changeset 12166:d943ffe46edc

use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/* * modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS. * modules/pipe-filter-ii: Likewise. * modules/sys_socket-tests: Likewise. * modules/tsearch-tests: Likewise. * Makefile (sc_prefer_ac_check_funcs_once): New rule. (check): Depend on it.
author Jim Meyering <meyering@redhat.com>
date Tue, 13 Oct 2009 09:15:52 +0200
parents c5a8a8e67e6f
children c314d472dca7
files ChangeLog Makefile modules/pipe-filter-gi modules/pipe-filter-ii modules/sys_socket-tests modules/tsearch-tests
diffstat 6 files changed, 20 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 12 10:42:35 2009 -0600
+++ b/ChangeLog	Tue Oct 13 09:15:52 2009 +0200
@@ -1,3 +1,13 @@
+2009-10-13  Jim Meyering  <meyering@redhat.com>
+
+	use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
+	* modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS.
+	* modules/pipe-filter-ii: Likewise.
+	* modules/sys_socket-tests: Likewise.
+	* modules/tsearch-tests: Likewise.
+	* Makefile (sc_prefer_ac_check_funcs_once): New rule.
+	(check): Depend on it.
+
 2009-10-12  Eric Blake  <ebb9@byu.net>
 
 	utimens-tests: port to NFS file systems
--- a/Makefile	Mon Oct 12 10:42:35 2009 -0600
+++ b/Makefile	Tue Oct 13 09:15:52 2009 +0200
@@ -13,7 +13,12 @@
 	cd doc && $(MAKE) $@ && $(MAKE) mostlyclean
 
 # Perform some platform independent checks on the gnulib code.
-check:
+check: sc_prefer_ac_check_funcs_once
+
+sc_prefer_ac_check_funcs_once:
+	git grep -w -l AC_CHECK_FUNCS modules && \
+	  { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/ 1>&2; \
+	    exit 1; } || :
 
 # Regenerate some files that are stored in the repository.
 regen: MODULES.html
--- a/modules/pipe-filter-gi	Mon Oct 12 10:42:35 2009 -0600
+++ b/modules/pipe-filter-gi	Tue Oct 13 09:15:52 2009 +0200
@@ -19,7 +19,7 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
-AC_CHECK_FUNCS([select])
+AC_CHECK_FUNCS_ONCE([select])
 
 Makefile.am:
 lib_SOURCES += pipe-filter-gi.c
--- a/modules/pipe-filter-ii	Mon Oct 12 10:42:35 2009 -0600
+++ b/modules/pipe-filter-ii	Tue Oct 13 09:15:52 2009 +0200
@@ -19,7 +19,7 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
-AC_CHECK_FUNCS([select])
+AC_CHECK_FUNCS_ONCE([select])
 
 Makefile.am:
 lib_SOURCES += pipe-filter-ii.c
--- a/modules/sys_socket-tests	Mon Oct 12 10:42:35 2009 -0600
+++ b/modules/sys_socket-tests	Tue Oct 13 09:15:52 2009 +0200
@@ -4,7 +4,7 @@
 Depends-on:
 
 configure.ac:
-AC_CHECK_FUNCS([shutdown])
+AC_CHECK_FUNCS_ONCE([shutdown])
 
 Makefile.am:
 TESTS += test-sys_socket
--- a/modules/tsearch-tests	Mon Oct 12 10:42:35 2009 -0600
+++ b/modules/tsearch-tests	Tue Oct 13 09:15:52 2009 +0200
@@ -15,7 +15,7 @@
    double x;],
   [x = log (x);], , [TEST_TSEARCH_LIBM=-lm])
 AC_SUBST([TEST_TSEARCH_LIBM])
-AC_CHECK_FUNCS([initstate])
+AC_CHECK_FUNCS_ONCE([initstate])
 
 Makefile.am:
 TESTS += test-tsearch.sh