+1999-04-05 Ben Elliston <bje@cygnus.com>
+
+ * acspecific.m4 (AC_EMXOS2): New macro. Contributed by Ryuji Abe
+ <raeva@t3.rim.or.jp>.
+ (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 <bje@cygnus.com>
* standards.texi: Update from FSF.
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
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*
@set EDITION 2.14
@set VERSION 2.14
-@set UPDATED January 1999
+@set UPDATED April 1999
@iftex
@finalout
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
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
@set EDITION 2.14
@set VERSION 2.14
-@set UPDATED January 1999
+@set UPDATED April 1999
@iftex
@finalout
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
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
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
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*