You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jim Meyering <ji...@meyering.net> on 2006/12/06 14:36:30 UTC
new configure-time options: --enable-apr (default), --disable-apr
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 <me...@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
Re: new configure-time options: --enable-apr (default), --disable-apr
Posted by Gordon Sim <gs...@redhat.com>.
Jim Meyering wrote:
> 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 <me...@redhat.com>
>
> * configure.ac: Add new configure-time options:
> --enable-apr (default), --disable-apr.
Applied (rev 483109).
>
> 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