📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(entities.c)AM_CONFIG_HEADER(config.h)AC_CANONICAL_HOSTLIBXML_MAJOR_VERSION=2LIBXML_MINOR_VERSION=6LIBXML_MICRO_VERSION=29LIBXML_MICRO_VERSION_SUFFIX=LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIXLIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSIONLIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`if test -f CVS/Entries ; then extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` echo extra=$extra if test "$extra" != "" then LIBXML_VERSION_EXTRA="-CVS$extra" fielse if test -d .svn ; then extra=`svn info | grep Revision | sed 's+Revision: ++'` echo extra=$extra if test "$extra" != "" then LIBXML_VERSION_EXTRA="-SVN$extra" fififiAC_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)AC_SUBST(LIBXML_VERSION_EXTRA)VERSION=${LIBXML_VERSION}AM_INIT_AUTOMAKE(libxml2, $VERSION)dnl Checks for programs.AC_PROG_CCAC_PROG_INSTALLAC_PROG_CPPAC_PATH_PROG(RM, rm, /bin/rm)AC_PATH_PROG(MV, mv, /bin/mv)AC_PATH_PROG(TAR, tar, /bin/tar)AC_PATH_PROG(PERL, perl, /usr/bin/perl)AC_PATH_PROG(WGET, wget, /usr/bin/wget)AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)dnl Make sure we have an ANSI compilerAM_C_PROTOTYPEStest "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)AC_LIBTOOL_WIN32_DLLAM_PROG_LIBTOOLdnldnl We process the AC_ARG_WITH first so that later we can modifydnl some of them to try to prevent impossible combinations. Thisdnl also allows up so alphabetize the choicesdnldnldnl zlib option might change flags, so we save them initiallydnl_cppflags="${CPPFLAGS}"_ldflags="${LDFLAGS}"AC_ARG_WITH(c14n,[ --with-c14n add the Canonicalization support (on)])AC_ARG_WITH(catalog,[ --with-catalog add the Catalog support (on)])AC_ARG_WITH(debug,[ --with-debug add the debugging module (on)])AC_ARG_WITH(docbook,[ --with-docbook add Docbook SGML support (on)])AC_ARG_WITH(fexceptions,[ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])AC_ARG_WITH(ftp,[ --with-ftp add the FTP support (on)])AC_ARG_WITH(history,[ --with-history add history support to xmllint shell(off)])AC_ARG_WITH(html,[ --with-html add the HTML support (on)])dnl Specific dir for HTML output ?AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path], [path to base html directory, default $datadir/doc/html]), [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path], [directory used under html-dir, default $PACKAGE-$VERSION/html]), [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"], [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])AC_SUBST(HTML_DIR)AC_ARG_WITH(http,[ --with-http add the HTTP support (on)])AC_ARG_WITH(iconv,[ --with-iconv[[=DIR]] add ICONV support (on)])AC_ARG_WITH(iso8859x,[ --with-iso8859x add ISO8859X support if no iconv (on)])AC_ARG_WITH(legacy,[ --with-legacy add deprecated APIs for compatibility (on)])AC_ARG_WITH(mem_debug,[ --with-mem-debug add the memory debugging module (off)])AC_ARG_WITH(minimum,[ --with-minimum build a minimally sized library (off)])AC_ARG_WITH(output,[ --with-output add the serialization support (on)])AC_ARG_WITH(pattern,[ --with-pattern add the xmlPattern selection interface (on)])AC_ARG_WITH(push,[ --with-push add the PUSH parser interfaces (on)])AC_ARG_WITH(python,[ --with-python[[=DIR]] build Python bindings if found])AC_ARG_WITH(reader,[ --with-reader add the xmlReader parsing interface (on)])AC_ARG_WITH(readline,[ --with-readline=DIR use readline in DIR],[ if test "$withval" != "no" -a "$withval" != "yes"; then RDL_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" LDFLAGS="${LDFLAGS} -L$withval/lib" fi])AC_ARG_WITH(regexps,[ --with-regexps add Regular Expressions support (on)])AC_ARG_WITH(run_debug,[ --with-run-debug add the runtime debugging module (off)])AC_ARG_WITH(sax1,[ --with-sax1 add the older SAX1 interface (on)])AC_ARG_WITH(schemas,[ --with-schemas add Relax-NG and Schemas support (on)])AC_ARG_WITH(schematron,[ --with-schematron add Schematron support (on)])AC_ARG_WITH(threads,[ --with-threads add multithread support(on)])AC_ARG_WITH(thread-alloc,[ --with-thread-alloc add per-thread memory(off)])AC_ARG_WITH(tree,[ --with-tree add the DOM like tree manipulation APIs (on)])AC_ARG_WITH(valid,[ --with-valid add the DTD validation support (on)])AC_ARG_WITH(writer,[ --with-writer add the xmlWriter saving interface (on)])AC_ARG_WITH(xinclude,[ --with-xinclude add the XInclude support (on)])AC_ARG_WITH(xpath,[ --with-xpath add the XPATH support (on)])AC_ARG_WITH(xptr,[ --with-xptr add the XPointer support (on)])AC_ARG_WITH(modules,[ --with-modules add the dynamic modules support (on)])AC_ARG_WITH(zlib,[ --with-zlib[[=DIR]] use libz in DIR],[ if test "$withval" != "no" -a "$withval" != "yes"; then Z_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" LDFLAGS="${LDFLAGS} -L$withval/lib" fi])dnldnl hard dependancies on optionsdnlif test "$with_schemas" = "yes"then with_pattern=yes with_regexps=yesfiif test "$with_schematron" = "yes"then with_pattern=yes with_xpath=yesfiif test "$with_reader" = "yes"then with_push=yesfiif test "$with_xptr" = "yes"then with_xpath=yesfidnldnl option to build a minimal libxml2 librarydnlif test "$with_minimum" = "yes"then echo "Configuring for a minimal library" if test "$with_c14n" = "" then with_c14n=no fi if test "$with_catalog" = "" then with_catalog=no fi echo So far so good! if test "$with_debug" = "" then with_debug=no fi if test "$with_docbook" = "" then with_docbook=no fi if test "$with_fexceptions" = "" then with_fexceptions=no fi if test "$with_ftp" = "" then with_ftp=no fi if test "$with_history" = "" then with_history=no fi if test "$with_html" = "" then with_html=no fi if test "$with_http" = "" then with_http=no fi if test "$with_iconv" = "" then with_iconv=no fi if test "$with_iso8859x" = "" then with_iso8859x=no fi if test "$with_legacy" = "" then with_legacy=no fi if test "$with_mem_debug" = "" then with_mem_debug=no fi if test "$with_output" = "" then with_output=no fi if test "$with_pattern" = "" then with_pattern=no fi if test "$with_push" = "" then with_push=no fi if test "$with_python" = "" then with_python=no fi if test "$with_reader" = "" then with_reader=no fi if test "$with_readline" = "" then with_readline=no fi if test "$with_regexps" = "" then with_regexps=no fi if test "$with_run_debug" = "" then with_run_debug=no fi if test "$with_sax1" = "" then with_sax1=no fi if test "$with_schemas" = "" then with_schemas=no fi if test "$with_schematron" = "" then with_schematron=no fi if test "$with_threads" = "" then with_threads=no fi if test "$with_thread_alloc" = "" then with_thread_alloc=no fi if test "$with_tree" = "" then with_tree=no fi if test "$with_valid" = "" then with_valid=no fi if test "$with_writer" = "" then with_writer=no fi if test "$with_xinclude" = "" then with_xinclude=no fi if test "$with_xpath" = "" then with_xpath=no fi if test "$with_xptr" = "" then with_xptr=no fi if test "$with_zlib" = "" then with_zlib=no fi if test "$with_modules" = "" then with_modules=no fifiecho Checking zlibdnl Checks for zlib library.WITH_ZLIB=0if test "$with_zlib" = "no"; then echo "Disabling compression support"else AC_CHECK_HEADERS(zlib.h, AC_CHECK_LIB(z, gzread,[ AC_DEFINE([HAVE_LIBZ], [1], [Have compression library]) WITH_ZLIB=1 if test "x${Z_DIR}" != "x"; then Z_CFLAGS="-I${Z_DIR}/include" Z_LIBS="-L${Z_DIR}/lib -lz" [case ${host} in *-*-solaris*) Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz" ;; esac] else Z_LIBS="-lz" fi]))fiAC_SUBST(Z_CFLAGS)AC_SUBST(Z_LIBS)AC_SUBST(WITH_ZLIB)CPPFLAGS=${_cppflags}LDFLAGS=${_ldflags}echo Checking headersdnl Checks for header files.AC_HEADER_DIRENTAC_HEADER_STDCAC_CHECK_HEADERS([fcntl.h])AC_CHECK_HEADERS([unistd.h])AC_CHECK_HEADERS([ctype.h])AC_CHECK_HEADERS([dirent.h])AC_CHECK_HEADERS([errno.h])AC_CHECK_HEADERS([malloc.h])AC_CHECK_HEADERS([stdarg.h])AC_CHECK_HEADERS([sys/stat.h])AC_CHECK_HEADERS([sys/types.h])AC_CHECK_HEADERS([time.h])AC_CHECK_HEADERS([ansidecl.h])AC_CHECK_HEADERS([ieeefp.h])AC_CHECK_HEADERS([nan.h])AC_CHECK_HEADERS([math.h])AC_CHECK_HEADERS([limits.h])AC_CHECK_HEADERS([fp_class.h])AC_CHECK_HEADERS([float.h])AC_CHECK_HEADERS([stdlib.h])AC_CHECK_HEADERS([sys/socket.h], [], [],[#if HAVE_SYS_TYPES_H# include <sys/types.h># endif])AC_CHECK_HEADERS([netinet/in.h], [], [],[#if HAVE_SYS_TYPES_H# include <sys/types.h># endif])AC_CHECK_HEADERS([arpa/inet.h], [], [],[#if HAVE_SYS_TYPES_H# include <sys/types.h># endif#if HAVE_ARPA_INET_H# include <arpa/inet.h># endif])AC_CHECK_HEADERS([netdb.h])AC_CHECK_HEADERS([sys/time.h])AC_CHECK_HEADERS([sys/select.h])AC_CHECK_HEADERS([sys/mman.h])AC_CHECK_HEADERS([sys/timeb.h])AC_CHECK_HEADERS([signal.h])AC_CHECK_HEADERS([arpa/nameser.h], [], [],[#if HAVE_SYS_TYPES_H# include <sys/types.h># endif])AC_CHECK_HEADERS([resolv.h], [], [],[#if HAVE_SYS_TYPES_H# include <sys/types.h># endif#if HAVE_NETINET_IN_H# include <netinet/in.h># endif#if HAVE_ARPA_NAMESER_H# include <arpa/nameser.h># endif])AC_CHECK_HEADERS([dl.h])AC_CHECK_HEADERS([dlfcn.h])echo Checking librariesdnl Checks for library functions.AC_FUNC_STRFTIMEAC_CHECK_FUNCS(strdup strndup strerror)AC_CHECK_FUNCS(finite isnand fp_class class fpclass)AC_CHECK_FUNCS(strftime localtime gettimeofday ftime)AC_CHECK_FUNCS(stat _stat signal)dnl Checking the standard string functions availabilityAC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, NEED_TRIO=1)dnl Checking for va_copy availabilityAC_MSG_CHECKING([for va_copy])AC_TRY_LINK([#include <stdarg.h>va_list ap1,ap2;], [va_copy(ap1,ap2);],have_va_copy=yes,have_va_copy=no)AC_MSG_RESULT($have_va_copy)if test x"$have_va_copy" = x"yes"; then AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])else AC_MSG_CHECKING([for __va_copy]) AC_TRY_LINK([#include <stdarg.h> va_list ap1,ap2;], [__va_copy(ap1,ap2);], have___va_copy=yes, have___va_copy=no) AC_MSG_RESULT($have___va_copy) if test x"$have___va_copy" = x"yes"; then AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -