AC_INIT(libxslt/xslt.c) dnl dnl libxslt is the main part of the package dnl LIBXSLT_MAJOR_VERSION=1 LIBXSLT_MINOR_VERSION=0 LIBXSLT_MICRO_VERSION=0 PACKAGE=libxslt LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION` AC_SUBST(LIBXSLT_MAJOR_VERSION) AC_SUBST(LIBXSLT_MINOR_VERSION) AC_SUBST(LIBXSLT_MICRO_VERSION) AC_SUBST(LIBXSLT_VERSION) AC_SUBST(LIBXSLT_VERSION_INFO) AC_SUBST(LIBXSLT_VERSION_NUMBER) dnl dnl libexslt is an extension library dnl LIBEXSLT_MAJOR_VERSION=0 LIBEXSLT_MINOR_VERSION=1 LIBEXSLT_MICRO_VERSION=0 LIBEXSLT_VERSION=$LIBEXSLT_MAJOR_VERSION.$LIBEXSLT_MINOR_VERSION.$LIBEXSLT_MICRO_VERSION LIBEXSLT_VERSION_INFO=`expr $LIBEXSLT_MAJOR_VERSION + $LIBEXSLT_MINOR_VERSION`:$LIBEXSLT_MICRO_VERSION:$LIBEXSLT_MINOR_VERSION LIBEXSLT_VERSION_NUMBER=`expr $LIBEXSLT_MAJOR_VERSION \* 10000 + $LIBEXSLT_MINOR_VERSION \* 100 + $LIBEXSLT_MICRO_VERSION` AC_SUBST(LIBEXSLT_MAJOR_VERSION) AC_SUBST(LIBEXSLT_MINOR_VERSION) AC_SUBST(LIBEXSLT_MICRO_VERSION) AC_SUBST(LIBEXSLT_VERSION) AC_SUBST(LIBEXSLT_VERSION_INFO) AC_SUBST(LIBEXSLT_VERSION_NUMBER) VERSION=${LIBXSLT_VERSION} AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_MAINTAINER_MODE AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) dnl dnl Check the environment dnl AC_ISC_POSIX AC_PROG_CC AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL dnl dnl Math detection dnl AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h) AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h) AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan, [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)])) AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf, [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)])) AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)])) AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, pow, [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)])) AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, pow, [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)])) AC_CHECK_FUNCS(gettimeofday) dnl dnl Perl is just needed for generating some data for XSLtmark dnl AC_CHECK_PROG(PERL, perl, perl, false) AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false") dnl dnl Debug for DV (-Wunreachable-code) dnl if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then if test "${with_mem_debug}" = "" ; then with_mem_debug="yes" fi CFLAGS="-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline " fi AC_ARG_WITH(debug, [ --with-debug Add the debugging code (on)]) if test "$with_debug" = "no" ; then echo Disabling debug support WITH_XSLT_DEBUG=0 else WITH_XSLT_DEBUG=1 fi AC_SUBST(WITH_XSLT_DEBUG) AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) if test "$with_mem_debug" = "yes" ; then echo Enabling memory debug support WITH_MEM_DEBUG=1 else WITH_MEM_DEBUG=0 fi AC_SUBST(WITH_MEM_DEBUG) dnl dnl The following new parameters were added to offer dnl the ability to specify the location of the libxml dnl library during linking and compilation. dnl Mathieu Lacage 30/03/2000 dnl LIBXML_PREFIX="" AC_ARG_WITH(libxml-prefix, [ --with-libxml-prefix=[PFX] Specify location of libxml], LIBXML_PREFIX=$withval ) AC_ARG_WITH(libxml-include-prefix, [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers], LIBXML_CFLAGS="-I$withval" ) AC_ARG_WITH(libxml-libs-prefix, [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], LIBXML_LIBS="-L$withval -lxml -lz" ) dnl No internationalization (yet ?) dnl dnl ALL_LINGUAS="it ko fr de es no ga sv pt ja fi cs" dnl AM_GNU_GETTEXT dnl dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) dnl dnl find libxml dnl XML_CONFIG="xml2-config" LIBXML_REQUIRED_VERSION=2.4.0 AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION) if test "x$LIBXML_PREFIX" != "x" then if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1 then XML_CONFIG=${LIBXML_PREFIX}/bin/xml2-config else XML_CONFIG=xml2-config fi fi AC_DEFUN(VERSION_TO_NUMBER, [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`]) dnl dnl test version and init our variables dnl if test "x$XML_CONFIG" != "x" then vers=VERSION_TO_NUMBER($XML_CONFIG --version) if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION) then LIBXML_LIBS="`$XML_CONFIG --libs`" LIBXML_CFLAGS="`$XML_CONFIG --cflags`" AC_MSG_RESULT(found) else AC_MSG_ERROR(You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt) fi else AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.) fi AC_SUBST(XML_CONFIG) AC_SUBST(LIBXML_LIBS) AC_SUBST(LIBXML_CFLAGS) XSLT_LIBDIR='-L${libdir}' XSLT_INCLUDEDIR='-I${includedir}' EXTRA_LIBS="$LIBXML_LIBS $M_LIBS" XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS" AC_SUBST(XSLT_LIBDIR) AC_SUBST(XSLT_INCLUDEDIR) AC_SUBST(EXTRA_LIBS) AC_SUBST(XSLT_LIBS) AC_OUTPUT([ Makefile libxslt/Makefile libxslt/xsltconfig.h libxslt/xsltwin32config.h libexslt/Makefile libexslt/exsltconfig.h xsltproc/Makefile tests/Makefile tests/docs/Makefile tests/REC1/Makefile tests/REC2/Makefile tests/REC/Makefile tests/general/Makefile tests/extensions/Makefile tests/namespaces/Makefile tests/numbers/Makefile tests/documents/Makefile tests/xmlspec/Makefile tests/multiple/Makefile tests/XSLTMark/Makefile tests/docbook/Makefile doc/Makefile xslt-config libxslt.spec ])