From 67c5accb682e347436f2db76fa007119569ae9be Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Mon, 26 Apr 2010 12:50:22 +0000 Subject: QPID-1811: Look for saslpasswd2 at configure time instead of hardcoding its location (autotools build only as cmake build doesn't currently build a custom sasl passwd file) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@938026 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/configure.ac | 7 +++++-- cpp/etc/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'cpp') diff --git a/cpp/configure.ac b/cpp/configure.ac index adcf4c5dd2..4eec5f1235 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -330,9 +330,12 @@ AS_IF([test "x$WANT_SASL" != xno], [AC_DEFINE([BROKER_SASL_NAME], ["qpidd"], [The SASL app name for the qpid Broker]) AC_DEFINE([HAVE_SASL], [1], [Enable if libsasl is present]) - have_sasl=yes])]) + have_sasl=yes]) + AC_PATH_PROG([SASL_PASSWD], [saslpasswd2], [], [$PATH$PATH_SEPARATOR/usr/sbin]) + AS_IF([test x$SASL_PASSWD = x], [AC_MSG_ERROR([saslpasswd2 not found])], []) + ]) AM_CONDITIONAL([HAVE_SASL], [test "x$have_sasl" = xyes]) - +AC_SUBST([SASL_PASSWD]) # Setup --with-xml/--without-xml as arguments to configure use_xml=yes diff --git a/cpp/etc/Makefile.am b/cpp/etc/Makefile.am index 8731641360..c91dbcbbad 100644 --- a/cpp/etc/Makefile.am +++ b/cpp/etc/Makefile.am @@ -52,7 +52,7 @@ sasldb_DATA = $(SASL_DB) # these reasons we always want the broker to specify a realm where its # users live, and we want the users to exist in that realm as well. $(SASL_DB): - echo guest | /usr/sbin/saslpasswd2 -c -p -f $(SASL_DB) -u QPID guest + echo guest | $(SASL_PASSWD) -c -p -f $(SASL_DB) -u QPID guest CLEANFILES=$(SASL_DB) -- cgit v1.2.1