Author: tabish
Date: Tue Jul 17 11:33:23 2007
New Revision: 557011
URL: http://svn.apache.org/viewvc?view=rev&rev=557011
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Adding dependencies on APR
Added:
activemq/activemq-cpp/trunk/src/decaf/m4/apr_tools.m4
Modified:
activemq/activemq-cpp/trunk/src/decaf/configure.ac
activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am
Modified: activemq/activemq-cpp/trunk/src/decaf/configure.ac
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/configure.ac?view=diff&rev=557011&r1=557010&r2=557011
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/configure.ac (original)
+++ activemq/activemq-cpp/trunk/src/decaf/configure.ac Tue Jul 17 11:33:23 2007
@@ -86,10 +86,10 @@
AM_PATH_CPPUNIT(1.10.2, cppunit=yes, cppunit=no; AC_MSG_RESULT([no. Unit and
Integration tests disabled]))
AM_CONDITIONAL(BUILD_CPPUNIT_TESTS, test x$cppunit = xyes)
-APR_FIND_APR([], [], 1, 1)
-if test $apr_found = "no"; then
- AC_MSG_ERROR([APR not found])
-fi
+## find and configure the APR, if not installed check if we have
+## the source under our source tree and setup the scripts and
+## makefile variables to build it.
+DECAF_CONFIGURE_APR
PLAT_CXXFLAGS=
PLAT_LIBS=
Added: activemq/activemq-cpp/trunk/src/decaf/m4/apr_tools.m4
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/m4/apr_tools.m4?view=auto&rev=557011
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/m4/apr_tools.m4 (added)
+++ activemq/activemq-cpp/trunk/src/decaf/m4/apr_tools.m4 Tue Jul 17 11:33:23
2007
@@ -0,0 +1,73 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl
+dnl This Macro File defines functions that help to manage the libraries
+dnl dependance on the Apache Portable Runtime.
+dnl
+dnl DECAF_CONFIGURE_APR()
+dnl
+dnl Check configure options and assign variables related to
+dnl the Apache Portable Runtime (APR) library.
+dnl
+
+AC_DEFUN([DECAF_CONFIGURE_APR],
+[
+ AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])
+ APR_FIND_APR(["$srcdir/apr"], ["./apr"], 1, [0 1])
+
+ if test $apr_found = "no"; then
+ AC_MSG_WARN([APR not found])
+ DECAF_DOWNLOAD_APR
+ fi
+
+ dnl Get build information from APR
+
+ CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --cppflags failed])
+ fi
+
+ CFLAGS="$CFLAGS `$apr_config --cflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --cflags failed])
+ fi
+
+ LDFLAGS="$LDFLAGS `$apr_config --ldflags`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --ldflags failed])
+ fi
+
+ dnl When APR stores the dependent libs in the .la file, we don't need
+ dnl --libs.
+ APR_LIBS="`$apr_config --link-libtool --libs`"
+ if test $? -ne 0; then
+ AC_MSG_ERROR([apr-config --link-libtool --libs failed])
+ fi
+
+ AC_SUBST([APR_LIBS])
+])
+
+dnl DECAF_DOWNLOAD_APR()
+dnl no apr found, print out a message telling the user what to do
+AC_DEFUN([DECAF_DOWNLOAD_APR],
+[
+ echo "The Apache Portable Runtime (APR) library cannot be found."
+ echo "Please install APR on this system and supply the appropriate"
+ echo "--with-apr option to 'configure'"
+
+ AC_MSG_ERROR([no suitable apr found])
+])
\ No newline at end of file
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am?view=diff&rev=557011&r1=557010&r2=557011
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am Tue Jul 17
11:33:23 2007
@@ -139,7 +139,7 @@
libdecaf_la_SOURCES= $(h_sources) $(cc_sources)
libdecaf_la_CXXFLAGS= $(DECAF_CXXFLAGS)
libdecaf_la_LDFLAGS= -version-info $(DECAF_LIBRARY_VERSION) -release
$(DECAF_VERSION)
-libdecaf_la_LIBADD= $(DECAF_LIBS)
+libdecaf_la_LIBADD= $(DECAF_LIBS) $(APR_LIBS)
##
## Packaging Info