]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
authorYang Tse <yangsita@gmail.com>
Mon, 4 Aug 2008 06:48:11 +0000 (06:48 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 4 Aug 2008 06:48:11 +0000 (06:48 +0000)
Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. But,
autoconf 2.62 version of AC_AIX defines _ALL_SOURCE along with other four
preprocessor symbols no matter if the system is AIX or not. To keep the
traditional behaviour, as well as an uniform one, across autoconf versions
AC_AIX is replaced with our own internal macro.

CHANGES
acinclude.m4
ares/CHANGES
ares/acinclude.m4
ares/configure.ac
configure.ac

diff --git a/CHANGES b/CHANGES
index 92ce699e465480e5d7ddb4f34e789bf70959c353..5cba3dc8e9565926408610f92422744c91ae69a9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,14 @@
 
                                   Changelog
 
+Yang Tse (4 Aug 2008)
+- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
+  Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
+  version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
+  no matter if the system is AIX or not. To keep the traditional behaviour,
+  and an uniform one across autoconf versions AC_AIX is replaced with our
+  own internal macro CURL_CHECK_AIX_ALL_SOURCE.
+
 
 Daniel Stenberg (4 Aug 2008)
 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
index e644670c279ff5a2055f2f63d8326fb93cc7eac7..4c54d5484c4133a7eb8d5b201d358d11c0ea91c3 100644 (file)
@@ -116,6 +116,34 @@ CURL_DEF_TOKEN $1
 ])
 
 
+dnl CURL_CHECK_AIX_ALL_SOURCE
+dnl -------------------------------------------------
+dnl Provides a replacement of traditional AC_AIX with
+dnl an uniform behaviour across all autoconf versions,
+dnl and with our own placement rules.
+
+AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [
+  AH_VERBATIM([_ALL_SOURCE],
+    [/* Define to 1 if OS is AIX. */
+#ifndef _ALL_SOURCE
+#  undef _ALL_SOURCE
+#endif])
+  AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
+  AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl
+  AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
+  AC_EGREP_CPP([yes_this_is_aix],[
+#ifdef _AIX
+   yes_this_is_aix
+#endif
+  ],[
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(_ALL_SOURCE)
+  ],[
+    AC_MSG_RESULT([no])
+  ])
+])
+
+
 dnl CURL_CHECK_HEADER_WINDOWS
 dnl -------------------------------------------------
 dnl Check for compilable and valid windows.h header 
@@ -3504,3 +3532,4 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
   fi
 ])
 
+
index d727f4ba205466da88024e9d0a98f678cf0ba55f..d238972161916af90676293d6ae915943544aaf9 100644 (file)
@@ -1,6 +1,14 @@
   Changelog for the c-ares project
 
-* Aug 01 2008 (Yang Tse)
+* Aug 4 2008 (Yang Tse)
+- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
+  Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
+  version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
+  no matter if the system is AIX or not. To keep the traditional behaviour,
+  and an uniform one across autoconf versions AC_AIX is replaced with our
+  own internal macro CARES_CHECK_AIX_ALL_SOURCE.
+
+* Aug 1 2008 (Yang Tse)
 - Configure process now checks if the preprocessor _REENTRANT symbol is already
   defined. If it isn't currently defined a set of checks are performed to test
   if its definition is required to make visible to the compiler a set of *_r
index bdea38447a755d584f006428c4486e0d1ed0e25b..a8c867b79a47801386a63fb54ad41f065d65230d 100644 (file)
@@ -47,7 +47,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
 ])
 
 
-dnl CURL_CHECK_DEF(SYMBOL, [INCLUDES], [SILENT])
+dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
 dnl -------------------------------------------------
 dnl Use the C preprocessor to find out if the given object-style symbol
 dnl is defined and get its expansion. This macro will not use default
@@ -94,6 +94,34 @@ CURL_DEF_TOKEN $1
 ])
 
 
+dnl CARES_CHECK_AIX_ALL_SOURCE
+dnl -------------------------------------------------
+dnl Provides a replacement of traditional AC_AIX with
+dnl an uniform behaviour across all autoconf versions,
+dnl and with our own placement rules.
+
+AC_DEFUN([CARES_CHECK_AIX_ALL_SOURCE], [
+  AH_VERBATIM([_ALL_SOURCE],
+    [/* Define to 1 if OS is AIX. */
+#ifndef _ALL_SOURCE
+#  undef _ALL_SOURCE
+#endif])
+  AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
+  AC_BEFORE([$0], [CARES_CONFIGURE_REENTRANT])dnl
+  AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
+  AC_EGREP_CPP([yes_this_is_aix],[
+#ifdef _AIX
+   yes_this_is_aix
+#endif
+  ],[
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(_ALL_SOURCE)
+  ],[
+    AC_MSG_RESULT([no])
+  ])
+])
+
+
 dnl CURL_CHECK_HEADER_WINDOWS
 dnl -------------------------------------------------
 dnl Check for compilable and valid windows.h header 
index f31896cceedb1b0191a0ccaeda4e24ac210cde00..8ba64e7e004af92f54daaef2bee891e33a78e6b1 100644 (file)
@@ -64,11 +64,13 @@ AC_CANONICAL_HOST
 dnl Get system canonical name
 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
 
-AC_AIX
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 
+dnl This defines _ALL_SOURCE for AIX
+CARES_CHECK_AIX_ALL_SOURCE
+
 dnl Our configure and build reentrant settings
 CARES_CONFIGURE_REENTRANT
 
index 2cd527d9e74dba886e6f1722d75d4f074801e441..f810ccce3cc7660c8fd863c70c03c0fa15de72e7 100644 (file)
@@ -129,12 +129,12 @@ AC_CANONICAL_HOST
 dnl Get system canonical name
 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
 
-dnl Check for AIX weirdos
-AC_AIX
-
 dnl Checks for programs.
 AC_PROG_CC
 
+dnl This defines _ALL_SOURCE for AIX
+CURL_CHECK_AIX_ALL_SOURCE
+
 dnl Our configure and build reentrant settings
 CURL_CONFIGURE_REENTRANT