changeset 22494:14c476bcdaee

Change a bunch of calls of AC_CHECK_HEADERS to AC_CHECK_HEADERS_ONCE. This makes our configure file 1000 lines smaller on my computer (it's still 39,404 lines). Basically if you're only using the first argument to AC_CHECK_HEADERS then you should use AC_CHECK_HEADERS_ONCE. I couldn't find info on when this was added to autoconf, but it looks like it's been there since 2.57. But if this causes large swaths of people to not be able to compile then we should revert it, or whatever the monotone term is for that. Revoke? See http://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Headers for the documentation.
author Mark Doliner <mark@kingant.net>
date Mon, 17 Mar 2008 06:14:38 +0000
parents 2c757739ee77
children 5c216e2c5405
files configure.ac
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Mar 17 06:09:32 2008 +0000
+++ b/configure.ac	Mon Mar 17 06:14:38 2008 +0000
@@ -166,7 +166,7 @@
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
+AC_CHECK_HEADERS_ONCE(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -1046,7 +1046,7 @@
 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
 
-AC_CHECK_HEADER(sys/utsname.h)
+AC_CHECK_HEADERS_ONCE(sys/utsname.h)
 AC_CHECK_FUNC(uname)
 
 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
@@ -1374,7 +1374,7 @@
 
 		oldCPPFLAGS="$CPPFLAGS"
 		CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
-		AC_CHECK_HEADERS(EXTERN.h)
+		AC_CHECK_HEADERS_ONCE(EXTERN.h)
 		AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
 		[#if HAVE_EXTERN_H
 		 # include <EXTERN.h>
@@ -2096,13 +2096,13 @@
 AC_MSG_RESULT(no)
 AC_CHECK_FUNCS(gethostid lrand48)
 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
-AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
-AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
-AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
-AC_CHECK_HEADERS(termios.h)
+AC_CHECK_HEADERS_ONCE(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
+AC_CHECK_HEADERS_ONCE(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
+AC_CHECK_HEADERS_ONCE(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
+AC_CHECK_HEADERS_ONCE(termios.h)
 
 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
-AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS_ONCE(sys/param.h)
 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
 	[[
 		#ifdef HAVE_PARAM_H
@@ -2110,7 +2110,7 @@
 		#endif
 	]])
 
-AC_CHECK_HEADERS(sys/socket.h)
+AC_CHECK_HEADERS_ONCE(sys/socket.h)
 AC_VAR_TIMEZONE_EXTERNALS
 
 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,