From: Ondřej Surý Date: Wed, 5 Sep 2018 11:33:59 +0000 (+0200) Subject: Replace custom HAVE_SYSCTLBYNAME define with AC_CHECK_FUNCS call X-Git-Tag: v9.13.4~157^2~16 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=78bb5761a0f1630fc17228b68e19bb664d25d6ce;p=thirdparty%2Fbind9.git Replace custom HAVE_SYSCTLBYNAME define with AC_CHECK_FUNCS call --- diff --git a/acconfig.h b/acconfig.h index 7b87198d04e..6cc24a4b3b1 100644 --- a/acconfig.h +++ b/acconfig.h @@ -17,9 +17,6 @@ ***/ @TOP@ -/** define if sysctlbyname() is available */ -#undef HAVE_SYSCTLBYNAME - /** define if catgets() is available */ #undef HAVE_CATGETS diff --git a/config.h.in b/config.h.in index eeeea85bc62..d0a1eda1bdc 100644 --- a/config.h.in +++ b/config.h.in @@ -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 @@ -410,6 +407,9 @@ /* 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 header file. */ #undef HAVE_SYS_CAPABILITY_H diff --git a/configure b/configure index 293ecfe419f..8d87d716ee7 100755 --- 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 # diff --git a/configure.in b/configure.in index d4fe8ebc1d8..9a673fe0734 100644 --- a/configure.in +++ b/configure.in @@ -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 #