📄 configure.in
字号:
AC_SUBST(WITH_TREE)
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)
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)
if test "$with_legacy" = "no" ; then
echo Disabling deprecated APIs
WITH_LEGACY=0
else
WITH_LEGACY=1
fi
AC_SUBST(WITH_LEGACY)
if test "$with_reader" = "no" ; then
echo Disabling the xmlReader parsing interface
WITH_READER=0
READER_TEST=
else
WITH_READER=1
READER_TEST=Readertests
if test "$with_push" = "no" ; then
echo xmlReader requires Push interface - enabling it
with_push=yes
fi
fi
AC_SUBST(WITH_READER)
AC_SUBST(READER_TEST)
if test "$with_writer" = "no" ; then
echo Disabling the xmlWriter saving interface
WITH_WRITER=0
# WRITER_TEST=
else
WITH_WRITER=1
# WRITER_TEST=Writertests
if test "$with_push" = "no" ; then
echo xmlWriter requires Push interface - enabling it
with_push=yes
fi
if test "$with_output" = "no" ; then
echo xmlWriter requires Output interface - enabling it
with_output=yes
fi
fi
AC_SUBST(WITH_WRITER)
#AC_SUBST(WRITER_TEST)
if test "$with_pattern" = "no" ; then
echo Disabling the xmlPattern parsing interface
WITH_PATTERN=0
TEST_PATTERN=
else
WITH_PATTERN=1
TEST_PATTERN=Patterntests
fi
AC_SUBST(WITH_PATTERN)
AC_SUBST(TEST_PATTERN)
if test "$with_sax1" = "no" ; then
echo Disabling the older SAX1 interface
WITH_SAX1=0
TEST_SAX=
else
WITH_SAX1=1
TEST_SAX=SAXtests
fi
AC_SUBST(WITH_SAX1)
AC_SUBST(TEST_SAX)
if test "$with_push" = "no" ; then
echo Disabling the PUSH parser interfaces
WITH_PUSH=0
TEST_PUSH=
else
WITH_PUSH=1
TEST_PUSH="XMLPushtests"
fi
AC_SUBST(WITH_PUSH)
AC_SUBST(TEST_PUSH)
if test "$with_html" = "no" ; then
echo Disabling HTML support
WITH_HTML=0
HTML_OBJ=
TEST_HTML=
else
WITH_HTML=1
HTML_OBJ="HTMLparser.o HTMLtree.o"
TEST_HTML=HTMLtests
if test "$with_push" != "no" ; then
TEST_PHTML=HTMLPushtests
else
TEST_PHTML=
fi
fi
AC_SUBST(WITH_HTML)
AC_SUBST(HTML_OBJ)
AC_SUBST(TEST_HTML)
AC_SUBST(TEST_PHTML)
if test "$with_valid" = "no" ; then
echo Disabling DTD validation support
WITH_VALID=0
TEST_VALID=
TEST_VTIME=
else
WITH_VALID=1
TEST_VALID=Validtests
TEST_VTIME=VTimingtests
fi
AC_SUBST(WITH_VALID)
AC_SUBST(TEST_VALID)
AC_SUBST(TEST_VTIME)
if test "$with_catalog" = "no" ; then
echo Disabling Catalog support
WITH_CATALOG=0
CATALOG_OBJ=
TEST_CATALOG=
else
WITH_CATALOG=1
CATALOG_OBJ="catalog.o"
TEST_CATALOG=Catatests
fi
AC_SUBST(WITH_CATALOG)
AC_SUBST(CATALOG_OBJ)
AC_SUBST(TEST_CATALOG)
if test "$with_docbook" = "no" ; then
echo Disabling Docbook support
WITH_DOCB=0
DOCB_OBJ=
else
WITH_DOCB=1
DOCB_OBJ="DOCBparser.o"
fi
AC_SUBST(WITH_DOCB)
AC_SUBST(DOCB_OBJ)
if test "$with_xptr" = "no" ; then
echo Disabling XPointer support
WITH_XPTR=0
XPTR_OBJ=
TEST_XPTR=
else
WITH_XPTR=1
XPTR_OBJ=xpointer.o
TEST_XPTR=XPtrtests
if test "$with_xpath" = "no" ; then
echo XPointer requires XPath support - enabling it
with_xpath=yes
fi
fi
AC_SUBST(WITH_XPTR)
AC_SUBST(XPTR_OBJ)
AC_SUBST(TEST_XPTR)
if test "$with_c14n" = "no" ; then
echo Disabling C14N support
WITH_C14N=0
C14N_OBJ=
TEST_C14N=
else
WITH_C14N=1
C14N_OBJ="c14n.c"
TEST_C14N=C14Ntests
if test "$with_xpath" = "no" ; then
echo C14N requires XPath support - enabling it
with_xpath=yes
fi
fi
AC_SUBST(WITH_C14N)
AC_SUBST(C14N_OBJ)
AC_SUBST(TEST_C14N)
if test "$with_xinclude" = "no" ; then
echo Disabling XInclude support
WITH_XINCLUDE=0
XINCLUDE_OBJ=
with_xinclude="no"
TEST_XINCLUDE=
else
WITH_XINCLUDE=1
XINCLUDE_OBJ=xinclude.o
TEST_XINCLUDE=XIncludetests
if test "$with_xpath" = "no" ; then
echo XInclude requires XPath support - enabling it
with_xpath=yes
fi
fi
AC_SUBST(WITH_XINCLUDE)
AC_SUBST(XINCLUDE_OBJ)
AC_SUBST(TEST_XINCLUDE)
if test "$with_xpath" = "no" ; then
echo Disabling XPATH support
WITH_XPATH=0
XPATH_OBJ=
TEST_XPATH=
else
WITH_XPATH=1
XPATH_OBJ=xpath.o
TEST_XPATH=XPathtests
fi
AC_SUBST(WITH_XPATH)
AC_SUBST(XPATH_OBJ)
AC_SUBST(TEST_XPATH)
dnl
dnl output functions
dnl
if test "$with_output" = "no" ; then
echo Disabling serialization/saving support
WITH_OUTPUT=0
else
WITH_OUTPUT=1
fi
AC_SUBST(WITH_OUTPUT)
WITH_ICONV=0
if test "$with_iconv" = "no" ; then
echo Disabling ICONV support
else
if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
# Export this since our headers include iconv.h
XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
ICONV_LIBS="-L$with_iconv/lib"
fi
AC_CHECK_HEADER(iconv.h,
AC_MSG_CHECKING(for iconv)
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],[
iconv_t cd = iconv_open ("","");
iconv (cd, NULL, NULL, NULL, NULL);],[
AC_MSG_RESULT(yes)
WITH_ICONV=1],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for iconv in -liconv)
_ldflags="${LDFLAGS}"
_libs="${LIBS}"
LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
LIBS="${LIBS} -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],[
iconv_t cd = iconv_open ("","");
iconv (cd, NULL, NULL, NULL, NULL);],[
AC_MSG_RESULT(yes)
WITH_ICONV=1
ICONV_LIBS="${ICONV_LIBS} -liconv"
LIBS="${_libs}"
LDFLAGS="${_ldflags}"],[
AC_MSG_RESULT(no)
LIBS="${_libs}"
LDFLAGS="${_ldflags}"])]))
fi
case "$host" in
*mingw*) M_LIBS=""
;;
*beos*) M_LIBS=""
;;
*) M_LIBS="-lm"
;;
esac
XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
XML_LIBTOOLLIBS="libxml2.la"
AC_SUBST(WITH_ICONV)
WITH_ISO8859X=1
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)
if test "$with_schemas" = "no" ; then
echo "Disabling Schemas/Relax-NG support"
WITH_SCHEMAS=0
TEST_SCHEMAS=
else
echo "Enabled Schemas/Relax-NG support"
WITH_SCHEMAS=1
TEST_SCHEMAS="Schemastests Relaxtests"
if test "$PYTHON_INCLUDES" != "" ; then
PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
fi
with_regexps=yes
fi
AC_SUBST(WITH_SCHEMAS)
AC_SUBST(TEST_SCHEMAS)
if test "$with_regexps" = "no" ; then
echo Disabling Regexps support
WITH_REGEXPS=0
TEST_REGEXPS=
else
WITH_REGEXPS=1
TEST_REGEXPS="Regexptests Automatatests"
fi
AC_SUBST(WITH_REGEXPS)
AC_SUBST(TEST_REGEXPS)
if test "$with_debug" = "no" ; then
echo Disabling DEBUG support
WITH_DEBUG=0
DEBUG_OBJ=
TEST_DEBUG=
else
WITH_DEBUG=1
DEBUG_OBJ=debugXML.o
TEST_DEBUG=Scripttests
fi
AC_SUBST(WITH_DEBUG)
AC_SUBST(DEBUG_OBJ)
AC_SUBST(TEST_DEBUG)
if test "$with_mem_debug" = "yes" ; then
if test "$with_thread_alloc" = "yes" ; then
echo Disabling memory debug - cannot use mem-debug with thread-alloc!
WITH_MEM_DEBUG=0
else
echo Enabling memory debug support
WITH_MEM_DEBUG=1
fi
else
WITH_MEM_DEBUG=0
fi
AC_SUBST(WITH_MEM_DEBUG)
if test "$with_run_debug" = "yes" ; then
echo Enabling runtime debug support
WITH_RUN_DEBUG=1
else
WITH_RUN_DEBUG=0
fi
AC_SUBST(WITH_RUN_DEBUG)
WIN32_EXTRA_LIBADD=
WIN32_EXTRA_LDFLAGS=
CYGWIN_EXTRA_LDFLAGS=
CYGWIN_EXTRA_PYTHON_LIBADD=
case "$host" in
*-*-mingw*)
CPPFLAGS="$CPPFLAGS -DWIN32"
WIN32_EXTRA_LIBADD="-lws2_32"
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])
;;
*-*-cygwin*)
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
if test "${PYTHON}" != ""
then
CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
fi
;;
esac
AC_SUBST(WIN32_EXTRA_LIBADD)
AC_SUBST(WIN32_EXTRA_LDFLAGS)
AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
AC_SUBST(CPPFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBDIR)
AC_SUBST(XML_LIBS)
AC_SUBST(XML_LIBTOOLLIBS)
AC_SUBST(ICONV_LIBS)
AC_SUBST(XML_INCLUDEDIR)
AC_SUBST(HTML_DIR)
AC_SUBST(HAVE_ISNAN)
AC_SUBST(HAVE_ISINF)
AC_SUBST(PYTHON)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_INCLUDES)
AC_SUBST(PYTHON_SITE_PACKAGES)
AC_SUBST(M_LIBS)
AC_SUBST(RDL_LIBS)
dnl for the spec file
RELDATE=`date +'%a %b %e %Y'`
AC_SUBST(RELDATE)
AC_SUBST(PYTHON_TESTS)
rm -f COPYING.LIB COPYING
ln -s Copyright COPYING
# keep on one line for cygwin c.f. #130896
AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/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)
chmod +x xml2-config python/setup.py
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -