From 01086fa65e1238c158723ddde8ed68d9f95865f1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 22 Jun 2007 09:58:59 +0000 Subject: [PATCH] Fixed bug #1206: Libxml2 include path weirdness. The problem is libexslt which on the system uses /bin/pkg-config. However the output of /bin/pkgconfig is not the same xslt as the one returned by /opt/csw/bin/xslt-config . The configure system now disables libexslt if libxslt was not configured using pkg-config also . --- yaz_libxml2.m4 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/yaz_libxml2.m4 b/yaz_libxml2.m4 index 9153a4b..bbc86fe 100644 --- a/yaz_libxml2.m4 +++ b/yaz_libxml2.m4 @@ -1,5 +1,6 @@ AC_DEFUN([YAZ_LIBXML2],[ AC_PATH_PROG(pkgconfigpath, pkg-config, NONE) +pkgmodule="" xml2dir=default XML2_VER="" AC_ARG_WITH(xml2,[[ --with-xml2[=PREFIX] use libxml2 in PREFIX]],xml2dir=$withval) @@ -12,6 +13,7 @@ if test "$xml2dir" = "yes" -o "$xml2dir" = "default"; then fi fi if test -z "$pkgmodule"; then + AC_MSG_RESULT([using xml2-config]) for d in /usr /usr/local; do if test -x $d/bin/xml2-config; then xml2dir=$d @@ -47,8 +49,9 @@ fi ]) AC_DEFUN([YAZ_LIBXSLT],[ - xsltdir=default pkgmodule="" +xsltdir=default +yaz_xslt_pkgconfig=no XSLT_VER="" AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libXSLT in PREFIX]],xsltdir=$withval) @@ -79,6 +82,7 @@ if test "$xsltdir" != "no"; then XSLT_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT($XSLT_VER) m4_default([$1],[AC_DEFINE(HAVE_XSLT)]) + yaz_xslt_pkgconfig=yes elif test -x $xsltdir/bin/xslt-config; then XML2_LIBS=`$xsltdir/bin/xslt-config --libs` XML2_CFLAGS=`$xsltdir/bin/xslt-config --cflags` @@ -113,11 +117,15 @@ fi if test "$exsltdir" != "no"; then AC_MSG_CHECKING(for libEXSLT) if test "$pkgmodule"; then - XML2_LIBS=`$pkgconfigpath --libs $pkgmodule` - XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` - EXSLT_VER=`$pkgconfigpath --modversion $pkgmodule` - AC_MSG_RESULT($EXSLT_VER) - m4_default([$1],[AC_DEFINE(HAVE_EXSLT)]) + if test "$yaz_xslt_pkgconfig" != "yes"; then + AC_MSG_RESULT([Disabled. Libxslt is not pkg-config configured]) + else + XML2_LIBS=`$pkgconfigpath --libs $pkgmodule` + XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` + EXSLT_VER=`$pkgconfigpath --modversion $pkgmodule` + AC_MSG_RESULT($EXSLT_VER) + m4_default([$1],[AC_DEFINE(HAVE_EXSLT)]) + fi else AC_MSG_RESULT(Not found) -- 1.7.10.4