From b591eca287a75abd96523d0ac10304cd18881c7b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 10 Aug 2010 11:08:03 +0200 Subject: [PATCH] configure.in: Reorder the library checks alphabetically. --- configure.in | 116 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 58 insertions(+), 58 deletions(-) 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.])], [ -- 2.11.0