diff options
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/bootstrap | 9 | ||||
-rw-r--r-- | cpp/configure.ac | 10 | ||||
-rw-r--r-- | cpp/lib/broker/Makefile.am | 14 | ||||
-rw-r--r-- | cpp/lib/client/Makefile.am | 14 | ||||
-rw-r--r-- | cpp/lib/common/Makefile.am | 16 |
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) |