summaryrefslogtreecommitdiff
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
commit5c5e64b2f577e1d1455133e4bb155cc6f9a8f8ba (patch)
treec7df89e8dd43eedabebf4dbca331a68831c5bc11 /acinclude.m4
parentabf47388f96794523efc0b1520b7d31a9c11a5fe (diff)
downloadc-ares-5c5e64b2f577e1d1455133e4bb155cc6f9a8f8ba.tar.gz
c-ares-5c5e64b2f577e1d1455133e4bb155cc6f9a8f8ba.tar.bz2
c-ares-5c5e64b2f577e1d1455133e4bb155cc6f9a8f8ba.zip
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.m430
1 files changed, 29 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index bdea384..a8c867b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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