From 96b4e4369d48a828bd2de4bf76c78c64a15f571e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 21 Jun 2023 07:36:46 +0100 Subject: [PATCH 3/4] Replace obsolete macros AC_HELP_STRING and AC_TRY_LINK, from Aaron Ji. --- configure.ac | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index e356e9c..4b1d6fe 100644 --- a/configure.ac +++ b/configure.ac @@ -24,14 +24,14 @@ test "$localstatedir" = '${prefix}/var' && localstatedir=/var AC_ARG_ENABLE( debug, - AC_HELP_STRING(--enable-debug, create a debug build), + AS_HELP_STRING(--enable-debug, create a debug build), found_debug=$enable_debug ) AM_CONDITIONAL(IS_DEBUG, test "x$found_debug" = xyes) AC_ARG_ENABLE( static, - AC_HELP_STRING(--enable-static, create a static build), + AS_HELP_STRING(--enable-static, create a static build), found_static=$enable_static ) if test "x$found_static" = xyes; then @@ -40,7 +40,7 @@ fi AC_ARG_ENABLE( pcre2, - AC_HELP_STRING(--enable-pcre2, use PCRE2), + AS_HELP_STRING(--enable-pcre2, use PCRE2), found_pcre2=$enable_pcre2 ) if test "x$found_pcre2" = xyes; then @@ -143,13 +143,15 @@ fi AM_CONDITIONAL(NO_STRTONUM, [test "x$found_strtonum" = xno]) AC_MSG_CHECKING(for b64_ntop) -AC_TRY_LINK( +AC_LINK_IFELSE([AC_LANG_PROGRAM( [ #include #include #include ], - [b64_ntop(NULL, 0, NULL, 0);], + [ + b64_ntop(NULL, 0, NULL, 0); + ])], found_b64_ntop=yes, found_b64_ntop=no ) @@ -158,13 +160,15 @@ if test "x$found_b64_ntop" = xno; then AC_MSG_CHECKING(for b64_ntop with -lresolv) LIBS="$LIBS -lresolv" - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [ #include #include #include ], - [b64_ntop(NULL, 0, NULL, 0);], + [ + b64_ntop(NULL, 0, NULL, 0); + ])], found_b64_ntop=yes, found_b64_ntop=no ) @@ -178,4 +182,5 @@ if test "x$found_b64_ntop" = xyes; then fi AM_CONDITIONAL(NO_B64_NTOP, [test "x$found_b64_ntop" = xno]) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES(Makefile) +AC_OUTPUT -- 2.42.0