You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2018/06/18 13:50:42 UTC

svn commit: r1833718 - in /santuario/xml-security-cpp/trunk: configure.ac xml-security-c.pc.in xsec/Makefile.am

Author: scantor
Date: Mon Jun 18 13:50:42 2018
New Revision: 1833718

URL: http://svn.apache.org/viewvc?rev=1833718&view=rev
Log:
Update Xalan autoconf handling to match other checks.

Modified:
    santuario/xml-security-cpp/trunk/configure.ac
    santuario/xml-security-cpp/trunk/xml-security-c.pc.in
    santuario/xml-security-cpp/trunk/xsec/Makefile.am

Modified: santuario/xml-security-cpp/trunk/configure.ac
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/configure.ac?rev=1833718&r1=1833717&r2=1833718&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/configure.ac (original)
+++ santuario/xml-security-cpp/trunk/configure.ac Mon Jun 18 13:50:42 2018
@@ -105,34 +105,35 @@ if test x"$use_xalan" != x"no" ; then
 
   if test $XALANCROOT; then
 
-    AC_MSG_CHECKING([for Xalan headers in XALANCROOT])
+    AC_MSG_NOTICE([looking for Xalan headers in $XALANCROOT])
 
-    OLD_CPPFLAGS=$CPPFLAGS
     # Updated to include nls/include as this is generally needed for
     # compilation against non-installed xalan.
     # Also now include XALANCROOT/include to cater for installed xalan
-    CPPFLAGS=["-I${XALANCROOT}/src -I${XALANCROOT}/include -I${XALANCROOT}/nls/include ${CPPFLAGS}"]
-
-    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <xalanc/Include/XalanVersion.hpp>]])],[xalan_found=yes 
-      LIBS="-L${XALANCROOT}/lib -lxalan-c ${LIBS}"
-      AC_MSG_RESULT([found])],[CPPFLAGS=$OLD_CPPFLAGS
-      AC_MSG_RESULT([no])]);
+    xalan_CFLAGS="-I${XALANCROOT}/src -I${XALANCROOT}/include -I${XALANCROOT}/nls/include"
+    xalan_LIBS="-L${XALANCROOT}/lib -lxalan-c"
+    AX_SAVE_FLAGS_WITH_PREFIX([xalan],[[CFLAGS]])
+    AC_CHECK_HEADER([xalanc/Include/XalanVersion.hpp],
+                    [xalan_found=yes])
+    AX_RESTORE_FLAGS_WITH_PREFIX([xalan],[[CFLAGS]])
 
   fi
 
   if test -z "$xalan_found" ; then
 
-    AC_MSG_CHECKING([for Xalan in system includes])
-    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <xalanc/Include/XalanVersion.hpp>]])],
-        [xalan_found=yes 
-        LIBS="${LIBS} -lxalan-c"
-        AC_MSG_RESULT([found])],
-      [AC_MSG_RESULT([no - WARNING - configuring without Xalan])]);
+    AC_MSG_NOTICE([looking for Xalan in system includes])
+    unset ac_cv_header_xalanc_Include_XalanVersion_hpp
+    AC_CHECK_HEADER([xalanc/Include/XalanVersion.hpp],
+                    [xalan_found=yes
+		     xalan_CFLAGS=""
+		     xalan_LIBS="-lxalan-c"],
+		    [AC_MSG_NOTICE([WARNING - configuring without Xalan])])
 
   fi
 fi
 
 if test "${xalan_found}" = "yes" ; then
+AX_SAVE_FLAGS_WITH_PREFIX([xalan],[[CFLAGS],[LIBS]])
 
 AC_MSG_CHECKING([Xalan version])
 AC_PREPROC_IFELSE(
@@ -146,16 +147,13 @@ int i = 0;
     [AC_MSG_FAILURE([Xalan-C 1.11+ is required])])
 
   # Do we need xalanMsg.so?
-  AC_MSG_CHECKING([if libxalanMsg is required])
-  old_libs=$LIBS
-  LIBS="${LIBS} -lxalanMsg"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
-    int test=1;
-  ]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
-  LIBS=${old_libs}]);
+  AC_SEARCH_LIBS([XalanInitialize],[xalanMsg],[xalan_LIBS="$LIBS"])
   
   AC_DEFINE([XSEC_HAVE_XALAN],[1],[Define to 1 if Xalan is available.])
+  AC_SUBST([xalan_CFLAGS])
+  AC_SUBST([xalan_LIBS])
 
+AX_RESTORE_FLAGS_WITH_PREFIX([xalan],[[CFLAGS],[LIBS]])
 else
   AC_MSG_NOTICE([Xalan not included in build - XPath and XSLT will not be available])
 fi

Modified: santuario/xml-security-cpp/trunk/xml-security-c.pc.in
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xml-security-c.pc.in?rev=1833718&r1=1833717&r2=1833718&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xml-security-c.pc.in (original)
+++ santuario/xml-security-cpp/trunk/xml-security-c.pc.in Mon Jun 18 13:50:42 2018
@@ -7,6 +7,7 @@ Name: @PACKAGE_NAME@
 Description: Apache XML security C++ library
 Version: @VERSION@
 Libs: -L${libdir} -lxml-security-c
-Cflags: -I${includedir}
+Libs.private: @xalan_LIBS@
+Cflags: -I${includedir} @xalan_CFLAGS@
 Requires: @AX_PACKAGE_REQUIRES@
 Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@

Modified: santuario/xml-security-cpp/trunk/xsec/Makefile.am
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/Makefile.am?rev=1833718&r1=1833717&r2=1833718&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/Makefile.am (original)
+++ santuario/xml-security-cpp/trunk/xsec/Makefile.am Mon Jun 18 13:50:42 2018
@@ -21,8 +21,8 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_
 noinst_PROGRAMS = ${samples}
 bin_PROGRAMS = ${tools}
 
-AM_CXXFLAGS = $(xerces_CFLAGS)
-LDADD = libxml-security-c.la $(xerces_LIBS)
+AM_CXXFLAGS = $(xerces_CFLAGS) $(xalan_CFLAGS)
+LDADD = libxml-security-c.la $(xerces_LIBS) $(xalan_LIBS)
 
 #
 # The following are sample programs.  They are NOT installed
@@ -94,7 +94,7 @@ tools += xsec-c14n
 xsec_c14n_SOURCES = \
    tools/c14n/c14n.cpp
 xsec_c14n_CPPFLAGS = $(AM_CPPFLAGS) -DXSEC_BUILDING_TOOLS
- 
+
 tools += xsec-checksig
 xsec_checksig_SOURCES = \
    tools/checksig/checksig.cpp \
@@ -157,11 +157,13 @@ endif
 libxml_security_c_la_CPPFLAGS = $(AM_CPPFLAGS) -DXSEC_BUILDING_LIBRARY
 
 libxml_security_c_la_CXXFLAGS = \
+   $(xalan_CFLAGS) \
    $(xerces_CFLAGS) \
    $(openssl_CFLAGS) \
    $(nss_CFLAGS)
 
 libxml_security_c_la_LIBADD = \
+   $(xalan_LIBS) \
    $(xerces_LIBS) \
    $(openssl_LIBS) \
    $(nss_LIBS)