Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
     5         kx dnl Process this file with autoconf to produce a configuration script.
     5         kx AC_PREREQ(2.63)
     5         kx 
     5         kx m4_define([MAJOR_VERSION], [1])
     5         kx m4_define([MINOR_VERSION], [1])
     5         kx m4_define([MICRO_VERSION], [34])
     5         kx 
     5         kx AC_INIT([libxslt], [MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
     5         kx AC_CONFIG_SRCDIR([libxslt/xslt.c])
     5         kx AC_CONFIG_HEADERS(config.h)
     5         kx AC_CANONICAL_HOST
     5         kx AC_USE_SYSTEM_EXTENSIONS
     5         kx 
     5         kx dnl
     5         kx dnl libxslt is the main part of the package
     5         kx dnl libexslt is an extension
     5         kx dnl
     5         kx LIBXSLT_MAJOR_VERSION=MAJOR_VERSION
     5         kx LIBXSLT_MINOR_VERSION=MINOR_VERSION
     5         kx LIBXSLT_MICRO_VERSION=MICRO_VERSION
     5         kx LIBEXSLT_MAJOR_VERSION=0
     5         kx LIBEXSLT_MINOR_VERSION=8
     5         kx LIBEXSLT_MICRO_VERSION=20
     5         kx LIBXML_REQUIRED_VERSION=2.6.27
     5         kx 
     5         kx 
     5         kx LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION
     5         kx LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION
     5         kx 
     5         kx LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION`
     5         kx LIBXSLT_MAJOR_MINOR_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION
     5         kx 
     5         kx if test -f CVS/Entries; then
     5         kx   extra=`grep ChangeLog CVS/Entries | grep -v LIBXSLT | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
     5         kx   echo extra=$extra
     5         kx   if test "$extra" != ""
     5         kx   then
     5         kx       LIBXSLT_VERSION_EXTRA="-CVS$extra"
     5         kx   fi
     5         kx else if test -d .svn ; then
     5         kx   extra=`svn info | grep Revision | sed 's+Revision: ++'`
     5         kx   echo extra=$extra
     5         kx   if test "$extra" != ""
     5         kx   then
     5         kx       LIBXSLT_VERSION_EXTRA="-SVN$extra"
     5         kx   fi
     5         kx else if test -d .git ; then
     5         kx   extra=`git describe | sed 's+LIBXSLT[[0-9.]]*-++'`
     5         kx   echo extra=$extra
     5         kx   if test "$extra" != ""
     5         kx   then
     5         kx       LIBXSLT_VERSION_EXTRA="-GIT$extra"
     5         kx   fi
     5         kx fi
     5         kx fi
     5         kx fi
     5         kx 
     5         kx AC_SUBST(LIBXSLT_MAJOR_VERSION)
     5         kx AC_SUBST(LIBXSLT_MINOR_VERSION)
     5         kx AC_SUBST(LIBXSLT_MICRO_VERSION)
     5         kx AC_SUBST(LIBXSLT_VERSION)
     5         kx AC_SUBST(LIBXSLT_VERSION_INFO)
     5         kx AC_SUBST(LIBXSLT_VERSION_NUMBER)
     5         kx AC_SUBST(LIBXSLT_VERSION_EXTRA)
     5         kx AC_SUBST(LIBXSLT_MAJOR_MINOR_VERSION)
     5         kx 
     5         kx dnl
     5         kx dnl libexslt is an extension library
     5         kx dnl
     5         kx 
     5         kx LIBEXSLT_VERSION=$LIBEXSLT_MAJOR_VERSION.$LIBEXSLT_MINOR_VERSION.$LIBEXSLT_MICRO_VERSION
     5         kx LIBEXSLT_VERSION_INFO=`expr $LIBEXSLT_MAJOR_VERSION + $LIBEXSLT_MINOR_VERSION`:$LIBEXSLT_MICRO_VERSION:$LIBEXSLT_MINOR_VERSION
     5         kx 
     5         kx LIBEXSLT_VERSION_NUMBER=`expr $LIBEXSLT_MAJOR_VERSION \* 10000 + $LIBEXSLT_MINOR_VERSION \* 100 + $LIBEXSLT_MICRO_VERSION`
     5         kx 
     5         kx if test -f CVS/Entries; then
     5         kx   LIBEXSLT_VERSION_EXTRA=-CVS`grep ChangeLog CVS/Entries | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
     5         kx fi
     5         kx 
     5         kx AC_SUBST(LIBEXSLT_MAJOR_VERSION)
     5         kx AC_SUBST(LIBEXSLT_MINOR_VERSION)
     5         kx AC_SUBST(LIBEXSLT_MICRO_VERSION)
     5         kx AC_SUBST(LIBEXSLT_VERSION)
     5         kx AC_SUBST(LIBEXSLT_VERSION_INFO)
     5         kx AC_SUBST(LIBEXSLT_VERSION_NUMBER)
     5         kx AC_SUBST(LIBEXSLT_VERSION_EXTRA)
     5         kx 
     5         kx AM_INIT_AUTOMAKE([foreign])
     5         kx 
     5         kx # AM_MAINTAINER_MODE
     5         kx 
     5         kx # Support silent build rules, requires at least automake-1.11. Disable
     5         kx # by either passing --disable-silent-rules to configure or passing V=1
     5         kx # to make
     5         kx m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
     5         kx 
     5         kx dnl
     5         kx dnl Specific dir for HTML output ?
     5         kx dnl
     5         kx 
     5         kx AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path],
     5         kx             [path to base html directory, default $datadir/doc/html]),
     5         kx             [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
     5         kx 
     5         kx AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
     5         kx             [directory used under html-dir, default $PACKAGE-$VERSION/html]),
     5         kx             [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
     5         kx             [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
     5         kx 
     5         kx AC_SUBST(HTML_DIR)
     5         kx 
     5         kx dnl
     5         kx dnl Check the environment
     5         kx dnl
     5         kx 
     5         kx AC_PROG_CC
     5         kx AC_PROG_INSTALL
     5         kx AC_PROG_CPP
     5         kx AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
     5         kx AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
     5         kx PKG_PROG_PKG_CONFIG
     5         kx 
     5         kx AC_HEADER_STDC
     5         kx 
     5         kx LT_INIT(win32-dll)
     5         kx 
     5         kx 
     5         kx AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h)
     5         kx 
     5         kx dnl
     5         kx dnl if the system support linker version scripts for symbol versioning
     5         kx dnl then add it
     5         kx dnl
     5         kx AC_MSG_CHECKING([how to pass version script to the linker ($LD)])
     5         kx VERSION_SCRIPT_FLAGS=none
     5         kx if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then
     5         kx     VERSION_SCRIPT_FLAGS=-Wl,--version-script=
     5         kx elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then
     5         kx     VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
     5         kx fi
     5         kx AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
     5         kx AC_SUBST(VERSION_SCRIPT_FLAGS)
     5         kx AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none])
     5         kx 
     5         kx dnl Look for pthread.h, needed for testThreads
     5         kx case $host in
     5         kx   *-mingw*) ;;
     5         kx   *)
     5         kx THREAD_LIBS=""
     5         kx AC_CHECK_HEADER(pthread.h,
     5         kx     AC_CHECK_LIB(pthread, pthread_join,[
     5         kx        AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
     5         kx        AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
     5         kx        THREAD_LIBS="-lpthread"]))
     5         kx   ;;
     5         kx esac
     5         kx 
     5         kx AC_SUBST(THREAD_LIBS)
     5         kx 
     5         kx dnl
     5         kx dnl Detect supported locale
     5         kx dnl
     5         kx 
     5         kx AC_CHECK_HEADERS([locale.h xlocale.h])
     5         kx AC_CHECK_FUNCS([strxfrm_l])
     5         kx 
     5         kx dnl
     5         kx dnl Math detection
     5         kx dnl
     5         kx 
     5         kx AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
     5         kx AC_CHECK_HEADERS(sys/timeb.h time.h sys/stat.h sys/select.h stdarg.h)
     5         kx AC_CHECK_HEADERS(errno.h)
     5         kx AC_CHECK_FUNCS(stat _stat)
     5         kx AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
     5         kx   [M_LIBS="-lm"; AC_DEFINE([HAVE_POW],[], [Define if pow is there])]))
     5         kx 
     5         kx AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, floor,
     5         kx   [M_LIBS="-lm"; AC_DEFINE([HAVE_FLOOR],[], [Define if floor is there])]))
     5         kx 
     5         kx AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, fabs,
     5         kx   [M_LIBS="-lm"; AC_DEFINE([HAVE_FABS],[], [Define if fabs is there])]))
     5         kx 
     5         kx 
     5         kx AC_CHECK_FUNCS(gettimeofday)
     5         kx AC_CHECK_FUNCS(localtime localtime_r time gmtime gmtime_r ftime)
     5         kx 
     5         kx dnl Checking the standard string functions availability
     5         kx AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
     5         kx                NEED_TRIO=1)
     5         kx 
     5         kx dnl Checking for POSIX timers
     5         kx AC_CHECK_FUNCS(clock_gettime, [], [
     5         kx   AC_CHECK_LIB(rt, clock_gettime, [
     5         kx     AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
     5         kx     EXTRA_LIBS="$EXTRA_LIBS -lrt"
     5         kx   ])
     5         kx ])
     5         kx 
     5         kx dnl
     5         kx dnl Check for trio string functions
     5         kx dnl
     5         kx 
     5         kx if test "${NEED_TRIO}" = "1" ; then
     5         kx     echo Reusing trio library for string functions
     5         kx     WITH_TRIO=1
     5         kx else    
     5         kx     WITH_TRIO=0
     5         kx fi
     5         kx AC_SUBST(WITH_TRIO)
     5         kx 
     5         kx dnl
     5         kx dnl Some packages need to be checked against version numbers so we
     5         kx dnl define a function here for later use
     5         kx dnl
     5         kx AC_DEFUN([VERSION_TO_NUMBER],
     5         kx [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
     5         kx 
     5         kx dnl
     5         kx dnl Perl is just needed for generating some data for XSLtmark
     5         kx dnl
     5         kx 
     5         kx AC_CHECK_PROG(PERL, perl, perl, false)
     5         kx AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
     5         kx 
     5         kx dnl
     5         kx dnl check for python
     5         kx dnl
     5         kx 
     5         kx pythondir=
     5         kx AC_ARG_WITH(python, [  --with-python[=DIR]    Build Python bindings if found])
     5         kx if test "$with_python" != "no" ; then
     5         kx 	    PYTHON="$with_python"
     5         kx     if test "$PYTHON" != ""
     5         kx     then
     5         kx 	echo Found Python version $PYTHON_VERSION
     5         kx     fi
     5         kx     pythondir='$(PYTHON_SITE_PACKAGES)'
     5         kx fi
     5         kx AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
     5         kx if test "$PYTHON_INCLUDES" != ""
     5         kx then
     5         kx     PYTHON_SUBDIR=python
     5         kx else
     5         kx     PYTHON_SUBDIR=
     5         kx fi
     5         kx AC_SUBST(PYTHON)
     5         kx AC_SUBST(pythondir)
     5         kx AC_SUBST(PYTHON_SUBDIR)
     5         kx AC_SUBST(PYTHON_LIBS)
     5         kx 
     5         kx AC_ARG_WITH(crypto, [  --with-crypto           Add crypto support to exslt (on)])
     5         kx WITH_CRYPTO=0
     5         kx CRYPTO_TESTDIR=
     5         kx if test "$with_crypto" = "no" ; then
     5         kx     echo Disabling crypto support
     5         kx     LIBGCRYPT_CFLAGS=""
     5         kx     LIBGCRYPT_LIBS=""
     5         kx else
     5         kx case $host in
     5         kx   *-mingw*)
     5         kx     dnl Use only native crypto-API for mingw* hosts
     5         kx     dnl TODO: to implement --with-crypto=foo to allow switch between
     5         kx     dnl crypto libraries
     5         kx     WITH_CRYPTO=1
     5         kx     CRYPTO_TESTDIR=crypto
     5         kx     ;;
     5         kx   *)
     5         kx     AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
     5         kx     if test "$LIBGCRYPT_CONFIG" != "no" ; then
     5         kx       LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
     5         kx       if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
     5         kx       then
     5         kx         LIBGCRYPT_CFLAGS=""
     5         kx         LIBGCRYPT_LIBS=""
     5         kx         echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
     5         kx       else
     5         kx         LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
     5         kx         LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
     5         kx         AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
     5         kx         echo 'Crypto extensions will be available.'
     5         kx         WITH_CRYPTO=1
     5         kx         CRYPTO_TESTDIR=crypto
     5         kx       fi
     5         kx     else
     5         kx       LIBGCRYPT_CFLAGS=""
     5         kx       LIBGCRYPT_LIBS=""
     5         kx       echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
     5         kx     fi
     5         kx esac
     5         kx fi
     5         kx AC_SUBST(WITH_CRYPTO)
     5         kx AC_SUBST(CRYPTO_TESTDIR)
     5         kx AC_SUBST(LIBGCRYPT_CFLAGS)
     5         kx AC_SUBST(LIBGCRYPT_LIBS)
     5         kx 
     5         kx dnl
     5         kx dnl Debug for DV (-Wunreachable-code)
     5         kx dnl
     5         kx if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ]] || \
     5         kx    [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxslt" ]]
     5         kx    then
     5         kx     if test "${with_mem_debug}" = "" ;
     5         kx     then
     5         kx 	with_mem_debug="yes"
     5         kx     fi
     5         kx     CFLAGS="-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat=2 -Wmissing-format-attribute -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
     5         kx fi
     5         kx 
     5         kx AC_ARG_WITH(debug, [  --with-debug            Add the debugging code (on)])
     5         kx if test "$with_debug" = "no" ; then
     5         kx     echo Disabling debug support
     5         kx     WITH_XSLT_DEBUG=0
     5         kx else    
     5         kx     WITH_XSLT_DEBUG=1
     5         kx fi
     5         kx AC_SUBST(WITH_XSLT_DEBUG)
     5         kx 
     5         kx AC_ARG_WITH(mem_debug, [  --with-mem-debug        Add the memory debugging module (off)])
     5         kx if test "$with_mem_debug" = "yes" ; then
     5         kx     echo Enabling memory debug support
     5         kx     WITH_MEM_DEBUG=1
     5         kx else    
     5         kx     WITH_MEM_DEBUG=0
     5         kx fi
     5         kx AC_SUBST(WITH_MEM_DEBUG)
     5         kx 
     5         kx dnl 
     5         kx dnl Is debugger support requested
     5         kx dnl
     5         kx AC_ARG_WITH(debugger, [  --with-debugger        Add the debugging support (on)])
     5         kx if test "$with_debugger" = "no" ; then
     5         kx     echo Disabling debugger
     5         kx     WITH_DEBUGGER=0
     5         kx else
     5         kx     echo Enabling debugger
     5         kx     WITH_DEBUGGER=1
     5         kx     AC_DEFINE([WITH_DEBUGGER],[], [Define if debugging support is enabled])
     5         kx fi
     5         kx AC_SUBST(WITH_DEBUGGER)
     5         kx 
     5         kx dnl
     5         kx dnl Is profiler support requested
     5         kx dnl
     5         kx AC_ARG_WITH(profiler, [  --with-profiler        Add the profiling support (on)])
     5         kx if test "$with_profiler" = "no" ; then
     5         kx     echo Disabling profiler
     5         kx     WITH_PROFILER=0
     5         kx else
     5         kx     echo Enabling profiler
     5         kx     WITH_PROFILER=1
     5         kx     AC_DEFINE([WITH_PROFILER],[], [Define if profiling support is enabled])
     5         kx fi
     5         kx AC_SUBST(WITH_PROFILER)
     5         kx 
     5         kx dnl
     5         kx dnl The following new parameters were added to offer
     5         kx dnl the ability to specify the location of the libxml
     5         kx dnl library during linking and compilation.
     5         kx dnl
     5         kx dnl original work - Mathieu Lacage 30/03/2000
     5         kx dnl some tweaking - David Härdeman 30/10/2001
     5         kx dnl
     5         kx 
     5         kx LIBXML_CONFIG_PREFIX=""
     5         kx LIBXML_SRC=""
     5         kx 
     5         kx AC_ARG_WITH(libxml-prefix,
     5         kx         [  --with-libxml-prefix=[PFX]		Specify location of libxml config],
     5         kx 	LIBXML_CONFIG_PREFIX=$withval
     5         kx )
     5         kx         
     5         kx AC_ARG_WITH(libxml-include-prefix,
     5         kx         [  --with-libxml-include-prefix=[PFX]	Specify location of libxml headers],
     5         kx         LIBXML_CFLAGS="-I$withval"
     5         kx )
     5         kx 
     5         kx AC_ARG_WITH(libxml-libs-prefix,
     5         kx         [  --with-libxml-libs-prefix=[PFX]	Specify location of libxml libs],
     5         kx         LIBXML_LIBS="-L$withval"
     5         kx )
     5         kx 
     5         kx AC_ARG_WITH(libxml-src,
     5         kx 	[  --with-libxml-src=[DIR]              For libxml thats not installed yet (sets all three above)],
     5         kx 	LIBXML_SRC="$withval"
     5         kx )
     5         kx AC_SUBST(LIBXML_SRC)
     5         kx 
     5         kx dnl
     5         kx dnl where is xml2-config
     5         kx dnl
     5         kx 
     5         kx AC_SUBST(LIBXML_REQUIRED_VERSION)
     5         kx if test "x$LIBXML_CONFIG_PREFIX" != "x"
     5         kx then
     5         kx 	AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false], [${LIBXML_CONFIG_PREFIX}/bin])
     5         kx else
     5         kx 	AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false])
     5         kx fi
     5         kx 
     5         kx dnl
     5         kx dnl imported from libxml2, c.f. #77827 
     5         kx dnl
     5         kx if test "${GCC}" != "yes" ; then
     5         kx     case "${host}" in
     5         kx           *-*-hpux* )
     5         kx 	       CFLAGS="${CFLAGS} -Wp,-H30000"
     5         kx 	       ;;
     5         kx           *-dec-osf* )
     5         kx                CFLAGS="${CFLAGS} -ieee"
     5         kx                ;;
     5         kx     esac
     5         kx else
     5         kx     CFLAGS="${CFLAGS} -Wall -Wextra -Wformat=2 -Wmissing-format-attribute"
     5         kx     case "${host}" in
     5         kx           alpha*-*-linux* )
     5         kx 	       CFLAGS="${CFLAGS} -mieee"
     5         kx 	       ;;
     5         kx 	  alpha*-*-osf* )
     5         kx 	       CFLAGS="${CFLAGS} -mieee"
     5         kx 	       ;;
     5         kx     esac
     5         kx fi
     5         kx 
     5         kx dnl
     5         kx dnl Check which type of library to build. Default to building shared and static.
     5         kx dnl
     5         kx 
     5         kx build_shared_libs="yes"
     5         kx build_static_libs="yes"
     5         kx 
     5         kx if test "$enable_shared" = "no"; then
     5         kx     build_shared_libs="no"
     5         kx fi
     5         kx 
     5         kx if test "$enable_static" = "no"; then
     5         kx     build_static_libs="no"
     5         kx fi
     5         kx 
     5         kx if test "$build_shared_libs" = "no" -a "$build_static_libs" = "no"; then
     5         kx     build_static_libs="yes"
     5         kx fi
     5         kx 
     5         kx dnl
     5         kx dnl Override other variables if LIBXML_SRC is set
     5         kx dnl
     5         kx 
     5         kx if test "x$LIBXML_SRC" != "x"; then
     5         kx     CWD=`pwd`
     5         kx     if cd $LIBXML_SRC; then
     5         kx         LIBXML_SRC=`pwd`
     5         kx         XML_CONFIG="${LIBXML_SRC}/xml2-config"
     5         kx         LIBXML_CFLAGS="-I${LIBXML_SRC}/include"
     5         kx         if test "$build_static_libs" = "no"; then
     5         kx             LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs --dynamic`"
     5         kx         else
     5         kx             LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs`"
     5         kx         fi
     5         kx         WITH_MODULES="`$XML_CONFIG --modules`"
     5         kx         cd $CWD
     5         kx     else
     5         kx         AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?])
     5         kx     fi
     5         kx fi
     5         kx 
     5         kx dnl
     5         kx dnl Try pkg-config first if nothing is set
     5         kx dnl
     5         kx 
     5         kx if test "x$LIBXML_CONFIG_PREFIX" = "x" -a "x$LIBXML_LIBS" = "x"; then
     5         kx     if test "$build_static_libs" = "no"; then
     5         kx         PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], [
     5         kx             WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
     5         kx         ], [ ])
     5         kx     else
     5         kx         PKG_CHECK_MODULES_STATIC([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],
     5         kx         [ ], [ ])
     5         kx     fi
     5         kx fi
     5         kx 
     5         kx dnl
     5         kx dnl make sure xml2-config is executable,
     5         kx dnl test version and init our variables
     5         kx dnl
     5         kx 
     5         kx if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1
     5         kx then
     5         kx     AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
     5         kx     XMLVERS=`$XML_CONFIG --version`
     5         kx     if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION); then
     5         kx         AC_MSG_RESULT($XMLVERS found)
     5         kx     else
     5         kx         AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
     5         kx     fi
     5         kx 
     5         kx     if test "$build_static_libs" = "no"; then
     5         kx         LIBXML_LIBS="`$XML_CONFIG --libs --dynamic`"
     5         kx     else
     5         kx         LIBXML_LIBS="`$XML_CONFIG --libs`"
     5         kx     fi
     5         kx 	LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
     5         kx         WITH_MODULES="`$XML_CONFIG --modules`"
     5         kx fi
     5         kx 
     5         kx if test "x$LIBXML_LIBS" = "x"
     5         kx then
     5         kx 	AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
     5         kx fi
     5         kx 
     5         kx 
     5         kx AC_SUBST(CFLAGS)
     5         kx AC_SUBST(CPPFLAGS)
     5         kx AC_SUBST(LDFLAGS)
     5         kx 
     5         kx AC_ARG_WITH(plugins,
     5         kx [  --with-plugins          Add plugin extension support (on)])
     5         kx if test "$with_plugins" = ""
     5         kx then
     5         kx     with_plugins=yes
     5         kx fi
     5         kx 
     5         kx AC_MSG_CHECKING([whether shared libraries will be built (required for plugins)])
     5         kx if test "$build_shared_libs" = "no" -a "$with_plugins" = "yes"; then
     5         kx 	 AC_MSG_RESULT(no)
     5         kx 	 AC_MSG_WARN([Disabling plugin support.])
     5         kx 	 AC_MSG_WARN([Plugins require that shared libraries be built.])
     5         kx 	 with_plugins=no
     5         kx else
     5         kx 	 AC_MSG_RESULT(yes)
     5         kx fi
     5         kx 
     5         kx if test "$with_plugins" = "yes" ; then
     5         kx   AC_MSG_CHECKING([libxml2 module support])
     5         kx   if test "${WITH_MODULES}" = "1"; then
     5         kx     AC_MSG_RESULT(yes)
     5         kx   else
     5         kx     AC_MSG_RESULT(no)
     5         kx     WITH_MODULES="0"
     5         kx   fi
     5         kx else
     5         kx   WITH_MODULES="0"
     5         kx fi
     5         kx 
     5         kx AC_SUBST(WITH_MODULES)
     5         kx AM_CONDITIONAL(WITH_MODULES, test "$WITH_MODULES" = "1")
     5         kx 
     5         kx dnl
     5         kx dnl setup default module path
     5         kx dnl
     5         kx expanded_libdir=$(
     5         kx     test "x$prefix" = xNONE && prefix="$ac_default_prefix"
     5         kx     test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
     5         kx     while test "$libdir_old" != "$libdir"; do
     5         kx       libdir_old="$libdir"
     5         kx       eval libdir="$libdir"
     5         kx     done
     5         kx     echo "$libdir"
     5         kx )
     5         kx LIBXSLT_DEFAULT_PLUGINS_PATH="$expanded_libdir/libxslt-plugins"
     5         kx AC_SUBST(LIBXSLT_DEFAULT_PLUGINS_PATH)
     5         kx 
     5         kx case "$host" in
     5         kx  *-*-cygwin*|*-*-mingw*)
     5         kx  LDFLAGS="$LDFLAGS -no-undefined"
     5         kx  ;;
     5         kx esac
     5         kx 
     5         kx 
     5         kx AC_SUBST(XSLTPROCDV)
     5         kx AC_SUBST(PYTHONSODV)
     5         kx AC_SUBST(XML_CONFIG)
     5         kx AC_SUBST(LIBXML_LIBS)
     5         kx AC_SUBST(LIBXML_CFLAGS)
     5         kx AC_SUBST(PYTHON)
     5         kx AC_SUBST(PYTHON_VERSION)
     5         kx AC_SUBST(PYTHON_INCLUDES)
     5         kx AC_SUBST(PYTHON_SITE_PACKAGES)
     5         kx 
     5         kx XSLT_LIBDIR='-L${libdir}'
     5         kx XSLT_INCLUDEDIR='-I${includedir}'
     5         kx XSLT_LIBS="-lxslt $LIBXML_LIBS"
     5         kx XSLT_PRIVATE_LIBS="$M_LIBS"
     5         kx AC_SUBST(XSLT_LIBDIR)
     5         kx AC_SUBST(XSLT_INCLUDEDIR)
     5         kx AC_SUBST(XSLT_LIBS)
     5         kx AC_SUBST(XSLT_PRIVATE_LIBS)
     5         kx 
     5         kx EXSLT_LIBDIR='-L${libdir}'
     5         kx EXSLT_INCLUDEDIR='-I${includedir}'
     5         kx EXSLT_LIBS="-lexslt $XSLT_LIBS"
     5         kx EXSLT_PRIVATE_LIBS="$XSLT_PRIVATE_LIBS $LIBGCRYPT_LIBS"
     5         kx AC_SUBST(EXSLT_LIBDIR)
     5         kx AC_SUBST(EXSLT_INCLUDEDIR)
     5         kx AC_SUBST(EXSLT_LIBS)
     5         kx AC_SUBST(EXSLT_PRIVATE_LIBS)
     5         kx 
     5         kx AC_SUBST(EXTRA_LIBS)
     5         kx 
     5         kx AC_SUBST(M_LIBS)
     5         kx 
     5         kx dnl for the spec file
     5         kx RELDATE=`date +'%a %b %e %Y'`
     5         kx AC_SUBST(RELDATE)
     5         kx 
     5         kx rm -f COPYING.LIB COPYING 2>/dev/null && $LN_S $srcdir/Copyright COPYING
     5         kx 
     5         kx 
     5         kx AC_CONFIG_FILES([
     5         kx Makefile
     5         kx libxslt.pc
     5         kx libexslt.pc
     5         kx libxslt/Makefile
     5         kx libxslt/xsltconfig.h
     5         kx libxslt/xsltwin32config.h
     5         kx libexslt/Makefile
     5         kx libexslt/exsltconfig.h
     5         kx xsltproc/Makefile
     5         kx python/Makefile
     5         kx python/tests/Makefile
     5         kx tests/Makefile
     5         kx tests/docs/Makefile
     5         kx tests/REC1/Makefile
     5         kx tests/REC2/Makefile
     5         kx tests/REC/Makefile
     5         kx tests/general/Makefile
     5         kx tests/reports/Makefile
     5         kx tests/extensions/Makefile
     5         kx tests/namespaces/Makefile
     5         kx tests/keys/Makefile
     5         kx tests/numbers/Makefile
     5         kx tests/documents/Makefile
     5         kx tests/xmlspec/Makefile
     5         kx tests/multiple/Makefile
     5         kx tests/xinclude/Makefile
     5         kx tests/XSLTMark/Makefile
     5         kx tests/docbook/Makefile
     5         kx tests/exslt/Makefile
     5         kx tests/exslt/common/Makefile
     5         kx tests/exslt/functions/Makefile
     5         kx tests/exslt/math/Makefile
     5         kx tests/exslt/saxon/Makefile
     5         kx tests/exslt/sets/Makefile
     5         kx tests/exslt/strings/Makefile
     5         kx tests/exslt/date/Makefile
     5         kx tests/exslt/dynamic/Makefile
     5         kx tests/exslt/crypto/Makefile
     5         kx tests/plugins/Makefile
     5         kx tests/fuzz/Makefile
     5         kx doc/Makefile
     5         kx xslt-config
     5         kx libxslt.spec
     5         kx ])
     5         kx AC_CONFIG_LINKS([tests/fuzz/xpath.xml:tests/fuzz/xpath.xml])
     5         kx AC_CONFIG_LINKS([tests/fuzz/xslt.xml:tests/fuzz/xslt.xml])
     5         kx 
     5         kx AC_OUTPUT