[20732] | 1 | dnl Process this file with autoconf to produce a configuration script. |
---|
| 2 | AC_PREREQ(2.2) |
---|
[18214] | 3 | AC_INIT(libxslt/xslt.c) |
---|
[20732] | 4 | AM_CONFIG_HEADER(config.h) |
---|
| 5 | AC_CANONICAL_HOST |
---|
[18214] | 6 | |
---|
| 7 | dnl |
---|
| 8 | dnl libxslt is the main part of the package |
---|
| 9 | dnl libexslt is an extension |
---|
| 10 | dnl |
---|
| 11 | LIBXSLT_MAJOR_VERSION=1 |
---|
[20732] | 12 | LIBXSLT_MINOR_VERSION=1 |
---|
| 13 | LIBXSLT_MICRO_VERSION=10 |
---|
[18214] | 14 | PACKAGE=libxslt |
---|
| 15 | LIBEXSLT_MAJOR_VERSION=0 |
---|
[20732] | 16 | LIBEXSLT_MINOR_VERSION=8 |
---|
| 17 | LIBEXSLT_MICRO_VERSION=8 |
---|
| 18 | LIBXML_REQUIRED_VERSION=2.6.8 |
---|
[18214] | 19 | |
---|
| 20 | |
---|
| 21 | LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION |
---|
| 22 | LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION |
---|
| 23 | |
---|
| 24 | LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION` |
---|
| 25 | |
---|
[20732] | 26 | if test -f CVS/Entries; then |
---|
| 27 | extra=`grep ChangeLog CVS/Entries | grep -v LIBXSLT | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` |
---|
| 28 | echo extra=$extra |
---|
| 29 | if test "$extra" != "" |
---|
| 30 | then |
---|
| 31 | LIBXSLT_VERSION_EXTRA="-CVS$extra" |
---|
| 32 | fi |
---|
| 33 | fi |
---|
| 34 | |
---|
[18214] | 35 | AC_SUBST(LIBXSLT_MAJOR_VERSION) |
---|
| 36 | AC_SUBST(LIBXSLT_MINOR_VERSION) |
---|
| 37 | AC_SUBST(LIBXSLT_MICRO_VERSION) |
---|
| 38 | AC_SUBST(LIBXSLT_VERSION) |
---|
| 39 | AC_SUBST(LIBXSLT_VERSION_INFO) |
---|
| 40 | AC_SUBST(LIBXSLT_VERSION_NUMBER) |
---|
[20732] | 41 | AC_SUBST(LIBXSLT_VERSION_EXTRA) |
---|
[18214] | 42 | |
---|
| 43 | dnl |
---|
| 44 | dnl libexslt is an extension library |
---|
| 45 | dnl |
---|
| 46 | |
---|
| 47 | LIBEXSLT_VERSION=$LIBEXSLT_MAJOR_VERSION.$LIBEXSLT_MINOR_VERSION.$LIBEXSLT_MICRO_VERSION |
---|
| 48 | LIBEXSLT_VERSION_INFO=`expr $LIBEXSLT_MAJOR_VERSION + $LIBEXSLT_MINOR_VERSION`:$LIBEXSLT_MICRO_VERSION:$LIBEXSLT_MINOR_VERSION |
---|
| 49 | |
---|
| 50 | LIBEXSLT_VERSION_NUMBER=`expr $LIBEXSLT_MAJOR_VERSION \* 10000 + $LIBEXSLT_MINOR_VERSION \* 100 + $LIBEXSLT_MICRO_VERSION` |
---|
| 51 | |
---|
[20732] | 52 | if test -f CVS/Entries; then |
---|
| 53 | LIBEXSLT_VERSION_EXTRA=-CVS`grep ChangeLog CVS/Entries | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` |
---|
| 54 | fi |
---|
| 55 | |
---|
[18214] | 56 | AC_SUBST(LIBEXSLT_MAJOR_VERSION) |
---|
| 57 | AC_SUBST(LIBEXSLT_MINOR_VERSION) |
---|
| 58 | AC_SUBST(LIBEXSLT_MICRO_VERSION) |
---|
| 59 | AC_SUBST(LIBEXSLT_VERSION) |
---|
| 60 | AC_SUBST(LIBEXSLT_VERSION_INFO) |
---|
| 61 | AC_SUBST(LIBEXSLT_VERSION_NUMBER) |
---|
[20732] | 62 | AC_SUBST(LIBEXSLT_VERSION_EXTRA) |
---|
[18214] | 63 | |
---|
| 64 | VERSION=${LIBXSLT_VERSION} |
---|
| 65 | |
---|
| 66 | AM_INIT_AUTOMAKE($PACKAGE, $VERSION) |
---|
| 67 | |
---|
[20732] | 68 | # AM_MAINTAINER_MODE |
---|
| 69 | |
---|
[18214] | 70 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
| 71 | |
---|
| 72 | dnl |
---|
| 73 | dnl Specific dir for HTML output ? |
---|
| 74 | dnl |
---|
| 75 | |
---|
| 76 | if test "x$with_html_dir" = "x" ; then |
---|
| 77 | HTML_DIR='$(prefix)/doc' |
---|
| 78 | else |
---|
| 79 | HTML_DIR=$with_html_dir |
---|
| 80 | fi |
---|
| 81 | AC_SUBST(HTML_DIR) |
---|
| 82 | |
---|
| 83 | dnl |
---|
| 84 | dnl Check the environment |
---|
| 85 | dnl |
---|
| 86 | |
---|
| 87 | AC_ISC_POSIX |
---|
| 88 | AC_PROG_CC |
---|
[20732] | 89 | AC_PROG_INSTALL |
---|
| 90 | AC_PROG_CPP |
---|
| 91 | AC_PATH_PROG(RM, rm, /bin/rm) |
---|
| 92 | AC_PATH_PROG(MV, mv, /bin/mv) |
---|
| 93 | AC_PATH_PROG(TAR, tar, /bin/tar) |
---|
| 94 | |
---|
[18214] | 95 | AC_STDC_HEADERS |
---|
| 96 | AM_PROG_LIBTOOL |
---|
| 97 | |
---|
| 98 | dnl |
---|
| 99 | dnl Math detection |
---|
| 100 | dnl |
---|
| 101 | |
---|
| 102 | AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h) |
---|
| 103 | AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h) |
---|
[20732] | 104 | AC_CHECK_HEADERS(sys/timeb.h time.h sys/stat.h sys/select.h stdarg.h) |
---|
[18214] | 105 | AC_CHECK_FUNCS(stat _stat) |
---|
| 106 | AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan, |
---|
| 107 | [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)])) |
---|
| 108 | |
---|
| 109 | AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf, |
---|
| 110 | [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)])) |
---|
| 111 | |
---|
| 112 | AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, |
---|
| 113 | [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)])) |
---|
| 114 | |
---|
| 115 | AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, floor, |
---|
| 116 | [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)])) |
---|
| 117 | |
---|
| 118 | AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, fabs, |
---|
| 119 | [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)])) |
---|
| 120 | AC_CHECK_FUNCS(gettimeofday) |
---|
[20732] | 121 | AC_CHECK_FUNCS(mktime localtime localtime_r asctime time gmtime ftime) |
---|
[18214] | 122 | |
---|
| 123 | dnl Checking the standard string functions availability |
---|
| 124 | AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, |
---|
| 125 | NEED_TRIO=1) |
---|
| 126 | dnl |
---|
| 127 | dnl Check for trio string functions |
---|
| 128 | dnl |
---|
| 129 | |
---|
| 130 | if test "${NEED_TRIO}" = "1" ; then |
---|
| 131 | echo Reusing trio library for string functions |
---|
| 132 | WITH_TRIO=1 |
---|
| 133 | else |
---|
| 134 | WITH_TRIO=0 |
---|
| 135 | fi |
---|
| 136 | AC_SUBST(WITH_TRIO) |
---|
| 137 | |
---|
| 138 | dnl |
---|
[20732] | 139 | dnl Some packages need to be checked against version numbers so we |
---|
| 140 | dnl define a function here for later use |
---|
| 141 | dnl |
---|
| 142 | AC_DEFUN(VERSION_TO_NUMBER, |
---|
| 143 | [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`]) |
---|
| 144 | |
---|
| 145 | dnl |
---|
[18214] | 146 | dnl Perl is just needed for generating some data for XSLtmark |
---|
| 147 | dnl |
---|
| 148 | |
---|
| 149 | AC_CHECK_PROG(PERL, perl, perl, false) |
---|
| 150 | AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false") |
---|
| 151 | |
---|
| 152 | dnl |
---|
| 153 | dnl check for python |
---|
| 154 | dnl |
---|
| 155 | |
---|
| 156 | PYTHON= |
---|
| 157 | PYTHON_VERSION= |
---|
| 158 | PYTHON_INCLUDES= |
---|
| 159 | PYTHON_SITE_PACKAGES= |
---|
[20732] | 160 | pythondir= |
---|
[18214] | 161 | AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found]) |
---|
| 162 | if test "$with_python" != "no" ; then |
---|
[20732] | 163 | if test -x "$with_python/bin/python" |
---|
[18214] | 164 | then |
---|
[20732] | 165 | echo Found python in $with_python/bin/python |
---|
| 166 | PYTHON="$with_python/bin/python" |
---|
[18214] | 167 | else |
---|
[20732] | 168 | if test -x "$with_python" |
---|
| 169 | then |
---|
| 170 | echo Found python in $with_python |
---|
| 171 | PYTHON="$with_python" |
---|
| 172 | else |
---|
| 173 | AC_PATH_PROG(PYTHON, python python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) |
---|
| 174 | fi |
---|
[18214] | 175 | fi |
---|
| 176 | if test "$PYTHON" != "" |
---|
| 177 | then |
---|
| 178 | PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
---|
| 179 | echo Found Python version $PYTHON_VERSION |
---|
[20732] | 180 | LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1 |
---|
[18214] | 181 | except: print 0"` |
---|
| 182 | if test "$LIBXML2_PYTHON" = "1" |
---|
| 183 | then |
---|
| 184 | echo Found libxml2-python module |
---|
| 185 | else |
---|
| 186 | echo Warning: Missing libxml2-python |
---|
| 187 | fi |
---|
| 188 | fi |
---|
| 189 | if test "$PYTHON_VERSION" != "" |
---|
| 190 | then |
---|
| 191 | if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ |
---|
| 192 | -d $with_python/lib/python$PYTHON_VERSION/site-packages |
---|
| 193 | then |
---|
| 194 | PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION |
---|
| 195 | PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages |
---|
| 196 | else |
---|
| 197 | if test -r $prefix/include/python$PYTHON_VERSION/Python.h |
---|
| 198 | then |
---|
| 199 | PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' |
---|
| 200 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
| 201 | else |
---|
| 202 | if test -r /usr/include/python$PYTHON_VERSION/Python.h |
---|
| 203 | then |
---|
| 204 | PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION |
---|
| 205 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
| 206 | else |
---|
| 207 | echo could not find python$PYTHON_VERSION/Python.h |
---|
| 208 | fi |
---|
| 209 | fi |
---|
[20732] | 210 | if test ! -d "$PYTHON_SITE_PACKAGES" |
---|
[18214] | 211 | then |
---|
| 212 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
---|
| 213 | fi |
---|
| 214 | fi |
---|
| 215 | fi |
---|
[20732] | 216 | if test "$with_python" != "" |
---|
| 217 | then |
---|
| 218 | pythondir='$(PYTHON_SITE_PACKAGES)' |
---|
| 219 | else |
---|
| 220 | pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' |
---|
| 221 | fi |
---|
[18214] | 222 | fi |
---|
| 223 | AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") |
---|
| 224 | if test "$PYTHON_INCLUDES" != "" |
---|
| 225 | then |
---|
| 226 | PYTHON_SUBDIR=python |
---|
| 227 | else |
---|
| 228 | PYTHON_SUBDIR= |
---|
| 229 | fi |
---|
[20732] | 230 | AC_SUBST(pythondir) |
---|
[18214] | 231 | AC_SUBST(PYTHON_SUBDIR) |
---|
| 232 | |
---|
[20732] | 233 | AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)]) |
---|
| 234 | WITH_CRYPTO=0 |
---|
| 235 | if test "$with_crypto" = "no" ; then |
---|
| 236 | echo Disabling crypto support |
---|
| 237 | LIBGCRYPT_CFLAGS="" |
---|
| 238 | LIBGCRYPT_LIBS="" |
---|
| 239 | else |
---|
| 240 | AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) |
---|
| 241 | if test "$LIBGCRYPT_CONFIG" != "no" ; then |
---|
| 242 | LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version` |
---|
| 243 | if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42") |
---|
| 244 | then |
---|
| 245 | LIBGCRYPT_CFLAGS="" |
---|
| 246 | LIBGCRYPT_LIBS="" |
---|
| 247 | echo gcrypt library version < 1.1.42 - Crypto extensions will not be available. |
---|
| 248 | else |
---|
| 249 | LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags` |
---|
| 250 | LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs` |
---|
| 251 | AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.]) |
---|
| 252 | echo Crypto extensions will be available. |
---|
| 253 | WITH_CRYPTO=1 |
---|
| 254 | fi |
---|
| 255 | else |
---|
| 256 | LIBGCRYPT_CFLAGS="" |
---|
| 257 | LIBGCRYPT_LIBS="" |
---|
| 258 | echo Crypto extensions will not be available. Install libgcrypt and reconfigure to make available. |
---|
| 259 | fi |
---|
| 260 | fi |
---|
| 261 | AC_SUBST(WITH_CRYPTO) |
---|
| 262 | AC_SUBST(LIBGCRYPT_CFLAGS) |
---|
| 263 | AC_SUBST(LIBGCRYPT_LIBS) |
---|
| 264 | |
---|
[18214] | 265 | dnl |
---|
| 266 | dnl Debug for DV (-Wunreachable-code) |
---|
| 267 | dnl |
---|
[20732] | 268 | if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ]] || \ |
---|
| 269 | [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xsltest" ]] |
---|
| 270 | then |
---|
| 271 | if test "${with_mem_debug}" = "" ; |
---|
| 272 | then |
---|
[18214] | 273 | with_mem_debug="yes" |
---|
| 274 | fi |
---|
| 275 | 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 " |
---|
[20732] | 276 | STATIC_BINARIES="-static" |
---|
| 277 | if test "$LOGNAME" = "veillard" |
---|
| 278 | then |
---|
| 279 | LIBXML_SRC="/u/veillard/XML" |
---|
| 280 | fi |
---|
| 281 | else |
---|
| 282 | STATIC_BINARIES= |
---|
[18214] | 283 | fi |
---|
[20732] | 284 | AC_SUBST(STATIC_BINARIES) |
---|
[18214] | 285 | |
---|
| 286 | AC_ARG_WITH(debug, [ --with-debug Add the debugging code (on)]) |
---|
| 287 | if test "$with_debug" = "no" ; then |
---|
| 288 | echo Disabling debug support |
---|
| 289 | WITH_XSLT_DEBUG=0 |
---|
| 290 | else |
---|
| 291 | WITH_XSLT_DEBUG=1 |
---|
| 292 | fi |
---|
| 293 | AC_SUBST(WITH_XSLT_DEBUG) |
---|
| 294 | |
---|
| 295 | AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) |
---|
| 296 | if test "$with_mem_debug" = "yes" ; then |
---|
| 297 | echo Enabling memory debug support |
---|
| 298 | WITH_MEM_DEBUG=1 |
---|
| 299 | else |
---|
| 300 | WITH_MEM_DEBUG=0 |
---|
| 301 | fi |
---|
| 302 | AC_SUBST(WITH_MEM_DEBUG) |
---|
| 303 | |
---|
| 304 | dnl |
---|
| 305 | dnl Is debugger support requested |
---|
| 306 | dnl |
---|
| 307 | AC_ARG_WITH(with_debugger, [ --with-debugger Add the debugging support (on)]) |
---|
| 308 | if test "$with_debugger" = "no" ; then |
---|
| 309 | echo Disabling debugger |
---|
| 310 | WITH_DEBUGGER=0 |
---|
| 311 | else |
---|
| 312 | echo Enabling debugger |
---|
| 313 | WITH_DEBUGGER=1 |
---|
| 314 | AC_DEFINE(WITH_DEBUGGER) |
---|
| 315 | fi |
---|
| 316 | AC_SUBST(WITH_DEBUGGER) |
---|
| 317 | |
---|
| 318 | dnl |
---|
| 319 | dnl The following new parameters were added to offer |
---|
| 320 | dnl the ability to specify the location of the libxml |
---|
| 321 | dnl library during linking and compilation. |
---|
| 322 | dnl |
---|
| 323 | dnl original work - Mathieu Lacage 30/03/2000 |
---|
| 324 | dnl some tweaking - David Härdeman 30/10/2001 |
---|
| 325 | dnl |
---|
| 326 | |
---|
| 327 | LIBXML_CONFIG_PREFIX="" |
---|
| 328 | LIBXML_SRC="" |
---|
| 329 | |
---|
| 330 | AC_ARG_WITH(libxml-prefix, |
---|
| 331 | [ --with-libxml-prefix=[PFX] Specify location of libxml config], |
---|
| 332 | LIBXML_CONFIG_PREFIX=$withval |
---|
| 333 | ) |
---|
| 334 | |
---|
| 335 | AC_ARG_WITH(libxml-include-prefix, |
---|
| 336 | [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers], |
---|
| 337 | LIBXML_CFLAGS="-I$withval" |
---|
| 338 | ) |
---|
| 339 | |
---|
| 340 | AC_ARG_WITH(libxml-libs-prefix, |
---|
| 341 | [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], |
---|
| 342 | LIBXML_LIBS="-L$withval" |
---|
| 343 | ) |
---|
| 344 | |
---|
| 345 | AC_ARG_WITH(libxml-src, |
---|
| 346 | [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], |
---|
| 347 | LIBXML_SRC="$withval" |
---|
| 348 | ) |
---|
[20732] | 349 | AC_SUBST(LIBXML_SRC) |
---|
[18214] | 350 | |
---|
| 351 | dnl |
---|
| 352 | dnl where is xml2-config |
---|
| 353 | dnl |
---|
| 354 | |
---|
| 355 | AC_SUBST(LIBXML_REQUIRED_VERSION) |
---|
| 356 | AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION) |
---|
| 357 | if test "x$LIBXML_CONFIG_PREFIX" != "x" |
---|
| 358 | then |
---|
| 359 | XML_CONFIG=${LIBXML_CONFIG_PREFIX}/bin/xml2-config |
---|
| 360 | else |
---|
| 361 | XML_CONFIG=xml2-config |
---|
| 362 | fi |
---|
| 363 | |
---|
| 364 | dnl |
---|
| 365 | dnl imported from libxml2, c.f. #77827 |
---|
| 366 | dnl |
---|
| 367 | if test "${GCC}" != "yes" ; then |
---|
| 368 | case "${host}" in |
---|
| 369 | *-*-hpux* ) |
---|
| 370 | CFLAGS="${CFLAGS} -Wp,-H30000" |
---|
| 371 | ;; |
---|
| 372 | *-dec-osf* ) |
---|
| 373 | CFLAGS="${CFLAGS} -ieee" |
---|
| 374 | ;; |
---|
| 375 | esac |
---|
| 376 | else |
---|
| 377 | CFLAGS="${CFLAGS} -Wall" |
---|
| 378 | case "${host}" in |
---|
| 379 | alpha*-*-linux* ) |
---|
| 380 | CFLAGS="${CFLAGS} -mieee" |
---|
| 381 | ;; |
---|
| 382 | alpha*-*-osf* ) |
---|
| 383 | CFLAGS="${CFLAGS} -mieee" |
---|
| 384 | ;; |
---|
| 385 | esac |
---|
| 386 | fi |
---|
| 387 | |
---|
| 388 | dnl |
---|
| 389 | dnl Override other variables if LIBXML_SRC is set |
---|
| 390 | dnl |
---|
| 391 | |
---|
| 392 | if test "x$LIBXML_SRC" != "x" |
---|
| 393 | then |
---|
| 394 | CWD=`pwd` |
---|
| 395 | if cd $LIBXML_SRC |
---|
| 396 | then |
---|
| 397 | SRC_DIR=`pwd` |
---|
| 398 | XML_CONFIG=${SRC_DIR}/xml2-config |
---|
| 399 | LIBXML_CFLAGS="-I${SRC_DIR}/include" |
---|
| 400 | LIBXML_LIBS="-L${SRC_DIR}" |
---|
| 401 | cd $CWD |
---|
| 402 | else |
---|
| 403 | AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?]) |
---|
| 404 | fi |
---|
| 405 | fi |
---|
| 406 | |
---|
| 407 | dnl |
---|
| 408 | dnl make sure xml2-config is executable, |
---|
| 409 | dnl test version and init our variables |
---|
| 410 | dnl |
---|
| 411 | |
---|
| 412 | if ${XML_CONFIG} --libs print > /dev/null 2>&1 |
---|
| 413 | then |
---|
| 414 | XMLVERS=`$XML_CONFIG --version` |
---|
| 415 | if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION) |
---|
| 416 | then |
---|
| 417 | LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`" |
---|
| 418 | LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`" |
---|
| 419 | AC_MSG_RESULT($XMLVERS found) |
---|
| 420 | else |
---|
| 421 | AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt) |
---|
| 422 | fi |
---|
| 423 | else |
---|
| 424 | AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.]) |
---|
| 425 | fi |
---|
| 426 | |
---|
| 427 | |
---|
| 428 | AC_SUBST(CFLAGS) |
---|
| 429 | AC_SUBST(CPPFLAGS) |
---|
| 430 | AC_SUBST(LDFLAGS) |
---|
| 431 | |
---|
| 432 | dnl |
---|
| 433 | dnl In build tree I use a static version with memory debug enabled |
---|
| 434 | dnl |
---|
| 435 | if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then |
---|
[20732] | 436 | LIBXML_LIBS="../../XML/.libs/libxml2.a -lpthread -lz" |
---|
[18214] | 437 | DV_LINK="1" |
---|
| 438 | XSLTPROCDV="xsltproc.dv" |
---|
[20732] | 439 | INSTALLED_XSLT_LIB="" |
---|
| 440 | LIBXML_SRC="../../XML/" |
---|
[18214] | 441 | fi |
---|
| 442 | |
---|
[20732] | 443 | WIN32_EXTRA_LIBADD= |
---|
| 444 | WIN32_EXTRA_LDFLAGS= |
---|
| 445 | case "$host" in |
---|
| 446 | *-*-mingw*) |
---|
| 447 | WIN32_EXTRA_LIBADD="-lwsock32" |
---|
| 448 | WIN32_EXTRA_LDFLAGS="-no-undefined" |
---|
| 449 | AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) |
---|
| 450 | AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) |
---|
| 451 | AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) |
---|
| 452 | ;; |
---|
| 453 | esac |
---|
| 454 | AC_SUBST(WIN32_EXTRA_LIBADD) |
---|
| 455 | AC_SUBST(WIN32_EXTRA_LDFLAGS) |
---|
| 456 | |
---|
| 457 | |
---|
[18214] | 458 | AC_SUBST(XSLTPROCDV) |
---|
| 459 | AC_SUBST(PYTHONSODV) |
---|
| 460 | AC_SUBST(XML_CONFIG) |
---|
| 461 | AC_SUBST(LIBXML_LIBS) |
---|
| 462 | AC_SUBST(LIBXML_CFLAGS) |
---|
| 463 | AC_SUBST(PYTHON) |
---|
| 464 | AC_SUBST(PYTHON_VERSION) |
---|
| 465 | AC_SUBST(PYTHON_INCLUDES) |
---|
| 466 | AC_SUBST(PYTHON_SITE_PACKAGES) |
---|
| 467 | |
---|
| 468 | XSLT_LIBDIR='-L${libdir}' |
---|
| 469 | XSLT_INCLUDEDIR='-I${includedir}' |
---|
| 470 | XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS" |
---|
| 471 | AC_SUBST(XSLT_LIBDIR) |
---|
| 472 | AC_SUBST(XSLT_INCLUDEDIR) |
---|
[20732] | 473 | AC_SUBST(XSLT_LIBS) |
---|
| 474 | |
---|
| 475 | EXSLT_LIBDIR='-L${libdir}' |
---|
| 476 | EXSLT_INCLUDEDIR='-I${includedir}' |
---|
| 477 | EXSLT_LIBS="-lexslt $XSLT_LIBS $LIBGCRYPT_LIBS" |
---|
| 478 | AC_SUBST(EXSLT_LIBDIR) |
---|
| 479 | AC_SUBST(EXSLT_INCLUDEDIR) |
---|
| 480 | AC_SUBST(EXSLT_LIBS) |
---|
| 481 | |
---|
| 482 | EXTRA_LIBS="$LIBXML_LIBS $M_LIBS" |
---|
[18214] | 483 | AC_SUBST(EXTRA_LIBS) |
---|
[20732] | 484 | |
---|
[18214] | 485 | AC_SUBST(M_LIBS) |
---|
| 486 | |
---|
[18542] | 487 | dnl for the spec file |
---|
| 488 | RELDATE=`date +'%a %b %e %Y'` |
---|
| 489 | AC_SUBST(RELDATE) |
---|
| 490 | |
---|
[20732] | 491 | ( cd $srcdir |
---|
[19101] | 492 | rm -f COPYING.LIB COPYING |
---|
[20732] | 493 | $LN_S Copyright COPYING |
---|
| 494 | ) |
---|
[18214] | 495 | |
---|
| 496 | |
---|
| 497 | AC_OUTPUT([ |
---|
| 498 | Makefile |
---|
| 499 | libxslt.pc |
---|
[20732] | 500 | libexslt.pc |
---|
[18214] | 501 | libxslt/Makefile |
---|
| 502 | libxslt/xsltconfig.h |
---|
| 503 | libxslt/xsltwin32config.h |
---|
| 504 | libexslt/Makefile |
---|
| 505 | libexslt/exsltconfig.h |
---|
| 506 | xsltproc/Makefile |
---|
| 507 | python/Makefile |
---|
| 508 | python/tests/Makefile |
---|
| 509 | tests/Makefile |
---|
| 510 | tests/docs/Makefile |
---|
| 511 | tests/REC1/Makefile |
---|
| 512 | tests/REC2/Makefile |
---|
| 513 | tests/REC/Makefile |
---|
| 514 | tests/general/Makefile |
---|
| 515 | tests/reports/Makefile |
---|
| 516 | tests/extensions/Makefile |
---|
| 517 | tests/namespaces/Makefile |
---|
| 518 | tests/keys/Makefile |
---|
| 519 | tests/numbers/Makefile |
---|
| 520 | tests/documents/Makefile |
---|
| 521 | tests/xmlspec/Makefile |
---|
| 522 | tests/multiple/Makefile |
---|
| 523 | tests/XSLTMark/Makefile |
---|
| 524 | tests/docbook/Makefile |
---|
| 525 | tests/exslt/Makefile |
---|
| 526 | tests/exslt/common/Makefile |
---|
| 527 | tests/exslt/functions/Makefile |
---|
| 528 | tests/exslt/math/Makefile |
---|
| 529 | tests/exslt/sets/Makefile |
---|
| 530 | tests/exslt/strings/Makefile |
---|
| 531 | tests/exslt/date/Makefile |
---|
| 532 | doc/Makefile |
---|
| 533 | xslt-config |
---|
| 534 | libxslt.spec |
---|
| 535 | ]) |
---|