[xmltooling] 09/19: Finish separating flags, use _LIBADD

Ferenc Wágner wferi-guest at moszumanska.debian.org
Thu Jul 21 18:18:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to branch patch-queue/debian/experimental
in repository xmltooling.

commit 5f37028651c8ef4b078d0c7db85d23477763fcfa
Author: Ferenc Wágner <wferi at niif.hu>
Date:   Wed Jul 6 09:06:09 2016 +0200

    Finish separating flags, use _LIBADD
---
 configure.ac           | 12 ++++++++----
 xmltooling.pc.in       |  4 ++--
 xmltooling/Makefile.am | 14 ++++++++------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 78f6d72..3d2bc28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,11 @@ AC_TYPE_SIZE_T
 # Checks for library functions.
 AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strcasecmp])
 AC_CHECK_HEADERS([dlfcn.h])
+AX_SAVE_FLAGS
+LIBS=""
 AC_SEARCH_LIBS([dlopen],[dl],,[AC_MSG_ERROR([cannot find dlopen() function])])
+AC_SUBST([dlopen_LIBS],[$LIBS])
+AX_RESTORE_FLAGS
 
 # checks for pthreads
 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
@@ -79,13 +83,14 @@ if test $enable_threads != "pthread"; then
     AC_MSG_ERROR([unable to find pthreads, currently this is required])
 else
     AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])
-	AM_CONDITIONAL(BUILD_PTHREAD,test "$enable_threads" = "pthread")
+    AX_SAVE_FLAGS
     LIBS="$PTHREAD_LIBS $LIBS"
     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
-    CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
+    AC_CHECK_FUNCS([pthread_rwlock_init])
+    AX_RESTORE_FLAGS
 fi
 
-AC_CHECK_FUNCS([pthread_rwlock_init])
+AM_CONDITIONAL(BUILD_PTHREAD,test "$enable_threads" = "pthread")
 
 AC_LANG([C++])
 
@@ -102,7 +107,6 @@ BOOST_POINTER_CONTAINER
 BOOST_SMART_PTR
 BOOST_STRING_ALGO
 BOOST_TOKENIZER
-CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
 
 # are covariant methods allowed?
 AC_LINK_IFELSE(
diff --git a/xmltooling.pc.in b/xmltooling.pc.in
index 0f58c6c..6d2c2cf 100644
--- a/xmltooling.pc.in
+++ b/xmltooling.pc.in
@@ -9,7 +9,7 @@ Name: @PACKAGE_NAME@
 Description: OpenSAML XMLTooling-C library
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lxmltooling
-Libs.private: @LIBS@
-Cflags: -I${includedir} @BOOST_CPPFLAGS@
+Libs.private: @dlopen_LIBS@ @PTHREAD_LIBS@
+Cflags: -I${includedir} @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
 Requires: @AX_PACKAGE_REQUIRES@
 Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@
diff --git a/xmltooling/Makefile.am b/xmltooling/Makefile.am
index 321e451..5842d60 100644
--- a/xmltooling/Makefile.am
+++ b/xmltooling/Makefile.am
@@ -203,20 +203,22 @@ common_sources = \
 	validation/ValidatorSuite.cpp \
 	$(thread_sources)
 
+common_CPPFLAGS = $(xerces_CFLAGS) $(log4shib_CFLAGS) $(log4cpp_CFLAGS) $(PTHREAD_CFLAGS) $(BOOST_CPPFLAGS)
+common_LIBADD   = $(xerces_LIBS)   $(log4shib_LIBS)   $(log4cpp_LIBS)   $(PTHREAD_LIBS)   $(dlopen_LIBS)
+
 libxmltooling_lite_la_SOURCES = \
 	${common_sources}
-libxmltooling_lite_la_CPPFLAGS = -DXMLTOOLING_LITE
-libxmltooling_lite_la_LDFLAGS  = -version-info 7:0:0
-libxmltooling_lite_la_CPPFLAGS += $(xerces_CFLAGS) $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
-libxmltooling_lite_la_LDFLAGS  += $(xerces_LIBS)   $(log4shib_LIBS)   $(log4cpp_LIBS)
+libxmltooling_lite_la_CPPFLAGS = -DXMLTOOLING_LITE $(common_CPPFLAGS)
+libxmltooling_lite_la_LDFLAGS = -version-info 7:0:0
+libxmltooling_lite_la_LIBADD = $(common_LIBADD)
 
 if BUILD_XMLSEC
 libxmltooling_la_SOURCES = \
 	${common_sources} \
 	${xmlsec_sources}
 libxmltooling_la_LDFLAGS = -version-info 7:0:0
-libxmltooling_la_CPPFLAGS = $(XMLSEC_CFLAGS) $(xerces_CFLAGS) $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
-libxmltooling_la_LDFLAGS += $(XMLSEC_LIBS)   $(xerces_LIBS)   $(log4shib_LIBS)   $(log4cpp_LIBS)
+libxmltooling_la_CPPFLAGS = $(XMLSEC_CFLAGS) $(common_CPPFLAGS)
+libxmltooling_la_LIBADD   = $(XMLSEC_LIBS)   $(common_LIBADD)
 endif
 
 install-exec-hook:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git



More information about the Pkg-shibboleth-devel mailing list