qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Meyering <...@meyering.net>
Subject new configure-time options: --enable-apr (default), --disable-apr
Date Wed, 06 Dec 2006 13:36:30 GMT
If you're having trouble with the configure-time check for APR or CPPUNIT,
this will help.  It'll also be useful in the long run, for when we're able
to compile out APR support altogether.

The default (--enable-apr) doesn't change anything, so there's no
need to use either option when running ./configure.  Use --disable-apr
if/when you want to skip all configure-time tests for libapr, which
means you won't compile with or link with any APR bits.

2006-12-06  Jim Meyering  <meyering@redhat.com>

	* configure.ac: Add new configure-time options:
	--enable-apr (default), --disable-apr.

Index: configure.ac
===================================================================
--- configure.ac	(revision 483058)
+++ configure.ac	(working copy)
@@ -93,17 +93,31 @@

 gl_CLOCK_TIME

-APR_MINIMUM_VERSION=1.2.2
-PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION])
-
-APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1"
-AC_SUBST(APR_CXXFLAGS)
-
 CPPUNIT_MINIMUM_VERSION=1.10.2
 PKG_CHECK_MODULES([CPPUNIT], [cppunit >= $CPPUNIT_MINIMUM_VERSION])
 CPPUNIT_CXXFLAGS=$CPPUNIT_CFLAGS
 AC_SUBST(CPPUNIT_CXXFLAGS)

+AC_ARG_ENABLE(apr,
+[  --enable-apr   use the Apache Portable Runtime library (default)
+   --disable-apr  do not use the Apache Portable Runtime library],
+[case $enable_APR in
+   yes|no) ;;
+   *)      AC_MSG_ERROR([invalid APR enable/disable value: $enable_APR]) ;;
+  esac],
+[enable_APR=yes])
+
+APR_MINIMUM_VERSION=1.2.2
+AC_SUBST(APR_MINIMUM_VERSION)
+AC_SUBST(APR_CXXFLAGS)
+AC_SUBST(USE_APR)
+
+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_CONFIG_FILES([
   Makefile
   gen/Makefile

Mime
View raw message