build: fix some minor autoconf & automake breakage

- use AS_HELP_STRING in configure.ac
- don't define HAVE_SETNS twice
- remove unused AM_LDFLAGS
- AC_PROG_RANLIB is automatically called by LT_INIT

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2016-11-10 13:14:48 +01:00
parent 095f8fae64
commit 428cd73fdc
2 changed files with 3 additions and 5 deletions

View file

@ -26,4 +26,3 @@ clean-local:
endif endif
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
ACLOCAL_LDFLAGS = -ljson

View file

@ -53,7 +53,7 @@ dnl ------------
dnl Check CFLAGS dnl Check CFLAGS
dnl ------------ dnl ------------
AC_ARG_WITH(cflags, AC_ARG_WITH(cflags,
[ --with-cflags Set CFLAGS for use in compilation.]) AS_HELP_STRING([--with-cflags], [Set CFLAGS for use in compilation.]))
if test "x$with_cflags" != "x" ; then if test "x$with_cflags" != "x" ; then
CFLAGS="$with_cflags" ; cflags_specified=yes ; CFLAGS="$with_cflags" ; cflags_specified=yes ;
elif test -n "$CFLAGS" ; then elif test -n "$CFLAGS" ; then
@ -61,7 +61,7 @@ elif test -n "$CFLAGS" ; then
fi fi
AC_ARG_ENABLE(tcmalloc, AC_ARG_ENABLE(tcmalloc,
[ --enable-tcmalloc Turn on tcmalloc], AS_HELP_STRING([--enable-tcmalloc], [Turn on tcmalloc]),
[case "${enableval}" in [case "${enableval}" in
yes) tcmalloc_enabled=true yes) tcmalloc_enabled=true
LIBS="$LIBS -ltcmalloc_minimal" LIBS="$LIBS -ltcmalloc_minimal"
@ -78,7 +78,6 @@ AC_LANG([C])
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_RANLIB
AC_PROG_EGREP AC_PROG_EGREP
AC_PROG_CC_C99 AC_PROG_CC_C99
@ -912,7 +911,7 @@ AC_CHECK_HEADER([asm-generic/unistd.h],
AC_DEFINE(HAVE_NETNS,, Have netns),, AC_DEFINE(HAVE_NETNS,, Have netns),,
QUAGGA_INCLUDES [#include <asm-generic/unistd.h> QUAGGA_INCLUDES [#include <asm-generic/unistd.h>
]) ])
AC_CHECK_FUNCS(setns, AC_DEFINE(HAVE_SETNS,, Have setns))] AC_CHECK_FUNCS(setns)]
) )
dnl ------------------------------------ dnl ------------------------------------