]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Put back AC_CYGWIN etc. under the responsibility of the
authorAkim Demaille <akim@epita.fr>
Thu, 14 Dec 2000 09:39:33 +0000 (09:39 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 14 Dec 2000 09:39:33 +0000 (09:39 +0000)
configure.in maintainer, but discourage its use.
* acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as...
(AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these.
AU defined on top of AC_CANONICAL_HOST and $host_os.
* tests/mktests.sh (update_exclude_list): Add AC_CYGWIN,
AC_MINGW32, and AC_EMXOS2.

ChangeLog
acoldnames.m4
acspecific.m4
doc/autoconf.texi
lib/autoconf/oldnames.m4
lib/autoconf/specific.m4
tests/mktests.sh
tests/update.at

index 77d0d8207f2f1adc5ba64271b4b0dd968c9705bc..5866cf258a8ccbbbf903ad9d0c648bef0d8d3fcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-12-14  Akim Demaille  <akim@epita.fr>
+
+       Put back AC_CYGWIN etc. under the responsibility of the
+       configure.in maintainer, but discourage its use.
+
+       * acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as...
+       (AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these.
+       AU defined on top of AC_CANONICAL_HOST and $host_os.
+       * tests/mktests.sh (update_exclude_list): Add AC_CYGWIN,
+       AC_MINGW32, and AC_EMXOS2.
+
 2000-12-13  Pavel Roskin  <proski@gnu.org>
 
        * m4sugar.m4 (m4_file_append): Add a newline after _m4eof,
index bf055367a913002ddf93896a777fd19ca203c54d..c8e9993be8c63ebf0e9ff21998bc2050829185a1 100644 (file)
@@ -77,6 +77,7 @@ AU_ALIAS([AC_UID_T],          [AC_TYPE_UID_T])
 AU_ALIAS([AC_WORDS_BIGENDIAN], [AC_C_BIGENDIAN])
 AU_ALIAS([AC_YYTEXT_POINTER],  [AC_DECL_YYTEXT])
 AU_ALIAS([AM_CYGWIN32],                [AC_CYGWIN32])
+AU_ALIAS([AC_CYGWIN32],         [AC_CYGWIN])
 AU_ALIAS([AM_EXEEXT],          [AC_EXEEXT])
 # We cannot do this, because in libtool.m4 yet they provide
 # this update.  Some solution is needed.
index 55ce13a76ecb02f4f8202ec49e9afa07279af7e0..2899554cd483b365792bfa179852eb11828b3a52 100644 (file)
@@ -1138,55 +1138,50 @@ AC_SUBST(X_EXTRA_LIBS)dnl
 ## ------------------------------------ ##
 
 
-
-# _AC_CYGWIN
-# ----------
+# AC_CYGWIN
+# ---------
 # Check for Cygwin.  This is a way to set the right value for
 # EXEEXT.
-m4_define([_AC_CYGWIN],
-[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[#ifndef __CYGWIN__
-# define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;])],
-                   [ac_cv_cygwin=yes],
-                   [ac_cv_cygwin=no])])
-test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl
-])# _AC_CYGWIN
+AU_DEFUN([AC_CYGWIN],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+         * ) CYGWIN=no;;
+esac
+])# AC_CYGWIN
 
 
-# _AC_EMXOS2
-# ----------
+# AC_EMXOS2
+# ---------
 # Check for EMX on OS/2.  This is another way to set the right value
 # for EXEEXT.
-m4_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
+AU_DEFUN([AC_EMXOS2],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *emx* ) EMXOS2=yes;;
+      * ) EMXOS2=no;;
+esac
+])# AC_EMXOS2
 
 
-# _AC_MINGW32
-# -----------
+# AC_MINGW32
+# ----------
 # Check for mingw32.  This is another way to set the right value for
 # EXEEXT.
-m4_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])])
-test "$ac_cv_mingw32" = yes && MINGW32=yes[]dnl
-])# _AC_MINGW32
-
-
-# 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_MINGW32],  [])
+AU_DEFUN([AC_MINGW32],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *mingw32* ) MINGW32=yes;;
+          * ) MINGW32=no;;
+esac
+])# AC_MINGW32
+
 
 
 
index 8b138410a9875a5c2ab120c9a80b27d12d01aa36..c33938aac717d7f610873a729a5d3cc16e9ad705 100644 (file)
@@ -4056,15 +4056,6 @@ All the tests for compilers (@code{AC_PROG_CC}, @code{AC_PROG_CXX},
 the output of the compiler, typically to the empty string if Unix and
 @samp{.exe} if Win32 or OS/2.
 
-@c FIXME:
-@c @ovindex CYGWIN
-@c @ovindex EMXOS2
-@c @ovindex MINGW32
-@c They also set the shell variable @code{CYGWIN} to @samp{yes} if run in
-@c the Cygwin environment, @code{EMXOS2} to @samp{yes} if in the EMX
-@c environment on OS/2, and @code{MINGW32} to @samp{yes} with the MingW32
-@c compiler.
-
 @ovindex OBJEXT
 They also define the output variable @code{OBJEXT} based on the
 output of the compiler, after .c files have been excluded, typically
@@ -8876,9 +8867,18 @@ Same as @code{AC_C_CROSS}, which is obsolete too, and does nothing
 
 @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.
+Check for the Cygwin environment in which case the shell variable
+@code{CYGWIN} is set to @samp{yes}.  Don't use this macro, the dignified
+means to check the nature of the host is using
+@code{AC_CANONICAL_HOST}.  As a matter of fact this macro is defined as:
+
+@example
+AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+         * ) CYGWIN=no;;
+esac
+@end example
 @end defmac
 
 @defmac AC_DECL_YYTEXT
@@ -8921,26 +8921,15 @@ now it is just @code{AC_FUNC_GETMNTENT}.
 @defmac AC_EXEEXT
 @maindex EXEEXT
 @ovindex EXEEXT
-@ovindex CYGWIN
-@ovindex EMXOS2
-@ovindex MINGW32
 Defined the output variable @code{EXEEXT} based on the output of the
-compiler.  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.
-
-Now handled by the macros checking for the compiler.
+compiler, which is now done automatically.  Typically set to empty
+string if Unix and @samp{.exe} if Win32 or OS/2.
 @end defmac
 
 @defmac AC_EMXOS2
 @maindex EMXOS2
-Checks for the EMX environment on OS/2 in which case the shell variable
-@code{EMXOS2} is set to @samp{yes}.  @code{AC_EXEEXT} now handles this
-task.
+Similar to @code{AC_CYGWIN} but checks for the EMX environment on OS/2
+and sets @code{EMXOS2}.
 @end defmac
 
 @defmac AC_ERROR
@@ -9142,9 +9131,8 @@ Symbols}.
 
 @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.
+Similar to @code{AC_CYGWIN} but checks for the MingW32 compiler
+environment and sets @code{MINGW32}.
 @end defmac
 
 @defmac AC_MINUS_C_MINUS_O
@@ -9168,7 +9156,7 @@ handles this task.
 Defined the output variable @code{OBJEXT} based on the output of the
 compiler, after .c files have been excluded.  Typically set to @samp{o}
 if Unix, @samp{obj} if Win32.  Now the compiler checking macros handle
-this.
+this automatically.
 @end defmac
 
 @defmac AC_OBSOLETE (@var{this-macro-name}, @ovar{suggestion})
index bf055367a913002ddf93896a777fd19ca203c54d..c8e9993be8c63ebf0e9ff21998bc2050829185a1 100644 (file)
@@ -77,6 +77,7 @@ AU_ALIAS([AC_UID_T],          [AC_TYPE_UID_T])
 AU_ALIAS([AC_WORDS_BIGENDIAN], [AC_C_BIGENDIAN])
 AU_ALIAS([AC_YYTEXT_POINTER],  [AC_DECL_YYTEXT])
 AU_ALIAS([AM_CYGWIN32],                [AC_CYGWIN32])
+AU_ALIAS([AC_CYGWIN32],         [AC_CYGWIN])
 AU_ALIAS([AM_EXEEXT],          [AC_EXEEXT])
 # We cannot do this, because in libtool.m4 yet they provide
 # this update.  Some solution is needed.
index 55ce13a76ecb02f4f8202ec49e9afa07279af7e0..2899554cd483b365792bfa179852eb11828b3a52 100644 (file)
@@ -1138,55 +1138,50 @@ AC_SUBST(X_EXTRA_LIBS)dnl
 ## ------------------------------------ ##
 
 
-
-# _AC_CYGWIN
-# ----------
+# AC_CYGWIN
+# ---------
 # Check for Cygwin.  This is a way to set the right value for
 # EXEEXT.
-m4_define([_AC_CYGWIN],
-[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[#ifndef __CYGWIN__
-# define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;])],
-                   [ac_cv_cygwin=yes],
-                   [ac_cv_cygwin=no])])
-test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl
-])# _AC_CYGWIN
+AU_DEFUN([AC_CYGWIN],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+         * ) CYGWIN=no;;
+esac
+])# AC_CYGWIN
 
 
-# _AC_EMXOS2
-# ----------
+# AC_EMXOS2
+# ---------
 # Check for EMX on OS/2.  This is another way to set the right value
 # for EXEEXT.
-m4_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
+AU_DEFUN([AC_EMXOS2],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *emx* ) EMXOS2=yes;;
+      * ) EMXOS2=no;;
+esac
+])# AC_EMXOS2
 
 
-# _AC_MINGW32
-# -----------
+# AC_MINGW32
+# ----------
 # Check for mingw32.  This is another way to set the right value for
 # EXEEXT.
-m4_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])])
-test "$ac_cv_mingw32" = yes && MINGW32=yes[]dnl
-])# _AC_MINGW32
-
-
-# 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_MINGW32],  [])
+AU_DEFUN([AC_MINGW32],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DIAGNOSE([obsolete],
+            [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl
+case $host_os in
+  *mingw32* ) MINGW32=yes;;
+          * ) MINGW32=no;;
+esac
+])# AC_MINGW32
+
 
 
 
index ede185d054bf2145db8fcb5d7d3218f29e91a142..e980cb2e936463403030945b62ce3fc9aea03e71 100755 (executable)
@@ -171,9 +171,12 @@ mv syntax.tat syntax.at
 #    need arguments and are tested elsewhere.
 # AC_INIT and AC_OUTPUT
 #    are already in `configure.in'.
+# AC_CYGWIN, AC_MINGW32, AC_EMXOS2
+#    are using AC_REQUIRE.
 update_exclude_list='^AC_LANG_RESTORE$
 ^AC_LINK_FILES|AC_PREREQ$
-^AC_(INIT|OUTPUT)$'
+^AC_(INIT|OUTPUT)$
+^AC_(CYGWIN|MINGW32|EMXOS2)$'
 
 # syntax_exclude_egrep --
 # Build a single egrep pattern out of filter_macros_list.
index a5be8330cbf7bb51577426b0e2c219b1de56e6e1..3132c071edc8e1dc635adfcba8cc7cb96b60c7a0 100644 (file)
@@ -6,12 +6,9 @@ AT_CHECK_UPDATE([AC_ARG_ARRAY])
 AT_CHECK_UPDATE([AC_CHECKING])
 AT_CHECK_UPDATE([AC_CHECK_TOOL_PREFIX])
 AT_CHECK_UPDATE([AC_COMPILE_CHECK])
-AT_CHECK_UPDATE([AC_CYGWIN])
-AT_CHECK_UPDATE([AC_CYGWIN32])
 AT_CHECK_UPDATE([AC_DECL_YYTEXT])
 AT_CHECK_UPDATE([AC_DIR_HEADER])
 AT_CHECK_UPDATE([AC_DYNIX_SEQ])
-AT_CHECK_UPDATE([AC_EMXOS2])
 AT_CHECK_UPDATE([AC_ENABLE])
 AT_CHECK_UPDATE([AC_F77_NAME_MANGLING])
 AT_CHECK_UPDATE([AC_HAVE_LIBRARY])
@@ -24,7 +21,6 @@ AT_CHECK_UPDATE([AC_LANG_FORTRAN77])
 AT_CHECK_UPDATE([AC_LANG_SAVE])
 AT_CHECK_UPDATE([AC_LONG_64_BITS])
 AT_CHECK_UPDATE([AC_MEMORY_H])
-AT_CHECK_UPDATE([AC_MINGW32])
 AT_CHECK_UPDATE([AC_OUTPUT_COMMANDS])
 AT_CHECK_UPDATE([AC_RSH])
 AT_CHECK_UPDATE([AC_SCO_INTL])