LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=5
-LIBXML_MICRO_VERSION=4
+LIBXML_MICRO_VERSION=10
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
AM_INIT_AUTOMAKE(libxml2, $VERSION)
-AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+AC_ARG_WITH(html-dir,
+[ --with-html-dir=PATH path to installed docs ])
dnl Checks for programs.
AC_PROG_CC
AC_ARG_WITH(zlib,
-[ --with-zlib[=DIR] use libz in DIR],[
+[ --with-zlib[[=DIR]] use libz in DIR],[
if test "$withval" != "no" -a "$withval" != "yes"; then
Z_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
AC_MSG_WARN(could not determine)])])])
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T)
+dnl ***********************Checking for availability of IPv6*******************
+
+AC_MSG_CHECKING([whether to enable IPv6])
+AC_ARG_ENABLE(ipv6, [ --enable-ipv6=[yes/no] enables compilation of IPv6 code],, enable_ipv6=yes)
+if test $enable_ipv6 = yes; then
+ have_ipv6=no
+ AC_TRY_COMPILE([
+ #include <sys/socket.h>
+ #include <sys/types.h>], [
+ struct sockaddr_storage ss;
+ socket(AF_INET6, SOCK_STREAM, 0)
+ ],
+ have_ipv6=yes,
+ have_ipv6=no
+ )
+ AC_MSG_RESULT($have_ipv6)
+
+ if test $have_ipv6 = yes; then
+ AC_DEFINE(SUPPORT_IP6)
+
+ have_getaddrinfo=no
+ AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
+ if test $have_getaddrinfo != yes; then
+ for lib in bsd socket inet; do
+ AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
+ done
+ fi
+
+ if test $have_getaddrinfo = yes; then
+ AC_DEFINE(HAVE_GETADDRINFO)
+ fi
+ fi
+fi
+
+dnl ******************************End IPv6 checks******************************
+
dnl Checks for isnan in libm if not in libc
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
[AC_DEFINE(HAVE_ISNAN)]))
XML_CFLAGS=""
RDL_LIBS=""
+AC_ARG_WITH(fexceptions,
+[ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])
dnl
dnl Workaround for native compilers
dnl HP : http://bugs.gnome.org/db/31/3163.html
*-dec-osf* )
CFLAGS="${CFLAGS} -ieee"
;;
+ alpha*-*-linux* )
+ CFLAGS="${CFLAGS} -ieee"
+ ;;
esac
else
+ if test "$with_fexceptions" = "yes"
+ then
+ #
+ # Not activated by default because this inflates the code size
+ # Used to allow propagation of C++ exceptions through the library
+ #
+ CFLAGS="${CFLAGS} -fexceptions"
+ fi
+
CFLAGS="${CFLAGS} -Wall"
case "${host}" in
alpha*-*-linux* )
PYTHON_VERSION=
PYTHON_INCLUDES=
PYTHON_SITE_PACKAGES=
-AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found])
+pythondir=
+AC_ARG_WITH(python,
+[ --with-python[[=DIR]] build Python bindings if found])
if test "$with_python" != "no" ; then
if test -x "$with_python/bin/python"
then
fi
fi
fi
+ if test "$with_python" != ""
+ then
+ pythondir='$(PYTHON_SITE_PACKAGES)'
+ else
+ pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
+ fi
fi
AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
if test "$PYTHON_INCLUDES" != ""
else
PYTHON_SUBDIR=
fi
+AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)
dnl
AC_SUBST(WITH_TRIO)
dnl
-dnl Aloow to enable/disable various pieces
+dnl Allow to enable/disable various pieces
dnl
THREAD_LIBS=""
THREAD_CFLAGS=""
TEST_THREADS=""
-AC_ARG_WITH(threads, [ --with-threads Add multithread support(off)])
-if test "$with_threads" = "yes" ; then
+AC_ARG_WITH(threads,
+[ --with-threads add multithread support(on)])
+if test "$with_threads" = "no" ; then
+ echo Disabling multithreaded support
+else
echo Enabling multithreaded support
AC_CHECK_HEADER(pthread.h,
TEST_THREADS="Threadtests"
fi
fi
-AC_ARG_WITH(thread-alloc, [ --with-thread-alloc Add per-thread memory(off)])
+AC_ARG_WITH(thread-alloc,
+[ --with-thread-alloc add per-thread memory(off)])
if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
fi
AC_SUBST(THREAD_CFLAGS)
AC_SUBST(TEST_THREADS)
-AC_ARG_WITH(history, [ --with-history Add history support to xmllint shell(off)])
+AC_ARG_WITH(history,
+[ --with-history add history support to xmllint shell(off)])
if test "$with_history" = "yes" ; then
echo Enabling xmllint shell history
dnl check for terminal library. this is a very cool solution
AC_SUBST(WITH_FTP)
AC_SUBST(FTP_OBJ)
-AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)])
+AC_ARG_WITH(ftp,
+[ --with-ftp add the FTP support (on)])
if test "$with_ftp" = "no" ; then
echo Disabling FTP support
WITH_FTP=0
AC_SUBST(WITH_FTP)
AC_SUBST(FTP_OBJ)
-AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)])
+AC_ARG_WITH(http,
+[ --with-http add the HTTP support (on)])
if test "$with_http" = "no" ; then
echo Disabling HTTP support
WITH_HTTP=0
AC_SUBST(WITH_HTTP)
AC_SUBST(HTTP_OBJ)
-AC_ARG_WITH(html, [ --with-html Add the HTML support (on)])
+AC_ARG_WITH(html,
+[ --with-html add the HTML support (on)])
if test "$with_html" = "no" ; then
echo Disabling HTML support
WITH_HTML=0
AC_SUBST(WITH_HTML)
AC_SUBST(HTML_OBJ)
-AC_ARG_WITH(catalog, [ --with-catalog Add the Catalog support (on)])
+AC_ARG_WITH(catalog,
+[ --with-catalog add the Catalog support (on)])
if test "$with_catalog" = "no" ; then
echo Disabling Catalog support
WITH_CATALOG=0
AC_SUBST(WITH_CATALOG)
AC_SUBST(CATALOG_OBJ)
-AC_ARG_WITH(docbook, [ --with-docbook Add Docbook SGML support (on)])
+AC_ARG_WITH(docbook,
+[ --with-docbook add Docbook SGML support (on)])
if test "$with_docbook" = "no" ; then
echo Disabling Docbook support
WITH_DOCB=0
AC_SUBST(DOCB_OBJ)
-AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)])
+AC_ARG_WITH(xpath,
+[ --with-xpath add the XPATH support (on)])
if test "$with_xpath" = "no" ; then
echo Disabling XPATH support
with_xptr="no"
AC_SUBST(WITH_XPATH)
AC_SUBST(XPATH_OBJ)
-AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (on)])
+AC_ARG_WITH(xptr,
+[ --with-xptr add the XPointer support (on)])
if test "$with_xptr" = "no" ; then
echo Disabling XPointer support
WITH_XPTR=0
AC_SUBST(WITH_XPTR)
AC_SUBST(XPTR_OBJ)
-AC_ARG_WITH(c14n, [ --with-c14n Add the Canonicalization support (on)])
+AC_ARG_WITH(c14n,
+[ --with-c14n add the Canonicalization support (on)])
if test "$with_c14n" = "no" ; then
echo Disabling C14N support
WITH_C14N=0
AC_SUBST(WITH_C14N)
AC_SUBST(C14N_OBJ)
-AC_ARG_WITH(xinclude, [ --with-xinclude Add the XInclude support (on)])
+AC_ARG_WITH(xinclude,
+[ --with-xinclude add the XInclude support (on)])
if test "$with_xinclude" = "no" ; then
echo Disabling XInclude support
WITH_XINCLUDE=0
AC_SUBST(XINCLUDE_OBJ)
WITH_ICONV=0
-AC_ARG_WITH(iconv, [ --with-iconv[=DIR] Add ICONV support (on)])
+AC_ARG_WITH(iconv,
+[ --with-iconv[[=DIR]] add ICONV support (on)])
if test "$with_iconv" = "no" ; then
echo Disabling ICONV support
else
XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
AC_SUBST(WITH_ICONV)
-AC_ARG_WITH(schemas, [ --with-schemas Add experimental Schemas/RelaxNG support (on)])
+WITH_ISO8859X=1
+AC_ARG_WITH(iso8859x,
+[ --with-iso8859x add ISO8859X support if no iconv (on)])
+if test "$WITH_ICONV" != "1" ; then
+if test "$with_iso8859x" = "no" ; then
+ echo Disabling ISO8859X support
+ WITH_ISO8859X=0
+fi
+fi
+AC_SUBST(WITH_ISO8859X)
+
+AC_ARG_WITH(schemas,
+[ --with-schemas add experimental Schemas/RelaxNG support (on)])
if test "$with_schemas" = "no" ; then
echo "Disabled Schemas/Relax-NG support"
WITH_SCHEMAS=0
AC_SUBST(WITH_SCHEMAS)
AC_SUBST(TEST_SCHEMAS)
-AC_ARG_WITH(regexps, [ --with-regexps Add Regular Expressions support (on)])
+AC_ARG_WITH(regexps,
+[ --with-regexps add Regular Expressions support (on)])
if test "$with_regexps" = "no" ; then
echo Disabling Regexps support
WITH_REGEXPS=0
AC_SUBST(WITH_REGEXPS)
AC_SUBST(TEST_REGEXPS)
-AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)])
+AC_ARG_WITH(debug,
+[ --with-debug add the debugging module (on)])
if test "$with_debug" = "no" ; then
echo Disabling DEBUG support
WITH_DEBUG=0
AC_SUBST(WITH_DEBUG)
AC_SUBST(DEBUG_OBJ)
-AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
+AC_ARG_WITH(mem_debug,
+[ --with-mem-debug add the memory debugging module (off)])
if test "$with_mem_debug" = "yes" ; then
echo Enabling memory debug support
WITH_MEM_DEBUG=1
fi
AC_SUBST(WITH_MEM_DEBUG)
+
+WIN32_EXTRA_LIBADD=
+WIN32_EXTRA_LDFLAGS=
+case "$host" in
+ *-*-mingw*)
+ WIN32_EXTRA_LIBADD="-lwsock32"
+ WIN32_EXTRA_LDFLAGS="-no-undefined"
+ AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
+ AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
+ AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
+ ;;
+esac
+AC_SUBST(WIN32_EXTRA_LIBADD)
+AC_SUBST(WIN32_EXTRA_LDFLAGS)
+
+
AC_SUBST(CFLAGS)
AC_SUBST(XML_CFLAGS)
rm -f COPYING.LIB COPYING
ln -s Copyright COPYING
-AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py)
+AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py)
chmod +x xml2-config xml2Conf.sh python/setup.py