From 95529d52609cfbfc7df137d5bb50a0f7e4a2ddba Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 26 Apr 2007 00:01:06 +0000 Subject: * Make APR/"posix" configurable using --disable-apr * Make "posix" code build (but not run correctly) * By default still build APR version, which works as before git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@532543 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/configure.ac | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'cpp/configure.ac') diff --git a/cpp/configure.ac b/cpp/configure.ac index da84a48357..c2b33170de 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -101,16 +101,27 @@ CPPUNIT_CXXFLAGS=$CPPUNIT_CFLAGS AC_SUBST(CPPUNIT_LIBS) AC_SUBST(CPPUNIT_CXXFLAGS) -# Removed --enable-apr option as we currently don't build without APR. - +AC_ARG_ENABLE([apr], + [AS_HELP_STRING([--enable-apr], + [use the Apache Portable Runtime library (default yes)])], + [case $enableval in + yes|no) enable_APR=$enableval;; + *) AC_MSG_ERROR([Invalid value for --enable-apr: $enableval]);; + esac], + [enable_APR=yes] +) +AM_CONDITIONAL([USE_APR], [test x$enable_APR = xyes]) + APR_MINIMUM_VERSION=1.2.2 AC_SUBST(APR_MINIMUM_VERSION) AC_SUBST(APR_CXXFLAGS) AC_SUBST(USE_APR) -PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION]) -APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1" -USE_APR=1 +if test "$enable_APR" = yes; then + PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION]) + APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1" + USE_APR=1 +fi AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], -- cgit v1.2.1