From be8be839bb81aab9e4e52ec5287f9c4c31c66afa Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 6 Jul 2006 10:17:53 +0000 Subject: [PATCH] For Libxml2 and friends, YAZ defines YAZ_HAVE_{XML2,XSLT,EXSLT) in the compitation phase, but also for yaz-config --cflags output. This allows us to have public headers with Libxml2 stuff in them . It should also, eventually, make Libxml2 checks redundant in packages using YAZ, such as yazproxy. --- yaz_libxml2.m4 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/yaz_libxml2.m4 b/yaz_libxml2.m4 index 699adc1..9153a4b 100644 --- a/yaz_libxml2.m4 +++ b/yaz_libxml2.m4 @@ -27,16 +27,15 @@ if test "$xml2dir" != "no"; then XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` XML2_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT($XML2_VER) - AC_DEFINE(HAVE_XML2) + m4_default([$1],[AC_DEFINE(HAVE_XML2)]) elif test -x $xml2dir/bin/xml2-config; then XML2_LIBS=`$xml2dir/bin/xml2-config --libs` XML2_CFLAGS=`$xml2dir/bin/xml2-config --cflags` XML2_VER=`$xml2dir/bin/xml2-config --version` AC_MSG_RESULT($XML2_VER) - AC_DEFINE(HAVE_XML2) + m4_default([$1],[AC_DEFINE(HAVE_XML2)]) else AC_MSG_RESULT(Not found) - if test "$xml2dir" = "default"; then AC_MSG_WARN([libxml2 development libraries not found.]) AC_MSG_WARN([There will be no support for SRU.]) @@ -79,13 +78,13 @@ if test "$xsltdir" != "no"; then XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` XSLT_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT($XSLT_VER) - AC_DEFINE(HAVE_XSLT) + m4_default([$1],[AC_DEFINE(HAVE_XSLT)]) elif test -x $xsltdir/bin/xslt-config; then XML2_LIBS=`$xsltdir/bin/xslt-config --libs` XML2_CFLAGS=`$xsltdir/bin/xslt-config --cflags` XSLT_VER=`$xsltdir/bin/xslt-config --version` AC_MSG_RESULT($XSLT_VER) - AC_DEFINE(HAVE_XSLT) + m4_default([$1],[AC_DEFINE(HAVE_XSLT)]) else AC_MSG_RESULT(Not found) @@ -118,7 +117,7 @@ if test "$exsltdir" != "no"; then XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` EXSLT_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT($EXSLT_VER) - AC_DEFINE(HAVE_EXSLT) + m4_default([$1],[AC_DEFINE(HAVE_EXSLT)]) else AC_MSG_RESULT(Not found) -- 1.7.10.4