1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_SRCDIR([entities.c])
5 AC_CONFIG_HEADERS([config.h])
6 AM_MAINTAINER_MODE([enable])
7 AC_CONFIG_MACRO_DIR([m4])
10 LIBXML_MAJOR_VERSION=2
11 LIBXML_MINOR_VERSION=9
12 LIBXML_MICRO_VERSION=5
13 LIBXML_MICRO_VERSION_SUFFIX=
14 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
15 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
17 LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
19 if test -f CVS/Entries ; then
20 extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
22 if test "$extra" != ""
24 LIBXML_VERSION_EXTRA="-CVS$extra"
26 else if test -d .svn ; then
27 extra=`svn info | grep Revision | sed 's+Revision: ++'`
29 if test "$extra" != ""
31 LIBXML_VERSION_EXTRA="-SVN$extra"
33 else if test -d .git ; then
34 extra=`git describe 2>/dev/null | sed 's+LIBXML[[0-9.]]*-++'`
36 if test "$extra" != ""
38 LIBXML_VERSION_EXTRA="-GIT$extra"
43 AC_SUBST(LIBXML_MAJOR_VERSION)
44 AC_SUBST(LIBXML_MINOR_VERSION)
45 AC_SUBST(LIBXML_MICRO_VERSION)
46 AC_SUBST(LIBXML_VERSION)
47 AC_SUBST(LIBXML_VERSION_INFO)
48 AC_SUBST(LIBXML_VERSION_NUMBER)
49 AC_SUBST(LIBXML_VERSION_EXTRA)
51 VERSION=${LIBXML_VERSION}
53 AM_INIT_AUTOMAKE(libxml2, $VERSION)
55 # Support silent build rules, requires at least automake-1.11. Disable
56 # by either passing --disable-silent-rules to configure or passing V=1
58 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
60 dnl Checks for programs.
66 AC_PATH_PROG(MV, mv, /bin/mv)
67 AC_PATH_PROG(TAR, tar, /bin/tar)
68 AC_PATH_PROG(PERL, perl, /usr/bin/perl)
69 AC_PATH_PROG(WGET, wget, /usr/bin/wget)
70 AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
71 AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
77 dnl if the system support linker version scripts for symbol versioning
81 # lt_cv_prog_gnu_ld is from libtool 2.+
82 if test "$lt_cv_prog_gnu_ld" = yes; then
83 VERSION_SCRIPT_FLAGS=-Wl,--version-script=
86 *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
89 AC_SUBST(VERSION_SCRIPT_FLAGS)
90 AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
93 dnl We process the AC_ARG_WITH first so that later we can modify
94 dnl some of them to try to prevent impossible combinations. This
95 dnl also allows up so alphabetize the choices
99 dnl zlib option might change flags, so we save them initially
101 _cppflags="${CPPFLAGS}"
105 [ --with-c14n add the Canonicalization support (on)])
107 [ --with-catalog add the Catalog support (on)])
109 [ --with-debug add the debugging module (on)])
111 [ --with-docbook add Docbook SGML support (on)])
112 AC_ARG_WITH(fexceptions,
113 [ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])
115 [ --with-ftp add the FTP support (on)])
117 [ --with-history add history support to xmllint shell(off)])
119 [ --with-html add the HTML support (on)])
120 dnl Specific dir for HTML output ?
121 AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path],
122 [path to base html directory, default $datadir/doc/html]),
123 [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
125 AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
126 [directory used under html-dir, default $PACKAGE-$VERSION/html]),
127 [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
128 [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
131 [ --with-http add the HTTP support (on)])
133 [ --with-iconv[[=DIR]] add ICONV support (on)])
135 [ --with-icu add ICU support (off)])
136 AC_ARG_WITH(iso8859x,
137 [ --with-iso8859x add ISO8859X support if no iconv (on)])
139 [ --with-legacy add deprecated APIs for compatibility (on)])
140 AC_ARG_WITH(mem_debug,
141 [ --with-mem-debug add the memory debugging module (off)])
143 [ --with-minimum build a minimally sized library (off)])
145 [ --with-output add the serialization support (on)])
147 [ --with-pattern add the xmlPattern selection interface (on)])
149 [ --with-push add the PUSH parser interfaces (on)])
151 [ --with-python[[=DIR]] build Python bindings if found])
152 AC_ARG_WITH(python_install_dir,
153 [ --with-python-install-dir=DIR
154 install Python bindings in DIR])
156 [ --with-reader add the xmlReader parsing interface (on)])
157 AC_ARG_WITH(readline,
158 [ --with-readline=DIR use readline in DIR],[
159 if test "$withval" != "no" -a "$withval" != "yes"; then
161 CPPFLAGS="${CPPFLAGS} -I$withval/include"
162 LDFLAGS="${LDFLAGS} -L$withval/lib"
166 [ --with-regexps add Regular Expressions support (on)])
167 AC_ARG_WITH(run_debug,
168 [ --with-run-debug add the runtime debugging module (off)])
170 [ --with-sax1 add the older SAX1 interface (on)])
172 [ --with-schemas add Relax-NG and Schemas support (on)])
173 AC_ARG_WITH(schematron,
174 [ --with-schematron add Schematron support (on)])
176 [ --with-threads add multithread support(on)])
177 AC_ARG_WITH(thread-alloc,
178 [ --with-thread-alloc add per-thread memory(off)])
180 [ --with-tree add the DOM like tree manipulation APIs (on)])
182 [ --with-valid add the DTD validation support (on)])
184 [ --with-writer add the xmlWriter saving interface (on)])
185 AC_ARG_WITH(xinclude,
186 [ --with-xinclude add the XInclude support (on)])
188 [ --with-xpath add the XPATH support (on)])
190 [ --with-xptr add the XPointer support (on)])
192 [ --with-modules add the dynamic modules support (on)])
194 [ --with-zlib[[=DIR]] use libz in DIR],[
195 if test "$withval" != "no" -a "$withval" != "yes"; then
197 CPPFLAGS="${CPPFLAGS} -I$withval/include"
198 LDFLAGS="${LDFLAGS} -L$withval/lib"
202 [ --with-lzma[[=DIR]] use liblzma in DIR],[
203 if test "$withval" != "no" -a "$withval" != "yes"; then
205 CPPFLAGS="${CPPFLAGS} -I$withval/include"
206 LDFLAGS="${LDFLAGS} -L$withval/lib"
209 AC_ARG_WITH(coverage,
210 [ --with-coverage build for code coverage with GCC (off)])
212 AC_ARG_ENABLE(rebuild-docs,
213 [ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=no]]])
214 if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
215 AC_MSG_ERROR([cannot rebuild docs when builddir != srcdir])
217 AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"])
220 dnl hard dependancies on options
222 if test "$with_schemas" = "yes"
227 if test "$with_schematron" = "yes"
233 if test "$with_reader" = "yes"
237 if test "$with_xptr" = "yes"
242 dnl option to build a minimal libxml2 library
244 if test "$with_minimum" = "yes"
246 echo "Configuring for a minimal library"
247 if test "$with_c14n" = ""
251 if test "$with_catalog" = ""
256 if test "$with_debug" = ""
260 if test "$with_docbook" = ""
264 if test "$with_fexceptions" = ""
268 if test "$with_ftp" = ""
272 if test "$with_history" = ""
276 if test "$with_html" = ""
280 if test "$with_http" = ""
284 if test "$with_iconv" = ""
288 if test "$with_iso8859x" = ""
292 if test "$with_legacy" = ""
296 if test "$with_mem_debug" = ""
300 if test "$with_output" = ""
304 if test "$with_pattern" = ""
308 if test "$with_push" = ""
312 if test "$with_python" = ""
316 if test "$with_reader" = ""
320 if test "$with_readline" = ""
324 if test "$with_regexps" = ""
328 if test "$with_run_debug" = ""
332 if test "$with_sax1" = ""
336 if test "$with_schemas" = ""
340 if test "$with_schematron" = ""
344 if test "$with_threads" = ""
348 if test "$with_thread_alloc" = ""
352 if test "$with_tree" = ""
356 if test "$with_valid" = ""
360 if test "$with_writer" = ""
364 if test "$with_xinclude" = ""
368 if test "$with_xpath" = ""
372 if test "$with_xptr" = ""
376 if test "$with_zlib" = ""
380 if test "$with_modules" = ""
388 dnl Checks for zlib library.
391 if test "$with_zlib" = "no"; then
392 echo "Disabling compression support"
394 # Try pkg-config first so that static linking works.
395 # If this succeeeds, we ignore the WITH_ZLIB directory.
396 PKG_CHECK_MODULES([Z],[zlib],
400 if test "x$have_libz" = "xno"; then
401 AC_CHECK_HEADERS(zlib.h,
402 AC_CHECK_LIB(z, gzread,[
404 if test "x${Z_DIR}" != "x"; then
405 Z_CFLAGS="-I${Z_DIR}/include"
406 Z_LIBS="-L${Z_DIR}/lib -lz"
409 Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
418 # we still need to check for zlib.h header
419 AC_CHECK_HEADERS([zlib.h])
422 # Found the library via either method?
423 if test "x$have_libz" = "xyes"; then
424 AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
435 dnl Checks for lzma library.
438 if test "$with_lzma" = "no"; then
439 echo "Disabling compression support"
441 # Try pkg-config first so that static linking works.
442 # If this succeeeds, we ignore the WITH_LZMA directory.
443 PKG_CHECK_MODULES([LZMA],[liblzma],
447 # If pkg-config failed, fall back to AC_CHECK_LIB. This
448 # will not pick up the necessary LIBS flags for liblzma's
449 # private dependencies, though, so static linking may fail.
450 if test "x$have_liblzma" = "xno"; then
451 AC_CHECK_HEADERS(lzma.h,
452 AC_CHECK_LIB(lzma, lzma_code,[
454 if test "x${LZMA_DIR}" != "x"; then
455 LZMA_CFLAGS="-I${LZMA_DIR}/include"
456 LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
463 # we still need to check for lzma,h header
464 AC_CHECK_HEADERS([lzma.h])
467 # Found the library via either method?
468 if test "x$have_liblzma" = "xyes"; then
469 AC_DEFINE([HAVE_LIBLZMA], [1], [Have compression library])
474 AC_SUBST(LZMA_CFLAGS)
478 CPPFLAGS=${_cppflags}
481 echo Checking headers
483 dnl Checks for header files.
486 AC_CHECK_HEADERS([fcntl.h])
487 AC_CHECK_HEADERS([unistd.h])
488 AC_CHECK_HEADERS([ctype.h])
489 AC_CHECK_HEADERS([dirent.h])
490 AC_CHECK_HEADERS([errno.h])
491 AC_CHECK_HEADERS([malloc.h])
492 AC_CHECK_HEADERS([stdarg.h])
493 AC_CHECK_HEADERS([sys/stat.h])
494 AC_CHECK_HEADERS([sys/types.h])
495 AC_CHECK_HEADERS([stdint.h])
496 AC_CHECK_HEADERS([inttypes.h])
497 AC_CHECK_HEADERS([time.h])
498 AC_CHECK_HEADERS([ansidecl.h])
499 AC_CHECK_HEADERS([ieeefp.h])
500 AC_CHECK_HEADERS([nan.h])
501 AC_CHECK_HEADERS([math.h])
502 AC_CHECK_HEADERS([limits.h])
503 AC_CHECK_HEADERS([fp_class.h])
504 AC_CHECK_HEADERS([float.h])
505 AC_CHECK_HEADERS([stdlib.h])
506 AC_CHECK_HEADERS([sys/socket.h], [], [],
507 [#if HAVE_SYS_TYPES_H
508 # include <sys/types.h>
511 AC_CHECK_HEADERS([netinet/in.h], [], [],
512 [#if HAVE_SYS_TYPES_H
513 # include <sys/types.h>
516 AC_CHECK_HEADERS([arpa/inet.h], [], [],
517 [#if HAVE_SYS_TYPES_H
518 # include <sys/types.h>
521 # include <arpa/inet.h>
524 AC_CHECK_HEADERS([netdb.h])
525 AC_CHECK_HEADERS([sys/time.h])
526 AC_CHECK_HEADERS([sys/select.h])
527 AC_CHECK_HEADERS([poll.h])
528 AC_CHECK_HEADERS([sys/mman.h])
529 AC_CHECK_HEADERS([sys/timeb.h])
530 AC_CHECK_HEADERS([signal.h])
531 AC_CHECK_HEADERS([arpa/nameser.h], [], [],
532 [#if HAVE_SYS_TYPES_H
533 # include <sys/types.h>
536 AC_CHECK_HEADERS([resolv.h], [], [],
537 [#if HAVE_SYS_TYPES_H
538 # include <sys/types.h>
540 #if HAVE_NETINET_IN_H
541 # include <netinet/in.h>
543 #if HAVE_ARPA_NAMESER_H
544 # include <arpa/nameser.h>
547 AC_CHECK_HEADERS([dl.h])
548 AC_CHECK_HEADERS([dlfcn.h])
556 echo Checking libraries
558 dnl Checks for library functions.
560 AC_CHECK_FUNCS(strdup strndup strerror)
561 AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
562 AC_CHECK_FUNCS(strftime localtime gettimeofday ftime)
563 AC_CHECK_FUNCS(stat _stat signal)
564 AC_CHECK_FUNCS(rand rand_r srand time)
565 AC_CHECK_FUNCS(isascii mmap munmap putenv)
567 AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
568 #if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
569 # undef /**/ HAVE_MMAP
572 dnl Checking for va_copy availability
573 AC_MSG_CHECKING([for va_copy])
574 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
575 va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],
578 AC_MSG_RESULT($have_va_copy)
579 if test x"$have_va_copy" = x"yes"; then
580 AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
582 AC_MSG_CHECKING([for __va_copy])
583 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
584 va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],
587 AC_MSG_RESULT($have___va_copy)
588 if test x"$have___va_copy" = x"yes"; then
589 AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
593 dnl Checking whether va_list is an array type
594 AC_MSG_CHECKING([whether va_list is an array type])
597 void a(va_list * ap) {}],[
598 va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1],[
601 AC_DEFINE([VA_LIST_IS_ARRAY], [1],[Define if va_list is an array type])])
603 dnl Checks for inet libraries:
604 AC_SEARCH_LIBS(gethostent, [nsl])
605 AC_SEARCH_LIBS(setsockopt, [socket net network])
606 AC_SEARCH_LIBS(connect, [inet])
608 dnl Determine what socket length (socklen_t) data type is
609 AC_MSG_CHECKING([for type of socket length (socklen_t)])
612 #include <sys/types.h>
613 #include <sys/socket.h>],[
614 (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
615 AC_MSG_RESULT(socklen_t *)
616 XML_SOCKLEN_T=socklen_t],[
619 #include <sys/types.h>
620 #include <sys/socket.h>],[
621 (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
622 AC_MSG_RESULT(size_t *)
623 XML_SOCKLEN_T=size_t],[
626 #include <sys/types.h>
627 #include <sys/socket.h>],[
628 (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
631 AC_MSG_WARN(could not determine)
632 XML_SOCKLEN_T="int"])])])
633 AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
635 dnl Checking if gethostbyname() argument is const.
636 AC_MSG_CHECKING([for const gethostbyname() argument])
637 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
638 [[(void)gethostbyname((const char *)"");]])],
639 have_gethostbyname_const_arg=yes,
640 have_gethostbyname_const_arg=no)
641 AC_MSG_RESULT($have_gethostbyname_const_arg)
642 if test x"$have_gethostbyname_const_arg" = x"yes"; then
643 AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [],
644 [Type cast for the gethostbyname() argument])
646 AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [(char *)],
647 [Type cast for the gethostbyname() argument])
650 dnl Checking if send() second argument is const.
651 AC_MSG_CHECKING([for const send() second argument])
652 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
653 #include <sys/socket.h>]],
654 [[(void)send(1,(const char *)"",1,1);]])],
655 have_send_const_arg2=yes,
656 have_send_const_arg2=no)
657 AC_MSG_RESULT($have_send_const_arg2)
658 if test x"$have_send_const_arg2" = x"yes"; then
659 AC_DEFINE([SEND_ARG2_CAST], [],
660 [Type cast for the send() function 2nd arg])
662 AC_DEFINE([SEND_ARG2_CAST], [(char *)],
663 [Type cast for the send() function 2nd arg])
666 dnl ***********************Checking for availability of IPv6*******************
668 AC_MSG_CHECKING([whether to enable IPv6])
669 AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
670 if test "$with_minimum" = "yes"
674 if test $enable_ipv6 = yes; then
676 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
677 # include <sys/types.h>
678 # include <sys/socket.h>
680 struct sockaddr_storage ss;
681 socket(AF_INET6, SOCK_STREAM, 0)
686 AC_MSG_RESULT($have_ipv6)
688 if test $have_ipv6 = yes; then
689 AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
690 have_broken_ss_family=no
692 dnl *********************************************************************
693 dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have
694 dnl a ss_family member, but rather __ss_family. Let's detect that
695 dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these
696 dnl platforms. However, we should only do this if ss_family is not
698 dnl ********************************************************************
699 AC_MSG_CHECKING([struct sockaddr::ss_family])
700 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
701 # include <sys/types.h>
702 # include <sys/socket.h>
704 struct sockaddr_storage ss ;
710 AC_MSG_RESULT($have_ss_family)
711 if test x$have_ss_family = xno ; then
712 AC_MSG_CHECKING([broken struct sockaddr::ss_family])
713 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
714 # include <sys/types.h>
715 # include <sys/socket.h>
717 struct sockaddr_storage ss ;
720 have_broken_ss_family=yes,
721 have_broken_ss_family=no
723 AC_MSG_RESULT($have_broken_ss_family)
724 if test x$have_broken_ss_family = xyes ; then
725 AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [],
726 [Whether struct sockaddr::__ss_family exists])
727 AC_DEFINE(ss_family, __ss_family,
728 [ss_family is not defined here, use __ss_family instead])
730 AC_MSG_WARN(ss_family and __ss_family not found)
735 AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
736 if test $have_getaddrinfo != yes; then
737 for lib in bsd socket inet; do
738 AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
742 if test $have_getaddrinfo = yes; then
743 AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there])
748 dnl ******************************End IPv6 checks******************************
750 dnl Checks for isnan in libm if not in libc
751 AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan,
752 [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))
754 AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
755 [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))
757 XML_LIBDIR='-L${libdir}'
758 XML_INCLUDEDIR='-I${includedir}/libxml2'
767 dnl Workaround for native compilers
768 dnl HP : http://bugs.gnome.org/db/31/3163.html
769 dnl DEC : Enable NaN/Inf
771 if test "${GCC}" != "yes" ; then
774 CFLAGS="${CFLAGS} -Wp,-H30000"
777 CFLAGS="${CFLAGS} -ieee"
780 CFLAGS="${CFLAGS} -ieee"
784 if test "$with_fexceptions" = "yes"
787 # Not activated by default because this inflates the code size
788 # Used to allow propagation of C++ exceptions through the library
790 CFLAGS="${CFLAGS} -fexceptions"
793 # warnings we'd like to see
794 CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
795 # warnings we'd like to supress
796 CFLAGS="${CFLAGS} -Wno-long-long"
799 CFLAGS="${CFLAGS} -mieee"
802 CFLAGS="${CFLAGS} -mieee"
808 XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
813 *-*-mingw* | *-*-cygwin* | *-*-msvc* )
814 # If the host is Windows, and shared libraries are disabled, we
815 # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
816 # work properly (without it, xmlexports.h would force the use of
817 # DLL imports, which obviously aren't present in a static
819 if test "x$enable_shared" = "xno"; then
820 XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
821 CFLAGS="$CFLAGS -DLIBXML_STATIC"
833 PYTHON_SITE_PACKAGES=
836 if test "$with_python" != "no" ; then
837 if test -x "$with_python/bin/python"
839 echo Found python in $with_python/bin/python
840 PYTHON="$with_python/bin/python"
842 if test -x "$with_python/python.exe"
844 echo Found python in $with_python/python.exe
845 PYTHON="$with_python/python.exe"
847 if test -x "$with_python"
849 echo Found python in $with_python
850 PYTHON="$with_python"
854 echo Found python in environment PYTHON=$PYTHON
855 with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
857 AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
862 if test "$PYTHON" != ""
864 PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
865 PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
866 # does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
868 # PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
869 echo Found Python version $PYTHON_VERSION
871 if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
873 if test -r $with_python/include/python$PYTHON_VERSION/Python.h
875 PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
877 if test -r $prefix/include/python$PYTHON_VERSION/Python.h
879 PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
881 if test -r /usr/include/python$PYTHON_VERSION/Python.h
883 PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
885 if test -r $with_python/include/Python.h
887 PYTHON_INCLUDES=$with_python/include
889 echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
895 if test "$with_python_install_dir" != ""
897 PYTHON_SITE_PACKAGES="$with_python_install_dir"
899 if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
901 if test -d $libdir/python$PYTHON_VERSION/site-packages
903 PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
905 if test -d $with_python/lib/site-packages
907 PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
909 PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
913 pythondir='$(PYTHON_SITE_PACKAGES)'
914 PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
918 AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
919 if test "$PYTHON_INCLUDES" != ""
926 AC_SUBST(PYTHON_SUBDIR)
927 AC_SUBST(PYTHON_LIBS)
929 dnl check for dso support
933 if test "$with_modules" != "no" ; then
936 MODULE_EXTENSION=".dll"
937 AC_CHECK_LIB(cygwin, dlopen, [
939 MODULE_PLATFORM_LIBS=
940 AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
944 MODULE_EXTENSION=".dll"
948 AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
949 AC_CHECK_LIB(dld, shl_load, [
950 MODULE_PLATFORM_LIBS="-ldld"
951 libxml_have_shl_load=yes], [
952 AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
953 AC_CHECK_LIB(dl, dlopen, [
954 MODULE_PLATFORM_LIBS="-ldl"
955 libxml_have_dlopen=yes])])])])
957 if test "${libxml_have_shl_load}" = "yes"; then
958 MODULE_EXTENSION=".sl"
960 AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
963 if test "${libxml_have_dlopen}" = "yes"; then
966 MODULE_EXTENSION=".sl"
969 MODULE_EXTENSION=".so"
974 AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
980 if test "${WITH_MODULES}" = "1"; then
981 TEST_MODULES="ModuleTests"
984 AC_SUBST(WITH_MODULES)
985 AC_SUBST(MODULE_PLATFORM_LIBS)
986 AC_SUBST(MODULE_EXTENSION)
987 AC_SUBST(TEST_MODULES)
990 dnl Tester makes use of readline if present
994 dnl specific tests to setup DV and Bill's devel environments with debug etc ...
995 dnl (-Wunreachable-code)
997 if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
998 [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
999 [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ]]
1001 if test "$with_minimum" != "yes"
1003 if test "${with_mem_debug}" = "" ; then
1004 echo Activating memory debugging
1005 with_mem_debug="yes"
1006 with_run_debug="yes"
1008 if test "${with_docbook}" = "" ; then
1012 if test "${GCC}" = "yes" ; then
1013 CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
1015 STATIC_BINARIES="-static"
1016 dnl -Wcast-qual -ansi
1020 AC_SUBST(STATIC_BINARIES)
1023 dnl Check for trio string functions
1026 if test "${NEED_TRIO}" = "1" ; then
1027 echo Adding trio library for string functions
1032 AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
1036 dnl Allow to enable/disable various pieces
1038 echo Checking configuration requirements
1041 dnl Thread-related stuff
1051 if test "$with_threads" = "no" ; then
1052 echo Disabling multithreaded support
1054 echo Enabling multithreaded support
1056 dnl Default to native threads on Win32
1058 *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
1061 THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
1066 dnl Use pthread by default in other cases
1067 if test -z "$THREADS_W32"; then
1068 if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
1069 AC_CHECK_HEADER(pthread.h,
1070 AC_CHECK_LIB(pthread, pthread_join,[
1071 THREAD_LIBS="-lpthread"
1072 AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
1073 AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
1079 *cygwin*) THREAD_LIBS=""
1081 *beos*) WITH_THREADS="1"
1082 THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
1085 if test "${GCC}" = "yes" ; then
1086 GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
1087 GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
1088 GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
1089 if test "${THREAD_LIBS}" = "-lpthread" ; then
1090 if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
1093 BASE_THREAD_LIBS="-lpthread"
1095 if expr ${GCC_MAJOR} \> 3 > /dev/null
1098 BASE_THREAD_LIBS="-lpthread"
1100 echo old GCC disabling weak symbols for pthread
1107 if test "$WITH_THREADS" = "1" ; then
1108 THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
1109 TEST_THREADS="Threadtests"
1112 if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
1116 AC_SUBST(THREAD_LIBS)
1117 AC_SUBST(BASE_THREAD_LIBS)
1118 AC_SUBST(WITH_THREADS)
1119 AC_SUBST(THREAD_CFLAGS)
1120 AC_SUBST(TEST_THREADS)
1121 AC_SUBST(WITH_THREAD_ALLOC)
1122 AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"])
1125 dnl xmllint shell history
1127 if test "$with_history" = "yes" ; then
1128 echo Enabling xmllint shell history
1129 dnl check for terminal library. this is a very cool solution
1130 dnl from octave's configure.in
1132 for termlib in ncurses curses termcap terminfo termlib; do
1133 AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
1134 test -n "$tcap" && break
1137 AC_CHECK_HEADER(readline/history.h,
1138 AC_CHECK_LIB(history, append_history,[
1139 RDL_LIBS="-lhistory"
1140 AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
1141 AC_CHECK_HEADER(readline/readline.h,
1142 AC_CHECK_LIB(readline, readline,[
1143 RDL_LIBS="-lreadline $RDL_LIBS $tcap"
1144 AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
1145 if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
1146 CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
1147 RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
1154 if test "$with_tree" = "no" ; then
1155 echo Disabling DOM like tree manipulation APIs
1162 if test "$with_ftp" = "no" ; then
1163 echo Disabling FTP support
1173 if test "$with_http" = "no" ; then
1174 echo Disabling HTTP support
1184 if test "$with_legacy" = "no" ; then
1185 echo Disabling deprecated APIs
1190 AC_SUBST(WITH_LEGACY)
1192 if test "$with_reader" = "no" ; then
1193 echo Disabling the xmlReader parsing interface
1198 READER_TEST=Readertests
1199 if test "$with_push" = "no" ; then
1200 echo xmlReader requires Push interface - enabling it
1204 AC_SUBST(WITH_READER)
1205 AC_SUBST(READER_TEST)
1207 if test "$with_writer" = "no" ; then
1208 echo Disabling the xmlWriter saving interface
1213 # WRITER_TEST=Writertests
1214 if test "$with_push" = "no" ; then
1215 echo xmlWriter requires Push interface - enabling it
1218 if test "$with_output" = "no" ; then
1219 echo xmlWriter requires Output interface - enabling it
1223 AC_SUBST(WITH_WRITER)
1224 #AC_SUBST(WRITER_TEST)
1226 if test "$with_pattern" = "no" ; then
1227 echo Disabling the xmlPattern parsing interface
1232 TEST_PATTERN=Patterntests
1234 AC_SUBST(WITH_PATTERN)
1235 AC_SUBST(TEST_PATTERN)
1237 if test "$with_sax1" = "no" ; then
1238 echo Disabling the older SAX1 interface
1246 AM_CONDITIONAL(WITH_SAX1_SOURCES, test "${WITH_TRIO}" = "1")
1249 if test "$with_push" = "no" ; then
1250 echo Disabling the PUSH parser interfaces
1255 TEST_PUSH="XMLPushtests"
1260 if test "$with_html" = "no" ; then
1261 echo Disabling HTML support
1267 HTML_OBJ="HTMLparser.o HTMLtree.o"
1269 if test "$with_push" != "no" ; then
1270 TEST_PHTML=HTMLPushtests
1278 AC_SUBST(TEST_PHTML)
1280 if test "$with_valid" = "no" ; then
1281 echo Disabling DTD validation support
1287 TEST_VALID=Validtests
1288 TEST_VTIME=VTimingtests
1290 AC_SUBST(WITH_VALID)
1291 AC_SUBST(TEST_VALID)
1292 AC_SUBST(TEST_VTIME)
1294 if test "$with_catalog" = "no" ; then
1295 echo Disabling Catalog support
1301 CATALOG_OBJ="catalog.o"
1302 TEST_CATALOG=Catatests
1304 AC_SUBST(WITH_CATALOG)
1305 AC_SUBST(CATALOG_OBJ)
1306 AC_SUBST(TEST_CATALOG)
1308 if test "$with_docbook" = "no" ; then
1309 echo Disabling Docbook support
1314 DOCB_OBJ="DOCBparser.o"
1320 if test "$with_xptr" = "no" ; then
1321 echo Disabling XPointer support
1329 if test "$with_xpath" = "no" ; then
1330 echo XPointer requires XPath support - enabling it
1338 if test "$with_c14n" = "no" ; then
1339 echo Disabling C14N support
1347 if test "$with_xpath" = "no" ; then
1348 echo C14N requires XPath support - enabling it
1356 if test "$with_xinclude" = "no" ; then
1357 echo Disabling XInclude support
1364 XINCLUDE_OBJ=xinclude.o
1365 TEST_XINCLUDE=XIncludetests
1366 if test "$with_xpath" = "no" ; then
1367 echo XInclude requires XPath support - enabling it
1371 AC_SUBST(WITH_XINCLUDE)
1372 AC_SUBST(XINCLUDE_OBJ)
1373 AC_SUBST(TEST_XINCLUDE)
1375 if test "$with_xptr" = "" -a "$with_xpath" = "no" ; then
1379 if test "$with_schematron" = "" -a "$with_xpath" = "no" ; then
1383 if test "$with_schematron" = "no" ; then
1384 echo "Disabling Schematron support"
1388 echo "Enabled Schematron support"
1390 TEST_SCHEMATRON="Schematrontests"
1395 AC_SUBST(WITH_SCHEMATRON)
1396 AC_SUBST(TEST_SCHEMATRON)
1398 if test "$with_xpath" = "no" ; then
1399 echo Disabling XPATH support
1406 TEST_XPATH=XPathtests
1408 AC_SUBST(WITH_XPATH)
1410 AC_SUBST(TEST_XPATH)
1413 dnl output functions
1415 if test "$with_output" = "no" ; then
1416 echo Disabling serialization/saving support
1421 AC_SUBST(WITH_OUTPUT)
1424 if test "$with_iconv" = "no" ; then
1425 echo Disabling ICONV support
1427 if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
1428 CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
1429 # Export this since our headers include iconv.h
1430 XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
1431 ICONV_LIBS="-L$with_iconv/lib"
1434 AC_CHECK_HEADER(iconv.h,
1435 AC_MSG_CHECKING(for iconv)
1436 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
1437 #include <iconv.h>]],[[
1438 iconv_t cd = iconv_open ("","");
1439 iconv (cd, NULL, NULL, NULL, NULL);]])],[
1443 AC_MSG_CHECKING(for iconv in -liconv)
1445 _ldflags="${LDFLAGS}"
1447 LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
1448 LIBS="${LIBS} -liconv"
1450 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
1451 #include <iconv.h>]],[[
1452 iconv_t cd = iconv_open ("","");
1453 iconv (cd, NULL, NULL, NULL, NULL);]])],[
1456 ICONV_LIBS="${ICONV_LIBS} -liconv"
1458 LDFLAGS="${_ldflags}"],[
1461 LDFLAGS="${_ldflags}"])]))
1463 if test "$WITH_ICONV" = "1" ; then
1464 AC_MSG_CHECKING([for iconv declaration])
1465 AC_CACHE_VAL(xml_cv_iconv_arg2, [
1466 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
1472 #if defined(__STDC__) || defined(__cplusplus)
1473 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1477 ]], [])], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
1479 xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
1480 AC_MSG_RESULT([${xml_xxx:-
1481 }$xml_cv_iconv_decl])
1482 AC_DEFINE_UNQUOTED(ICONV_CONST, $xml_cv_iconv_arg2,
1483 [Define as const if the declaration of iconv() needs const.])
1496 AC_SUBST(WITH_ICONV)
1500 if test "$with_icu" != "yes" ; then
1501 echo Disabling ICU support
1503 # Try pkg-config first so that static linking works.
1504 # If this succeeeds, we ignore the WITH_ICU directory.
1505 PKG_CHECK_MODULES([ICU],[icu-i18n],
1509 # If pkg-config failed, fall back to AC_CHECK_LIB. This
1510 # will not pick up the necessary LIBS flags for liblzma's
1511 # private dependencies, though, so static linking may fail.
1512 if test "x$have_libicu" = "xno"; then
1513 ICU_CONFIG=icu-config
1514 if ${ICU_CONFIG} --cflags >/dev/null 2>&1
1516 ICU_LIBS=`${ICU_CONFIG} --ldflags`
1518 echo Enabling ICU support
1520 if test "$with_icu" != "yes" -a "$with_iconv" != "" ; then
1521 CPPFLAGS="${CPPFLAGS} -I$with_icu"
1522 # Export this since our headers include icu.h
1523 XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_icu"
1526 AC_CHECK_HEADER(unicode/ucnv.h,
1527 AC_MSG_CHECKING(for icu)
1528 AC_TRY_LINK([#include <unicode/ucnv.h>],[
1529 UConverter *utf = ucnv_open("UTF-8", NULL);],[
1533 AC_MSG_CHECKING(for icu in -licucore)
1535 _ldflags="${LDFLAGS}"
1537 LDFLAGS="${LDFLAGS} ${ICU_LIBS}"
1538 LIBS="${LIBS} -licucore"
1540 AC_TRY_LINK([#include <unicode/ucnv.h>],[
1541 UConverter *utf = ucnv_open("UTF-8", NULL);],[
1544 ICU_LIBS="${ICU_LIBS} -licucore"
1546 LDFLAGS="${_ldflags}"],[
1549 LDFLAGS="${_ldflags}"])]))
1553 # Found the library via either method?
1554 if test "x$have_libicu" = "xyes"; then
1558 XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS"
1559 XML_LIBTOOLLIBS="libxml2.la"
1563 if test "$WITH_ICONV" != "1" ; then
1564 if test "$with_iso8859x" = "no" ; then
1565 echo Disabling ISO8859X support
1569 AC_SUBST(WITH_ISO8859X)
1571 if test "$with_schemas" = "no" ; then
1572 echo "Disabling Schemas/Relax-NG support"
1576 echo "Enabled Schemas/Relax-NG support"
1578 TEST_SCHEMAS="Schemastests Relaxtests"
1579 if test "$PYTHON_INCLUDES" != "" ; then
1580 PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
1584 AC_SUBST(WITH_SCHEMAS)
1585 AC_SUBST(TEST_SCHEMAS)
1587 if test "$with_regexps" = "no" ; then
1588 echo Disabling Regexps support
1593 TEST_REGEXPS="Regexptests Automatatests"
1595 AC_SUBST(WITH_REGEXPS)
1596 AC_SUBST(TEST_REGEXPS)
1598 if test "$with_debug" = "no" ; then
1599 echo Disabling DEBUG support
1605 DEBUG_OBJ=debugXML.o
1606 TEST_DEBUG=Scripttests
1608 AC_SUBST(WITH_DEBUG)
1610 AC_SUBST(TEST_DEBUG)
1612 if test "$with_mem_debug" = "yes" ; then
1613 if test "$with_thread_alloc" = "yes" ; then
1614 echo Disabling memory debug - cannot use mem-debug with thread-alloc!
1617 echo Enabling memory debug support
1623 AC_SUBST(WITH_MEM_DEBUG)
1625 if test "$with_run_debug" = "yes" ; then
1626 echo Enabling runtime debug support
1631 AC_SUBST(WITH_RUN_DEBUG)
1634 WIN32_EXTRA_LDFLAGS=
1635 CYGWIN_EXTRA_LDFLAGS=
1636 CYGWIN_EXTRA_PYTHON_LIBADD=
1637 WIN32_EXTRA_PYTHON_LIBADD=
1640 CPPFLAGS="$CPPFLAGS -DWIN32"
1641 WIN32_EXTRA_LIBADD="-lws2_32"
1642 WIN32_EXTRA_LDFLAGS="-no-undefined"
1643 AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
1644 if test "${PYTHON}" != ""
1646 WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
1650 CYGWIN_EXTRA_LDFLAGS="-no-undefined"
1651 if test "${PYTHON}" != ""
1653 CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
1657 AC_SUBST(WIN32_EXTRA_LIBADD)
1658 AC_SUBST(WIN32_EXTRA_LDFLAGS)
1659 AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD)
1660 AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
1661 AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
1663 dnl Checking the standard string functions availability
1665 dnl Note mingw* has C99 implementation that produce expected xml numbers
1666 dnl if code use {v}snprintf functions.
1667 dnl If you like to activate at run-time C99 compatible number output
1668 dnl see release note for mingw runtime 3.15:
1669 dnl http://sourceforge.net/project/shownotes.php?release_id=24832
1671 dnl Also *win32*config.h files redefine them for various MSC compilers.
1673 dnl So do not redefine {v}snprintf to _{v}snprintf like follwing:
1674 dnl AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
1675 dnl AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
1676 dnl and do not redefine those functions is C-source files.
1678 AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
1681 if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
1683 echo Enabling code coverage for GCC
1684 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
1685 LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
1687 echo Disabling code coverage for GCC
1693 AC_SUBST(XML_CFLAGS)
1695 AC_SUBST(XML_LIBDIR)
1697 AC_SUBST(XML_LIBTOOLLIBS)
1698 AC_SUBST(ICONV_LIBS)
1700 AC_SUBST(XML_INCLUDEDIR)
1702 AC_SUBST(HAVE_ISNAN)
1703 AC_SUBST(HAVE_ISINF)
1705 AC_SUBST(PYTHON_VERSION)
1706 AC_SUBST(PYTHON_INCLUDES)
1707 AC_SUBST(PYTHON_SITE_PACKAGES)
1712 dnl for the spec file
1713 RELDATE=`date +'%a %b %e %Y'`
1715 AC_SUBST(PYTHON_TESTS)
1717 rm -f COPYING.LIB COPYING
1718 ln -s $srcdir/Copyright COPYING
1720 # keep on one line for cygwin c.f. #130896
1721 AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
1722 AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
1723 AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
1726 echo Done configuring