for special environments.
* acspecific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): AU defined to
nothing. Replace them by...
(_AC_CYGWIN, _AC_EMXOS2, _AC_MINGW32): these, which are
automatically called by...
(AC_EXEEXT): this.
* doc/autoconf.texi (System Services, Obsolete Macros): Adjust.
+2000-05-23 Akim Demaille <akim@epita.fr>
+
+ Simplify the interface: users shouldn't need to explicitly check
+ for special environments.
+
+ * acspecific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): AU defined to
+ nothing. Replace them by...
+ (_AC_CYGWIN, _AC_EMXOS2, _AC_MINGW32): these, which are
+ automatically called by...
+ (AC_EXEEXT): this.
+ * doc/autoconf.texi (System Services, Obsolete Macros): Adjust.
+
2000-05-23 Akim Demaille <akim@epita.fr>
AC_PROG_GNU_M4 should actually be private to the package
## Checks for not-quite-Unix variants. ##
## ------------------------------------ ##
-# The old Cygwin32 macro is deprecated.
-AU_DEFUN([AC_CYGWIN32],
-[AC_CYGWIN])
-# AC_CYGWIN
-# ---------
+# _AC_CYGWIN
+# ----------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-AC_DEFUN([AC_CYGWIN],
+define([_AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
return __CYGWIN__;])],
[ac_cv_cygwin=yes],
[ac_cv_cygwin=no])])
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes])
+test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl
+])# _AC_CYGWIN
-# AC_MINGW32
+# _AC_EMXOS2
# ----------
+# Check for EMX on OS/2. This is another way to set the right value
+# for EXEEXT.
+define([_AC_EMXOS2],
+[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
+ [ac_cv_emxos2=yes],
+ [ac_cv_emxos2=no])])
+test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl
+])# _AC_EMXOS2
+
+
+# _AC_MINGW32
+# -----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-AC_DEFUN([AC_MINGW32],
+define([_AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=yes],
[ac_cv_mingw32=no])])
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes])
+test "$ac_cv_mingw32" = yes && MINGW32=yes[]dnl
+])# _AC_MINGW32
-# AC_EMXOS2
-# ---------
-# Check for EMX on OS/2. This is another way to set the right value
-# for EXEEXT.
-AC_DEFUN([AC_EMXOS2],
-[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
- [ac_cv_emxos2=yes],
- [ac_cv_emxos2=no])])
-EMXOS2=
-test "$ac_cv_emxos2" = yes && EMXOS2=yes])
+# The user is no longer supposed to call these macros.
+AU_DEFUN([AC_CYGWIN], [])
+AU_DEFUN([AC_CYGWIN32], [])
+AU_DEFUN([AC_EMXOS2], [])
+AU_DEFUN([AC_MING32], [])
# AC_EXEEXT
# executable. If this is called, the executable extensions will be
# automatically used by link commands run by the configure script.
AC_DEFUN([AC_EXEEXT],
-[AC_REQUIRE([AC_CYGWIN])dnl
-AC_REQUIRE([AC_MINGW32])dnl
-AC_REQUIRE([AC_EMXOS2])dnl
+[_AC_CYGWIN
+_AC_MINGW32
+_AC_EMXOS2
AC_MSG_CHECKING([for executable suffix])
AC_CACHE_VAL(ac_cv_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
The following macros check for operating system services or capabilities.
-@defmac AC_CYGWIN
-@maindex CYGWIN
-Checks for the Cygwin environment. If present, sets shell variable
-@code{CYGWIN} to @samp{yes}. If not present, sets @code{CYGWIN}
-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.
-@end defmac
-
@defmac AC_EXEEXT
@maindex EXEEXT
@ovindex EXEEXT
+@maindex CYGWIN
+@maindex EMXOS2
+@maindex MINGW32
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 and @samp{.exe} if Win32 or OS/2.
+compiler, after @samp{.c}, @samp{.C}, @samp{.o}, @samp{.obj} and
+@samp{.xcoff} files have been excluded. Typically set to empty string
+if Unix and @samp{.exe} if Win32 or OS/2.
+
+This macro sets the shell variable @code{CYGWIN} to @samp{yes} if run in
+the Cygwin environment, @code{EMXOS2} to @samp{yes} if in the EMX
+environment on OS/2, and @code{MINGW32} to @samp{yes} with the MingW32
+compiler.
@end defmac
@defmac AC_OBJEXT
@code{AC_C_CROSS}
@end defmac
+@defmac AC_CYGWIN
+@maindex CYGWIN
+Checked for the Cygwin environment in which case the shell variable
+@code{CYGWIN} is set to @samp{yes}. @code{AC_EXEEXT} now handles this
+task.
+@end defmac
+
@defmac AC_DECL_YYTEXT
Does nothing, now integrated in @code{AC_PROG_LEX}.
@end defmac
@code{AC_FUNC_GETMNTENT}.
@end defmac
+@defmac AC_EMXOS2
+@maindex EMXOS2
+Checks for the EMX environment on OS/2in which case the shell variable
+@code{EMXOS2} is set to @samp{yes}. @code{AC_EXEEXT} now handles this
+task.
+@end defmac
+
@defmac AC_ERROR
@maindex ERROR
@code{AC_MSG_ERROR}
@code{AC_HEADER_MAJOR}
@end defmac
+@defmac AC_MINGW32
+@maindex MINGW32
+Checked for the MingW32 compiler environment, in which case the shell
+variable @code{MINGW32} is set to @samp{yes}. @code{AC_EXEEXT} now
+handles this task.
+@end defmac
+
@defmac AC_MINUS_C_MINUS_O
@maindex MINUS_C_MINUS_O
@code{AC_PROG_CC_C_O}
## Checks for not-quite-Unix variants. ##
## ------------------------------------ ##
-# The old Cygwin32 macro is deprecated.
-AU_DEFUN([AC_CYGWIN32],
-[AC_CYGWIN])
-# AC_CYGWIN
-# ---------
+# _AC_CYGWIN
+# ----------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-AC_DEFUN([AC_CYGWIN],
+define([_AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
return __CYGWIN__;])],
[ac_cv_cygwin=yes],
[ac_cv_cygwin=no])])
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes])
+test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl
+])# _AC_CYGWIN
-# AC_MINGW32
+# _AC_EMXOS2
# ----------
+# Check for EMX on OS/2. This is another way to set the right value
+# for EXEEXT.
+define([_AC_EMXOS2],
+[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
+ [ac_cv_emxos2=yes],
+ [ac_cv_emxos2=no])])
+test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl
+])# _AC_EMXOS2
+
+
+# _AC_MINGW32
+# -----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-AC_DEFUN([AC_MINGW32],
+define([_AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=yes],
[ac_cv_mingw32=no])])
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes])
+test "$ac_cv_mingw32" = yes && MINGW32=yes[]dnl
+])# _AC_MINGW32
-# AC_EMXOS2
-# ---------
-# Check for EMX on OS/2. This is another way to set the right value
-# for EXEEXT.
-AC_DEFUN([AC_EMXOS2],
-[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
- [ac_cv_emxos2=yes],
- [ac_cv_emxos2=no])])
-EMXOS2=
-test "$ac_cv_emxos2" = yes && EMXOS2=yes])
+# The user is no longer supposed to call these macros.
+AU_DEFUN([AC_CYGWIN], [])
+AU_DEFUN([AC_CYGWIN32], [])
+AU_DEFUN([AC_EMXOS2], [])
+AU_DEFUN([AC_MING32], [])
# AC_EXEEXT
# executable. If this is called, the executable extensions will be
# automatically used by link commands run by the configure script.
AC_DEFUN([AC_EXEEXT],
-[AC_REQUIRE([AC_CYGWIN])dnl
-AC_REQUIRE([AC_MINGW32])dnl
-AC_REQUIRE([AC_EMXOS2])dnl
+[_AC_CYGWIN
+_AC_MINGW32
+_AC_EMXOS2
AC_MSG_CHECKING([for executable suffix])
AC_CACHE_VAL(ac_cv_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then