Skip to content

Commit

Permalink
build: update to autoconf 2.71
Browse files Browse the repository at this point in the history
This removes warning about deprecated stuff. Notably AC_PROG_CC now
does what AC_PROG_CC_C99 did.
  • Loading branch information
vincentbernat committed Sep 21, 2021
1 parent 837d5d1 commit bc6cf97
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Base configuration

# Configure autoconf
AC_PREREQ([2.69])
AC_PREREQ([2.71])

AC_INIT([lldpd],
[m4_esyscmd_s([./get-version])],
Expand All @@ -14,7 +14,7 @@ AC_INIT([lldpd],
[https://lldpd.github.io/])

AC_CONFIG_SRCDIR([src/log.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
src/Makefile
src/compat/Makefile
Expand Down Expand Up @@ -44,7 +44,6 @@ gl_LD_VERSION_SCRIPT

# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99
if test x"$ac_cv_prog_cc_c99" = x"no"; then
AC_MSG_FAILURE([*** C99 support is mandatory])
fi
Expand Down
7 changes: 3 additions & 4 deletions m4/alignof.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
#
AC_DEFUN([lldp_CHECK_ALIGNOF],[
AC_CACHE_CHECK([whether compiler understands __alignof__], lldp_cv_check_alignof, [
AC_TRY_COMPILE([],
[ return __alignof__(long); ],
[ lldp_cv_check_alignof="yes" ],
[ lldp_cv_check_alignof="no" ])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return __alignof__(long); ]])],
[ lldp_cv_check_alignof="yes" ],
[ lldp_cv_check_alignof="no" ])
])
if test x"$lldp_cv_check_alignof" = x"yes"; then
AC_DEFINE([HAVE_ALIGNOF], [1], [Define if __alignof__ operator is available])
Expand Down
7 changes: 4 additions & 3 deletions m4/ax_cflags_gcc_option.m4
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl
AC_CACHE_CHECK([FLAGS for gcc m4_ifval($1,$1,-option)],
VAR,[AS_VAR_SET([VAR],["no, unknown"])
AC_LANG_SAVE
AC_LANG_C
AC_LANG([C])
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS $[]m4_ifval($2,$2,) "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]) ; break])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],
[AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]) ; break],
[])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
Expand Down
4 changes: 2 additions & 2 deletions m4/ax_ld_check_flag.m4
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#serial 6

AC_DEFUN([AX_LDFLAGS_OPTION],[
AC_PREREQ([2.61])
AC_PREREQ([2.71])
AC_REQUIRE([AC_PROG_SED])
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
Expand All @@ -59,7 +59,7 @@ AC_DEFUN([AX_LDFLAGS_OPTION],[
[ax_cv_ld_check_flag_$flag],[
AC_LANG_SAVE
AC_LANG_C
AC_LANG([C])
save_LDFLAGS="$LDFLAGS"
LDFLAGS="-Werror $LDFLAGS $[]m4_ifval($2,$2,) $1"
Expand Down

0 comments on commit bc6cf97

Please sign in to comment.