diff options
| author | David Wragg <dpw@lshift.net> | 2010-02-20 22:58:40 +0000 |
|---|---|---|
| committer | David Wragg <dpw@lshift.net> | 2010-02-20 22:58:40 +0000 |
| commit | c90336ef0b6c8507a2f409db7e33dd1844b25517 (patch) | |
| tree | fe58dc22a21ac75341dd1064fb48ba60a5c2e70c /configure.ac | |
| parent | 55ac202750859482c4319addb8c54368b2369455 (diff) | |
| download | rabbitmq-c-github-ask-c90336ef0b6c8507a2f409db7e33dd1844b25517.tar.gz | |
Command line AMQP tools based on rabbitmq-c
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cb835e8..4b653ba 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,7 @@ AM_INIT_AUTOMAKE AC_CONFIG_HEADER([config.h]) dnl Program checks +AC_GNU_SOURCE AC_PROG_CC dnl Library checks @@ -63,9 +64,28 @@ AC_SUBST(AMQP_CODEGEN_DIR) AC_SUBST(AMQP_SPEC_JSON_PATH) AC_SUBST(PYTHON) +AC_ARG_WITH([popt], + [AS_HELP_STRING([--with-popt], [use the popt library. Needed for tools])], + [], + [with_popt=check]) + +LIBPOPT= +AS_IF([test "x$with_popt" != xno], + [AC_CHECK_LIB([popt], [poptGetContext], + [AC_SUBST([LIBPOPT], ["-lpopt"]) + AC_DEFINE([HAVE_LIBPOPT], [1], [Define if you have libpopt]) + ], + [if test "x$with_popt" != xcheck; then + AC_MSG_FAILURE([--with-popt was given, but test for libpopt failed]) + fi + ])]) + +AM_CONDITIONAL(TOOLS, test "x$LIBPOPT" != "x") + AC_OUTPUT( Makefile librabbitmq/Makefile tests/Makefile examples/Makefile +tools/Makefile ) |
