]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace custom HAVE_SYSCTLBYNAME define with AC_CHECK_FUNCS call
authorOndřej Surý <ondrej@sury.org>
Wed, 5 Sep 2018 11:33:59 +0000 (13:33 +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 7b87198d04e6f564b576134cb78e41020dd7e85c..6cc24a4b3b173cf94b87fd3e219df18c601d1758 100644 (file)
@@ -17,9 +17,6 @@
  ***/
 @TOP@
 
-/** define if sysctlbyname() is available */
-#undef HAVE_SYSCTLBYNAME
-
 /** define if catgets() is available */
 #undef HAVE_CATGETS
 
index eeeea85bc6221c146320767ea495565d5c75da3e..d0a1eda1bdc1e364b3660d313540ef2bae633b86 100644 (file)
@@ -17,9 +17,6 @@
  *** it does not get installed.
  ***/
 
-/** define if sysctlbyname() is available */
-#undef HAVE_SYSCTLBYNAME
-
 /** define if catgets() is available */
 #undef HAVE_CATGETS
 
 /* Define to 1 if you have the `sysconf' function. */
 #undef HAVE_SYSCONF
 
+/* Define to 1 if you have the `sysctlbyname' function. */
+#undef HAVE_SYSCTLBYNAME
+
 /* Define to 1 if you have the <sys/capability.h> header file. */
 #undef HAVE_SYS_CAPABILITY_H
 
index 293ecfe419f771650c0699e4cba75b313198684d..8d87d716ee7dc6c31f2d6b01556fcc292103cc96 100755 (executable)
--- a/configure
+++ b/configure
@@ -13573,12 +13573,6 @@ if test $ac_cv_c_volatile = no; then
 
 $as_echo "#define volatile /**/" >>confdefs.h
 
-fi
-
-ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
-if test "x$ac_cv_func_sysctlbyname" = xyes; then :
-  $as_echo "#define HAVE_SYSCTLBYNAME 1" >>confdefs.h
-
 fi
 
 
@@ -13624,6 +13618,18 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
   fi
 
 
+for ac_func in sysctlbyname
+do :
+  ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
+if test "x$ac_cv_func_sysctlbyname" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYSCTLBYNAME 1
+_ACEOF
+
+fi
+done
+
+
 #
 # Check for the existence of mmap to enable the fast format zones
 #
index d4fe8ebc1d8539a8be04758f0cc49d5df7504f20..9a673fe0734237ee36a480fb5f2d194f1f0199fc 100644 (file)
@@ -458,9 +458,10 @@ AC_CHECK_HEADERS([threads.h],
 AC_C_CONST
 AC_C_INLINE
 AC_C_VOLATILE
-AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
 AC_C_FLEXIBLE_ARRAY_MEMBER
 
+AC_CHECK_FUNCS([sysctlbyname])
+
 #
 # Check for the existence of mmap to enable the fast format zones
 #