Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: third_party/libxslt/configure.in

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

Powered by Google App Engine
This is Rietveld 408576698