lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5218] Honour XMLWRAPP_{CFLAGS, LIB} variables when not us


From: Vadim Zeitlin
Subject: [lmi-commits] [5218] Honour XMLWRAPP_{CFLAGS, LIB} variables when not using pkg-config too .
Date: Thu, 23 Jun 2011 21:47:15 +0000

Revision: 5218
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5218
Author:   zeitlin
Date:     2011-06-23 21:47:15 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
Honour XMLWRAPP_{CFLAGS,LIB} variables when not using pkg-config too.

pkg-config allows the user to predefine these variables to avoid running
checks for the library. Allow using them when not using pkg-config too for
consistency and because these variables are documented in any case in
"configure --help" output so they should work. Besides, it's more convenient
to use them instead of xmlwrapp-config script when cross-compiling.

Modified Paths:
--------------
    lmi/trunk/configure.ac

Modified: lmi/trunk/configure.ac
===================================================================
--- lmi/trunk/configure.ac      2011-06-23 21:47:12 UTC (rev 5217)
+++ lmi/trunk/configure.ac      2011-06-23 21:47:15 UTC (rev 5218)
@@ -453,19 +453,27 @@
     PKG_CHECK_MODULES(GTK, gtk+-2.0)
     PKG_CHECK_MODULES(XMLWRAPP, xmlwrapp >= 0.6.0 xsltwrapp)
 else
-    dnl --- XMLWRAPP (required) -------------------
-    AC_CHECK_PROG(lmi_xmlwrapp_config, xmlwrapp-config, yes, no)
-    if test "x$lmi_xmlwrapp_config" != "xyes"; then
-        AC_MSG_ERROR([Unable to find xmlwrapp configuration program 
xmlwrapp-config in the path.])
+    if test -z "$XMLWRAPP_CFLAGS" -o -z "$XMLWRAPP_LIBS"; then
+        dnl --- XMLWRAPP (required) -------------------
+        AC_CHECK_PROG(lmi_xmlwrapp_config, xmlwrapp-config, yes, no)
+        if test "x$lmi_xmlwrapp_config" != "xyes"; then
+            AC_MSG_ERROR([Unable to find xmlwrapp configuration program 
xmlwrapp-config in the path.])
+        fi
+
+        dnl make sure xmlwrapp was compiled with XSLT support:
+        if xmlwrapp-config --libs | grep -v -q xslt; then
+            AC_MSG_ERROR([xmlwrapp with XSLT support is required.])
+        fi
     fi
 
-    dnl make sure xmlwrapp was compiled with XSLT support:
-    if xmlwrapp-config --libs | grep -v -q xslt; then
-        AC_MSG_ERROR([xmlwrapp with XSLT support is required.])
+    if test -z "$XMLWRAPP_CFLAGS"; then
+        XMLWRAPP_CFLAGS=`xmlwrapp-config --cxxflags`
     fi
 
-    XMLWRAPP_CFLAGS=`xmlwrapp-config --cxxflags`
-    XMLWRAPP_LIBS=`xmlwrapp-config --libs`
+    if test -z "$XMLWRAPP_LIBS"; then
+        XMLWRAPP_LIBS=`xmlwrapp-config --libs`
+    fi
+
     AC_SUBST(XMLWRAPP_CFLAGS)
     AC_SUBST(XMLWRAPP_LIBS)
 fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]