Fix require version
[m4-moved-to-github.git] / yaz_libxml2.m4
index 699adc1..9153a4b 100644 (file)
@@ -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)