You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/11/07 20:29:10 UTC
svn commit: r592862 - in /activemq/activemq-cpp/decaf/trunk: Makefile.am
configure.ac decaf-config.in
Author: tabish
Date: Wed Nov 7 11:29:08 2007
New Revision: 592862
URL: http://svn.apache.org/viewvc?rev=592862&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Modified:
activemq/activemq-cpp/decaf/trunk/Makefile.am
activemq/activemq-cpp/decaf/trunk/configure.ac
activemq/activemq-cpp/decaf/trunk/decaf-config.in
Modified: activemq/activemq-cpp/decaf/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/Makefile.am?rev=592862&r1=592861&r2=592862&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/Makefile.am (original)
+++ activemq/activemq-cpp/decaf/trunk/Makefile.am Wed Nov 7 11:29:08 2007
@@ -27,7 +27,12 @@
#Distribute these directories:
DIST_SUBDIRS = src/main
-bin_SCRIPTS = decaf-config
+# Create the correct decaf-config and setup the install rule
+DECAF_CONFIG = decaf-config
+
+install-exec-local: $(DECAF_CONFIG)
+ sed 's,^\(location=\).*$$,\1installed,' < $(DECAF_CONFIG) > $(DECAF_CONFIG).out
+ $(INSTALL) -m 755 $(DECAF_CONFIG).out $(DESTDIR)$(bindir)/$(DECAF_CONFIG)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = decaf.pc
Modified: activemq/activemq-cpp/decaf/trunk/configure.ac
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/configure.ac?rev=592862&r1=592861&r2=592862&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/configure.ac (original)
+++ activemq/activemq-cpp/decaf/trunk/configure.ac Wed Nov 7 11:29:08 2007
@@ -95,6 +95,21 @@
## find and configure the APR, and ARP Utils
DECAF_CONFIGURE_APR
+# Absolute source/build directory
+decaf_srcdir=`(cd $srcdir && pwd)`
+decaf_builddir=`pwd`
+AC_SUBST(decaf_srcdir)
+AC_SUBST(decaf_builddir)
+
+if test "$decaf_builddir" != "$decaf_srcdir"; then
+ USE_VPATH=1
+ DECAF_CONFIG_LOCATION=build
+else
+ DECAF_CONFIG_LOCATION=source
+fi
+
+AC_SUBST(DECAF_CONFIG_LOCATION)
+
PLAT_CXXFLAGS=
PLAT_LIBS=
Modified: activemq/activemq-cpp/decaf/trunk/decaf-config.in
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/decaf-config.in?rev=592862&r1=592861&r2=592862&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/decaf-config.in (original)
+++ activemq/activemq-cpp/decaf/trunk/decaf-config.in Wed Nov 7 11:29:08 2007
@@ -19,8 +19,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-exec_prefix_set=no
-includedir=@includedir@
+bindir="@bindir@"
+libdir="@libdir@"
+datadir="@datadir@"
+installbuilddir="@installbuilddir@"
+includedir="@includedir@"
CPPFLAGS="@CPPFLAGS@"
APR_CPPFLAGS="@APR_CPPFLAGS@"
@@ -31,6 +34,12 @@
APU_INCLUDES="@APU_INCLUDES@"
DECAF_LIBS="@DECAF_LIBS@"
+DECAF_SOURCE_DIR="@decaf_srcdir@"
+DECAF_BUILD_DIR="@decaf_builddir@"
+
+# NOTE: the following line is modified during 'make install': alter with care!
+location=@DECAF_CONFIG_LOCATION@
+
usage()
{
cat <<EOF
@@ -57,6 +66,12 @@
usage 1 1>&2
fi
+if test "$location" = "installed"; then
+ LA_FILE="$libdir/libdecaf.la"
+else
+ LA_FILE="$DECAF_BUILD_DIR/libdecaf.la"
+fi
+
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@@ -111,8 +126,14 @@
fi
if test "$echo_includes" = "yes"; then
- my_include_flags="-I$includedir/@DECAF_LIBRARY_NAME@-@DECAF_API_VERSION@"
- echo "${my_include_flags} $APR_INCLUDES $APU_INCLUDES"
+
+ if test "$location" = "installed"; then
+ my_include_flags="-I$includedir/@DECAF_LIBRARY_NAME@-@DECAF_API_VERSION@"
+ else
+ my_include_flags="$DECAF_SOURCE_DIR/src/main"
+ fi
+
+ echo "${my_include_flags} $APR_INCLUDES $APU_INCLUDES"
fi
if test "$echo_cppflags" = "yes"; then
@@ -120,8 +141,11 @@
fi
if test "$echo_libs" = "yes"; then
- if test @libdir@ != /usr/lib ; then
- my_libs_flags="-L@libdir@/@DECAF_LIBRARY_NAME@-@DECAF_API_VERSION@"
- fi
- echo "${my_libs_flags} -ldecaf $APR_LIBS $APU_LIBS"
+ if test "$location" = "installed"; then
+ my_libs_flags="-L@libdir@/@DECAF_LIBRARY_NAME@-@DECAF_API_VERSION@"
+ else
+ my_libs_flags="$DECAF_BUILD_DIR/src/main"
+ fi
+
+ echo "${my_libs_flags} -ldecaf $APR_LIBS $APU_LIBS"
fi