aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-04 06:48:11 +0000
committerYang Tse <yangsita@gmail.com>2008-08-04 06:48:11 +0000
commitb4fdccf87a78d2de32e049e5926e921f002e5ac7 (patch)
treefddc3154a8a140d4f1a550845b12075167a1848d /acinclude.m4
parent8d012181b01aae80b46c90755a55126bc9731f7d (diff)
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. 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.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m429
1 files changed, 29 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e644670c2..4c54d5484 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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
])
+