]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Simplify the interface: users shouldn't need to explicitly check
authorAkim Demaille <akim@epita.fr>
Tue, 23 May 2000 14:47:33 +0000 (14:47 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 23 May 2000 14:47:33 +0000 (14:47 +0000)
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.

ChangeLog
acspecific.m4
doc/autoconf.texi
lib/autoconf/specific.m4

index f3d717ec57612e918c7dc8a82de4d6c54b585c63..c8af754c0b12419524b9c74b725a2d844f5f157e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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
index 0e1c93f17fb33c597da6911e8b3416b4242edcb8..91d84f56402cdb1d4147275367f248d0d412c260 100644 (file)
@@ -2492,16 +2492,13 @@ AC_SUBST(X_EXTRA_LIBS)dnl
 ## 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__
@@ -2510,34 +2507,41 @@ AC_DEFUN([AC_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
@@ -2547,9 +2551,9 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes])
 # 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
index 2c6c93436f2aa4e1a57be365e000b9fd4ccce3bf..3212c260e4bbaaec7aa9bec1ecf4693c91142a98 100644 (file)
@@ -4040,33 +4040,21 @@ The @code{AC_F77_FUNC_WRAPPER} macro uses the
 
 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
@@ -7713,6 +7701,13 @@ to print messages (@pxref{Printing Messages}).
 @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
@@ -7724,6 +7719,13 @@ If on Dynix/PTX (Sequent @sc{unix}), add @samp{-lseq} to output variable
 @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}
@@ -7886,6 +7888,13 @@ AC_CONFIG_LINKS(host.h:config/$machine.h
 @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}
index 0e1c93f17fb33c597da6911e8b3416b4242edcb8..91d84f56402cdb1d4147275367f248d0d412c260 100644 (file)
@@ -2492,16 +2492,13 @@ AC_SUBST(X_EXTRA_LIBS)dnl
 ## 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__
@@ -2510,34 +2507,41 @@ AC_DEFUN([AC_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
@@ -2547,9 +2551,9 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes])
 # 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