From: Adam Dickmeiss Date: Wed, 3 May 2006 12:02:23 +0000 (+0000) Subject: YAZ optionally uses libxslt. Check for xml2 obsoleted because libxslt X-Git-Tag: YAZ.2.1.20~95 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=fd3508c19a217ebd059552cc301c76d203d03524;p=yaz-moved-to-github.git YAZ optionally uses libxslt. Check for xml2 obsoleted because libxslt includes it. --- diff --git a/buildconf.sh b/buildconf.sh index de89581..970f81e 100755 --- a/buildconf.sh +++ b/buildconf.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildconf.sh,v 1.28 2006-04-21 12:54:52 adam Exp $ +# $Id: buildconf.sh,v 1.29 2006-05-03 12:02:23 adam Exp $ if automake --version|head -1 |grep '1\.[4-7]'; then echo "automake 1.4-1.7 is active. You should use automake 1.8 or later" @@ -73,6 +73,6 @@ Or just build the Debian packages without configuring When building from a CVS checkout, you need these Debian tools: autoconf, automake, bison, gcc, libtool, docbook-utils, docbook, docbook-xml, docbook-dsssl, jade, jadetex, - libxml2-dev, libssl-dev, libreadline5-dev, libwrap0-dev, any tcl + libxslt1-dev, libssl-dev, libreadline5-dev, libwrap0-dev, any tcl EOF fi diff --git a/configure.ac b/configure.ac index 4397a81..d55af6f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2006 dnl See the file LICENSE for details. -dnl $Id: configure.ac,v 1.9 2006-04-26 09:40:42 adam Exp $ +dnl $Id: configure.ac,v 1.10 2006-05-03 12:02:23 adam Exp $ AC_PREREQ(2.59) AC_INIT([yaz],[2.1.19],[adam@indexdata.dk]) AC_CONFIG_SRCDIR(configure.ac) @@ -316,38 +316,47 @@ if test "$enable_threads" = "yes" -a "$HAVETHREADS" = "0"; then CC=$OCC LIBS="$OLIBS $LIBTHREAD" fi -dnl -dnl ----- libXML2 -AC_SUBST(XML2_LIBS) + +dnl ----- libXSLT +AC_SUBST(XSLT_CFLAGS) AC_SUBST(XML2_CFLAGS) -xml2dir=default -AC_ARG_WITH(xml2, [ --with-xml2[=PREFIX] use libxml2 in PREFIX],[xml2dir=$withval]) -if test "$xml2dir" = "yes" -o "$xml2dir" = "default"; then +xsltdir=default +AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval) +if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then for d in /usr /usr/local; do - if test -x $d/bin/xml2-config; then - xml2dir=$d + if test -x $d/bin/xslt-config; then + xsltdir=$d fi done fi -if test "$xml2dir" != "no"; then - AC_MSG_CHECKING(for libXML2) - if test -x $xml2dir/bin/xml2-config; then - XML2_LIBS=`$xml2dir/bin/xml2-config --libs` - LIBS="$XML2_LIBS $LIBS" - XML2_CFLAGS=`$xml2dir/bin/xml2-config --cflags` - XML2_VER=`$xml2dir/bin/xml2-config --version` - AC_MSG_RESULT($XML2_VER) +if test "$xsltdir" != "no"; then + AC_MSG_CHECKING(for libXSLT) + if test -x $xsltdir/bin/xslt-config; then + XSLT_LIBS=`$xsltdir/bin/xslt-config --libs` + XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags` + XML2_CFLAGS=$XSLT_CFLAGS + XSLT_VER=`$xsltdir/bin/xslt-config --version` + LIBS="$XSLT_LIBS $LIBS" + AC_MSG_RESULT($XSLT_VER) + AC_DEFINE(HAVE_XSLT) 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([YAZ will NOT support SRW/SRU.]) + AC_MSG_RESULT(Not found) + + if test "$xsltdir" = "default"; then + AC_MSG_WARN([libxslt development libraries not found.]) + AC_MSG_WARN([YAZ will NOT support SRU.]) else - AC_MSG_ERROR([libXML2 development libraries not found.]) + AC_MSG_ERROR([libxslt development libraries not found.]) fi fi fi + +xml2dir=default +AC_ARG_WITH(xml2,[[ --with-xml2[=PREFIX] OBSOLETE. Use --with-xslt instead]],xml2dir=$withval) +if test "$xml2dir" != "default"; then + AC_MSG_ERROR([--with-xml2 OBSOLETE. Use --with-xslt instead.]) +fi dnl dnl ------ Memory debugging AC_ARG_ENABLE(memdebug, [ --enable-memdebug enable memory debugging],[enable_memdebug=$enableval],[enable_memdebug=none]) diff --git a/debian/control b/debian/control index 4e4710e..077d466 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Standards-Version: 3.6.2 Maintainer: Adam Dickmeiss Priority: extra -Build-Depends: debhelper (>= 4), libxml2-dev, libssl-dev, libreadline5-dev, libwrap0-dev +Build-Depends: debhelper (>= 4), libxslt1-dev, libssl-dev, libreadline5-dev, libwrap0-dev Package: libyaz Section: libs @@ -37,7 +37,7 @@ Description: The YAZ Z39.50 toolkit (documentation) This packages includes documentation for YAZ in HTML and PDF. Package: libyaz-dev -Depends: libyaz (= ${Source-Version}), libxml2-dev, libwrap0-dev, libssl-dev +Depends: libyaz (= ${Source-Version}), libxslt1-dev, libwrap0-dev, libssl-dev Replaces: yaz-devel Conflicts: yaz-devel Section: devel diff --git a/debian/rules b/debian/rules index 74f09f9..5dd4035 100755 --- a/debian/rules +++ b/debian/rules @@ -30,7 +30,7 @@ endif config.status: configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-shared --enable-static --enable-tcpd --with-xml2 --with-openssl + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-shared --enable-static --enable-tcpd --with-xslt --with-openssl build: build-stamp