]> granicus.if.org Git - curl/commitdiff
Make sure that configure process tests are done with the same _REENTRANT
authorYang Tse <yangsita@gmail.com>
Tue, 22 Jul 2008 19:04:16 +0000 (19:04 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 22 Jul 2008 19:04:16 +0000 (19:04 +0000)
setting as the one actually used when finally building the library.

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

index e42de229d6c0cccd120a433f1910c378a5e13f7c..30b22b256549f603e7033c819042818f28e9b701 100644 (file)
@@ -110,6 +110,31 @@ CURL_DEF_TOKEN $1
 ])
 
 
+dnl CONFIGURE_WITH_REENTRANT
+dnl -------------------------------------------------
+dnl This macro ensures that configuration tests done
+dnl after this will execute with preprocessor symbol
+dnl _REENTRANT defined. This macro also ensures that
+dnl the generated config file will equally define it.
+
+AC_DEFUN([CONFIGURE_WITH_REENTRANT], [
+AC_BEFORE([$0], [AC_PREPROC_IFELSE])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_LINK_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AH_VERBATIM([_REENTRANT],
+[/* Define _REENTRANT if not already defined */
+@%:@ifndef _REENTRANT
+@%:@ define _REENTRANT
+@%:@endif])
+cat >>confdefs.h <<_ACEOF
+[@%:@ifndef _REENTRANT
+@%:@ define _REENTRANT
+@%:@endif]
+_ACEOF
+])
+
+
 dnl CURL_CHECK_HEADER_WINDOWS
 dnl -------------------------------------------------
 dnl Check for compilable and valid windows.h header 
index 9eb8d0c0745dc036fdcc1b7dbb8ba1b17b96734a..10de9271779b88934ece0712681261302c8df168 100644 (file)
@@ -88,6 +88,31 @@ CURL_DEF_TOKEN $1
 ])
 
 
+dnl CONFIGURE_WITH_REENTRANT
+dnl -------------------------------------------------
+dnl This macro ensures that configuration tests done
+dnl after this will execute with preprocessor symbol
+dnl _REENTRANT defined. This macro also ensures that
+dnl the generated config file will equally define it.
+
+AC_DEFUN([CONFIGURE_WITH_REENTRANT], [
+AC_BEFORE([$0], [AC_PREPROC_IFELSE])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_LINK_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AH_VERBATIM([_REENTRANT],
+[/* Define _REENTRANT if not already defined */
+@%:@ifndef _REENTRANT
+@%:@ define _REENTRANT
+@%:@endif])
+cat >>confdefs.h <<_ACEOF
+[@%:@ifndef _REENTRANT
+@%:@ define _REENTRANT
+@%:@endif]
+_ACEOF
+])
+
+
 dnl CURL_CHECK_HEADER_WINDOWS
 dnl -------------------------------------------------
 dnl Check for compilable and valid windows.h header 
index 66f44f45a7a708a10b003920f0bda3f7aabbbbf3..2266b14807ebb1ab7ac29a110089c3546d219731 100644 (file)
@@ -75,6 +75,9 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 
+dnl Our configure and build reentrant settings
+CONFIGURE_WITH_REENTRANT
+
 dnl check for how to do large files
 AC_SYS_LARGEFILE
 
index 25e747d953b92e22ab4d0fd45670fcac96f4e439..a2a1fe290e14d79224db8dce6a1ceee611e46578 100644 (file)
@@ -141,6 +141,9 @@ AC_AIX
 dnl Checks for programs.
 AC_PROG_CC
 
+dnl Our configure and build reentrant settings
+CONFIGURE_WITH_REENTRANT
+
 dnl check for how to do large files
 AC_SYS_LARGEFILE