Annotation of embedaddon/libxml2/configure.in, revision 1.1
1.1 ! misho 1: dnl Process this file with autoconf to produce a configure script.
! 2: AC_PREREQ(2.59)
! 3: AC_INIT(entities.c)
! 4: AM_CONFIG_HEADER(config.h)
! 5: AC_CONFIG_MACRO_DIR([m4])
! 6: AC_CANONICAL_HOST
! 7:
! 8: LIBXML_MAJOR_VERSION=2
! 9: LIBXML_MINOR_VERSION=7
! 10: LIBXML_MICRO_VERSION=8
! 11: LIBXML_MICRO_VERSION_SUFFIX=
! 12: LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
! 13: LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
! 14:
! 15: LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
! 16:
! 17: if test -f CVS/Entries ; then
! 18: extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
! 19: echo extra=$extra
! 20: if test "$extra" != ""
! 21: then
! 22: LIBXML_VERSION_EXTRA="-CVS$extra"
! 23: fi
! 24: else if test -d .svn ; then
! 25: extra=`svn info | grep Revision | sed 's+Revision: ++'`
! 26: echo extra=$extra
! 27: if test "$extra" != ""
! 28: then
! 29: LIBXML_VERSION_EXTRA="-SVN$extra"
! 30: fi
! 31: else if test -d .git ; then
! 32: extra=`git describe | sed 's+LIBXML[[0-9.]]*-++'`
! 33: echo extra=$extra
! 34: if test "$extra" != ""
! 35: then
! 36: LIBXML_VERSION_EXTRA="-GIT$extra"
! 37: fi
! 38: fi
! 39: fi
! 40: fi
! 41: AC_SUBST(LIBXML_MAJOR_VERSION)
! 42: AC_SUBST(LIBXML_MINOR_VERSION)
! 43: AC_SUBST(LIBXML_MICRO_VERSION)
! 44: AC_SUBST(LIBXML_VERSION)
! 45: AC_SUBST(LIBXML_VERSION_INFO)
! 46: AC_SUBST(LIBXML_VERSION_NUMBER)
! 47: AC_SUBST(LIBXML_VERSION_EXTRA)
! 48:
! 49: VERSION=${LIBXML_VERSION}
! 50:
! 51: AM_INIT_AUTOMAKE(libxml2, $VERSION)
! 52:
! 53: dnl Checks for programs.
! 54: AC_PROG_CC
! 55: AC_PROG_INSTALL
! 56: AC_PROG_MKDIR_P
! 57: AC_PROG_CPP
! 58: AC_PATH_PROG(RM, rm, /bin/rm)
! 59: AC_PATH_PROG(MV, mv, /bin/mv)
! 60: AC_PATH_PROG(TAR, tar, /bin/tar)
! 61: AC_PATH_PROG(PERL, perl, /usr/bin/perl)
! 62: AC_PATH_PROG(WGET, wget, /usr/bin/wget)
! 63: AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
! 64: AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
! 65:
! 66: dnl Make sure we have an ANSI compiler
! 67: AM_C_PROTOTYPES
! 68: test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
! 69:
! 70: AC_LIBTOOL_WIN32_DLL
! 71: AM_PROG_LIBTOOL
! 72:
! 73: dnl
! 74: dnl if the system support linker version scripts for symbol versioning
! 75: dnl then add it
! 76: dnl
! 77: VERSION_SCRIPT_FLAGS=
! 78: # lt_cv_prog_gnu_ld is from libtool 2.+
! 79: if test "$lt_cv_prog_gnu_ld" = yes; then
! 80: VERSION_SCRIPT_FLAGS=-Wl,--version-script=
! 81: else
! 82: case $host in
! 83: *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
! 84: esac
! 85: fi
! 86: AC_SUBST(VERSION_SCRIPT_FLAGS)
! 87: AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -z "$VERSION_SCRIPT_FLAGS"])
! 88:
! 89: dnl
! 90: dnl We process the AC_ARG_WITH first so that later we can modify
! 91: dnl some of them to try to prevent impossible combinations. This
! 92: dnl also allows up so alphabetize the choices
! 93: dnl
! 94:
! 95: dnl
! 96: dnl zlib option might change flags, so we save them initially
! 97: dnl
! 98: _cppflags="${CPPFLAGS}"
! 99: _ldflags="${LDFLAGS}"
! 100:
! 101: AC_ARG_WITH(c14n,
! 102: [ --with-c14n add the Canonicalization support (on)])
! 103: AC_ARG_WITH(catalog,
! 104: [ --with-catalog add the Catalog support (on)])
! 105: AC_ARG_WITH(debug,
! 106: [ --with-debug add the debugging module (on)])
! 107: AC_ARG_WITH(docbook,
! 108: [ --with-docbook add Docbook SGML support (on)])
! 109: AC_ARG_WITH(fexceptions,
! 110: [ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])
! 111: AC_ARG_WITH(ftp,
! 112: [ --with-ftp add the FTP support (on)])
! 113: AC_ARG_WITH(history,
! 114: [ --with-history add history support to xmllint shell(off)])
! 115: AC_ARG_WITH(html,
! 116: [ --with-html add the HTML support (on)])
! 117: dnl Specific dir for HTML output ?
! 118: AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path],
! 119: [path to base html directory, default $datadir/doc/html]),
! 120: [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
! 121:
! 122: AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path],
! 123: [directory used under html-dir, default $PACKAGE-$VERSION/html]),
! 124: [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
! 125: [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
! 126: AC_SUBST(HTML_DIR)
! 127: AC_ARG_WITH(http,
! 128: [ --with-http add the HTTP support (on)])
! 129: AC_ARG_WITH(iconv,
! 130: [ --with-iconv[[=DIR]] add ICONV support (on)])
! 131: AC_ARG_WITH(icu,
! 132: [ --with-icu add ICU support (off)])
! 133: AC_ARG_WITH(iso8859x,
! 134: [ --with-iso8859x add ISO8859X support if no iconv (on)])
! 135: AC_ARG_WITH(legacy,
! 136: [ --with-legacy add deprecated APIs for compatibility (on)])
! 137: AC_ARG_WITH(mem_debug,
! 138: [ --with-mem-debug add the memory debugging module (off)])
! 139: AC_ARG_WITH(minimum,
! 140: [ --with-minimum build a minimally sized library (off)])
! 141: AC_ARG_WITH(output,
! 142: [ --with-output add the serialization support (on)])
! 143: AC_ARG_WITH(pattern,
! 144: [ --with-pattern add the xmlPattern selection interface (on)])
! 145: AC_ARG_WITH(push,
! 146: [ --with-push add the PUSH parser interfaces (on)])
! 147: AC_ARG_WITH(python,
! 148: [ --with-python[[=DIR]] build Python bindings if found])
! 149: AC_ARG_WITH(reader,
! 150: [ --with-reader add the xmlReader parsing interface (on)])
! 151: AC_ARG_WITH(readline,
! 152: [ --with-readline=DIR use readline in DIR],[
! 153: if test "$withval" != "no" -a "$withval" != "yes"; then
! 154: RDL_DIR=$withval
! 155: CPPFLAGS="${CPPFLAGS} -I$withval/include"
! 156: LDFLAGS="${LDFLAGS} -L$withval/lib"
! 157: fi
! 158: ])
! 159: AC_ARG_WITH(regexps,
! 160: [ --with-regexps add Regular Expressions support (on)])
! 161: AC_ARG_WITH(run_debug,
! 162: [ --with-run-debug add the runtime debugging module (off)])
! 163: AC_ARG_WITH(sax1,
! 164: [ --with-sax1 add the older SAX1 interface (on)])
! 165: AC_ARG_WITH(schemas,
! 166: [ --with-schemas add Relax-NG and Schemas support (on)])
! 167: AC_ARG_WITH(schematron,
! 168: [ --with-schematron add Schematron support (on)])
! 169: AC_ARG_WITH(threads,
! 170: [ --with-threads add multithread support(on)])
! 171: AC_ARG_WITH(thread-alloc,
! 172: [ --with-thread-alloc add per-thread memory(off)])
! 173: AC_ARG_WITH(tree,
! 174: [ --with-tree add the DOM like tree manipulation APIs (on)])
! 175: AC_ARG_WITH(valid,
! 176: [ --with-valid add the DTD validation support (on)])
! 177: AC_ARG_WITH(writer,
! 178: [ --with-writer add the xmlWriter saving interface (on)])
! 179: AC_ARG_WITH(xinclude,
! 180: [ --with-xinclude add the XInclude support (on)])
! 181: AC_ARG_WITH(xpath,
! 182: [ --with-xpath add the XPATH support (on)])
! 183: AC_ARG_WITH(xptr,
! 184: [ --with-xptr add the XPointer support (on)])
! 185: AC_ARG_WITH(modules,
! 186: [ --with-modules add the dynamic modules support (on)])
! 187: AC_ARG_WITH(zlib,
! 188: [ --with-zlib[[=DIR]] use libz in DIR],[
! 189: if test "$withval" != "no" -a "$withval" != "yes"; then
! 190: Z_DIR=$withval
! 191: CPPFLAGS="${CPPFLAGS} -I$withval/include"
! 192: LDFLAGS="${LDFLAGS} -L$withval/lib"
! 193: fi
! 194: ])
! 195: AC_ARG_WITH(coverage,
! 196: [ --with-coverage build for code coverage with GCC (off)])
! 197:
! 198: AC_ARG_ENABLE(rebuild-docs,
! 199: [ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=yes]]])
! 200: AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "no"])
! 201:
! 202: dnl
! 203: dnl hard dependancies on options
! 204: dnl
! 205: if test "$with_schemas" = "yes"
! 206: then
! 207: with_pattern=yes
! 208: with_regexps=yes
! 209: fi
! 210: if test "$with_schematron" = "yes"
! 211: then
! 212: with_pattern=yes
! 213: with_xpath=yes
! 214: fi
! 215: if test "$with_reader" = "yes"
! 216: then
! 217: with_push=yes
! 218: fi
! 219: if test "$with_xptr" = "yes"
! 220: then
! 221: with_xpath=yes
! 222: fi
! 223: dnl
! 224: dnl option to build a minimal libxml2 library
! 225: dnl
! 226: if test "$with_minimum" = "yes"
! 227: then
! 228: echo "Configuring for a minimal library"
! 229: if test "$with_c14n" = ""
! 230: then
! 231: with_c14n=no
! 232: fi
! 233: if test "$with_catalog" = ""
! 234: then
! 235: with_catalog=no
! 236: fi
! 237: echo So far so good!
! 238: if test "$with_debug" = ""
! 239: then
! 240: with_debug=no
! 241: fi
! 242: if test "$with_docbook" = ""
! 243: then
! 244: with_docbook=no
! 245: fi
! 246: if test "$with_fexceptions" = ""
! 247: then
! 248: with_fexceptions=no
! 249: fi
! 250: if test "$with_ftp" = ""
! 251: then
! 252: with_ftp=no
! 253: fi
! 254: if test "$with_history" = ""
! 255: then
! 256: with_history=no
! 257: fi
! 258: if test "$with_html" = ""
! 259: then
! 260: with_html=no
! 261: fi
! 262: if test "$with_http" = ""
! 263: then
! 264: with_http=no
! 265: fi
! 266: if test "$with_iconv" = ""
! 267: then
! 268: with_iconv=no
! 269: fi
! 270: if test "$with_iso8859x" = ""
! 271: then
! 272: with_iso8859x=no
! 273: fi
! 274: if test "$with_legacy" = ""
! 275: then
! 276: with_legacy=no
! 277: fi
! 278: if test "$with_mem_debug" = ""
! 279: then
! 280: with_mem_debug=no
! 281: fi
! 282: if test "$with_output" = ""
! 283: then
! 284: with_output=no
! 285: fi
! 286: if test "$with_pattern" = ""
! 287: then
! 288: with_pattern=no
! 289: fi
! 290: if test "$with_push" = ""
! 291: then
! 292: with_push=no
! 293: fi
! 294: if test "$with_python" = ""
! 295: then
! 296: with_python=no
! 297: fi
! 298: if test "$with_reader" = ""
! 299: then
! 300: with_reader=no
! 301: fi
! 302: if test "$with_readline" = ""
! 303: then
! 304: with_readline=no
! 305: fi
! 306: if test "$with_regexps" = ""
! 307: then
! 308: with_regexps=no
! 309: fi
! 310: if test "$with_run_debug" = ""
! 311: then
! 312: with_run_debug=no
! 313: fi
! 314: if test "$with_sax1" = ""
! 315: then
! 316: with_sax1=no
! 317: fi
! 318: if test "$with_schemas" = ""
! 319: then
! 320: with_schemas=no
! 321: fi
! 322: if test "$with_schematron" = ""
! 323: then
! 324: with_schematron=no
! 325: fi
! 326: if test "$with_threads" = ""
! 327: then
! 328: with_threads=no
! 329: fi
! 330: if test "$with_thread_alloc" = ""
! 331: then
! 332: with_thread_alloc=no
! 333: fi
! 334: if test "$with_tree" = ""
! 335: then
! 336: with_tree=no
! 337: fi
! 338: if test "$with_valid" = ""
! 339: then
! 340: with_valid=no
! 341: fi
! 342: if test "$with_writer" = ""
! 343: then
! 344: with_writer=no
! 345: fi
! 346: if test "$with_xinclude" = ""
! 347: then
! 348: with_xinclude=no
! 349: fi
! 350: if test "$with_xpath" = ""
! 351: then
! 352: with_xpath=no
! 353: fi
! 354: if test "$with_xptr" = ""
! 355: then
! 356: with_xptr=no
! 357: fi
! 358: if test "$with_zlib" = ""
! 359: then
! 360: with_zlib=no
! 361: fi
! 362: if test "$with_modules" = ""
! 363: then
! 364: with_modules=no
! 365: fi
! 366: fi
! 367:
! 368: echo Checking zlib
! 369:
! 370: dnl Checks for zlib library.
! 371:
! 372: WITH_ZLIB=0
! 373: if test "$with_zlib" = "no"; then
! 374: echo "Disabling compression support"
! 375: else
! 376: AC_CHECK_HEADERS(zlib.h,
! 377: AC_CHECK_LIB(z, gzread,[
! 378: AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
! 379: WITH_ZLIB=1
! 380: if test "x${Z_DIR}" != "x"; then
! 381: Z_CFLAGS="-I${Z_DIR}/include"
! 382: Z_LIBS="-L${Z_DIR}/lib -lz"
! 383: [case ${host} in
! 384: *-*-solaris*)
! 385: Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
! 386: ;;
! 387: esac]
! 388: else
! 389: Z_LIBS="-lz"
! 390: fi]))
! 391: fi
! 392:
! 393: AC_SUBST(Z_CFLAGS)
! 394: AC_SUBST(Z_LIBS)
! 395: AC_SUBST(WITH_ZLIB)
! 396:
! 397: CPPFLAGS=${_cppflags}
! 398: LDFLAGS=${_ldflags}
! 399:
! 400: echo Checking headers
! 401:
! 402: dnl Checks for header files.
! 403: AC_HEADER_DIRENT
! 404: AC_HEADER_STDC
! 405: AC_CHECK_HEADERS([fcntl.h])
! 406: AC_CHECK_HEADERS([unistd.h])
! 407: AC_CHECK_HEADERS([ctype.h])
! 408: AC_CHECK_HEADERS([dirent.h])
! 409: AC_CHECK_HEADERS([errno.h])
! 410: AC_CHECK_HEADERS([malloc.h])
! 411: AC_CHECK_HEADERS([stdarg.h])
! 412: AC_CHECK_HEADERS([sys/stat.h])
! 413: AC_CHECK_HEADERS([sys/types.h])
! 414: AC_CHECK_HEADERS([stdint.h])
! 415: AC_CHECK_HEADERS([inttypes.h.h])
! 416: AC_CHECK_HEADERS([time.h])
! 417: AC_CHECK_HEADERS([ansidecl.h])
! 418: AC_CHECK_HEADERS([ieeefp.h])
! 419: AC_CHECK_HEADERS([nan.h])
! 420: AC_CHECK_HEADERS([math.h])
! 421: AC_CHECK_HEADERS([limits.h])
! 422: AC_CHECK_HEADERS([fp_class.h])
! 423: AC_CHECK_HEADERS([float.h])
! 424: AC_CHECK_HEADERS([stdlib.h])
! 425: AC_CHECK_HEADERS([sys/socket.h], [], [],
! 426: [#if HAVE_SYS_TYPES_H
! 427: # include <sys/types.h>
! 428: # endif
! 429: ])
! 430: AC_CHECK_HEADERS([netinet/in.h], [], [],
! 431: [#if HAVE_SYS_TYPES_H
! 432: # include <sys/types.h>
! 433: # endif
! 434: ])
! 435: AC_CHECK_HEADERS([arpa/inet.h], [], [],
! 436: [#if HAVE_SYS_TYPES_H
! 437: # include <sys/types.h>
! 438: # endif
! 439: #if HAVE_ARPA_INET_H
! 440: # include <arpa/inet.h>
! 441: # endif
! 442: ])
! 443: AC_CHECK_HEADERS([netdb.h])
! 444: AC_CHECK_HEADERS([sys/time.h])
! 445: AC_CHECK_HEADERS([sys/select.h])
! 446: AC_CHECK_HEADERS([poll.h])
! 447: AC_CHECK_HEADERS([sys/mman.h])
! 448: AC_CHECK_HEADERS([sys/timeb.h])
! 449: AC_CHECK_HEADERS([signal.h])
! 450: AC_CHECK_HEADERS([arpa/nameser.h], [], [],
! 451: [#if HAVE_SYS_TYPES_H
! 452: # include <sys/types.h>
! 453: # endif
! 454: ])
! 455: AC_CHECK_HEADERS([resolv.h], [], [],
! 456: [#if HAVE_SYS_TYPES_H
! 457: # include <sys/types.h>
! 458: # endif
! 459: #if HAVE_NETINET_IN_H
! 460: # include <netinet/in.h>
! 461: # endif
! 462: #if HAVE_ARPA_NAMESER_H
! 463: # include <arpa/nameser.h>
! 464: # endif
! 465: ])
! 466: AC_CHECK_HEADERS([dl.h])
! 467: AC_CHECK_HEADERS([dlfcn.h])
! 468:
! 469:
! 470: echo Checking libraries
! 471:
! 472: dnl Checks for library functions.
! 473: AC_FUNC_STRFTIME
! 474: AC_CHECK_FUNCS(strdup strndup strerror)
! 475: AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
! 476: AC_CHECK_FUNCS(strftime localtime gettimeofday ftime)
! 477: AC_CHECK_FUNCS(stat _stat signal)
! 478:
! 479: dnl Checking the standard string functions availability
! 480: AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
! 481: NEED_TRIO=1)
! 482:
! 483: dnl Checking for va_copy availability
! 484: AC_MSG_CHECKING([for va_copy])
! 485: AC_TRY_LINK([#include <stdarg.h>
! 486: va_list ap1,ap2;], [va_copy(ap1,ap2);],
! 487: have_va_copy=yes,
! 488: have_va_copy=no)
! 489: AC_MSG_RESULT($have_va_copy)
! 490: if test x"$have_va_copy" = x"yes"; then
! 491: AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
! 492: else
! 493: AC_MSG_CHECKING([for __va_copy])
! 494: AC_TRY_LINK([#include <stdarg.h>
! 495: va_list ap1,ap2;], [__va_copy(ap1,ap2);],
! 496: have___va_copy=yes,
! 497: have___va_copy=no)
! 498: AC_MSG_RESULT($have___va_copy)
! 499: if test x"$have___va_copy" = x"yes"; then
! 500: AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
! 501: fi
! 502: fi
! 503:
! 504: dnl Checks for inet libraries:
! 505: AC_SEARCH_LIBS(gethostent, [nsl])
! 506: AC_SEARCH_LIBS(setsockopt, [socket net network])
! 507: AC_SEARCH_LIBS(connect, [inet])
! 508:
! 509: dnl Determine what socket length (socklen_t) data type is
! 510: AC_MSG_CHECKING([for type of socket length (socklen_t)])
! 511: AC_TRY_COMPILE2([
! 512: #include <stddef.h>
! 513: #include <sys/types.h>
! 514: #include <sys/socket.h>],[
! 515: (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
! 516: AC_MSG_RESULT(socklen_t *)
! 517: XML_SOCKLEN_T=socklen_t],[
! 518: AC_TRY_COMPILE2([
! 519: #include <stddef.h>
! 520: #include <sys/types.h>
! 521: #include <sys/socket.h>],[
! 522: (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
! 523: AC_MSG_RESULT(size_t *)
! 524: XML_SOCKLEN_T=size_t],[
! 525: AC_TRY_COMPILE2([
! 526: #include <stddef.h>
! 527: #include <sys/types.h>
! 528: #include <sys/socket.h>],[
! 529: (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
! 530: AC_MSG_RESULT(int *)
! 531: XML_SOCKLEN_T=int],[
! 532: AC_MSG_WARN(could not determine)
! 533: XML_SOCKLEN_T="int"])])])
! 534: AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
! 535:
! 536: dnl ***********************Checking for availability of IPv6*******************
! 537:
! 538: AC_MSG_CHECKING([whether to enable IPv6])
! 539: AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
! 540: if test "$with_minimum" = "yes"
! 541: then
! 542: enable_ipv6=no
! 543: fi
! 544: if test $enable_ipv6 = yes; then
! 545: have_ipv6=no
! 546: AC_TRY_COMPILE([
! 547: #include <sys/types.h>
! 548: #include <sys/socket.h>
! 549: ], [
! 550: struct sockaddr_storage ss;
! 551: socket(AF_INET6, SOCK_STREAM, 0)
! 552: ],
! 553: have_ipv6=yes,
! 554: have_ipv6=no
! 555: )
! 556: AC_MSG_RESULT($have_ipv6)
! 557:
! 558: if test $have_ipv6 = yes; then
! 559: AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
! 560: have_broken_ss_family=no
! 561:
! 562: dnl *********************************************************************
! 563: dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have
! 564: dnl a ss_family member, but rather __ss_family. Let's detect that
! 565: dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these
! 566: dnl platforms. However, we should only do this if ss_family is not
! 567: dnl present.
! 568: dnl ********************************************************************
! 569: AC_MSG_CHECKING([struct sockaddr::ss_family])
! 570: AC_TRY_COMPILE([
! 571: #include <sys/types.h>
! 572: #include <sys/socket.h>
! 573: ], [
! 574: struct sockaddr_storage ss ;
! 575: ss.ss_family = 0 ;
! 576: ],
! 577: have_ss_family=yes,
! 578: have_ss_family=no
! 579: )
! 580: AC_MSG_RESULT($have_ss_family)
! 581: if test x$have_ss_family = xno ; then
! 582: AC_MSG_CHECKING([broken struct sockaddr::ss_family])
! 583: AC_TRY_COMPILE([
! 584: #include <sys/types.h>
! 585: #include <sys/socket.h>
! 586: ], [
! 587: struct sockaddr_storage ss ;
! 588: ss.__ss_family = 0 ;
! 589: ],
! 590: have_broken_ss_family=yes,
! 591: have_broken_ss_family=no
! 592: )
! 593: AC_MSG_RESULT($have_broken_ss_family)
! 594: if test x$have_broken_ss_family = xyes ; then
! 595: AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [],
! 596: [Whether struct sockaddr::__ss_family exists])
! 597: AC_DEFINE(ss_family, __ss_family,
! 598: [ss_family is not defined here, use __ss_family instead])
! 599: else
! 600: AC_MSG_WARN(ss_family and __ss_family not found)
! 601: fi
! 602: fi
! 603:
! 604: have_getaddrinfo=no
! 605: AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
! 606: if test $have_getaddrinfo != yes; then
! 607: for lib in bsd socket inet; do
! 608: AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
! 609: done
! 610: fi
! 611:
! 612: if test $have_getaddrinfo = yes; then
! 613: AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there])
! 614: fi
! 615: fi
! 616: fi
! 617:
! 618: dnl ******************************End IPv6 checks******************************
! 619:
! 620: dnl Checks for isnan in libm if not in libc
! 621: AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan,
! 622: [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))
! 623:
! 624: AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
! 625: [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))
! 626:
! 627: XML_LIBDIR='-L${libdir}'
! 628: XML_INCLUDEDIR='-I${includedir}/libxml2'
! 629:
! 630: dnl
! 631: dnl Extra flags
! 632: dnl
! 633: XML_CFLAGS=""
! 634: RDL_LIBS=""
! 635:
! 636: dnl
! 637: dnl Workaround for native compilers
! 638: dnl HP : http://bugs.gnome.org/db/31/3163.html
! 639: dnl DEC : Enable NaN/Inf
! 640: dnl
! 641: if test "${GCC}" != "yes" ; then
! 642: case "${host}" in
! 643: hppa*-*-hpux* )
! 644: CFLAGS="${CFLAGS} -Wp,-H30000"
! 645: ;;
! 646: *-dec-osf* )
! 647: CFLAGS="${CFLAGS} -ieee"
! 648: ;;
! 649: alpha*-*-linux* )
! 650: CFLAGS="${CFLAGS} -ieee"
! 651: ;;
! 652: esac
! 653: else
! 654: if test "$with_fexceptions" = "yes"
! 655: then
! 656: #
! 657: # Not activated by default because this inflates the code size
! 658: # Used to allow propagation of C++ exceptions through the library
! 659: #
! 660: CFLAGS="${CFLAGS} -fexceptions"
! 661: fi
! 662:
! 663: CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
! 664: case "${host}" in
! 665: alpha*-*-linux* )
! 666: CFLAGS="${CFLAGS} -mieee"
! 667: ;;
! 668: alpha*-*-osf* )
! 669: CFLAGS="${CFLAGS} -mieee"
! 670: ;;
! 671: esac
! 672: fi
! 673: case ${host} in
! 674: *-*-solaris*)
! 675: XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
! 676: ;;
! 677: hppa*-hp-mpeix)
! 678: NEED_TRIO=1
! 679: ;;
! 680: *-*-mingw* | *-*-cygwin* | *-*-msvc* )
! 681: # If the host is Windows, and shared libraries are disabled, we
! 682: # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
! 683: # work properly (without it, xmlexports.h would force the use of
! 684: # DLL imports, which obviously aren't present in a static
! 685: # library).
! 686: if test "x$enable_shared" = "xno"; then
! 687: XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
! 688: CFLAGS="$CFLAGS -DLIBXML_STATIC"
! 689: fi
! 690: ;;
! 691: esac
! 692:
! 693:
! 694: dnl
! 695: dnl check for python
! 696: dnl
! 697:
! 698: PYTHON_VERSION=
! 699: PYTHON_INCLUDES=
! 700: PYTHON_SITE_PACKAGES=
! 701: PYTHON_TESTS=
! 702: pythondir=
! 703: if test "$with_python" != "no" ; then
! 704: if test -x "$with_python/bin/python"
! 705: then
! 706: echo Found python in $with_python/bin/python
! 707: PYTHON="$with_python/bin/python"
! 708: else
! 709: if test -x "$with_python/python.exe"
! 710: then
! 711: echo Found python in $with_python/python.exe
! 712: PYTHON="$with_python/python.exe"
! 713: else
! 714: if test -x "$with_python"
! 715: then
! 716: echo Found python in $with_python
! 717: PYTHON="$with_python"
! 718: else
! 719: if test -x "$PYTHON"
! 720: then
! 721: echo Found python in environment PYTHON=$PYTHON
! 722: with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
! 723: else
! 724: AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
! 725: fi
! 726: fi
! 727: fi
! 728: fi
! 729: if test "$PYTHON" != ""
! 730: then
! 731: PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
! 732: echo Found Python version $PYTHON_VERSION
! 733: fi
! 734: if test "$PYTHON_VERSION" != ""
! 735: then
! 736: if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
! 737: -d $with_python/lib/python$PYTHON_VERSION/site-packages
! 738: then
! 739: PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
! 740: PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
! 741: else
! 742: if test -r $prefix/include/python$PYTHON_VERSION/Python.h
! 743: then
! 744: PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
! 745: PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
! 746: else
! 747: if test -r /usr/include/python$PYTHON_VERSION/Python.h
! 748: then
! 749: PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
! 750: PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
! 751: else
! 752: if test -r $with_python/include/Python.h -a \
! 753: -d $with_python/lib/site-packages
! 754: then
! 755: PYTHON_INCLUDES=$with_python/include
! 756: PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
! 757: else
! 758: echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
! 759: fi
! 760: fi
! 761: fi
! 762: if test ! -d "$PYTHON_SITE_PACKAGES"
! 763: then
! 764: PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
! 765: fi
! 766: fi
! 767: PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
! 768: fi
! 769: if test "$with_python" != ""
! 770: then
! 771: pythondir='$(PYTHON_SITE_PACKAGES)'
! 772: else
! 773: pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
! 774: fi
! 775: else
! 776: PYTHON=
! 777: fi
! 778: AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
! 779: if test "$PYTHON_INCLUDES" != ""
! 780: then
! 781: PYTHON_SUBDIR=python
! 782: else
! 783: PYTHON_SUBDIR=
! 784: fi
! 785: AC_SUBST(pythondir)
! 786: AC_SUBST(PYTHON_SUBDIR)
! 787: AC_SUBST(PYTHON_LIBS)
! 788:
! 789: dnl check for dso support
! 790: WITH_MODULES=0
! 791: TEST_MODULES=
! 792:
! 793: if test "$with_modules" != "no" ; then
! 794: case "$host" in
! 795: *-*-cygwin*)
! 796: MODULE_EXTENSION=".dll"
! 797: AC_CHECK_LIB(cygwin, dlopen, [
! 798: WITH_MODULES=1
! 799: MODULE_PLATFORM_LIBS=
! 800: AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
! 801: ])
! 802: ;;
! 803: *-*-mingw*)
! 804: MODULE_EXTENSION=".dll"
! 805: WITH_MODULES=1
! 806: ;;
! 807: *)
! 808: AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
! 809: AC_CHECK_LIB(dld, shl_load, [
! 810: MODULE_PLATFORM_LIBS="-ldld"
! 811: libxml_have_shl_load=yes], [
! 812: AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
! 813: AC_CHECK_LIB(dl, dlopen, [
! 814: MODULE_PLATFORM_LIBS="-ldl"
! 815: libxml_have_dlopen=yes])])])])
! 816:
! 817: if test "${libxml_have_shl_load}" = "yes"; then
! 818: MODULE_EXTENSION=".sl"
! 819: WITH_MODULES=1
! 820: AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
! 821: fi
! 822:
! 823: if test "${libxml_have_dlopen}" = "yes"; then
! 824: case "${host}" in
! 825: *-*-hpux* )
! 826: MODULE_EXTENSION=".sl"
! 827: ;;
! 828: * )
! 829: MODULE_EXTENSION=".so"
! 830: ;;
! 831: esac
! 832:
! 833: WITH_MODULES=1
! 834: AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
! 835: fi
! 836: ;;
! 837: esac
! 838: fi
! 839:
! 840: if test "${WITH_MODULES}" = "1"; then
! 841: TEST_MODULES="ModuleTests"
! 842: fi
! 843:
! 844: AC_SUBST(WITH_MODULES)
! 845: AC_SUBST(MODULE_PLATFORM_LIBS)
! 846: AC_SUBST(MODULE_EXTENSION)
! 847: AC_SUBST(TEST_MODULES)
! 848:
! 849: dnl
! 850: dnl Tester makes use of readline if present
! 851: dnl
! 852:
! 853: dnl
! 854: dnl specific tests to setup DV and Bill's devel environments with debug etc ...
! 855: dnl (-Wunreachable-code)
! 856: dnl
! 857: if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
! 858: [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
! 859: [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ]]
! 860: then
! 861: if test "$with_minimum" != "yes"
! 862: then
! 863: if test "${with_mem_debug}" = "" ; then
! 864: echo Activating memory debugging
! 865: with_mem_debug="yes"
! 866: with_run_debug="yes"
! 867: fi
! 868: if test "${with_docbook}" = "" ; then
! 869: with_docbook="yes"
! 870: fi
! 871: fi
! 872: if test "${GCC}" = "yes" ; then
! 873: CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
! 874: fi
! 875: STATIC_BINARIES="-static"
! 876: dnl -Wcast-qual -ansi
! 877: else
! 878: STATIC_BINARIES=
! 879: fi
! 880: AC_SUBST(STATIC_BINARIES)
! 881:
! 882: dnl
! 883: dnl Check for trio string functions
! 884: dnl
! 885:
! 886: if test "${NEED_TRIO}" = "1" ; then
! 887: echo Adding trio library for string functions
! 888: WITH_TRIO=1
! 889: else
! 890: WITH_TRIO=0
! 891: fi
! 892: AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
! 893: AC_SUBST(WITH_TRIO)
! 894:
! 895: dnl
! 896: dnl Allow to enable/disable various pieces
! 897: dnl
! 898: echo Checking configuration requirements
! 899:
! 900: dnl
! 901: dnl Thread-related stuff
! 902: dnl
! 903: THREAD_LIBS=""
! 904: BASE_THREAD_LIBS=""
! 905: WITH_THREADS=0
! 906: THREAD_CFLAGS=""
! 907: TEST_THREADS=""
! 908: THREADS_W32=""
! 909:
! 910: if test "$with_threads" = "no" ; then
! 911: echo Disabling multithreaded support
! 912: else
! 913: echo Enabling multithreaded support
! 914: dnl Use pthread by default
! 915: if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
! 916: AC_CHECK_HEADER(pthread.h,
! 917: AC_CHECK_LIB(pthread, pthread_join,[
! 918: THREAD_LIBS="-lpthread"
! 919: AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
! 920: AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
! 921: WITH_THREADS="1"]))
! 922: fi
! 923: case $host_os in
! 924: *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then
! 925: WITH_THREADS="1"
! 926: THREADS_W32="Win32"
! 927: THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
! 928: fi
! 929: ;;
! 930: *cygwin*) THREAD_LIBS=""
! 931: ;;
! 932: *beos*) WITH_THREADS="1"
! 933: THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
! 934: ;;
! 935: *linux*)
! 936: if test "${GCC}" = "yes" ; then
! 937: GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
! 938: GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
! 939: GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
! 940: if test "${THREAD_LIBS}" = "-lpthread" ; then
! 941: if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
! 942: then
! 943: THREAD_LIBS=""
! 944: BASE_THREAD_LIBS="-lpthread"
! 945: else
! 946: if expr ${GCC_MAJOR} \> 3 > /dev/null
! 947: then
! 948: THREAD_LIBS=""
! 949: BASE_THREAD_LIBS="-lpthread"
! 950: else
! 951: echo old GCC disabling weak symbols for pthread
! 952: fi
! 953: fi
! 954: fi
! 955: fi
! 956: ;;
! 957: esac
! 958: if test "$WITH_THREADS" = "1" ; then
! 959: THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
! 960: TEST_THREADS="Threadtests"
! 961: fi
! 962: fi
! 963: if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
! 964: THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
! 965: fi
! 966:
! 967: AC_SUBST(THREAD_LIBS)
! 968: AC_SUBST(BASE_THREAD_LIBS)
! 969: AC_SUBST(WITH_THREADS)
! 970: AC_SUBST(THREAD_CFLAGS)
! 971: AC_SUBST(TEST_THREADS)
! 972: AC_SUBST(THREADS_W32)
! 973:
! 974: dnl
! 975: dnl xmllint shell history
! 976: dnl
! 977: if test "$with_history" = "yes" ; then
! 978: echo Enabling xmllint shell history
! 979: dnl check for terminal library. this is a very cool solution
! 980: dnl from octave's configure.in
! 981: unset tcap
! 982: for termlib in ncurses curses termcap terminfo termlib; do
! 983: AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
! 984: test -n "$tcap" && break
! 985: done
! 986:
! 987: AC_CHECK_HEADER(readline/history.h,
! 988: AC_CHECK_LIB(history, append_history,[
! 989: RDL_LIBS="-lhistory"
! 990: AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
! 991: AC_CHECK_HEADER(readline/readline.h,
! 992: AC_CHECK_LIB(readline, readline,[
! 993: RDL_LIBS="-lreadline $RDL_LIBS $tcap"
! 994: AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
! 995: if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
! 996: CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
! 997: RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
! 998: fi
! 999: fi
! 1000:
! 1001: dnl
! 1002: dnl Tree functions
! 1003: dnl
! 1004: if test "$with_tree" = "no" ; then
! 1005: echo Disabling DOM like tree manipulation APIs
! 1006: WITH_TREE=0
! 1007: else
! 1008: WITH_TREE=1
! 1009: fi
! 1010: AC_SUBST(WITH_TREE)
! 1011:
! 1012: if test "$with_ftp" = "no" ; then
! 1013: echo Disabling FTP support
! 1014: WITH_FTP=0
! 1015: FTP_OBJ=
! 1016: else
! 1017: WITH_FTP=1
! 1018: FTP_OBJ=nanoftp.o
! 1019: fi
! 1020: AC_SUBST(WITH_FTP)
! 1021: AC_SUBST(FTP_OBJ)
! 1022:
! 1023: if test "$with_http" = "no" ; then
! 1024: echo Disabling HTTP support
! 1025: WITH_HTTP=0
! 1026: HTTP_OBJ=
! 1027: else
! 1028: WITH_HTTP=1
! 1029: HTTP_OBJ=nanohttp.o
! 1030: fi
! 1031: AC_SUBST(WITH_HTTP)
! 1032: AC_SUBST(HTTP_OBJ)
! 1033:
! 1034: if test "$with_legacy" = "no" ; then
! 1035: echo Disabling deprecated APIs
! 1036: WITH_LEGACY=0
! 1037: else
! 1038: WITH_LEGACY=1
! 1039: fi
! 1040: AC_SUBST(WITH_LEGACY)
! 1041:
! 1042: if test "$with_reader" = "no" ; then
! 1043: echo Disabling the xmlReader parsing interface
! 1044: WITH_READER=0
! 1045: READER_TEST=
! 1046: else
! 1047: WITH_READER=1
! 1048: READER_TEST=Readertests
! 1049: if test "$with_push" = "no" ; then
! 1050: echo xmlReader requires Push interface - enabling it
! 1051: with_push=yes
! 1052: fi
! 1053: fi
! 1054: AC_SUBST(WITH_READER)
! 1055: AC_SUBST(READER_TEST)
! 1056:
! 1057: if test "$with_writer" = "no" ; then
! 1058: echo Disabling the xmlWriter saving interface
! 1059: WITH_WRITER=0
! 1060: # WRITER_TEST=
! 1061: else
! 1062: WITH_WRITER=1
! 1063: # WRITER_TEST=Writertests
! 1064: if test "$with_push" = "no" ; then
! 1065: echo xmlWriter requires Push interface - enabling it
! 1066: with_push=yes
! 1067: fi
! 1068: if test "$with_output" = "no" ; then
! 1069: echo xmlWriter requires Output interface - enabling it
! 1070: with_output=yes
! 1071: fi
! 1072: fi
! 1073: AC_SUBST(WITH_WRITER)
! 1074: #AC_SUBST(WRITER_TEST)
! 1075:
! 1076: if test "$with_pattern" = "no" ; then
! 1077: echo Disabling the xmlPattern parsing interface
! 1078: WITH_PATTERN=0
! 1079: TEST_PATTERN=
! 1080: else
! 1081: WITH_PATTERN=1
! 1082: TEST_PATTERN=Patterntests
! 1083: fi
! 1084: AC_SUBST(WITH_PATTERN)
! 1085: AC_SUBST(TEST_PATTERN)
! 1086:
! 1087: if test "$with_sax1" = "no" ; then
! 1088: echo Disabling the older SAX1 interface
! 1089: WITH_SAX1=0
! 1090: TEST_SAX=
! 1091: else
! 1092: WITH_SAX1=1
! 1093: TEST_SAX=SAXtests
! 1094: fi
! 1095: AC_SUBST(WITH_SAX1)
! 1096: AC_SUBST(TEST_SAX)
! 1097:
! 1098: if test "$with_push" = "no" ; then
! 1099: echo Disabling the PUSH parser interfaces
! 1100: WITH_PUSH=0
! 1101: TEST_PUSH=
! 1102: else
! 1103: WITH_PUSH=1
! 1104: TEST_PUSH="XMLPushtests"
! 1105: fi
! 1106: AC_SUBST(WITH_PUSH)
! 1107: AC_SUBST(TEST_PUSH)
! 1108:
! 1109: if test "$with_html" = "no" ; then
! 1110: echo Disabling HTML support
! 1111: WITH_HTML=0
! 1112: HTML_OBJ=
! 1113: TEST_HTML=
! 1114: else
! 1115: WITH_HTML=1
! 1116: HTML_OBJ="HTMLparser.o HTMLtree.o"
! 1117: TEST_HTML=HTMLtests
! 1118: if test "$with_push" != "no" ; then
! 1119: TEST_PHTML=HTMLPushtests
! 1120: else
! 1121: TEST_PHTML=
! 1122: fi
! 1123: fi
! 1124: AC_SUBST(WITH_HTML)
! 1125: AC_SUBST(HTML_OBJ)
! 1126: AC_SUBST(TEST_HTML)
! 1127: AC_SUBST(TEST_PHTML)
! 1128:
! 1129: if test "$with_valid" = "no" ; then
! 1130: echo Disabling DTD validation support
! 1131: WITH_VALID=0
! 1132: TEST_VALID=
! 1133: TEST_VTIME=
! 1134: else
! 1135: WITH_VALID=1
! 1136: TEST_VALID=Validtests
! 1137: TEST_VTIME=VTimingtests
! 1138: fi
! 1139: AC_SUBST(WITH_VALID)
! 1140: AC_SUBST(TEST_VALID)
! 1141: AC_SUBST(TEST_VTIME)
! 1142:
! 1143: if test "$with_catalog" = "no" ; then
! 1144: echo Disabling Catalog support
! 1145: WITH_CATALOG=0
! 1146: CATALOG_OBJ=
! 1147: TEST_CATALOG=
! 1148: else
! 1149: WITH_CATALOG=1
! 1150: CATALOG_OBJ="catalog.o"
! 1151: TEST_CATALOG=Catatests
! 1152: fi
! 1153: AC_SUBST(WITH_CATALOG)
! 1154: AC_SUBST(CATALOG_OBJ)
! 1155: AC_SUBST(TEST_CATALOG)
! 1156:
! 1157: if test "$with_docbook" = "no" ; then
! 1158: echo Disabling Docbook support
! 1159: WITH_DOCB=0
! 1160: DOCB_OBJ=
! 1161: else
! 1162: WITH_DOCB=1
! 1163: DOCB_OBJ="DOCBparser.o"
! 1164: fi
! 1165: AC_SUBST(WITH_DOCB)
! 1166: AC_SUBST(DOCB_OBJ)
! 1167:
! 1168:
! 1169: if test "$with_xptr" = "no" ; then
! 1170: echo Disabling XPointer support
! 1171: WITH_XPTR=0
! 1172: XPTR_OBJ=
! 1173: TEST_XPTR=
! 1174: else
! 1175: WITH_XPTR=1
! 1176: XPTR_OBJ=xpointer.o
! 1177: TEST_XPTR=XPtrtests
! 1178: if test "$with_xpath" = "no" ; then
! 1179: echo XPointer requires XPath support - enabling it
! 1180: with_xpath=yes
! 1181: fi
! 1182: fi
! 1183: AC_SUBST(WITH_XPTR)
! 1184: AC_SUBST(XPTR_OBJ)
! 1185: AC_SUBST(TEST_XPTR)
! 1186:
! 1187: if test "$with_c14n" = "no" ; then
! 1188: echo Disabling C14N support
! 1189: WITH_C14N=0
! 1190: C14N_OBJ=
! 1191: TEST_C14N=
! 1192: else
! 1193: WITH_C14N=1
! 1194: C14N_OBJ="c14n.c"
! 1195: TEST_C14N=C14Ntests
! 1196: if test "$with_xpath" = "no" ; then
! 1197: echo C14N requires XPath support - enabling it
! 1198: with_xpath=yes
! 1199: fi
! 1200: fi
! 1201: AC_SUBST(WITH_C14N)
! 1202: AC_SUBST(C14N_OBJ)
! 1203: AC_SUBST(TEST_C14N)
! 1204:
! 1205: if test "$with_xinclude" = "no" ; then
! 1206: echo Disabling XInclude support
! 1207: WITH_XINCLUDE=0
! 1208: XINCLUDE_OBJ=
! 1209: with_xinclude="no"
! 1210: TEST_XINCLUDE=
! 1211: else
! 1212: WITH_XINCLUDE=1
! 1213: XINCLUDE_OBJ=xinclude.o
! 1214: TEST_XINCLUDE=XIncludetests
! 1215: if test "$with_xpath" = "no" ; then
! 1216: echo XInclude requires XPath support - enabling it
! 1217: with_xpath=yes
! 1218: fi
! 1219: fi
! 1220: AC_SUBST(WITH_XINCLUDE)
! 1221: AC_SUBST(XINCLUDE_OBJ)
! 1222: AC_SUBST(TEST_XINCLUDE)
! 1223:
! 1224: if test "$with_xpath" = "no" ; then
! 1225: echo Disabling XPATH support
! 1226: WITH_XPATH=0
! 1227: XPATH_OBJ=
! 1228: TEST_XPATH=
! 1229: else
! 1230: WITH_XPATH=1
! 1231: XPATH_OBJ=xpath.o
! 1232: TEST_XPATH=XPathtests
! 1233: fi
! 1234: AC_SUBST(WITH_XPATH)
! 1235: AC_SUBST(XPATH_OBJ)
! 1236: AC_SUBST(TEST_XPATH)
! 1237:
! 1238: dnl
! 1239: dnl output functions
! 1240: dnl
! 1241: if test "$with_output" = "no" ; then
! 1242: echo Disabling serialization/saving support
! 1243: WITH_OUTPUT=0
! 1244: else
! 1245: WITH_OUTPUT=1
! 1246: fi
! 1247: AC_SUBST(WITH_OUTPUT)
! 1248:
! 1249: WITH_ICONV=0
! 1250: if test "$with_iconv" = "no" ; then
! 1251: echo Disabling ICONV support
! 1252: else
! 1253: if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
! 1254: CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
! 1255: # Export this since our headers include iconv.h
! 1256: XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
! 1257: ICONV_LIBS="-L$with_iconv/lib"
! 1258: fi
! 1259:
! 1260: AC_CHECK_HEADER(iconv.h,
! 1261: AC_MSG_CHECKING(for iconv)
! 1262: AC_TRY_LINK([#include <stdlib.h>
! 1263: #include <iconv.h>],[
! 1264: iconv_t cd = iconv_open ("","");
! 1265: iconv (cd, NULL, NULL, NULL, NULL);],[
! 1266: AC_MSG_RESULT(yes)
! 1267: WITH_ICONV=1],[
! 1268: AC_MSG_RESULT(no)
! 1269: AC_MSG_CHECKING(for iconv in -liconv)
! 1270:
! 1271: _ldflags="${LDFLAGS}"
! 1272: _libs="${LIBS}"
! 1273: LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
! 1274: LIBS="${LIBS} -liconv"
! 1275:
! 1276: AC_TRY_LINK([#include <stdlib.h>
! 1277: #include <iconv.h>],[
! 1278: iconv_t cd = iconv_open ("","");
! 1279: iconv (cd, NULL, NULL, NULL, NULL);],[
! 1280: AC_MSG_RESULT(yes)
! 1281: WITH_ICONV=1
! 1282: ICONV_LIBS="${ICONV_LIBS} -liconv"
! 1283: LIBS="${_libs}"
! 1284: LDFLAGS="${_ldflags}"],[
! 1285: AC_MSG_RESULT(no)
! 1286: LIBS="${_libs}"
! 1287: LDFLAGS="${_ldflags}"])]))
! 1288:
! 1289: if test "$WITH_ICONV" = "1" ; then
! 1290: AC_MSG_CHECKING([for iconv declaration])
! 1291: AC_CACHE_VAL(xml_cv_iconv_arg2, [
! 1292: AC_TRY_COMPILE([#include <stdlib.h>
! 1293: #include <iconv.h>
! 1294: extern
! 1295: #ifdef __cplusplus
! 1296: "C"
! 1297: #endif
! 1298: #if defined(__STDC__) || defined(__cplusplus)
! 1299: size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
! 1300: #else
! 1301: size_t iconv();
! 1302: #endif
! 1303: ], [], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
! 1304:
! 1305: 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);"
! 1306: AC_MSG_RESULT([${xml_xxx:-
! 1307: }$xml_cv_iconv_decl])
! 1308: AC_DEFINE_UNQUOTED(ICONV_CONST, $xml_cv_iconv_arg2,
! 1309: [Define as const if the declaration of iconv() needs const.])
! 1310: fi
! 1311: fi
! 1312: case "$host" in
! 1313: *mingw*) M_LIBS=""
! 1314: ;;
! 1315: *beos*) M_LIBS=""
! 1316: ;;
! 1317: *haiku*) M_LIBS=""
! 1318: ;;
! 1319: *) M_LIBS="-lm"
! 1320: ;;
! 1321: esac
! 1322: XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
! 1323: XML_LIBTOOLLIBS="libxml2.la"
! 1324: AC_SUBST(WITH_ICONV)
! 1325:
! 1326: WITH_ICU=0
! 1327: if test "$with_icu" != "yes" ; then
! 1328: echo Disabling ICU support
! 1329: else
! 1330: ICU_CONFIG=icu-config
! 1331: if ${ICU_CONFIG} --cflags >/dev/null 2>&1
! 1332: then
! 1333: ICU_LIBS=`icu-config --ldflags`
! 1334: LDFLAGS="$LDFLAGS $ICU_LIBS"
! 1335: WITH_ICU=1
! 1336: echo Enabling ICU support
! 1337: else
! 1338: AC_MSG_ERROR([libicu config program icu-config not found])
! 1339: fi
! 1340: fi
! 1341: AC_SUBST(WITH_ICU)
! 1342:
! 1343: WITH_ISO8859X=1
! 1344: if test "$WITH_ICONV" != "1" ; then
! 1345: if test "$with_iso8859x" = "no" ; then
! 1346: echo Disabling ISO8859X support
! 1347: WITH_ISO8859X=0
! 1348: fi
! 1349: fi
! 1350: AC_SUBST(WITH_ISO8859X)
! 1351:
! 1352: if test "$with_schematron" = "no" ; then
! 1353: echo "Disabling Schematron support"
! 1354: WITH_SCHEMATRON=0
! 1355: TEST_SCHEMATRON=
! 1356: else
! 1357: echo "Enabled Schematron support"
! 1358: WITH_SCHEMATRON=1
! 1359: TEST_SCHEMATRON="Schematrontests"
! 1360: with_xpath=yes
! 1361: with_pattern=yes
! 1362: fi
! 1363: AC_SUBST(WITH_SCHEMATRON)
! 1364: AC_SUBST(TEST_SCHEMATRON)
! 1365:
! 1366: if test "$with_schemas" = "no" ; then
! 1367: echo "Disabling Schemas/Relax-NG support"
! 1368: WITH_SCHEMAS=0
! 1369: TEST_SCHEMAS=
! 1370: else
! 1371: echo "Enabled Schemas/Relax-NG support"
! 1372: WITH_SCHEMAS=1
! 1373: TEST_SCHEMAS="Schemastests Relaxtests"
! 1374: if test "$PYTHON_INCLUDES" != "" ; then
! 1375: PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
! 1376: fi
! 1377: with_regexps=yes
! 1378: fi
! 1379: AC_SUBST(WITH_SCHEMAS)
! 1380: AC_SUBST(TEST_SCHEMAS)
! 1381:
! 1382: if test "$with_regexps" = "no" ; then
! 1383: echo Disabling Regexps support
! 1384: WITH_REGEXPS=0
! 1385: TEST_REGEXPS=
! 1386: else
! 1387: WITH_REGEXPS=1
! 1388: TEST_REGEXPS="Regexptests Automatatests"
! 1389: fi
! 1390: AC_SUBST(WITH_REGEXPS)
! 1391: AC_SUBST(TEST_REGEXPS)
! 1392:
! 1393: if test "$with_debug" = "no" ; then
! 1394: echo Disabling DEBUG support
! 1395: WITH_DEBUG=0
! 1396: DEBUG_OBJ=
! 1397: TEST_DEBUG=
! 1398: else
! 1399: WITH_DEBUG=1
! 1400: DEBUG_OBJ=debugXML.o
! 1401: TEST_DEBUG=Scripttests
! 1402: fi
! 1403: AC_SUBST(WITH_DEBUG)
! 1404: AC_SUBST(DEBUG_OBJ)
! 1405: AC_SUBST(TEST_DEBUG)
! 1406:
! 1407: if test "$with_mem_debug" = "yes" ; then
! 1408: if test "$with_thread_alloc" = "yes" ; then
! 1409: echo Disabling memory debug - cannot use mem-debug with thread-alloc!
! 1410: WITH_MEM_DEBUG=0
! 1411: else
! 1412: echo Enabling memory debug support
! 1413: WITH_MEM_DEBUG=1
! 1414: fi
! 1415: else
! 1416: WITH_MEM_DEBUG=0
! 1417: fi
! 1418: AC_SUBST(WITH_MEM_DEBUG)
! 1419:
! 1420: if test "$with_run_debug" = "yes" ; then
! 1421: echo Enabling runtime debug support
! 1422: WITH_RUN_DEBUG=1
! 1423: else
! 1424: WITH_RUN_DEBUG=0
! 1425: fi
! 1426: AC_SUBST(WITH_RUN_DEBUG)
! 1427:
! 1428: WIN32_EXTRA_LIBADD=
! 1429: WIN32_EXTRA_LDFLAGS=
! 1430: CYGWIN_EXTRA_LDFLAGS=
! 1431: CYGWIN_EXTRA_PYTHON_LIBADD=
! 1432: WIN32_EXTRA_PYTHON_LIBADD=
! 1433: case "$host" in
! 1434: *-*-mingw*)
! 1435: CPPFLAGS="$CPPFLAGS -DWIN32"
! 1436: WIN32_EXTRA_LIBADD="-lws2_32"
! 1437: WIN32_EXTRA_LDFLAGS="-no-undefined"
! 1438: AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
! 1439: AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
! 1440: AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
! 1441: if test "${PYTHON}" != ""
! 1442: then
! 1443: WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}"
! 1444: fi
! 1445: ;;
! 1446: *-*-cygwin*)
! 1447: CYGWIN_EXTRA_LDFLAGS="-no-undefined"
! 1448: if test "${PYTHON}" != ""
! 1449: then
! 1450: CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
! 1451: fi
! 1452: ;;
! 1453: esac
! 1454: AC_SUBST(WIN32_EXTRA_LIBADD)
! 1455: AC_SUBST(WIN32_EXTRA_LDFLAGS)
! 1456: AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD)
! 1457: AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
! 1458: AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
! 1459:
! 1460: if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
! 1461: then
! 1462: echo Enabling code coverage for GCC
! 1463: CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
! 1464: LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
! 1465: else
! 1466: echo Disabling code coverage for GCC
! 1467: fi
! 1468:
! 1469: AC_SUBST(CPPFLAGS)
! 1470: AC_SUBST(CFLAGS)
! 1471: AC_SUBST(LDFLAGS)
! 1472: AC_SUBST(XML_CFLAGS)
! 1473:
! 1474: AC_SUBST(XML_LIBDIR)
! 1475: AC_SUBST(XML_LIBS)
! 1476: AC_SUBST(XML_LIBTOOLLIBS)
! 1477: AC_SUBST(ICONV_LIBS)
! 1478: AC_SUBST(XML_INCLUDEDIR)
! 1479: AC_SUBST(HTML_DIR)
! 1480: AC_SUBST(HAVE_ISNAN)
! 1481: AC_SUBST(HAVE_ISINF)
! 1482: AC_SUBST(PYTHON)
! 1483: AC_SUBST(PYTHON_VERSION)
! 1484: AC_SUBST(PYTHON_INCLUDES)
! 1485: AC_SUBST(PYTHON_SITE_PACKAGES)
! 1486:
! 1487: AC_SUBST(M_LIBS)
! 1488: AC_SUBST(RDL_LIBS)
! 1489:
! 1490: dnl for the spec file
! 1491: RELDATE=`date +'%a %b %e %Y'`
! 1492: AC_SUBST(RELDATE)
! 1493: AC_SUBST(PYTHON_TESTS)
! 1494:
! 1495: rm -f COPYING.LIB COPYING
! 1496: ln -s Copyright COPYING
! 1497:
! 1498: # keep on one line for cygwin c.f. #130896
! 1499: AC_OUTPUT(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 xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py)
! 1500:
! 1501: chmod +x xml2-config python/setup.py
! 1502: echo Done configuring
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>