pidgin: 33bd2430: Change a bunch of calls of AC_CHECK_HEAD...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Mar 17 02:20:42 EDT 2008


-----------------------------------------------------------------
Revision: 33bd2430510196431b931ccb1fa0b55777482dd0
Ancestor: b47050c07cd8a73aca7a3a9ceb7793febe0d81ac
Author: markdoliner at pidgin.im
Date: 2008-03-17T06:14:38
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/33bd2430510196431b931ccb1fa0b55777482dd0

Modified files:
        configure.ac

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- configure.ac	4c576bfea37797f072ca90160c2ccaebbe7c04d4
+++ configure.ac	74b3e3bf7ee65abb422256d51d9a6c0177f53386
@@ -166,7 +166,7 @@ AC_HEADER_SYS_WAIT
 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 @@ AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test 
 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 @@ if test "$enable_perl" = yes ; then
 
 		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_CHECK_FUNCS(memcpy memmove random str
 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 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [],
 		#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,


More information about the Commits mailing list