From 3e77c9e8f960390d7d9baf4e9a29f8472a2590c6 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 22 Mar 2010 20:01:39 +0100 Subject: [PATCH] =?utf8?q?configure.in:=20Move=20the=20checks=20for=20libr?= =?utf8?q?abbitmq=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … so the checks are roughly alphabetical. "Roughly", because the leading "lib" is ignored when sorting. --- configure.in | 102 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/configure.in b/configure.in index 28e71b6a..04caadff 100644 --- a/configure.in +++ b/configure.in @@ -1279,57 +1279,6 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes") -# --with-librabbitmq {{{ -with_librabbitmq_cppflags="" -with_librabbitmq_ldflags="" -AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])], -[ - if test "x$withval" != "xno" && test "x$withval" != "xyes" - then - with_librabbitmq_cppflags="-I$withval/include" - with_librabbitmq_ldflags="-L$withval/lib" - with_librabbitmq="yes" - else - with_librabbitmq="$withval" - fi -], -[ - with_librabbitmq="yes" -]) -if test "x$with_librabbitmq" = "xyes" -then - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" - - AC_CHECK_HEADERS(amqp.h, [with_librabbitmq="yes"], [with_librabbitmq="no (amqp.h not found)"]) - - CPPFLAGS="$SAVE_CPPFLAGS" -fi -if test "x$with_librabbitmq" = "xyes" -then - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" - LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags" - - AC_CHECK_LIB(rabbitmq, amqp_basic_publish, [with_librabbitmq="yes"], [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"]) - - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" -fi -if test "x$with_librabbitmq" = "xyes" -then - BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags" - BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags" - BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq" - AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS) - AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS) - AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS) - AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.]) -fi -AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes") -# }}} - # --with-libcurl {{{ with_curl_config="curl-config" with_curl_cflags="" @@ -3102,6 +3051,57 @@ then fi # }}} --with-python +# --with-librabbitmq {{{ +with_librabbitmq_cppflags="" +with_librabbitmq_ldflags="" +AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_librabbitmq_cppflags="-I$withval/include" + with_librabbitmq_ldflags="-L$withval/lib" + with_librabbitmq="yes" + else + with_librabbitmq="$withval" + fi +], +[ + with_librabbitmq="yes" +]) +if test "x$with_librabbitmq" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" + + AC_CHECK_HEADERS(amqp.h, [with_librabbitmq="yes"], [with_librabbitmq="no (amqp.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_librabbitmq" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" + LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags" + + AC_CHECK_LIB(rabbitmq, amqp_basic_publish, [with_librabbitmq="yes"], [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_librabbitmq" = "xyes" +then + BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags" + BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags" + BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq" + AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS) + AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes") +# }}} + # --with-librouteros {{{ AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])], [ -- 2.11.0