1dnl Process this file with autoconf to produce a configuration script. 2AC_PREREQ(2.63) 3 4m4_define([MAJOR_VERSION], [1]) 5m4_define([MINOR_VERSION], [1]) 6m4_define([MICRO_VERSION], [34]) 7 8AC_INIT([libxslt], [MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION]) 9AC_CONFIG_SRCDIR([libxslt/xslt.c]) 10AC_CONFIG_HEADERS(config.h) 11AC_CANONICAL_HOST 12AC_USE_SYSTEM_EXTENSIONS 13 14dnl 15dnl libxslt is the main part of the package 16dnl libexslt is an extension 17dnl 18LIBXSLT_MAJOR_VERSION=MAJOR_VERSION 19LIBXSLT_MINOR_VERSION=MINOR_VERSION 20LIBXSLT_MICRO_VERSION=MICRO_VERSION 21LIBEXSLT_MAJOR_VERSION=0 22LIBEXSLT_MINOR_VERSION=8 23LIBEXSLT_MICRO_VERSION=20 24LIBXML_REQUIRED_VERSION=2.6.27 25 26 27LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION 28LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION 29 30LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION` 31LIBXSLT_MAJOR_MINOR_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION 32 33if test -f CVS/Entries; then 34 extra=`grep ChangeLog CVS/Entries | grep -v LIBXSLT | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` 35 echo extra=$extra 36 if test "$extra" != "" 37 then 38 LIBXSLT_VERSION_EXTRA="-CVS$extra" 39 fi 40else if test -d .svn ; then 41 extra=`svn info | grep Revision | sed 's+Revision: ++'` 42 echo extra=$extra 43 if test "$extra" != "" 44 then 45 LIBXSLT_VERSION_EXTRA="-SVN$extra" 46 fi 47else if test -d .git ; then 48 extra=`git describe | sed 's+LIBXSLT[[0-9.]]*-++'` 49 echo extra=$extra 50 if test "$extra" != "" 51 then 52 LIBXSLT_VERSION_EXTRA="-GIT$extra" 53 fi 54fi 55fi 56fi 57 58AC_SUBST(LIBXSLT_MAJOR_VERSION) 59AC_SUBST(LIBXSLT_MINOR_VERSION) 60AC_SUBST(LIBXSLT_MICRO_VERSION) 61AC_SUBST(LIBXSLT_VERSION) 62AC_SUBST(LIBXSLT_VERSION_INFO) 63AC_SUBST(LIBXSLT_VERSION_NUMBER) 64AC_SUBST(LIBXSLT_VERSION_EXTRA) 65AC_SUBST(LIBXSLT_MAJOR_MINOR_VERSION) 66 67dnl 68dnl libexslt is an extension library 69dnl 70 71LIBEXSLT_VERSION=$LIBEXSLT_MAJOR_VERSION.$LIBEXSLT_MINOR_VERSION.$LIBEXSLT_MICRO_VERSION 72LIBEXSLT_VERSION_INFO=`expr $LIBEXSLT_MAJOR_VERSION + $LIBEXSLT_MINOR_VERSION`:$LIBEXSLT_MICRO_VERSION:$LIBEXSLT_MINOR_VERSION 73 74LIBEXSLT_VERSION_NUMBER=`expr $LIBEXSLT_MAJOR_VERSION \* 10000 + $LIBEXSLT_MINOR_VERSION \* 100 + $LIBEXSLT_MICRO_VERSION` 75 76if test -f CVS/Entries; then 77 LIBEXSLT_VERSION_EXTRA=-CVS`grep ChangeLog CVS/Entries | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` 78fi 79 80AC_SUBST(LIBEXSLT_MAJOR_VERSION) 81AC_SUBST(LIBEXSLT_MINOR_VERSION) 82AC_SUBST(LIBEXSLT_MICRO_VERSION) 83AC_SUBST(LIBEXSLT_VERSION) 84AC_SUBST(LIBEXSLT_VERSION_INFO) 85AC_SUBST(LIBEXSLT_VERSION_NUMBER) 86AC_SUBST(LIBEXSLT_VERSION_EXTRA) 87 88AM_INIT_AUTOMAKE([foreign]) 89 90# AM_MAINTAINER_MODE 91 92# Support silent build rules, requires at least automake-1.11. Disable 93# by either passing --disable-silent-rules to configure or passing V=1 94# to make 95m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 96 97dnl 98dnl Specific dir for HTML output ? 99dnl 100 101AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path], 102 [path to base html directory, default $datadir/doc/html]), 103 [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc']) 104 105AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path], 106 [directory used under html-dir, default $PACKAGE-$VERSION/html]), 107 [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"], 108 [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"]) 109 110AC_SUBST(HTML_DIR) 111 112dnl 113dnl Check the environment 114dnl 115 116AC_PROG_CC 117AC_PROG_INSTALL 118AC_PROG_CPP 119AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint) 120AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) 121PKG_PROG_PKG_CONFIG 122 123AC_HEADER_STDC 124 125LT_INIT(win32-dll) 126 127 128AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h) 129 130dnl 131dnl if the system support linker version scripts for symbol versioning 132dnl then add it 133dnl 134AC_MSG_CHECKING([how to pass version script to the linker ($LD)]) 135VERSION_SCRIPT_FLAGS=none 136if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then 137 VERSION_SCRIPT_FLAGS=-Wl,--version-script= 138elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then 139 VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," 140fi 141AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS]) 142AC_SUBST(VERSION_SCRIPT_FLAGS) 143AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none]) 144 145dnl Look for pthread.h, needed for testThreads 146case $host in 147 *-mingw*) ;; 148 *) 149THREAD_LIBS="" 150AC_CHECK_HEADER(pthread.h, 151 AC_CHECK_LIB(pthread, pthread_join,[ 152 AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) 153 AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there]) 154 THREAD_LIBS="-lpthread"])) 155 ;; 156esac 157 158AC_SUBST(THREAD_LIBS) 159 160dnl 161dnl Detect supported locale 162dnl 163 164AC_CHECK_HEADERS([locale.h xlocale.h]) 165AC_CHECK_FUNCS([strxfrm_l]) 166 167dnl 168dnl Math detection 169dnl 170 171AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h) 172AC_CHECK_HEADERS(sys/timeb.h time.h sys/stat.h sys/select.h stdarg.h) 173AC_CHECK_HEADERS(errno.h) 174AC_CHECK_FUNCS(stat _stat) 175AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, 176 [M_LIBS="-lm"; AC_DEFINE([HAVE_POW],[], [Define if pow is there])])) 177 178AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, floor, 179 [M_LIBS="-lm"; AC_DEFINE([HAVE_FLOOR],[], [Define if floor is there])])) 180 181AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, fabs, 182 [M_LIBS="-lm"; AC_DEFINE([HAVE_FABS],[], [Define if fabs is there])])) 183 184 185AC_CHECK_FUNCS(gettimeofday) 186AC_CHECK_FUNCS(localtime localtime_r time gmtime gmtime_r ftime) 187 188dnl Checking the standard string functions availability 189AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, 190 NEED_TRIO=1) 191 192dnl Checking for POSIX timers 193AC_CHECK_FUNCS(clock_gettime, [], [ 194 AC_CHECK_LIB(rt, clock_gettime, [ 195 AC_DEFINE(HAVE_CLOCK_GETTIME, 1) 196 EXTRA_LIBS="$EXTRA_LIBS -lrt" 197 ]) 198]) 199 200dnl 201dnl Check for trio string functions 202dnl 203 204if test "${NEED_TRIO}" = "1" ; then 205 echo Reusing trio library for string functions 206 WITH_TRIO=1 207else 208 WITH_TRIO=0 209fi 210AC_SUBST(WITH_TRIO) 211 212dnl 213dnl Some packages need to be checked against version numbers so we 214dnl define a function here for later use 215dnl 216AC_DEFUN([VERSION_TO_NUMBER], 217[`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`]) 218 219dnl 220dnl Perl is just needed for generating some data for XSLtmark 221dnl 222 223AC_CHECK_PROG(PERL, perl, perl, false) 224AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false") 225 226dnl 227dnl check for python 228dnl 229 230PYTHON_VERSION= 231PYTHON_INCLUDES= 232PYTHON_SITE_PACKAGES= 233pythondir= 234AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found]) 235if test "$with_python" != "no" ; then 236 if test -x "$with_python/bin/python" 237 then 238 echo Found python in $with_python/bin/python 239 PYTHON="$with_python/bin/python" 240 else 241 if test -x "$with_python" 242 then 243 echo Found python in $with_python 244 PYTHON="$with_python" 245 else 246 if test -x "$PYTHON" 247 then 248 echo Found python in environment PYTHON=$PYTHON 249 with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` 250 else 251 AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) 252 fi 253 fi 254 fi 255 if test "$PYTHON" != "" 256 then 257 echo "PYTHON is pointing at $PYTHON" 258 PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` 259 echo Found Python version $PYTHON_VERSION 260 LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1 261except: print 0"` 262 if test "$LIBXML2_PYTHON" = "1" 263 then 264 echo Found libxml2-python module 265 else 266 echo Warning: Missing libxml2-python 267 fi 268 fi 269 if test "$PYTHON_VERSION" != "" 270 then 271 if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ 272 -d $with_python/lib/python$PYTHON_VERSION/site-packages 273 then 274 PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION 275 PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' 276 else 277 if test -r $prefix/include/python$PYTHON_VERSION/Python.h 278 then 279 PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION 280 PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' 281 else 282 if test -r /usr/include/python$PYTHON_VERSION/Python.h 283 then 284 PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION 285 PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' 286 else 287 echo could not find python$PYTHON_VERSION/Python.h 288 fi 289 fi 290 if test ! -d "$PYTHON_SITE_PACKAGES" 291 then 292 PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` 293 fi 294 fi 295 PYTHON_LIBS=`python$PYTHON_VERSION-config --libs` 296 fi 297 if test "$with_python" != "" 298 then 299 pythondir='$(PYTHON_SITE_PACKAGES)' 300 else 301 pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' 302 fi 303fi 304AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") 305if test "$PYTHON_INCLUDES" != "" 306then 307 PYTHON_SUBDIR=python 308else 309 PYTHON_SUBDIR= 310fi 311AC_SUBST(pythondir) 312AC_SUBST(PYTHON_SUBDIR) 313AC_SUBST(PYTHON_LIBS) 314 315AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)]) 316WITH_CRYPTO=0 317CRYPTO_TESTDIR= 318if test "$with_crypto" = "no" ; then 319 echo Disabling crypto support 320 LIBGCRYPT_CFLAGS="" 321 LIBGCRYPT_LIBS="" 322else 323case $host in 324 *-mingw*) 325 dnl Use only native crypto-API for mingw* hosts 326 dnl TODO: to implement --with-crypto=foo to allow switch between 327 dnl crypto libraries 328 WITH_CRYPTO=1 329 CRYPTO_TESTDIR=crypto 330 ;; 331 *) 332 AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) 333 if test "$LIBGCRYPT_CONFIG" != "no" ; then 334 LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version` 335 if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42") 336 then 337 LIBGCRYPT_CFLAGS="" 338 LIBGCRYPT_LIBS="" 339 echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.' 340 else 341 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags` 342 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs` 343 AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.]) 344 echo 'Crypto extensions will be available.' 345 WITH_CRYPTO=1 346 CRYPTO_TESTDIR=crypto 347 fi 348 else 349 LIBGCRYPT_CFLAGS="" 350 LIBGCRYPT_LIBS="" 351 echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.' 352 fi 353esac 354fi 355AC_SUBST(WITH_CRYPTO) 356AC_SUBST(CRYPTO_TESTDIR) 357AC_SUBST(LIBGCRYPT_CFLAGS) 358AC_SUBST(LIBGCRYPT_LIBS) 359 360dnl 361dnl Debug for DV (-Wunreachable-code) 362dnl 363if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ]] || \ 364 [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxslt" ]] 365 then 366 if test "${with_mem_debug}" = "" ; 367 then 368 with_mem_debug="yes" 369 fi 370 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 " 371fi 372 373AC_ARG_WITH(debug, [ --with-debug Add the debugging code (on)]) 374if test "$with_debug" = "no" ; then 375 echo Disabling debug support 376 WITH_XSLT_DEBUG=0 377else 378 WITH_XSLT_DEBUG=1 379fi 380AC_SUBST(WITH_XSLT_DEBUG) 381 382AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) 383if test "$with_mem_debug" = "yes" ; then 384 echo Enabling memory debug support 385 WITH_MEM_DEBUG=1 386else 387 WITH_MEM_DEBUG=0 388fi 389AC_SUBST(WITH_MEM_DEBUG) 390 391dnl 392dnl Is debugger support requested 393dnl 394AC_ARG_WITH(debugger, [ --with-debugger Add the debugging support (on)]) 395if test "$with_debugger" = "no" ; then 396 echo Disabling debugger 397 WITH_DEBUGGER=0 398else 399 echo Enabling debugger 400 WITH_DEBUGGER=1 401 AC_DEFINE([WITH_DEBUGGER],[], [Define if debugging support is enabled]) 402fi 403AC_SUBST(WITH_DEBUGGER) 404 405dnl 406dnl Is profiler support requested 407dnl 408AC_ARG_WITH(profiler, [ --with-profiler Add the profiling support (on)]) 409if test "$with_profiler" = "no" ; then 410 echo Disabling profiler 411 WITH_PROFILER=0 412else 413 echo Enabling profiler 414 WITH_PROFILER=1 415 AC_DEFINE([WITH_PROFILER],[], [Define if profiling support is enabled]) 416fi 417AC_SUBST(WITH_PROFILER) 418 419dnl 420dnl The following new parameters were added to offer 421dnl the ability to specify the location of the libxml 422dnl library during linking and compilation. 423dnl 424dnl original work - Mathieu Lacage 30/03/2000 425dnl some tweaking - David Härdeman 30/10/2001 426dnl 427 428LIBXML_CONFIG_PREFIX="" 429LIBXML_SRC="" 430 431AC_ARG_WITH(libxml-prefix, 432 [ --with-libxml-prefix=[PFX] Specify location of libxml config], 433 LIBXML_CONFIG_PREFIX=$withval 434) 435 436AC_ARG_WITH(libxml-include-prefix, 437 [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers], 438 LIBXML_CFLAGS="-I$withval" 439) 440 441AC_ARG_WITH(libxml-libs-prefix, 442 [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], 443 LIBXML_LIBS="-L$withval" 444) 445 446AC_ARG_WITH(libxml-src, 447 [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], 448 LIBXML_SRC="$withval" 449) 450AC_SUBST(LIBXML_SRC) 451 452dnl 453dnl where is xml2-config 454dnl 455 456AC_SUBST(LIBXML_REQUIRED_VERSION) 457if test "x$LIBXML_CONFIG_PREFIX" != "x" 458then 459 AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false], [${LIBXML_CONFIG_PREFIX}/bin]) 460else 461 AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false]) 462fi 463 464dnl 465dnl imported from libxml2, c.f. #77827 466dnl 467if test "${GCC}" != "yes" ; then 468 case "${host}" in 469 *-*-hpux* ) 470 CFLAGS="${CFLAGS} -Wp,-H30000" 471 ;; 472 *-dec-osf* ) 473 CFLAGS="${CFLAGS} -ieee" 474 ;; 475 esac 476else 477 CFLAGS="${CFLAGS} -Wall -Wextra -Wformat=2 -Wmissing-format-attribute" 478 case "${host}" in 479 alpha*-*-linux* ) 480 CFLAGS="${CFLAGS} -mieee" 481 ;; 482 alpha*-*-osf* ) 483 CFLAGS="${CFLAGS} -mieee" 484 ;; 485 esac 486fi 487 488dnl 489dnl Check which type of library to build. Default to building shared and static. 490dnl 491 492build_shared_libs="yes" 493build_static_libs="yes" 494 495if test "$enable_shared" = "no"; then 496 build_shared_libs="no" 497fi 498 499if test "$enable_static" = "no"; then 500 build_static_libs="no" 501fi 502 503if test "$build_shared_libs" = "no" -a "$build_static_libs" = "no"; then 504 build_static_libs="yes" 505fi 506 507dnl 508dnl Override other variables if LIBXML_SRC is set 509dnl 510 511if test "x$LIBXML_SRC" != "x"; then 512 CWD=`pwd` 513 if cd $LIBXML_SRC; then 514 LIBXML_SRC=`pwd` 515 XML_CONFIG="${LIBXML_SRC}/xml2-config" 516 LIBXML_CFLAGS="-I${LIBXML_SRC}/include" 517 if test "$build_static_libs" = "no"; then 518 LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs --dynamic`" 519 else 520 LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs`" 521 fi 522 WITH_MODULES="`$XML_CONFIG --modules`" 523 cd $CWD 524 else 525 AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?]) 526 fi 527fi 528 529dnl 530dnl Try pkg-config first if nothing is set 531dnl 532 533if test "x$LIBXML_CONFIG_PREFIX" = "x" -a "x$LIBXML_LIBS" = "x"; then 534 if test "$build_static_libs" = "no"; then 535 PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], [ 536 WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`" 537 ], [ ]) 538 else 539 PKG_CHECK_MODULES_STATIC([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], 540 [ ], [ ]) 541 fi 542fi 543 544dnl 545dnl make sure xml2-config is executable, 546dnl test version and init our variables 547dnl 548 549if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1 550then 551 AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION) 552 XMLVERS=`$XML_CONFIG --version` 553 if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION); then 554 AC_MSG_RESULT($XMLVERS found) 555 else 556 AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt) 557 fi 558 559 if test "$build_static_libs" = "no"; then 560 LIBXML_LIBS="`$XML_CONFIG --libs --dynamic`" 561 else 562 LIBXML_LIBS="`$XML_CONFIG --libs`" 563 fi 564 LIBXML_CFLAGS="`$XML_CONFIG --cflags`" 565 WITH_MODULES="`$XML_CONFIG --modules`" 566fi 567 568if test "x$LIBXML_LIBS" = "x" 569then 570 AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.]) 571fi 572 573 574AC_SUBST(CFLAGS) 575AC_SUBST(CPPFLAGS) 576AC_SUBST(LDFLAGS) 577 578AC_ARG_WITH(plugins, 579[ --with-plugins Add plugin extension support (on)]) 580if test "$with_plugins" = "" 581then 582 with_plugins=yes 583fi 584 585AC_MSG_CHECKING([whether shared libraries will be built (required for plugins)]) 586if test "$build_shared_libs" = "no" -a "$with_plugins" = "yes"; then 587 AC_MSG_RESULT(no) 588 AC_MSG_WARN([Disabling plugin support.]) 589 AC_MSG_WARN([Plugins require that shared libraries be built.]) 590 with_plugins=no 591else 592 AC_MSG_RESULT(yes) 593fi 594 595if test "$with_plugins" = "yes" ; then 596 AC_MSG_CHECKING([libxml2 module support]) 597 if test "${WITH_MODULES}" = "1"; then 598 AC_MSG_RESULT(yes) 599 else 600 AC_MSG_RESULT(no) 601 WITH_MODULES="0" 602 fi 603else 604 WITH_MODULES="0" 605fi 606 607AC_SUBST(WITH_MODULES) 608AM_CONDITIONAL(WITH_MODULES, test "$WITH_MODULES" = "1") 609 610dnl 611dnl setup default module path 612dnl 613expanded_libdir=$( 614 test "x$prefix" = xNONE && prefix="$ac_default_prefix" 615 test "x$exec_prefix" = xNONE && exec_prefix="$prefix" 616 while test "$libdir_old" != "$libdir"; do 617 libdir_old="$libdir" 618 eval libdir="$libdir" 619 done 620 echo "$libdir" 621) 622LIBXSLT_DEFAULT_PLUGINS_PATH="$expanded_libdir/libxslt-plugins" 623AC_SUBST(LIBXSLT_DEFAULT_PLUGINS_PATH) 624 625case "$host" in 626 *-*-cygwin*|*-*-mingw*) 627 LDFLAGS="$LDFLAGS -no-undefined" 628 ;; 629esac 630 631 632AC_SUBST(XSLTPROCDV) 633AC_SUBST(PYTHONSODV) 634AC_SUBST(XML_CONFIG) 635AC_SUBST(LIBXML_LIBS) 636AC_SUBST(LIBXML_CFLAGS) 637AC_SUBST(PYTHON) 638AC_SUBST(PYTHON_VERSION) 639AC_SUBST(PYTHON_INCLUDES) 640AC_SUBST(PYTHON_SITE_PACKAGES) 641 642XSLT_LIBDIR='-L${libdir}' 643XSLT_INCLUDEDIR='-I${includedir}' 644XSLT_LIBS="-lxslt $LIBXML_LIBS" 645XSLT_PRIVATE_LIBS="$M_LIBS" 646AC_SUBST(XSLT_LIBDIR) 647AC_SUBST(XSLT_INCLUDEDIR) 648AC_SUBST(XSLT_LIBS) 649AC_SUBST(XSLT_PRIVATE_LIBS) 650 651EXSLT_LIBDIR='-L${libdir}' 652EXSLT_INCLUDEDIR='-I${includedir}' 653EXSLT_LIBS="-lexslt $XSLT_LIBS" 654EXSLT_PRIVATE_LIBS="$XSLT_PRIVATE_LIBS $LIBGCRYPT_LIBS" 655AC_SUBST(EXSLT_LIBDIR) 656AC_SUBST(EXSLT_INCLUDEDIR) 657AC_SUBST(EXSLT_LIBS) 658AC_SUBST(EXSLT_PRIVATE_LIBS) 659 660AC_SUBST(EXTRA_LIBS) 661 662AC_SUBST(M_LIBS) 663 664dnl for the spec file 665RELDATE=`date +'%a %b %e %Y'` 666AC_SUBST(RELDATE) 667 668rm -f COPYING.LIB COPYING 2>/dev/null && $LN_S $srcdir/Copyright COPYING 669 670 671AC_CONFIG_FILES([ 672Makefile 673libxslt.pc 674libexslt.pc 675libxslt/Makefile 676libxslt/xsltconfig.h 677libxslt/xsltwin32config.h 678libexslt/Makefile 679libexslt/exsltconfig.h 680xsltproc/Makefile 681python/Makefile 682python/tests/Makefile 683tests/Makefile 684tests/docs/Makefile 685tests/REC1/Makefile 686tests/REC2/Makefile 687tests/REC/Makefile 688tests/general/Makefile 689tests/reports/Makefile 690tests/extensions/Makefile 691tests/namespaces/Makefile 692tests/keys/Makefile 693tests/numbers/Makefile 694tests/documents/Makefile 695tests/xmlspec/Makefile 696tests/multiple/Makefile 697tests/xinclude/Makefile 698tests/XSLTMark/Makefile 699tests/docbook/Makefile 700tests/exslt/Makefile 701tests/exslt/common/Makefile 702tests/exslt/functions/Makefile 703tests/exslt/math/Makefile 704tests/exslt/saxon/Makefile 705tests/exslt/sets/Makefile 706tests/exslt/strings/Makefile 707tests/exslt/date/Makefile 708tests/exslt/dynamic/Makefile 709tests/exslt/crypto/Makefile 710tests/plugins/Makefile 711tests/fuzz/Makefile 712doc/Makefile 713xslt-config 714libxslt.spec 715]) 716AC_CONFIG_LINKS([tests/fuzz/xpath.xml:tests/fuzz/xpath.xml]) 717AC_CONFIG_LINKS([tests/fuzz/xslt.xml:tests/fuzz/xslt.xml]) 718 719AC_OUTPUT 720