From 2c371a8609bdc8a3fa8410adf301c9fefe1daea4 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sun, 4 Apr 1999 20:32:09 +0000 Subject: [PATCH] 1999-04-05 Ben Elliston * acspecific.m4 (AC_EMXOS2): New macro. Contributed by Ryuji Abe . (AC_EXEEXT): Handle case for OS/2. * autoconf.texi (AC_EMXOS2): Document. (AC_EXEEXT): Mention OS/2. (AC_MINGW32): Move. (UPDATED): Update. --- ChangeLog | 11 +++++++++++ acspecific.m4 | 13 ++++++++++++- autoconf.texi | 24 +++++++++++++++--------- doc/autoconf.texi | 24 +++++++++++++++--------- lib/autoconf/specific.m4 | 13 ++++++++++++- 5 files changed, 65 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index e388686c..1df46aec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-04-05 Ben Elliston + + * acspecific.m4 (AC_EMXOS2): New macro. Contributed by Ryuji Abe + . + (AC_EXEEXT): Handle case for OS/2. + + * autoconf.texi (AC_EMXOS2): Document. + (AC_EXEEXT): Mention OS/2. + (AC_MINGW32): Move. + (UPDATED): Update. + 1999-04-01 Ben Elliston * standards.texi: Update from FSF. diff --git a/acspecific.m4 b/acspecific.m4 index 41e19c99..2890660f 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -2646,6 +2646,16 @@ rm -f conftest*]) MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes]) +dnl Check for EMX on OS/2. This is another way to set the right value +dnl for EXEEXT. +AC_DEFUN(AC_EMXOS2, +[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2, +[AC_TRY_COMPILE(,[return __EMX__;], +ac_cv_emxos2=yes, ac_cv_emxos2=no) +rm -f conftest*]) +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes]) + dnl Check for the extension used for executables. This knows that we dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test dnl executable. If this is called, the executable extensions will be @@ -2653,9 +2663,10 @@ dnl automatically used by link commands run by the configure script. AC_DEFUN(AC_EXEEXT, [AC_REQUIRE([AC_CYGWIN]) AC_REQUIRE([AC_MINGW32]) +AC_REQUIRE([AC_EMXOS2]) AC_MSG_CHECKING([for executable suffix]) AC_CACHE_VAL(ac_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then +[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* diff --git a/autoconf.texi b/autoconf.texi index 7b98ae4a..44e56605 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -8,7 +8,7 @@ @set EDITION 2.14 @set VERSION 2.14 -@set UPDATED January 1999 +@set UPDATED April 1999 @iftex @finalout @@ -2801,12 +2801,25 @@ Checks for the Cygwin environment. If present, sets shell variable to the empty string. @end defmac +@defmac AC_MINGW32 +@maindex MINGW32 +Checks for the MingW32 compiler environment. If present, sets shell +variable @code{MINGW32} to @samp{yes}. If not present, sets +@code{MINGW32} to the empty string. +@end defmac + +@defmac AC_EMXOS2 +@maindex EMXOS2 +Checks for the EMX environment on OS/2. If present, sets shell variable +@code{EMXOS2} to @samp{yes}. If not present. sets @code{EMXOS2} to the +empty string. + @defmac AC_EXEEXT @maindex EXEEXT @ovindex EXEEXT Defines substitute variable @code{EXEEXT} based on the output of the compiler, after .c, .o, and .obj files have been excluded. Typically -set to empty string if Unix, @samp{.exe} or @samp{.EXE} if Win32. +set to empty string if Unix and @samp{.exe} if Win32 or OS/2. @end defmac @defmac AC_OBJEXT @@ -2817,13 +2830,6 @@ compiler, after .c files have been excluded. Typically set to @samp{o} if Unix, @samp{obj} if Win32. @end defmac -@defmac AC_MINGW32 -@maindex MINGW32 -Checks for the MingW32 compiler environment. If present, sets shell -variable @code{MINGW32} to @samp{yes}. If not present, sets -@code{MINGW32} to the empty string. -@end defmac - @defmac AC_PATH_X @maindex PATH_X Try to locate the X Window System include files and libraries. If the diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7b98ae4a..44e56605 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8,7 +8,7 @@ @set EDITION 2.14 @set VERSION 2.14 -@set UPDATED January 1999 +@set UPDATED April 1999 @iftex @finalout @@ -2801,12 +2801,25 @@ Checks for the Cygwin environment. If present, sets shell variable to the empty string. @end defmac +@defmac AC_MINGW32 +@maindex MINGW32 +Checks for the MingW32 compiler environment. If present, sets shell +variable @code{MINGW32} to @samp{yes}. If not present, sets +@code{MINGW32} to the empty string. +@end defmac + +@defmac AC_EMXOS2 +@maindex EMXOS2 +Checks for the EMX environment on OS/2. If present, sets shell variable +@code{EMXOS2} to @samp{yes}. If not present. sets @code{EMXOS2} to the +empty string. + @defmac AC_EXEEXT @maindex EXEEXT @ovindex EXEEXT Defines substitute variable @code{EXEEXT} based on the output of the compiler, after .c, .o, and .obj files have been excluded. Typically -set to empty string if Unix, @samp{.exe} or @samp{.EXE} if Win32. +set to empty string if Unix and @samp{.exe} if Win32 or OS/2. @end defmac @defmac AC_OBJEXT @@ -2817,13 +2830,6 @@ compiler, after .c files have been excluded. Typically set to @samp{o} if Unix, @samp{obj} if Win32. @end defmac -@defmac AC_MINGW32 -@maindex MINGW32 -Checks for the MingW32 compiler environment. If present, sets shell -variable @code{MINGW32} to @samp{yes}. If not present, sets -@code{MINGW32} to the empty string. -@end defmac - @defmac AC_PATH_X @maindex PATH_X Try to locate the X Window System include files and libraries. If the diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 41e19c99..2890660f 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -2646,6 +2646,16 @@ rm -f conftest*]) MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes]) +dnl Check for EMX on OS/2. This is another way to set the right value +dnl for EXEEXT. +AC_DEFUN(AC_EMXOS2, +[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2, +[AC_TRY_COMPILE(,[return __EMX__;], +ac_cv_emxos2=yes, ac_cv_emxos2=no) +rm -f conftest*]) +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes]) + dnl Check for the extension used for executables. This knows that we dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test dnl executable. If this is called, the executable extensions will be @@ -2653,9 +2663,10 @@ dnl automatically used by link commands run by the configure script. AC_DEFUN(AC_EXEEXT, [AC_REQUIRE([AC_CYGWIN]) AC_REQUIRE([AC_MINGW32]) +AC_REQUIRE([AC_EMXOS2]) AC_MSG_CHECKING([for executable suffix]) AC_CACHE_VAL(ac_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then +[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest*