dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.2) AC_INIT(entities.h) AC_REVISION AC_CANONICAL_SYSTEM AC_CONFIG_HEADER(config.h) LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=2 LIBXML_MICRO_VERSION=4 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 LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION` AC_SUBST(LIBXML_MAJOR_VERSION) AC_SUBST(LIBXML_MINOR_VERSION) AC_SUBST(LIBXML_MICRO_VERSION) AC_SUBST(LIBXML_VERSION) AC_SUBST(LIBXML_VERSION_INFO) AC_SUBST(LIBXML_VERSION_NUMBER) VERSION=$LIBXML_VERSION dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) AC_PATH_PROG(GZIP, gzip, /bin/gzip) dnl Checks for libraries. for z in z gz ; do AC_CHECK_LIB(${z}, deflate, [LIBS="-l${z} $LIBS"; break]) done dnl Checks for inet libraries: AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(inet, connect) AC_CHECK_LIB(nsl, t_accept) dnl Checks for libunicode from Gnome AC_CHECK_LIB(unicode, unicode_get_utf8, [LIBS="-lunicode $LIBS" ; AC_CHECK_HEADERS(unicode.h)]) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h) AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h zlib.h) AC_CHECK_HEADERS(ieeefp.h nan.h math.h sys/types.h sys/mman.h) AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h) AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h resolv.h) dnl Checks for library functions. AC_FUNC_STRFTIME AC_CHECK_FUNCS(strdup strndup strerror snprintf) AC_CHECK_FUNCS(finite isinf isnan isnand strftime localtime) dnl dnl Workaround wor HP native compiler dnl http://bugs.gnome.org/db/31/3163.html dnl if test "${CC}" != "gcc" ; then case "${host}" in *-*-hpux* ) CFLAGS="${CFLAGS} -Wp,-H30000 -Ae" ;; esac else case "${host}" in *linux* ) CFLAGS="${CFLAGS} -pedantic" ;; esac fi if test "${LOGNAME}" = "veillard" ; then if test "${with_mem_debug}" = "" ; then with_mem_debug="yes" fi if test "${with_docbook}" = "" ; then with_docbook="yes" fi if test "${with_xptr}" = "" ; then with_xptr="yes" fi fi dnl dnl Use buffers for content dnl AC_ARG_WITH(buffers, [ --with-buffers Use buffers for node content (off)]) if test "$with_buffers" = "yes" ; then CFLAGS="${CFLAGS} -DXML_USE_BUFFER_CONTENT" fi AC_SUBST(CFLAGS) LIBXML_LIBS="${LIBS}" AC_CHECK_LIB(history, append_history) AC_CHECK_LIB(readline, readline) dnl dnl Disable various pieces dnl AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)]) if test "$with_ftp" = "no" ; then echo Disabling FTP support WITH_FTP=0 FTP_OBJ= else WITH_FTP=1 FTP_OBJ=nanoftp.o fi AC_SUBST(WITH_FTP) AC_SUBST(FTP_OBJ) AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)]) if test "$with_http" = "no" ; then echo Disabling HTTP support WITH_HTTP=0 HTTP_OBJ= else WITH_HTTP=1 HTTP_OBJ=nanohttp.o fi AC_SUBST(WITH_HTTP) AC_SUBST(HTTP_OBJ) AC_ARG_WITH(html, [ --with-html Add the HTML support (on)]) if test "$with_html" = "no" ; then echo Disabling HTML support WITH_HTML=0 HTML_OBJ= else WITH_HTML=1 HTML_OBJ="HTMLparser.o HTMLtree.o" fi AC_SUBST(WITH_HTML) AC_SUBST(HTML_OBJ) AC_ARG_WITH(docbook, [ --with-docbook Add the Docbook support (off)]) if test "$with_docbook" = "yes" ; then echo Enabling Docbook support WITH_SGML=1 SGML_OBJ="SGMLparser.o" else WITH_SGML=0 SGML_OBJ= fi AC_SUBST(WITH_SGML) AC_SUBST(SGML_OBJ) AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)]) if test "$with_xpath" = "no" ; then echo Disabling XPATH support WITH_XPATH=0 XPATH_OBJ= else WITH_XPATH=1 XPATH_OBJ=xpath.o fi AC_SUBST(WITH_XPATH) AC_SUBST(XPATH_OBJ) AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (off)]) if test "$with_xptr" = "yes" ; then if test "$WITH_XPATH" != "1" ; then echo Enabling XPointer support requires XPath exit 1 fi echo Enabling XPointer support WITH_XPTR=1 XPTR_OBJ=xpointer.o else WITH_XPTR=0 XPTR_OBJ= fi AC_SUBST(WITH_XPTR) AC_SUBST(XPTR_OBJ) AC_ARG_WITH(iconv, [ --with-iconv Add the ICONV support (on)]) if test "$with_iconv" = "no" ; then echo Disabling ICONV support WITH_ICONV=0 else AC_CHECK_FUNCS(iconv) if test "$have_iconv" != "" ; then echo Iconv support not found WITH_ICONV=0 else WITH_ICONV=1 fi fi AC_SUBST(WITH_ICONV) AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)]) if test "$with_debug" = "no" ; then echo Disabling DEBUG support WITH_DEBUG=0 DEBUG_OBJ= else WITH_DEBUG=1 DEBUG_OBJ=debugXML.o fi AC_SUBST(WITH_DEBUG) AC_SUBST(DEBUG_OBJ) AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) if test "$with_mem_debug" = "no" ; then WITH_MEM_DEBUG=0 else echo Enabling memory debug support WITH_MEM_DEBUG=1 fi AC_SUBST(WITH_MEM_DEBUG) AC_SUBST(LIBXML_MAJOR_VERSION) xmlextrasrcdir="" AC_SUBST(xmlextrasrcdir) AC_SUBST(LIBXML_LIBS) AC_OUTPUT(Makefile xmlversion.h win32config.h)