X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=11fb9ab3c488ae1eb661ed7fa8587970464f2123;hb=27b74c66c80c061efac9b22f059bdc27de064015;hp=102933c4b1d37777f2f478346e8ffc4f0aa59ccb;hpb=c1ddaf55d030e0e214c1359c8f8dc6ecbf9bee30;p=collectd.git diff --git a/configure.ac b/configure.ac index 102933c4..11fb9ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -60,9 +60,9 @@ if test "x$collectd_cv_prog_bison" = "xno" && test ! -f "${srcdir}/src/liboconfi AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/src/liboconfig/parser.c. Please install bison]) fi -AS_IF([test "x$lt_cv_dlopen" = "xno"], - [AC_MSG_ERROR([Your system does not support dlopen])] -) +if test "x$lt_cv_dlopen" = "xno"; then + AC_MSG_ERROR([Your system does not support dlopen]) +fi AC_SUBST([DLOPEN_LIBS], [$lt_cv_dlopen_libs]) @@ -2803,7 +2803,7 @@ if test "x$with_libdpdk" != "xno"; then AC_CHECK_HEADERS([rte_config.h], [ with_libdpdk="yes" - AC_COMPILE_IFELSE( + AC_PREPROC_IFELSE( [ AC_LANG_PROGRAM( [[ @@ -4387,62 +4387,74 @@ AC_SUBST([BUILD_WITH_LIBPQ_LIBS]) # }}} # --with-libpqos {{{ -with_libpqos_cppflags="" -with_libpqos_ldflags="" -AC_ARG_WITH(libpqos, [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])], -[ - if test "x$withval" != "xno" && test "x$withval" != "xyes" - then - with_libpqos_cppflags="-I$withval/include" - with_libpqos_ldflags="-L$withval/lib" - with_libpqos="yes" - else - with_libpqos="$withval" - fi -], -[ - with_libpqos="yes" -]) -if test "x$with_libpqos" = "xyes" -then - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" +AC_ARG_WITH([libpqos], + [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])], + [ + if test "x$withval" != "xno" && test "x$withval" != "xyes"; then + with_libpqos_cppflags="-I$withval/include" + with_libpqos_ldflags="-L$withval/lib" + with_libpqos="yes" + else + with_libpqos="$withval" + fi + ], + [with_libpqos="yes"] +) + +if test "x$with_libpqos" = "xyes"; then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" - AC_CHECK_HEADERS(pqos.h, [with_libpqos="yes"], [with_libpqos="no (pqos.h not found)"]) + AC_CHECK_HEADERS([pqos.h], + [with_libpqos="yes"], + [with_libpqos="no (pqos.h not found)"] + ) - CPPFLAGS="$SAVE_CPPFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" fi -if test "x$with_libpqos" = "xyes" -then - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" - LDFLAGS="$LDFLAGS $with_libpqos_ldflags" - AC_CHECK_LIB(pqos, pqos_init, [with_libpqos="yes"], [with_libpqos="no (Can't find libpqos)"]) +if test "x$with_libpqos" = "xyes"; then + SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $with_libpqos_ldflags" + + AC_CHECK_LIB([pqos], [pqos_init], + [with_libpqos="yes"], + [with_libpqos="no (Can't find libpqos)"] + ) - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LDFLAGS="$SAVE_LDFLAGS" fi -if test "x$with_libpqos" = "xyes" -then + +if test "x$with_libpqos" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" - AC_RUN_IFELSE([AC_LANG_PROGRAM( - [[#include ]], - [[return !(PQOS_VERSION >= 106)]])], - [with_libpqos="yes"], [with_libpqos="no (pqos library version 1.06 or higher is required)"]) + AC_RUN_IFELSE( + [ + AC_LANG_PROGRAM( + [[ + #include + ]], + [[ + return !(PQOS_VERSION >= 106) + ]] + ) + ], + [with_libpqos="yes"], + [with_libpqos="no (pqos library version 1.06 or higher is required)"] + ) + CPPFLAGS="$SAVE_CPPFLAGS" fi -if test "x$with_libpqos" = "xyes" -then - BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags" - BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags" - BUILD_WITH_LIBPQOS_LIBS="-lpqos" - AC_SUBST(BUILD_WITH_LIBPQOS_CPPFLAGS) - AC_SUBST(BUILD_WITH_LIBPQOS_LDFLAGS) - AC_SUBST(BUILD_WITH_LIBPQOS_LIBS) + +if test "x$with_libpqos" = "xyes"; then + BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags" + BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags" + BUILD_WITH_LIBPQOS_LIBS="-lpqos" fi + +AC_SUBST([BUILD_WITH_LIBPQOS_CPPFLAGS]) +AC_SUBST([BUILD_WITH_LIBPQOS_LDFLAGS]) +AC_SUBST([BUILD_WITH_LIBPQOS_LIBS]) # }}} # --with-libprotobuf {{{ @@ -6728,15 +6740,14 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ fi ]) -if test "x$with_perl_bindings" = "xyes" -then - AC_MSG_CHECKING([for the ExtUtils::MakeMaker module]) - if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - with_perl_bindings="no (ExtUtils::MakeMaker not found)" - fi +if test "x$with_perl_bindings" = "xyes"; then + AC_MSG_CHECKING([for the ExtUtils::MakeMaker module]) + if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + with_perl_bindings="no (ExtUtils::MakeMaker not found)" + fi fi if test "x$with_perl_bindings" = "xyes"