summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-01 15:15:18 +0000
committerGordon Sim <gsim@apache.org>2006-12-01 15:15:18 +0000
commit000106462f3480bef55a1874f2949a74d59df9fd (patch)
tree472503cc271f5d2d49be1c008ffebe2ba353c4ef
parent14f06747d5d7bc6cde5efc54003624129d295956 (diff)
downloadqpid-python-000106462f3480bef55a1874f2949a74d59df9fd.tar.gz
Path from Jim Meyering (sent to qpid-dev list) to fix issue with gen.mk plus apr dependencies etc.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@481262 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xcpp/bootstrap9
-rw-r--r--cpp/configure.ac10
-rw-r--r--cpp/lib/broker/Makefile.am14
-rw-r--r--cpp/lib/client/Makefile.am14
-rw-r--r--cpp/lib/common/Makefile.am16
5 files changed, 38 insertions, 25 deletions
diff --git a/cpp/bootstrap b/cpp/bootstrap
index 253eff6a16..fe76a84989 100755
--- a/cpp/bootstrap
+++ b/cpp/bootstrap
@@ -1,8 +1,13 @@
#!/bin/sh
+set -e
aclocal -I m4
autoheader
libtoolize --automake
+
+# Generate (for automake) lots of repetitive parts of tests/Makefile.am.
+(cd tests && rm -f gen.mk
+ perl -ne '/^include / or print' Makefile.am \
+ | make -f - abs_srcdir=`dirname $(pwd)` gen.mk )
+
automake
autoconf
-./configure --enable-warnings --prefix=/tmp/qpid-inst CXXFLAGS=-g
-
diff --git a/cpp/configure.ac b/cpp/configure.ac
index 559ec84496..6a44ae1116 100644
--- a/cpp/configure.ac
+++ b/cpp/configure.ac
@@ -32,7 +32,7 @@ AC_ARG_ENABLE(warnings,
*) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
esac],
[enableval=yes])
-
+
# Warnings: Enable as many as possible, keep the code clean. Please
# do not disable warnings or remove -Werror without discussing on
# qpid-dev list.
@@ -80,6 +80,14 @@ AC_SUBST(LIBTOOL_VERSION_INFO_ARG)
gl_CLOCK_TIME
+APR_MINIMUM_VERSION=1.2.7
+PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION])
+
+APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1"
+AC_SUBST(APR_CXXFLAGS)
+AC_SUBST(APR_LIBS)
+
+
AC_CONFIG_FILES([
Makefile
gen/Makefile
diff --git a/cpp/lib/broker/Makefile.am b/cpp/lib/broker/Makefile.am
index fdf9953967..58da2e562c 100644
--- a/cpp/lib/broker/Makefile.am
+++ b/cpp/lib/broker/Makefile.am
@@ -1,10 +1,10 @@
-AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1
-INCLUDES = \
- -I$(shell apr-1-config --includedir) \
- -I$(top_srcdir)/gen \
- -I$(top_srcdir)/lib/common \
- -I$(top_srcdir)/lib/common/sys \
- -I$(top_srcdir)/lib/common/framing
+AM_CXXFLAGS = $(WARNING_CFLAGS)
+INCLUDES = \
+ -I$(top_srcdir)/gen \
+ -I$(top_srcdir)/lib/common \
+ -I$(top_srcdir)/lib/common/sys \
+ -I$(top_srcdir)/lib/common/framing \
+ $(APR_CXXFLAGS)
lib_LTLIBRARIES = libbroker.la
libbroker_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG)
diff --git a/cpp/lib/client/Makefile.am b/cpp/lib/client/Makefile.am
index fcc571a511..28b96d7844 100644
--- a/cpp/lib/client/Makefile.am
+++ b/cpp/lib/client/Makefile.am
@@ -1,10 +1,10 @@
-AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1
-INCLUDES = \
- -I$(shell apr-1-config --includedir) \
- -I$(top_srcdir)/gen \
- -I$(top_srcdir)/lib/common \
- -I$(top_srcdir)/lib/common/sys \
- -I$(top_srcdir)/lib/common/framing
+AM_CXXFLAGS = $(WARNING_CFLAGS)
+INCLUDES = \
+ -I$(top_srcdir)/gen \
+ -I$(top_srcdir)/lib/common \
+ -I$(top_srcdir)/lib/common/sys \
+ -I$(top_srcdir)/lib/common/framing \
+ $(APR_CXXFLAGS)
lib_LTLIBRARIES = libclient.la
libclient_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG)
diff --git a/cpp/lib/common/Makefile.am b/cpp/lib/common/Makefile.am
index 829519eac6..ed2ccd61a8 100644
--- a/cpp/lib/common/Makefile.am
+++ b/cpp/lib/common/Makefile.am
@@ -1,11 +1,10 @@
-AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1
-LIBS = -lapr-1
+AM_CXXFLAGS = $(WARNING_CFLAGS)
-INCLUDES = \
- -I$(shell apr-1-config --includedir) \
- -I$(top_srcdir)/gen \
- -I$(top_srcdir)/lib/common/sys \
- -I$(top_srcdir)/lib/common/framing
+INCLUDES = \
+ -I$(top_srcdir)/gen \
+ -I$(top_srcdir)/lib/common/sys \
+ -I$(top_srcdir)/lib/common/framing \
+ $(APR_CXXFLAGS)
apr = sys/apr
apr_src = \
@@ -24,7 +23,7 @@ apr_src = \
$(apr)/Thread.cpp
posix = sys/posix
-posix_src = \
+posix_src = \
$(posix)/PosixAcceptor.cpp \
$(posix)/Socket.cpp \
$(posix)/Thread.cpp \
@@ -43,6 +42,7 @@ gen = $(srcdir)/../../gen
lib_LTLIBRARIES = libcommon.la
libcommon_la_LIBADD = \
+ $(APR_LIBS) \
$(LIB_DLOPEN) \
$(LIB_CLOCK_GETTIME)