From: Florian Forster Date: Tue, 10 Aug 2010 09:08:03 +0000 (+0200) Subject: configure.in: Reorder the library checks alphabetically. X-Git-Tag: collectd-5.0.0-beta0~50^2~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b591eca287a75abd96523d0ac10304cd18881c7b;p=collectd.git configure.in: Reorder the library checks alphabetically. --- diff --git a/configure.in b/configure.in index eb21ffe6..962d1716 100644 --- a/configure.in +++ b/configure.in @@ -1279,6 +1279,64 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes") +# --with-libcredis {{{ +AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])], +[ + if test "x$withval" = "xyes" + then + with_libcredis="yes" + else if test "x$withval" = "xno" + then + with_libcredis="no" + else + with_libcredis="yes" + LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include" + LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib" + fi; fi +], +[with_libcredis="yes"]) + +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" + +CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS" +LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS" + +if test "x$with_libcredis" = "xyes" +then + if test "x$LIBCREDIS_CPPFLAGS" != "x" + then + AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS]) + fi + AC_CHECK_HEADERS(credis.h, + [with_libcredis="yes"], + [with_libcredis="no ('credis.h' not found)"]) +fi +if test "x$with_libcredis" = "xyes" +then + if test "x$LIBCREDIS_LDFLAGS" != "x" + then + AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS]) + fi + AC_CHECK_LIB(credis, credis_info, + [with_libcredis="yes"], + [with_libcredis="no (symbol 'credis_info' not found)"]) + +fi + +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" + +if test "x$with_libcredis" = "xyes" +then + BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS" + BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS" + AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS) +fi +AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes") +# }}} + # --with-libcurl {{{ with_curl_config="curl-config" with_curl_cflags="" @@ -3051,64 +3109,6 @@ then fi # }}} --with-python -# --with-libcredis {{{ -AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])], -[ - if test "x$withval" = "xyes" - then - with_libcredis="yes" - else if test "x$withval" = "xno" - then - with_libcredis="no" - else - with_libcredis="yes" - LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include" - LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib" - fi; fi -], -[with_libcredis="yes"]) - -SAVE_CPPFLAGS="$CPPFLAGS" -SAVE_LDFLAGS="$LDFLAGS" - -CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS" -LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS" - -if test "x$with_libcredis" = "xyes" -then - if test "x$LIBCREDIS_CPPFLAGS" != "x" - then - AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS]) - fi - AC_CHECK_HEADERS(credis.h, - [with_libcredis="yes"], - [with_libcredis="no ('credis.h' not found)"]) -fi -if test "x$with_libcredis" = "xyes" -then - if test "x$LIBCREDIS_LDFLAGS" != "x" - then - AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS]) - fi - AC_CHECK_LIB(credis, credis_info, - [with_libcredis="yes"], - [with_libcredis="no (symbol 'credis_info' not found)"]) - -fi - -CPPFLAGS="$SAVE_CPPFLAGS" -LDFLAGS="$SAVE_LDFLAGS" - -if test "x$with_libcredis" = "xyes" -then - BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS" - BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS" - AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS) - AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS) -fi -AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes") -# }}} - # --with-librouteros {{{ AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])], [