From 7384a9f23aa9decdbfcaaeb577b8130925a6588a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 5 Sep 2018 13:34:44 +0200 Subject: [PATCH] Replace custom HAVE_CATGETS define with AC_CHECK_FUNCS call --- acconfig.h | 3 --- config.h.in | 6 +++--- configure | 9 +++++++-- configure.in | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/acconfig.h b/acconfig.h index 6cc24a4b3b..43c2eace17 100644 --- a/acconfig.h +++ b/acconfig.h @@ -17,9 +17,6 @@ ***/ @TOP@ -/** define if catgets() is available */ -#undef HAVE_CATGETS - /** define if getifaddrs() exists */ #undef HAVE_GETIFADDRS diff --git a/config.h.in b/config.h.in index d0a1eda1bd..f50291852a 100644 --- a/config.h.in +++ b/config.h.in @@ -17,9 +17,6 @@ *** it does not get installed. ***/ -/** define if catgets() is available */ -#undef HAVE_CATGETS - /** define if getifaddrs() exists */ #undef HAVE_GETIFADDRS @@ -122,6 +119,9 @@ /* Define to 1 if the compiler supports __builtin_expect. */ #undef HAVE_BUILTIN_EXPECT +/* Define to 1 if you have the `catgets' function. */ +#undef HAVE_CATGETS + /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT diff --git a/configure b/configure index 8d87d716ee..193423fb7f 100755 --- a/configure +++ b/configure @@ -17071,11 +17071,16 @@ fi # # NLS # -ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets" +for ac_func in catgets +do : + ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets" if test "x$ac_cv_func_catgets" = xyes; then : - $as_echo "#define HAVE_CATGETS 1" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HAVE_CATGETS 1 +_ACEOF fi +done # diff --git a/configure.in b/configure.in index 9a673fe073..c6e1489964 100644 --- a/configure.in +++ b/configure.in @@ -1603,7 +1603,7 @@ AC_SUBST(MKDEPPROG) # # NLS # -AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),) +AC_CHECK_FUNCS([catgets]) # # -lxnet buys us one big porting headache... standards, gotta love 'em.