diff options
| author | Gordon Sim <gsim@apache.org> | 2008-04-14 09:54:16 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-04-14 09:54:16 +0000 |
| commit | f58096364147d54676f520efc003c58fa7897d0f (patch) | |
| tree | 2e1954201b139d6cca7beae9f703a46be2cda922 /cpp/configure.ac | |
| parent | 1bf367821416484ebbb14480a5b68d1e6110b4c9 (diff) | |
| download | qpid-python-f58096364147d54676f520efc003c58fa7897d0f.tar.gz | |
QPID-648: Initial support for sasl authentication for c++ broker. From patch submitted by mfarrellee@redhat.com.
Authentication is optional at compile time (based on user selection or availability of cyrus sasl libs) and at
runtime (through broker config option). Note: At present the runtime default is to not authenticate; this is a
temporary measure to give some time for any automation scripts etc to be updated and will revert shortly to be
on by default.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@647716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/configure.ac')
| -rw-r--r-- | cpp/configure.ac | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac index c17051d431..c062fc3f8b 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -164,7 +164,38 @@ AM_CONDITIONAL([CPG], [test x$with_CPG = xyes]) if test x$with_CPG = xyes; then CPPFLAGS+=" -DCPG" fi - + + +# Setup --with-sasl/--without-sasl as arguments to configure +AC_ARG_WITH([sasl], + [AS_HELP_STRING([--with-sasl], [Build with SASL authentication support])], + [WANT_SASL="$withval"], + [WANT_SASL=check]) + +# Make sure --with-sasl/--without-sasl were only give yes|no|check +AS_IF([test "x$WANT_SASL" != xyes -a \ + "x$WANT_SASL" != xno -a \ + "x$WANT_SASL" != xcheck], + [AC_MSG_ERROR([Bad value for --with-sasl: $withval])]) + +# If we weren't explicitly asked /not/ to test, i.e. not given --without-sasl +AS_IF([test "x$WANT_SASL" != xno], + # Perform tests for headers and libraries. Remember, AC_CHECK_LIB + # will give you some useful default behavior, e.g. setup LDFLAGS, if + # you do not give it a second argument, so try not to + [AC_CHECK_HEADER([sasl/sasl.h], , [HAVE_SASL_H=no]) + AC_CHECK_LIB([sasl2], [sasl_checkpass], , [HAVE_SASL_LIB=no]) + # If any of the tests failed + AS_IF([test "x$HAVE_SASL_H" = xno -o \ + "x$HAVE_SASL_LIB" = xno], + # And we were given --with, then fail + [AS_IF([test "x$WANT_SASL" = xyes], + [AC_MSG_ERROR([sasl requested but not available])])], + # Otherwise, no tests failed, setup AC_SUBST/AC_DEFINE/AM_CONDITIONALs + [AC_DEFINE([BROKER_SASL_NAME], ["qpidd"], + [The SASL app name for the qpid Broker]) + AC_DEFINE([HAVE_SASL], [1], [Enable if libsasl is present])])]) + # Files to generate AC_CONFIG_FILES([ qpidc.spec |
