autofs-5.1.8 - update autoconf macros From: Ian Kent Fix autoconf usage of obselete macros. Signed-off-by: Ian Kent --- CHANGELOG | 1 + aclocal.m4 | 33 +++++++++++++++++---------------- configure | 16 ++++++++-------- configure.ac | 7 ++++--- include/config.h.in | 2 +- 5 files changed, 31 insertions(+), 28 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 450990ba..c7bd43ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -104,6 +104,7 @@ - add null check in master_kill(). - be more careful with cmd pipe at exit. - rename configure.in to configure.ac. +- update autoconf macros. 19/10/2021 autofs-5.1.8 - add xdr_exports(). diff --git a/aclocal.m4 b/aclocal.m4 index cfb3e391..1046d72b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -313,9 +313,9 @@ AC_DEFUN([AF_CHECK_LIBHESIOD], af_check_hesiod_save_libs="$LIBS" LIBS="$LIBS -lhesiod -lresolv" -AC_TRY_LINK( - [ #include ], - [ void *c; hesiod_init(&c); ], +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ #include ]], + [[ void *c; hesiod_init(&c); ]])], [ HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod -lresolv" AC_MSG_RESULT(yes) ], @@ -382,14 +382,14 @@ LIBS="$LIBS -lldap" af_check_ldap_create_page_control_save_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror=implicit-function-declaration" -AC_TRY_LINK( - [ #include ], - [ LDAP *ld; +AC_LINK_IFELSE( + [ AC_LANG_PROGRAM([[ #include ]], + [[ LDAP *ld; ber_int_t ps; struct berval *c; int ic, ret; LDAPControl **clp; - ret = ldap_create_page_control(ld,ps,c,ic,clp); ], + ret = ldap_create_page_control(ld,ps,c,ic,clp); ]])], [ af_have_ldap_create_page_control=yes AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) @@ -418,15 +418,16 @@ LIBS="$LIBS -lldap" af_check_ldap_parse_page_control_save_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror=implicit-function-declaration" -AC_TRY_LINK( - [ #define LDAP_DEPRECATED 1 - #include ], - [ LDAP *ld; - ber_int_t *ct; - struct berval *c; - int ret; - LDAPControl **clp; - ret = ldap_parse_page_control(ld,clp,ct,c); ], +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ #define LDAP_DEPRECATED 1 + #include ]], + [[ LDAP *ld; + ber_int_t *ct; + struct berval *c; + int ret; + LDAPControl **clp; + ret = ldap_parse_page_control(ld,clp,ct,c); ]])], [ af_have_ldap_parse_page_control=yes AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) diff --git a/configure b/configure index 99cd8536..d090af80 100755 --- a/configure +++ b/configure @@ -5464,7 +5464,7 @@ CFLAGS="$CFLAGS -Werror=implicit-function-declaration" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { @@ -5511,16 +5511,16 @@ CFLAGS="$CFLAGS -Werror=implicit-function-declaration" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define LDAP_DEPRECATED 1 - #include + #include int main () { LDAP *ld; - ber_int_t *ct; - struct berval *c; - int ret; - LDAPControl **clp; - ret = ldap_parse_page_control(ld,clp,ct,c); + ber_int_t *ct; + struct berval *c; + int ret; + LDAPControl **clp; + ret = ldap_parse_page_control(ld,clp,ct,c); ; return 0; } @@ -7504,5 +7504,5 @@ fi # # Run make clean since we don't explicitly code the header file dependencies # -ac_config_commands="$ac_config_commands default-1" +ac_config_commands="$ac_config_commands foo" diff --git a/configure.ac b/configure.ac index d9567ef2..63f2a5b4 100644 --- a/configure.ac +++ b/configure.ac @@ -437,10 +437,11 @@ fi # # Write Makefile.conf and include/config.h # -AC_CONFIG_HEADER(include/config.h) -AC_OUTPUT(Makefile.conf) +AC_CONFIG_HEADERS(include/config.h) +AC_CONFIG_FILES(Makefile.conf) +AC_OUTPUT() # # Run make clean since we don't explicitly code the header file dependencies # -AC_OUTPUT_COMMANDS([make clean]) +AC_CONFIG_COMMANDS(foo, [make clean]) diff --git a/include/config.h.in b/include/config.h.in index 7dab82ee..2b341120 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated from configure.in by autoheader. */ +/* include/config.h.in. Generated from configure.ac by autoheader. */ /* leave this alone */ #undef ENABLE_EXT_ENV