• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ([2.63])
3
4m4_define([MAJOR_VERSION], 2)
5m4_define([MINOR_VERSION], 12)
6m4_define([MICRO_VERSION], 0)
7
8AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
9AC_CONFIG_SRCDIR([entities.c])
10AC_CONFIG_HEADERS([config.h])
11AC_CONFIG_MACRO_DIR([m4])
12AC_CANONICAL_HOST
13
14LIBXML_MAJOR_VERSION=MAJOR_VERSION
15LIBXML_MINOR_VERSION=MINOR_VERSION
16LIBXML_MICRO_VERSION=MICRO_VERSION
17LIBXML_MICRO_VERSION_SUFFIX=
18LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
19LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
20
21LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
22
23if test -d .git ; then
24  extra=`git describe 2>/dev/null | sed 's+LIBXML[[0-9.]]*-++'`
25  echo extra=$extra
26  if test "$extra" != ""
27  then
28      LIBXML_VERSION_EXTRA="-GIT$extra"
29  fi
30fi
31
32AC_SUBST(LIBXML_MAJOR_VERSION)
33AC_SUBST(LIBXML_MINOR_VERSION)
34AC_SUBST(LIBXML_MICRO_VERSION)
35AC_SUBST(LIBXML_VERSION)
36AC_SUBST(LIBXML_VERSION_INFO)
37AC_SUBST(LIBXML_VERSION_NUMBER)
38AC_SUBST(LIBXML_VERSION_EXTRA)
39
40VERSION=${LIBXML_VERSION}
41
42AM_INIT_AUTOMAKE([1.16.3 foreign no-dist-gzip dist-xz])
43AM_MAINTAINER_MODE([enable])
44AM_SILENT_RULES([yes])
45
46dnl Checks for programs.
47AC_PROG_CC
48AC_PROG_INSTALL
49AC_PROG_LN_S
50AC_PROG_MKDIR_P
51AC_PATH_PROG(TAR, tar, /bin/tar)
52AC_PATH_PROG(PERL, perl, /usr/bin/perl)
53AC_PATH_PROG(WGET, wget, /usr/bin/wget)
54AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
55PKG_PROG_PKG_CONFIG
56
57LT_INIT([disable-static])
58LT_LIB_M
59
60dnl
61dnl We process the AC_ARG_WITH first so that later we can modify
62dnl some of them to try to prevent impossible combinations.  This
63dnl also allows up so alphabetize the choices
64dnl
65
66AC_ARG_WITH(c14n,
67[  --with-c14n             Canonical XML 1.0 support (on)])
68AC_ARG_WITH(catalog,
69[  --with-catalog          XML Catalogs support (on)])
70AC_ARG_WITH(debug,
71[  --with-debug            debugging module and shell (on)])
72AC_ARG_WITH(ftp,
73[  --with-ftp              FTP support (off)])
74AC_ARG_WITH(history,
75[  --with-history          history support for shell (off)])
76AC_ARG_WITH(readline,
77[  --with-readline[[=DIR]]   use readline in DIR (for shell history)])
78AC_ARG_WITH(html,
79[  --with-html             HTML parser (on)])
80AC_ARG_WITH(http,
81[  --with-http             HTTP support (on)])
82AC_ARG_WITH(iconv,
83[  --with-iconv[[=DIR]]      iconv support (on)])
84AC_ARG_WITH(icu,
85[  --with-icu              ICU support (off)])
86AC_ARG_WITH(iso8859x,
87[  --with-iso8859x         ISO-8859-X support if no iconv (on)])
88AC_ARG_WITH(lzma,
89[  --with-lzma[[=DIR]]       use liblzma in DIR (on)])
90AC_ARG_WITH(mem_debug,
91[  --with-mem-debug        memory debugging module (off)])
92AC_ARG_WITH(modules,
93[  --with-modules          dynamic modules support (on)])
94AC_ARG_WITH(output,
95[  --with-output           serialization support (on)])
96AC_ARG_WITH(pattern,
97[  --with-pattern          xmlPattern selection interface (on)])
98AC_ARG_WITH(push,
99[  --with-push             push parser interfaces (on)])
100AC_ARG_WITH(python,
101[  --with-python           Python bindings (on)])
102AC_ARG_WITH(reader,
103[  --with-reader           xmlReader parsing interface (on)])
104AC_ARG_WITH(regexps,
105[  --with-regexps          regular expressions support (on)])
106AC_ARG_WITH(run_debug,
107[  --with-run-debug        runtime debugging module (off)])
108AC_ARG_WITH(sax1,
109[  --with-sax1             older SAX1 interface (on)])
110AC_ARG_WITH(schemas,
111[  --with-schemas          XML Schemas 1.0 and RELAX NG support (on)])
112AC_ARG_WITH(schematron,
113[  --with-schematron       Schematron support (on)])
114AC_ARG_WITH(threads,
115[  --with-threads          multithreading support (on)])
116AC_ARG_WITH(thread-alloc,
117[  --with-thread-alloc     per-thread malloc hooks (off)])
118AC_ARG_WITH(tree,
119[  --with-tree             DOM like tree manipulation APIs (on)])
120AC_ARG_WITH(valid,
121[  --with-valid            DTD validation support (on)])
122AC_ARG_WITH(writer,
123[  --with-writer           xmlWriter serialization interface (on)])
124AC_ARG_WITH(xinclude,
125[  --with-xinclude         XInclude 1.0 support (on)])
126AC_ARG_WITH(xpath,
127[  --with-xpath            XPath 1.0 support (on)])
128AC_ARG_WITH(xptr,
129[  --with-xptr             XPointer support (on)])
130AC_ARG_WITH(zlib,
131[  --with-zlib[[=DIR]]       use libz in DIR (on)])
132
133AC_ARG_WITH(minimum,
134[  --with-minimum          build a minimally sized library (off)])
135AC_ARG_WITH(legacy,
136[  --with-legacy           maximum ABI compatibility (off)])
137
138AC_ARG_WITH(tls,
139[  --with-tls              thread-local storage (on)])
140AC_ARG_WITH(fexceptions,
141[  --with-fexceptions      add GCC flag -fexceptions for C++ exceptions (off)])
142AC_ARG_WITH(coverage,
143[  --with-coverage         build for code coverage with GCC (off)])
144
145dnl
146dnl hard dependencies on options
147dnl
148if test "$with_c14n" = "yes"; then
149    if test "$with_output" = "no"; then
150        echo WARNING: --with-c14n overrides --without-output
151    fi
152    with_output=yes
153    if test "$with_xpath" = "no"; then
154        echo WARNING: --with-c14n overrides --without-xpath
155    fi
156    with_xpath=yes
157fi
158if test "$with_schemas" = "yes"; then
159    if test "$with_pattern" = "no"; then
160        echo WARNING: --with-schemas overrides --without-pattern
161    fi
162    with_pattern=yes
163    if test "$with_regexps" = "no"; then
164        echo WARNING: --with-schemas overrides --without-regexps
165    fi
166    with_regexps=yes
167fi
168if test "$with_schematron" = "yes"; then
169    if test "$with_pattern" = "no"; then
170        echo WARNING: --with-schematron overrides --without-pattern
171    fi
172    with_pattern=yes
173    if test "$with_tree" = "no"; then
174        echo WARNING: --with-schematron overrides --without-tree
175    fi
176    with_tree=yes
177    if test "$with_xpath" = "no"; then
178        echo WARNING: --with-schematron overrides --without-xpath
179    fi
180    with_xpath=yes
181fi
182if test "$with_reader" = "yes"; then
183    if test "$with_push" = "no"; then
184        echo WARNING: --with-reader overrides --without-push
185    fi
186    with_push=yes
187    if test "$with_tree" = "no"; then
188        echo WARNING: --with-reader overrides --without-tree
189    fi
190    with_tree=yes
191fi
192if test "$with_writer" = "yes"; then
193    if test "$with_output" = "no"; then
194        echo WARNING: --with-writer overrides --without-output
195    fi
196    with_output=yes
197    if test "$with_push" = "no"; then
198        echo WARNING: --with-writer overrides --without-push
199    fi
200    with_push=yes
201fi
202if test "$with_xinclude" = "yes"; then
203    if test "$with_xpath" = "no"; then
204        echo WARNING: --with-xinclude overrides --without-xpath
205    fi
206    with_xpath=yes
207fi
208if test "$with_xptr_locs" = "yes"; then
209    if test "$with_xptr" = "no"; then
210        echo WARNING: --with-xptr-locs overrides --without-xptr
211    fi
212    with_xptr=yes
213fi
214if test "$with_xptr" = "yes"; then
215    if test "$with_xpath" = "no"; then
216        echo WARNING: --with-xptr overrides --without-xpath
217    fi
218    with_xpath=yes
219fi
220
221if test "$with_minimum" = "yes"; then
222    dnl
223    dnl option to build a minimal libxml2 library
224    dnl
225    echo "Configuring for a minimal library"
226    test "$with_c14n" = "" && with_c14n=no
227    test "$with_catalog" = "" && with_catalog=no
228    test "$with_debug" = "" && with_debug=no
229    test "$with_fexceptions" = "" && with_fexceptions=no
230    test "$with_history" = "" && with_history=no
231    test "$with_html" = "" && with_html=no
232    test "$with_http" = "" && with_http=no
233    test "$with_iconv" = "" && with_iconv=no
234    test "$with_iso8859x" = "" && with_iso8859x=no
235    test "$with_lzma" = "" && with_lzma=no
236    test "$with_mem_debug" = "" && with_mem_debug=no
237    test "$with_output" = "" && with_output=no
238    test "$with_pattern" = "" && with_pattern=no
239    test "$with_push" = "" && with_push=no
240    test "$with_python" = "" && with_python=no
241    test "$with_reader" = "" && with_reader=no
242    test "$with_readline" = "" && with_readline=no
243    test "$with_regexps" = "" && with_regexps=no
244    test "$with_run_debug" = "" && with_run_debug=no
245    test "$with_sax1" = "" && with_sax1=no
246    test "$with_schemas" = "" && with_schemas=no
247    test "$with_schematron" = "" && with_schematron=no
248    test "$with_threads" = "" && with_threads=no
249    test "$with_thread_alloc" = "" && with_thread_alloc=no
250    test "$with_tree" = "" && with_tree=no
251    test "$with_valid" = "" && with_valid=no
252    test "$with_writer" = "" && with_writer=no
253    test "$with_xinclude" = "" && with_xinclude=no
254    test "$with_xpath" = "" && with_xpath=no
255    test "$with_xptr" = "" && with_xptr=no
256    test "$with_zlib" = "" && with_zlib=no
257    test "$with_modules" = "" && with_modules=no
258else
259    dnl
260    dnl Disable dependent modules
261    dnl
262    if test "$with_output" = "no"; then
263        with_c14n=no
264        with_writer=no
265    fi
266    if test "$with_pattern" = "no"; then
267        with_schemas=no
268        with_schematron=no
269    fi
270    if test "$with_push" = "no"; then
271        with_reader=no
272        with_writer=no
273    fi
274    if test "$with_regexps" = "no"; then
275        with_schemas=no
276    fi
277    if test "$with_tree" = "no"; then
278        with_reader=no
279        with_schematron=no
280    fi
281    if test "$with_xpath" = "no"; then
282        with_c14n=no
283        with_schematron=no
284        with_xinclude=no
285        with_xptr=no
286    fi
287fi
288
289XML_PRIVATE_LIBS=
290XML_PRIVATE_CFLAGS=
291XML_PC_LIBS=
292XML_PC_REQUIRES=
293
294dnl
295dnl Checks for header files.
296dnl
297AC_CHECK_HEADERS([stdint.h inttypes.h])
298AC_CHECK_HEADERS([fcntl.h unistd.h sys/stat.h])
299AC_CHECK_HEADERS([sys/mman.h])
300AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h netdb.h])
301AC_CHECK_HEADERS([sys/select.h poll.h])
302AC_CHECK_HEADERS([sys/time.h sys/timeb.h])
303AC_CHECK_HEADERS([dl.h dlfcn.h])
304AC_CHECK_HEADERS([glob.h])
305AM_CONDITIONAL(WITH_GLOB, test "$ac_cv_header_glob_h" = "yes")
306
307dnl
308dnl Checking types
309dnl
310AC_TYPE_UINT32_T
311
312dnl
313dnl Checking libraries
314dnl
315AC_CHECK_FUNCS(snprintf vsnprintf,, NEED_TRIO=1)
316
317dnl Checks for library functions.
318AC_CHECK_FUNCS([gettimeofday ftime stat isascii mmap munmap])
319
320AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
321#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
322#  undef /**/ HAVE_MMAP
323#endif])
324
325dnl Checking for va_copy availability
326AC_MSG_CHECKING([for va_copy])
327AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
328va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],
329have_va_copy=yes,
330have_va_copy=no)
331AC_MSG_RESULT($have_va_copy)
332if test x"$have_va_copy" = x"yes"; then
333    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
334else
335    AC_MSG_CHECKING([for __va_copy])
336    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
337    va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],
338    have___va_copy=yes,
339    have___va_copy=no)
340    AC_MSG_RESULT($have___va_copy)
341    if test x"$have___va_copy" = x"yes"; then
342        AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
343    fi
344fi
345
346dnl Checking whether va_list is an array type
347AC_MSG_CHECKING([whether va_list is an array type])
348AC_TRY_COMPILE2([
349#include <stdarg.h>
350void a(va_list * ap) {}],[
351va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1],[
352  AC_MSG_RESULT(no)],[
353  AC_MSG_RESULT(yes)
354  AC_DEFINE([VA_LIST_IS_ARRAY], [1],[Define if va_list is an array type])])
355
356dnl
357dnl Checks for inet libraries
358dnl
359if test "$with_http" != "no" || test "with_ftp" = "yes"; then
360    case "$host" in
361        *-*-mingw*)
362            dnl AC_SEARCH_LIBS doesn't work because of non-standard calling
363            dnl conventions on 32-bit Windows.
364            NET_LIBS="$NET_LIBS -lws2_32"
365            ;;
366        *)
367            _libs=$LIBS
368            AC_SEARCH_LIBS(gethostbyname, [nsl], [
369                if test "$ac_cv_search_gethostbyname" != "none required"; then
370                    NET_LIBS="$NET_LIBS $ac_cv_search_gethostbyname"
371                fi], [:], [$NET_LIBS])
372            AC_SEARCH_LIBS(connect, [bsd socket inet], [
373                if test "$ac_cv_search_connect" != "none required"; then
374                    NET_LIBS="$NET_LIBS $ac_cv_search_connect"
375                fi], [:], [$NET_LIBS])
376            LIBS=$_libs
377            ;;
378    esac
379
380    dnl Determine what socket length (socklen_t) data type is
381    AC_MSG_CHECKING([for type of socket length (socklen_t)])
382    AC_TRY_COMPILE2([
383    #include <stddef.h>
384    #ifdef _WIN32
385      #include <ws2tcpip.h>
386    #else
387      #include <sys/socket.h>
388    #endif],[
389    (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
390      AC_MSG_RESULT(socklen_t *)
391      XML_SOCKLEN_T=socklen_t],[
392      AC_TRY_COMPILE2([
393    #include <stddef.h>
394    #include <sys/socket.h>],[
395    (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
396        AC_MSG_RESULT(size_t *)
397        XML_SOCKLEN_T=size_t],[
398        AC_TRY_COMPILE2([
399    #include <stddef.h>
400    #include <sys/socket.h>],[
401    (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
402          AC_MSG_RESULT(int *)
403          XML_SOCKLEN_T=int],[
404          AC_MSG_WARN(could not determine)
405          XML_SOCKLEN_T="int"])])])
406    AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
407
408    dnl
409    dnl Checking for availability of IPv6
410    dnl
411    AC_ARG_ENABLE(ipv6, [  --enable-ipv6[[=yes/no]]  enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
412    if test "$with_minimum" = "yes"
413    then
414        enable_ipv6=no
415    fi
416    if test $enable_ipv6 = yes; then
417        AC_MSG_CHECKING([whether to enable IPv6])
418        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
419            #ifdef _WIN32
420              #include <winsock2.h>
421            #else
422              #include <sys/socket.h>
423              #ifdef HAVE_NETDB_H
424                #include <netdb.h>
425              #endif
426            #endif
427            ]], [[
428            struct sockaddr_storage ss;
429            socket(AF_INET6, SOCK_STREAM, 0);
430            getaddrinfo(0, 0, 0, 0);
431            ]])], [
432            AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
433            AC_MSG_RESULT([yes])], [
434            AC_MSG_RESULT([no])]
435        )
436    fi
437fi
438
439dnl
440dnl Extra flags
441dnl
442XML_LIBDIR='-L${libdir}'
443XML_INCLUDEDIR='-I${includedir}/libxml2'
444XML_CFLAGS=""
445
446dnl Thread-local storage
447if test "$with_tls" != "no"; then
448    AC_COMPILE_IFELSE([
449        AC_LANG_SOURCE([_Thread_local int v;]) ], [
450        AC_DEFINE([XML_THREAD_LOCAL], [_Thread_local], [TLS specifier]) ], [
451    AC_COMPILE_IFELSE([
452        AC_LANG_SOURCE([__thread int v;]) ], [
453        AC_DEFINE([XML_THREAD_LOCAL], [__thread], [TLS specifier]) ], [
454    AC_COMPILE_IFELSE([
455        AC_LANG_SOURCE([__declspec(thread) int v;]) ], [
456        AC_DEFINE([XML_THREAD_LOCAL], [__declspec(thread)], [TLS specifier]) ], [
457    WARN_NO_TLS=1 ])])])
458fi
459
460dnl Checking whether __attribute__((destructor)) is accepted by the compiler
461AC_MSG_CHECKING([whether __attribute__((destructor)) is accepted])
462AC_TRY_COMPILE2([
463void __attribute__((destructor))
464f(void) {}], [], [
465  AC_MSG_RESULT(yes)
466  AC_DEFINE([HAVE_ATTRIBUTE_DESTRUCTOR], [1],[Define if __attribute__((destructor)) is accepted])
467  AC_DEFINE([ATTRIBUTE_DESTRUCTOR], [__attribute__((destructor))],[A form that will not confuse apibuild.py])],[
468  AC_MSG_RESULT(no)])
469
470dnl
471dnl Linker version scripts for symbol versioning
472dnl
473VERSION_SCRIPT_FLAGS=
474# lt_cv_prog_gnu_ld is from libtool 2.+
475if test "$lt_cv_prog_gnu_ld" = yes; then
476  case $host in
477    *-*-cygwin* | *-*-mingw* | *-*-msys* )
478      ;;
479    *)
480      dnl lld 16 defaults to --no-undefined-version but the version script
481      dnl can contain symbols disabled by configuration options.
482      AX_APPEND_LINK_FLAGS([-Wl,--undefined-version], [VERSION_SCRIPT_FLAGS])
483      AX_APPEND_FLAG([-Wl,--version-script=], [VERSION_SCRIPT_FLAGS])
484      ;;
485  esac
486else
487  case $host in
488  *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
489  esac
490fi
491AC_SUBST(VERSION_SCRIPT_FLAGS)
492AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
493
494dnl
495dnl Workaround for native compilers
496dnl  HP  : http://bugs.gnome.org/db/31/3163.html
497dnl  DEC : Enable NaN/Inf
498dnl
499if test "${GCC}" != "yes" ; then
500    case "${host}" in
501          hppa*-*-hpux* )
502	       AM_CFLAGS="${AM_CFLAGS} -Wp,-H30000"
503	       ;;
504          *-dec-osf* )
505               AM_CFLAGS="${AM_CFLAGS} -ieee"
506               ;;
507	  alpha*-*-linux* )
508	       AM_CFLAGS="${AM_CFLAGS} -ieee"
509	       ;;
510    esac
511else
512    if test "$with_fexceptions" = "yes"
513    then
514        #
515	# Not activated by default because this inflates the code size
516	# Used to allow propagation of C++ exceptions through the library
517	#
518	AM_CFLAGS="${AM_CFLAGS} -fexceptions"
519    fi
520
521    # warnings we'd like to see
522    AM_CFLAGS="${AM_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
523    # warnings we'd like to suppress
524    AM_CFLAGS="${AM_CFLAGS} -Wno-long-long -Wno-format-extra-args"
525    case "${host}" in
526          alpha*-*-linux* )
527	       AM_CFLAGS="${AM_CFLAGS} -mieee"
528	       ;;
529	  alpha*-*-osf* )
530	       AM_CFLAGS="${AM_CFLAGS} -mieee"
531	       ;;
532    esac
533fi
534case ${host} in
535    *-*-solaris*)
536        XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
537        ;;
538    hppa*-hp-mpeix)
539        NEED_TRIO=1
540	;;
541    *-*-cygwin* | *-*-mingw* | *-*-msys* )
542        # If the host is Windows, and shared libraries are disabled, we
543        # need to add -DLIBXML_STATIC to AM_CFLAGS in order for linking to
544        # work properly (without it, xmlexports.h would force the use of
545        # DLL imports, which obviously aren't present in a static
546        # library).
547        if test "x$enable_shared" = "xno"; then
548            XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
549            AM_CFLAGS="$AM_CFLAGS -DLIBXML_STATIC"
550        fi
551        ;;
552esac
553
554
555dnl
556dnl Simple API modules
557dnl
558
559if test "$with_tree" = "no" ; then
560    echo Disabling DOM like tree manipulation APIs
561    WITH_TREE=0
562else
563    WITH_TREE=1
564fi
565AC_SUBST(WITH_TREE)
566
567if test "$with_ftp" != "yes" ; then
568    WITH_FTP=0
569else
570    echo Enabling FTP support
571    WITH_FTP=1
572fi
573AC_SUBST(WITH_FTP)
574AM_CONDITIONAL(WITH_FTP_SOURCES, test "$WITH_FTP" = "1")
575
576if test "$with_http" = "no" ; then
577    echo Disabling HTTP support
578    WITH_HTTP=0
579else
580    WITH_HTTP=1
581fi
582AC_SUBST(WITH_HTTP)
583AM_CONDITIONAL(WITH_HTTP_SOURCES, test "$WITH_HTTP" = "1")
584
585if test "$with_legacy" != "yes" ; then
586    WITH_LEGACY=0
587else
588    echo Enabling deprecated APIs
589    WITH_LEGACY=1
590fi
591AC_SUBST(WITH_LEGACY)
592AM_CONDITIONAL(WITH_LEGACY_SOURCES, test "$WITH_LEGACY" = "1")
593
594if test "$with_reader" = "no" ; then
595    echo Disabling the xmlReader parsing interface
596    WITH_READER=0
597else
598    WITH_READER=1
599fi
600AC_SUBST(WITH_READER)
601AM_CONDITIONAL(WITH_READER_SOURCES, test "$WITH_READER" = "1")
602
603if test "$with_writer" = "no" ; then
604    echo Disabling the xmlWriter saving interface
605    WITH_WRITER=0
606else
607    WITH_WRITER=1
608fi
609AC_SUBST(WITH_WRITER)
610AM_CONDITIONAL(WITH_WRITER_SOURCES, test "$WITH_WRITER" = "1")
611
612if test "$with_pattern" = "no" ; then
613    echo Disabling the xmlPattern parsing interface
614    WITH_PATTERN=0
615else
616    WITH_PATTERN=1
617fi
618AC_SUBST(WITH_PATTERN)
619AM_CONDITIONAL(WITH_PATTERN_SOURCES, test "$WITH_PATTERN" = "1")
620
621if test "$with_sax1" = "no" ; then
622    echo Disabling the older SAX1 interface
623    WITH_SAX1=0
624else
625    WITH_SAX1=1
626fi
627AC_SUBST(WITH_SAX1)
628AM_CONDITIONAL(WITH_SAX1_SOURCES, test "$WITH_SAX1" = "1")
629
630if test "$with_push" = "no" ; then
631    echo Disabling the PUSH parser interfaces
632    WITH_PUSH=0
633else
634    WITH_PUSH=1
635fi
636AC_SUBST(WITH_PUSH)
637
638if test "$with_html" = "no" ; then
639    echo Disabling HTML support
640    WITH_HTML=0
641else
642    WITH_HTML=1
643fi
644AC_SUBST(WITH_HTML)
645AM_CONDITIONAL(WITH_HTML_SOURCES, test "$WITH_HTML" = "1")
646
647if test "$with_valid" = "no" ; then
648    echo Disabling DTD validation support
649    WITH_VALID=0
650else
651    WITH_VALID=1
652fi
653AC_SUBST(WITH_VALID)
654AM_CONDITIONAL(WITH_VALID_SOURCES, test "$WITH_VALID" = "1")
655
656if test "$with_catalog" = "no" ; then
657    echo Disabling Catalog support
658    WITH_CATALOG=0
659else
660    WITH_CATALOG=1
661fi
662AC_SUBST(WITH_CATALOG)
663AM_CONDITIONAL(WITH_CATALOG_SOURCES, test "$WITH_CATALOG" = "1")
664
665if test "$with_xptr" = "no" ; then
666    echo Disabling XPointer support
667    WITH_XPTR=0
668    WITH_XPTR_LOCS=0
669else
670    WITH_XPTR=1
671fi
672AC_SUBST(WITH_XPTR)
673AM_CONDITIONAL(WITH_XPTR_SOURCES, test "$WITH_XPTR" = "1")
674
675if test "$with_xptr_locs" != "yes" ; then
676    WITH_XPTR_LOCS=0
677else
678    echo Enabling Xpointer locations support
679    WITH_XPTR_LOCS=1
680fi
681AC_SUBST(WITH_XPTR_LOCS)
682
683if test "$with_c14n" = "no" ; then
684    echo Disabling C14N support
685    WITH_C14N=0
686else
687    WITH_C14N=1
688fi
689AC_SUBST(WITH_C14N)
690AM_CONDITIONAL(WITH_C14N_SOURCES, test "$WITH_C14N" = "1")
691
692if test "$with_xinclude" = "no" ; then
693    echo Disabling XInclude support
694    WITH_XINCLUDE=0
695else
696    WITH_XINCLUDE=1
697fi
698AC_SUBST(WITH_XINCLUDE)
699AM_CONDITIONAL(WITH_XINCLUDE_SOURCES, test "$WITH_XINCLUDE" = "1")
700
701if test "$with_schematron" = "no" ; then
702    echo "Disabling Schematron support"
703    WITH_SCHEMATRON=0
704else
705    WITH_SCHEMATRON=1
706fi
707AC_SUBST(WITH_SCHEMATRON)
708AM_CONDITIONAL(WITH_SCHEMATRON_SOURCES, test "$WITH_SCHEMATRON" = "1")
709
710if test "$with_xpath" = "no" ; then
711    echo Disabling XPATH support
712    WITH_XPATH=0
713else
714    WITH_XPATH=1
715fi
716AC_SUBST(WITH_XPATH)
717AM_CONDITIONAL(WITH_XPATH_SOURCES, test "$WITH_XPATH" = "1")
718
719if test "$with_output" = "no" ; then
720    echo Disabling serialization/saving support
721    WITH_OUTPUT=0
722else
723    WITH_OUTPUT=1
724fi
725AC_SUBST(WITH_OUTPUT)
726AM_CONDITIONAL(WITH_OUTPUT_SOURCES, test "$WITH_OUTPUT" = "1")
727
728if test "$WITH_ICONV" != "1" && test "$with_iso8859x" = "no" ; then
729    echo Disabling ISO8859X support
730    WITH_ISO8859X=0
731else
732    WITH_ISO8859X=1
733fi
734AC_SUBST(WITH_ISO8859X)
735
736if test "$with_schemas" = "no" ; then
737    echo "Disabling Schemas/Relax-NG support"
738    WITH_SCHEMAS=0
739else
740    WITH_SCHEMAS=1
741fi
742AC_SUBST(WITH_SCHEMAS)
743AM_CONDITIONAL(WITH_SCHEMAS_SOURCES, test "$WITH_SCHEMAS" = "1")
744
745if test "$with_regexps" = "no" ; then
746    echo Disabling Regexps support
747    WITH_REGEXPS=0
748else
749    WITH_REGEXPS=1
750fi
751AC_SUBST(WITH_REGEXPS)
752AM_CONDITIONAL(WITH_REGEXPS_SOURCES, test "$WITH_REGEXPS" = "1")
753
754if test "$with_debug" = "no" ; then
755    echo Disabling DEBUG support
756    WITH_DEBUG=0
757else
758    WITH_DEBUG=1
759fi
760AC_SUBST(WITH_DEBUG)
761AM_CONDITIONAL(WITH_DEBUG_SOURCES, test "$WITH_DEBUG" = "1")
762
763if test "$with_mem_debug" = "yes" ; then
764    if test "$with_thread_alloc" = "yes" ; then
765        echo Disabling memory debug - cannot use mem-debug with thread-alloc!
766	WITH_MEM_DEBUG=0
767    else
768        echo Enabling memory debug support
769        WITH_MEM_DEBUG=1
770    fi
771else
772    WITH_MEM_DEBUG=0
773fi
774AC_SUBST(WITH_MEM_DEBUG)
775
776dnl
777dnl Check for Python
778dnl
779
780AS_IF([test "x$with_python" != "xno"], [
781    AM_PATH_PYTHON
782    PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
783])
784AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"])
785
786dnl
787dnl Extra Python flags for Windows
788dnl
789PYTHON_LDFLAGS=
790if test "${PYTHON}" != ""; then
791    case "$host" in
792        *-*-mingw* )
793            PYTHON_LDFLAGS="-no-undefined -shrext .pyd"
794            ;;
795        *-*-cygwin* |*-*-msys* )
796            PYTHON_LDFLAGS="-no-undefined"
797            ;;
798    esac
799fi
800AC_SUBST(PYTHON_LDFLAGS)
801
802dnl
803dnl Check for DSO support
804dnl
805WITH_MODULES=0
806
807if test "$with_modules" != "no" ; then
808    case "$host" in
809        *-*-cygwin* | *-*-msys* )
810            MODULE_EXTENSION=".dll"
811            ;;
812        *-*-mingw*)
813            MODULE_EXTENSION=".dll"
814            WITH_MODULES=1
815            ;;
816        *-*-hpux*)
817	    MODULE_EXTENSION=".sl"
818	    ;;
819        *)
820	    MODULE_EXTENSION=".so"
821	    ;;
822    esac
823
824    if test "$WITH_MODULES" = "0"; then
825        _libs=$LIBS
826        AC_SEARCH_LIBS([dlopen], [dl], [
827            WITH_MODULES=1
828            if test "$ac_cv_search_dlopen" != "none required"; then
829                MODULE_PLATFORM_LIBS=$ac_cv_search_dlopen
830            fi
831            AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])], [
832            AC_SEARCH_LIBS([shl_load], [dld], [
833                WITH_MODULES=1
834                if test "$ac_cv_search_shl_load" != "none required"; then
835                    MODULE_PLATFORM_LIBS=$ac_cv_search_shl_load
836                fi
837                AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])])])
838        LIBS=$_libs
839    fi
840fi
841
842AC_SUBST(WITH_MODULES)
843AC_SUBST(MODULE_PLATFORM_LIBS)
844AC_SUBST(MODULE_EXTENSION)
845AM_CONDITIONAL(WITH_MODULES_SOURCES, test "$WITH_MODULES" = "1")
846
847dnl
848dnl Check for trio string functions
849dnl
850if test "${NEED_TRIO}" = "1" ; then
851    echo Adding trio library for string functions
852    WITH_TRIO=1
853else
854    WITH_TRIO=0
855fi
856AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
857AC_SUBST(WITH_TRIO)
858
859dnl
860dnl Thread-related stuff
861dnl
862THREAD_LIBS=""
863BASE_THREAD_LIBS=""
864WITH_THREADS=0
865THREAD_CFLAGS=""
866WITH_THREAD_ALLOC=0
867
868if test "$with_threads" = "no" ; then
869    echo Disabling multithreaded support
870else
871    case $host_os in
872        *mingw*)
873            dnl Default to native threads on Windows
874            WITH_THREADS="1"
875            ;;
876        *)
877            dnl Use pthread by default in other cases
878            _libs=$LIBS
879            AC_CHECK_HEADERS(pthread.h,
880                AC_SEARCH_LIBS([pthread_join], [pthread], [
881                    WITH_THREADS="1"
882                    if test "$ac_cv_search_pthread_join" != "none required"; then
883                        THREAD_LIBS=$ac_cv_search_pthread_join
884                    fi
885                    AC_DEFINE([HAVE_PTHREAD_H], [],
886                              [Define if <pthread.h> is there])]))
887            LIBS=$_libs
888            ;;
889    esac
890
891    case $host_os in
892        *linux*)
893            if test "${GCC}" = "yes" ; then
894                BASE_THREAD_LIBS="$THREAD_LIBS"
895                THREAD_LIBS=""
896            fi
897            ;;
898    esac
899
900    if test "$WITH_THREADS" = "1" ; then
901	THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
902    fi
903fi
904if test "$with_thread_alloc" = "yes" && test "$WITH_THREADS" = "1" ; then
905    WITH_THREAD_ALLOC=1
906fi
907
908AC_SUBST(THREAD_LIBS)
909AC_SUBST(BASE_THREAD_LIBS)
910AC_SUBST(WITH_THREADS)
911AC_SUBST(THREAD_CFLAGS)
912AC_SUBST(WITH_THREAD_ALLOC)
913
914dnl
915dnl xmllint shell history
916dnl
917if test "$with_history" = "yes" && test "$with_readline" != "no"; then
918    echo Enabling xmllint shell history
919    dnl check for terminal library. this is a very cool solution
920    dnl from octave's configure.in
921    unset tcap
922    for termlib in ncurses curses termcap terminfo termlib; do
923	AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
924	test -n "$tcap" && break
925    done
926
927    _cppflags=$CPPFLAGS
928    _libs=$LIBS
929    if test "$with_readline" != "" && test "$with_readline" != "yes"; then
930        RDL_DIR=$with_readline
931        CPPFLAGS="${CPPFLAGS} -I$RDL_DIR/include"
932        LIBS="${LIBS} -L$RDL_DIR/lib"
933    fi
934    AC_CHECK_HEADER(readline/history.h,
935	AC_CHECK_LIB(history, append_history,[
936	    RDL_LIBS="-lhistory"
937            if test "x${RDL_DIR}" != "x"; then
938                RDL_CFLAGS="-I$RDL_DIR/include"
939                RDL_LIBS="-L$RDL_DIR/lib $RDL_LIBS"
940            fi
941	    AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
942    AC_CHECK_HEADER(readline/readline.h,
943	AC_CHECK_LIB(readline, readline,[
944	    RDL_LIBS="-lreadline $RDL_LIBS $tcap"
945            if test "x$RDL_DIR" != "x"; then
946                RDL_CFLAGS="-I$RDL_DIR/include"
947                RDL_LIBS="-L$RDL_DIR/lib $RDL_LIBS"
948            fi
949	    AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
950    CPPFLAGS=$_cppflags
951    LIBS=$_libs
952fi
953AC_SUBST(RDL_CFLAGS)
954AC_SUBST(RDL_LIBS)
955
956dnl
957dnl Checks for zlib library.
958dnl
959WITH_ZLIB=0
960
961if test "$with_zlib" = "no"; then
962    echo "Disabling zlib compression support"
963else
964    if test "$with_zlib" != "yes"; then
965        Z_DIR=$with_zlib
966    fi
967
968    # Don't run pkg-config if with_zlib contains a path.
969    if test "x$Z_DIR" = "x"; then
970        # Try pkg-config first so that static linking works.
971        PKG_CHECK_MODULES([Z],[zlib],
972            [WITH_ZLIB=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} zlib"],
973            [:])
974    fi
975
976    if test "$WITH_ZLIB" = "0"; then
977        _cppflags=$CPPFLAGS
978        _libs=$LIBS
979        if test "x$Z_DIR" != "x"; then
980            CPPFLAGS="${CPPFLAGS} -I$Z_DIR/include"
981            LIBS="${LIBS} -L$Z_DIR/lib"
982        fi
983        AC_CHECK_HEADERS(zlib.h,
984            AC_CHECK_LIB(z, gzread,[
985                WITH_ZLIB=1
986                if test "x${Z_DIR}" != "x"; then
987                    Z_CFLAGS="-I${Z_DIR}/include"
988                    Z_LIBS="-L${Z_DIR}/lib -lz"
989                    [case ${host} in
990                        *-*-solaris*)
991                            Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
992                            ;;
993                    esac]
994                else
995                    Z_LIBS="-lz"
996                fi])
997                XML_PC_LIBS="${XML_PC_LIBS} ${Z_LIBS}"
998            )
999        CPPFLAGS=$_cppflags
1000        LIBS=$_libs
1001    fi
1002
1003    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${Z_CFLAGS}"
1004    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${Z_LIBS}"
1005fi
1006AC_SUBST(WITH_ZLIB)
1007
1008dnl
1009dnl Checks for lzma library.
1010dnl
1011WITH_LZMA=0
1012
1013if test "$with_lzma" = "no"; then
1014    echo "Disabling lzma compression support"
1015else
1016    if test "$with_lzma" != "yes"; then
1017        LZMA_DIR=$with_lzma
1018    fi
1019
1020    # Don't run pkg-config if with_lzma contains a path.
1021    if test "x$LZMA_DIR" = "x"; then
1022        # Try pkg-config first so that static linking works.
1023        PKG_CHECK_MODULES([LZMA],[liblzma],
1024            [WITH_LZMA=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} liblzma"],
1025            [:])
1026    fi
1027
1028    # If pkg-config failed, fall back to AC_CHECK_LIB. This
1029    # will not pick up the necessary LIBS flags for liblzma's
1030    # private dependencies, though, so static linking may fail.
1031    if test "$WITH_LZMA" = "0"; then
1032        _cppflags=$CPPFLAGS
1033        _libs=$LIBS
1034        if test "x$LZMA_DIR" != "x"; then
1035            CPPFLAGS="${CPPFLAGS} -I$LZMA_DIR/include"
1036            LIBS="${LIBS} -L$LZMA_DIR/lib"
1037        fi
1038        AC_CHECK_HEADERS(lzma.h,
1039            AC_CHECK_LIB(lzma, lzma_code,[
1040                WITH_LZMA=1
1041                if test "x${LZMA_DIR}" != "x"; then
1042                    LZMA_CFLAGS="-I${LZMA_DIR}/include"
1043                    LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
1044                else
1045                    LZMA_LIBS="-llzma"
1046                fi])
1047                XML_PC_LIBS="${XML_PC_LIBS} ${LZMA_LIBS}"
1048            )
1049        CPPFLAGS=$_cppflags
1050        LIBS=$_libs
1051    fi
1052
1053    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${LZMA_CFLAGS}"
1054    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${LZMA_LIBS}"
1055fi
1056AC_SUBST(WITH_LZMA)
1057AM_CONDITIONAL(WITH_LZMA_SOURCES, test "$WITH_LZMA" = "1")
1058
1059dnl
1060dnl Checks for iconv library.
1061dnl
1062WITH_ICONV=0
1063
1064if test "$with_iconv" = "no" ; then
1065    echo Disabling ICONV support
1066else
1067    _cppflags=$CPPFLAGS
1068    _libs=$LIBS
1069    if test "$with_iconv" != "yes" && test "$with_iconv" != "" ; then
1070	ICONV_DIR=$with_iconv
1071	CPPFLAGS="$CPPFLAGS -I$ICONV_DIR/include"
1072	LIBS="$LIBS -L$ICONV_DIR/lib"
1073    fi
1074    AC_MSG_CHECKING([for libiconv])
1075    AC_LINK_IFELSE([
1076        AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0,0);])
1077    ], [
1078        WITH_ICONV=1
1079        AC_MSG_RESULT([none required])
1080    ], [
1081        LIBS="$LIBS -liconv"
1082        AC_LINK_IFELSE([
1083            AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0,0);])
1084        ], [
1085            WITH_ICONV=1
1086            ICONV_LIBS="-liconv"
1087            AC_MSG_RESULT([yes])
1088        ], [
1089            AC_MSG_RESULT([no])
1090        ])
1091    ])
1092    if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
1093        ICONV_CFLAGS="-I$ICONV_DIR/include"
1094        ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS"
1095	# Export this since our headers include iconv.h
1096	XML_INCLUDEDIR="$XML_INCLUDEDIR -I$ICONV_DIR/include"
1097    fi
1098    CPPFLAGS=$_cppflags
1099    LIBS=$_libs
1100fi
1101AC_SUBST(WITH_ICONV)
1102AC_SUBST(ICONV_CFLAGS)
1103
1104dnl
1105dnl Checks for ICU library.
1106dnl
1107WITH_ICU=0
1108
1109if test "$with_icu" = "no" || test "$with_icu" = "" ; then
1110    echo Disabling ICU support
1111else
1112    # Try pkg-config first so that static linking works.
1113    # If this succeeeds, we ignore the WITH_ICU directory.
1114    PKG_CHECK_MODULES([ICU], [icu-i18n], [
1115        WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-i18n"
1116        m4_ifdef([PKG_CHECK_VAR],
1117            [PKG_CHECK_VAR([ICU_DEFS], [icu-i18n], [DEFS])])
1118        if test "x$ICU_DEFS" != "x"; then
1119            ICU_CFLAGS="$ICU_CFLAGS $ICU_DEFS"
1120        fi],[:])
1121
1122    if test "$WITH_ICU" = "0"; then
1123        ICU_CONFIG=icu-config
1124        if ${ICU_CONFIG} --cflags >/dev/null 2>&1
1125        then
1126            WITH_ICU=1
1127            ICU_CFLAGS=`${ICU_CONFIG} --cflags`
1128            ICU_LIBS=`${ICU_CONFIG} --ldflags`
1129            XML_PC_LIBS="${XML_PC_LIBS} ${ICU_LIBS}"
1130        else
1131            _cppflags="${CPPFLAGS}"
1132            _libs="${LIBS}"
1133            if test "$with_icu" != "yes" ; then
1134                ICU_DIR=$with_icu
1135                CPPFLAGS="${CPPFLAGS} -I$ICU_DIR/include"
1136                LIBS="${LIBS} -L$ICU_DIR/lib"
1137            fi
1138
1139            AC_CHECK_HEADER(unicode/ucnv.h, [
1140                AC_CHECK_LIB([icucore], [ucnv_open], [
1141                    WITH_ICU=1
1142                    ICU_LIBS=-licucore
1143                    if test "$ICU_DIR" != ""; then
1144                        ICU_CFLAGS="-I$ICU_DIR/include"
1145                        ICU_LIBS="-L$ICU_DIR/lib $ICU_LIBS"
1146                    fi])])
1147                    XML_PC_LIBS="${XML_PC_LIBS} ${ICU_LIBS}"
1148            CPPFLAGS=$_cppflags
1149            LIBS=$_libs
1150        fi
1151    fi
1152
1153    XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${ICU_CFLAGS}"
1154    XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${ICU_LIBS}"
1155fi
1156AC_SUBST(WITH_ICU)
1157
1158if test "$with_coverage" = "yes" && test "${GCC}" = "yes"
1159then
1160    echo Enabling code coverage for GCC
1161    AM_CFLAGS="$AM_CFLAGS -fprofile-arcs -ftest-coverage"
1162    AM_LDFLAGS="$AM_LDFLAGS -fprofile-arcs -ftest-coverage"
1163else
1164    echo Disabling code coverage for GCC
1165fi
1166
1167XML_LIBS="-lxml2"
1168XML_LIBTOOLLIBS="libxml2.la"
1169NON_PC_LIBS="${THREAD_LIBS} ${ICONV_LIBS} ${LIBM} ${NET_LIBS}"
1170XML_PC_LIBS="${XML_PC_LIBS} ${NON_PC_LIBS}"
1171XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${NON_PC_LIBS}"
1172XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${THREAD_CFLAGS} ${ICONV_CFLAGS}"
1173
1174dnl When static-only:
1175dnl * Duplicate xml-config static --libs into --dynamic.
1176dnl * Fold pkg-config private fields into main fields.
1177if test "x$enable_shared" = "xno"; then
1178  XML_PRIVATE_LIBS_NO_SHARED="${XML_PRIVATE_LIBS}"
1179  XML_PC_PRIVATE=
1180  XML_PC_LIBS_PRIVATE=
1181else
1182  XML_PRIVATE_LIBS_NO_SHARED=
1183  XML_PC_PRIVATE=".private"
1184  XML_PC_LIBS_PRIVATE="
1185Libs.private:"
1186fi
1187AC_SUBST(XML_PRIVATE_LIBS_NO_SHARED)
1188AC_SUBST(XML_PC_PRIVATE)
1189AC_SUBST(XML_PC_LIBS_PRIVATE)
1190AM_SUBST_NOTMAKE(XML_PRIVATE_LIBS_NO_SHARED)
1191AM_SUBST_NOTMAKE(XML_PC_PRIVATE)
1192AM_SUBST_NOTMAKE(XML_PC_LIBS_PRIVATE)
1193
1194AC_SUBST(XML_PC_LIBS)
1195AC_SUBST(XML_PC_REQUIRES)
1196AM_SUBST_NOTMAKE(XML_PC_LIBS)
1197AM_SUBST_NOTMAKE(XML_PC_REQUIRES)
1198
1199AC_SUBST(AM_CFLAGS)
1200AC_SUBST(AM_LDFLAGS)
1201AC_SUBST(XML_CFLAGS)
1202
1203AC_SUBST(XML_LIBDIR)
1204AC_SUBST(XML_LIBS)
1205AC_SUBST(XML_PRIVATE_LIBS)
1206AC_SUBST(XML_PRIVATE_CFLAGS)
1207AC_SUBST(XML_LIBTOOLLIBS)
1208AC_SUBST(XML_INCLUDEDIR)
1209
1210dnl for the spec file
1211RELDATE=`date +'%a %b %e %Y'`
1212AC_SUBST(RELDATE)
1213
1214# keep on one line for cygwin c.f. #130896
1215AC_CONFIG_FILES([Makefile include/Makefile include/libxml/Makefile include/private/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile fuzz/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
1216AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
1217AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
1218AC_OUTPUT
1219
1220if test "$WARN_NO_TLS" != ""; then
1221    echo "================================================================"
1222    echo "WARNING: Your C compiler appears to not support thread-local"
1223    echo "storage. Future versions of libxml2 will require this feature"
1224    echo "for multi-threading."
1225    echo "================================================================"
1226fi
1227