]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace custom HAVE_SYSCONF with proper AC_CHECK_FUNCS call
authorOndřej Surý <ondrej@sury.org>
Wed, 5 Sep 2018 11:29:28 +0000 (13:29 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 7 Sep 2018 10:17:40 +0000 (12:17 +0200)
acconfig.h
config.h.in
configure
configure.in

index 43a2e90993324f008093d207684c1f25436ae2ec..2ab1a827cdea126173e18fa142e1769ef9d2610f 100644 (file)
@@ -20,9 +20,6 @@
 /** define if your system has sigwait() */
 #undef HAVE_SIGWAIT
 
-/** define if sysconf() is available */
-#undef HAVE_SYSCONF
-
 /** define if sysctlbyname() is available */
 #undef HAVE_SYSCTLBYNAME
 
index f2ad6c379ef9076074cadcf35cd54c41dd03e4c2..3cc00140c023cd01644f93cb87096789cf70e830 100644 (file)
@@ -20,9 +20,6 @@
 /** define if your system has sigwait() */
 #undef HAVE_SIGWAIT
 
-/** define if sysconf() is available */
-#undef HAVE_SYSCONF
-
 /** define if sysctlbyname() is available */
 #undef HAVE_SYSCTLBYNAME
 
 /* Define to 1 if you have the `strlcpy' function. */
 #undef HAVE_STRLCPY
 
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
 /* Define to 1 if you have the <sys/capability.h> header file. */
 #undef HAVE_SYS_CAPABILITY_H
 
index dda2137af9f67291806d02df3d07529f237e4598..701d58e2261511e0eef0868f7339db852e2b3723 100755 (executable)
--- a/configure
+++ b/configure
@@ -15358,11 +15358,16 @@ done
 #
 # Look for sysconf to allow detection of the number of processors.
 #
-ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+for ac_func in sysconf
+do :
+  ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
 if test "x$ac_cv_func_sysconf" = xyes; then :
-  $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYSCONF 1
+_ACEOF
 
 fi
+done
 
 
 
index ce82ce1dc0ac61e7e53be3554b4aec97e8fa9fb0..fd135f7436fc28f4351cbeaa9356d1357911b8cb 100644 (file)
@@ -761,7 +761,7 @@ AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
 #
 # Look for sysconf to allow detection of the number of processors.
 #
-AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
+AC_CHECK_FUNCS([sysconf])
 
 AC_SUBST(ALWAYS_DEFINES)