[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CYGWIN etc. (Was: AC_OBJEXT again)
From: |
Akim Demaille |
Subject: |
AC_CYGWIN etc. (Was: AC_OBJEXT again) |
Date: |
13 Dec 2000 16:54:30 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Here is my proposal.
Index: ChangeLog
from Akim Demaille <address@hidden>
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.
Index: acoldnames.m4
===================================================================
RCS file: /cvs/autoconf/acoldnames.m4,v
retrieving revision 1.14
diff -u -u -r1.14 acoldnames.m4
--- acoldnames.m4 2000/10/16 18:25:56 1.14
+++ acoldnames.m4 2000/12/13 13:20:29
@@ -77,6 +77,7 @@
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: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.323
diff -u -u -r1.323 acspecific.m4
--- acspecific.m4 2000/12/13 12:36:54 1.323
+++ acspecific.m4 2000/12/13 13:20:29
@@ -1138,55 +1138,50 @@
## ------------------------------------ ##
-
-# _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
-
+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
-# 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], [])
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.405
diff -u -u -r1.405 autoconf.texi
--- doc/autoconf.texi 2000/12/13 12:36:54 1.405
+++ doc/autoconf.texi 2000/12/13 13:20:47
@@ -4056,15 +4056,6 @@
the output of the compiler, typically to the empty string if Unix and
@samp{.exe} if Win32 or OS/2.
address@hidden FIXME:
address@hidden @ovindex CYGWIN
address@hidden @ovindex EMXOS2
address@hidden @ovindex MINGW32
address@hidden They also set the shell variable @code{CYGWIN} to @samp{yes} if
run in
address@hidden the Cygwin environment, @code{EMXOS2} to @samp{yes} if in the EMX
address@hidden environment on OS/2, and @code{MINGW32} to @samp{yes} with the
MingW32
address@hidden 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 @@
@defmac AC_CYGWIN
@maindex CYGWIN
-Checked for the Cygwin environment in which case the shell variable
address@hidden is set to @samp{yes}. @code{AC_EXEEXT} now handles this
-task.
+Check for the Cygwin environment in which case the shell variable
address@hidden is set to @samp{yes}. Don't use this macro, the dignified
+means to check the nature of the host is using
address@hidden As a matter of fact this macro is defined as:
+
address@hidden
+AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+case $host_os in
+ *cygwin* ) CYGWIN=yes;;
+ * ) CYGWIN=no;;
+esac
address@hidden example
@end defmac
@defmac AC_DECL_YYTEXT
@@ -8921,26 +8921,15 @@
@defmac AC_EXEEXT
@maindex EXEEXT
@ovindex EXEEXT
address@hidden CYGWIN
address@hidden EMXOS2
address@hidden 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
address@hidden 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 @@
@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 @@
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: tests/mktests.sh
===================================================================
RCS file: /cvs/autoconf/tests/mktests.sh,v
retrieving revision 1.12
diff -u -u -r1.12 mktests.sh
--- tests/mktests.sh 2000/12/07 15:21:55 1.12
+++ tests/mktests.sh 2000/12/13 13:20:47
@@ -170,9 +170,12 @@
# 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: tests/update.at
===================================================================
RCS file: /cvs/autoconf/tests/update.at,v
retrieving revision 1.3
diff -u -u -r1.3 update.at
--- tests/update.at 2000/11/29 14:58:44 1.3
+++ tests/update.at 2000/12/13 13:20:47
@@ -6,12 +6,9 @@
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_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])
- AC_CYGWIN etc. (Was: AC_OBJEXT again),
Akim Demaille <=