⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 ReactOS是一些高手根据Windows XP的内核编写出的类XP。内核实现机理和API函数调用几乎相同。甚至可以兼容XP的程序。喜欢研究系统内核的人可以看一看。
💻 IN
📖 第 1 页 / 共 3 页
字号:
               NEED_TRIO=1)

dnl Checks for inet libraries:
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(net, setsockopt))
AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))

dnl Determine what socket length (socklen_t) data type is
AC_MSG_CHECKING([for type of socket length (socklen_t)])
AC_TRY_COMPILE2([
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>],[
(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
  AC_MSG_RESULT(socklen_t *)
  XML_SOCKLEN_T=socklen_t],[
  AC_TRY_COMPILE2([
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>],[
(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
    AC_MSG_RESULT(size_t *)
    XML_SOCKLEN_T=size_t],[
    AC_TRY_COMPILE2([
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>],[
(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
      AC_MSG_RESULT(int *)
      XML_SOCKLEN_T=int],[
      AC_MSG_WARN(could not determine)
      XML_SOCKLEN_T="int"])])])
AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])

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 [[default=yes]]],, enable_ipv6=yes)
if test "$with_minimum" = "yes"
then
    enable_ipv6=no
fi
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], [], [Support for IPv6])
    have_broken_ss_family=no

    dnl *********************************************************************
    dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have
    dnl a ss_family member, but rather __ss_family. Let's detect that
    dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these
    dnl platforms.  However, we should only do this if ss_family is not
    dnl present.
    dnl ********************************************************************
    AC_MSG_CHECKING([struct sockaddr::ss_family])
    AC_TRY_COMPILE([
      #include <sys/socket.h>
      #include <sys/types.h>], [
      struct sockaddr_storage ss ;
      ss.ss_family = 0 ;
      ],
      have_ss_family=yes,
      have_ss_family=no
    )
    AC_MSG_RESULT($have_ss_family)
    if test x$have_ss_family = xno ; then
      AC_MSG_CHECKING([broken struct sockaddr::ss_family])
      AC_TRY_COMPILE([
        #include <sys/socket.h>
        #include <sys/types.h>], [
        struct sockaddr_storage ss ;
        ss.__ss_family = 0 ;
        ],
        have_broken_ss_family=yes,
        have_broken_ss_family=no
      )
      AC_MSG_RESULT($have_broken_ss_family)
      if test x$have_broken_ss_family = xyes ; then
        AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [],
	  [Whether struct sockaddr::__ss_family exists]) 
        AC_DEFINE(ss_family, __ss_family,
	  [ss_family is not defined here, use __ss_family instead])
      else
        AC_MSG_WARN(ss_family and __ss_family not found)
      fi
    fi

    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], [], [Define if getaddrinfo is there])
    fi
  fi
fi 

dnl ******************************End IPv6 checks******************************

dnl Checks for isnan in libm if not in libc
AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan,
  [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))

AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
  [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))

XML_LIBDIR='-L${libdir}'
XML_INCLUDEDIR='-I${includedir}/libxml2'

dnl
dnl Extra flags
dnl
XML_CFLAGS=""
RDL_LIBS=""

dnl
dnl Workaround for native compilers
dnl  HP  : http://bugs.gnome.org/db/31/3163.html
dnl  DEC : Enable NaN/Inf
dnl
if test "${GCC}" != "yes" ; then
    case "${host}" in
          *-*-hpux* )
	       CFLAGS="${CFLAGS} -Wp,-H30000"
	       ;;
          *-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} -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" 
    case "${host}" in
          alpha*-*-linux* )
	       CFLAGS="${CFLAGS} -mieee"
	       ;;
	  alpha*-*-osf* )
	       CFLAGS="${CFLAGS} -mieee"
	       ;;
    esac
fi
case ${host} in
    *-*-solaris*)
        XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
        ;;
    hppa*-hp-mpeix)
        NEED_TRIO=1
	;;
esac


dnl
dnl check for python
dnl

PYTHON=
PYTHON_VERSION=
PYTHON_INCLUDES=
PYTHON_SITE_PACKAGES=
PYTHON_TESTS=
pythondir=
if test "$with_python" != "no" ; then
    if test -x "$with_python/bin/python"
    then
        echo Found python in $with_python/bin/python
        PYTHON="$with_python/bin/python"
    else
	if test -x "$with_python"
	then
	    echo Found python in $with_python
	    PYTHON="$with_python"
	else
	    AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
	fi
    fi
    if test "$PYTHON" != ""
    then
        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
	echo Found Python version $PYTHON_VERSION
    fi
    if test "$PYTHON_VERSION" != ""
    then
	if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
	   -d $with_python/lib/python$PYTHON_VERSION/site-packages
	then
	    PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
	    PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
	else
	    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
	    then
	        PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
		PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
	    else
		if test -r /usr/include/python$PYTHON_VERSION/Python.h
		then
		    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
		    PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
		else
		    echo could not find python$PYTHON_VERSION/Python.h
		fi
	    fi
	    if test ! -d "$PYTHON_SITE_PACKAGES"
	    then
		    PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
	    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" != ""
then
    PYTHON_SUBDIR=python
else
    PYTHON_SUBDIR=
fi
AC_SUBST(pythondir)
AC_SUBST(PYTHON_SUBDIR)

dnl check for dso support
WITH_MODULES=0
MODULE_EXTENSION=".so"
TEST_MODULES=

if test "$with_modules" != "no" ; then
AC_CHECK_LIB(dld, shl_load, [
  WITH_MODULES=1
  MODULE_PLATFORM_LIBS="-ldld"
  AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
])

AC_CHECK_LIB(dl, dlopen, [
  WITH_MODULES=1
  MODULE_PLATFORM_LIBS="-ldl"
  AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
])
fi

if test "${WITH_MODULES}" = "1"; then
  TEST_MODULES="ModuleTests"
fi  

AC_SUBST(WITH_MODULES)
AC_SUBST(MODULE_PLATFORM_LIBS)
AC_SUBST(MODULE_EXTENSION)
AC_SUBST(TEST_MODULES)

dnl
dnl Tester makes use of readline if present
dnl

dnl
dnl specific tests to setup DV and Bill's devel environments with debug etc ...
dnl (-Wunreachable-code)
dnl
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
   [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
   [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ]] || \
   [[ "${LOGNAME}" = "wbrack" -a "`pwd`" = "/Users/wbrack/gnomecvs/xmltest" ]]
   then
    if test "$with_minimum" != "yes"
    then
	if test "${with_mem_debug}" = "" ; then
	    with_mem_debug="yes"
	    with_run_debug="yes"
	fi
	if test "${with_docbook}" = "" ; then
	    with_docbook="yes"
	fi
    fi
    if test "${CC}" = "gcc" ; then
    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"
    fi
    STATIC_BINARIES="-static"
dnl -Wcast-qual -ansi
else
    STATIC_BINARIES=
fi
AC_SUBST(STATIC_BINARIES)

dnl
dnl Check for trio string functions
dnl

if test "${NEED_TRIO}" = "1" ; then
    echo Adding trio library for string functions
    WITH_TRIO=1
else    
    WITH_TRIO=0
fi
AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
AC_SUBST(WITH_TRIO)

dnl
dnl Allow to enable/disable various pieces
dnl
echo Checking configuration requirements

dnl
dnl Thread-related stuff
dnl
THREAD_LIBS=""
BASE_THREAD_LIBS=""
WITH_THREADS=0
THREAD_CFLAGS=""
TEST_THREADS=""
THREADS_W32=""

if test "$with_threads" = "no" ; then
    echo Disabling multithreaded support
else
    echo Enabling multithreaded support

    AC_CHECK_HEADER(pthread.h,
	AC_CHECK_LIB(pthread, pthread_join,[
	   THREAD_LIBS="-lpthread"
	   AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
	   AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
	   WITH_THREADS="1"]))
    case $host_os in
       *mingw32*) WITH_THREADS="1"
           THREADS_W32="Win32"
	   THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
       ;;
       *cygwin*) THREAD_LIBS=""
       ;;
       *beos*) WITH_THREADS="1"
	   THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
       ;;
       *linux*)
           if test "${CC}" = "gcc" -a "${THREAD_LIBS}" = "-lpthread" ; then
	       THREAD_LIBS=""
	       BASE_THREAD_LIBS="-lpthread"
	   fi
       ;;
    esac
    if test "$WITH_THREADS" = "1" ; then
	THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
	TEST_THREADS="Threadtests"
    fi
fi
if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
    THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
fi

AC_SUBST(THREAD_LIBS)
AC_SUBST(BASE_THREAD_LIBS)
AC_SUBST(WITH_THREADS)
AC_SUBST(THREAD_CFLAGS)
AC_SUBST(TEST_THREADS)
AC_SUBST(THREADS_W32)

dnl
dnl xmllint shell history
dnl
if test "$with_history" = "yes" ; then
    echo Enabling xmllint shell history
    dnl check for terminal library. this is a very cool solution
    dnl from octave's configure.in
    unset tcap
    for termlib in ncurses curses termcap terminfo termlib; do
	AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
	test -n "$tcap" && break
    done

    AC_CHECK_HEADER(readline/history.h,
	AC_CHECK_LIB(history, append_history,[
	   RDL_LIBS="-lhistory"
	   AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
    AC_CHECK_HEADER(readline/readline.h,
	AC_CHECK_LIB(readline, readline,[
	   RDL_LIBS="-lreadline $RDL_LIBS $tcap"
	   AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
    if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
	CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
	RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
    fi
fi

dnl
dnl Tree functions
dnl
if test "$with_tree" = "no" ; then
    echo Disabling DOM like tree manipulation APIs
    WITH_TREE=0
else    
    WITH_TREE=1
fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -