X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=configure.ac;h=eb3c14550f19fcb53721761cc7602fff67917794;hb=27829b920327ad00cdc6a388b247b14e1c95faf5;hp=575d0243e45fc3f133494375bc81b5601e258478;hpb=5f917915b5648233b3e58488b56a718db3af397f;p=util-vserver.git diff --git a/configure.ac b/configure.ac index 575d024..eb3c145 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl $Id: configure.ac 2422 2006-12-09 16:13:54Z dhozac $ +dnl $Id: configure.ac 2539 2007-05-02 20:11:40Z dhozac $ dnl Copyright (C) 2003,2004 Enrico Scholz dnl @@ -24,7 +24,7 @@ dnl distribution terms that you use for the rest of that program. dnl AC_PREREQ(2.57) -AC_INIT(util-vserver, 0.30.212, vserver@list.linux-vserver.org) +AC_INIT(util-vserver, 0.30.213, vserver@list.linux-vserver.org) AC_CONFIG_SRCDIR([src/capchroot.c]) AC_CONFIG_HEADER([config.h]) @@ -138,6 +138,11 @@ AC_ARG_VAR(CC, [The C compiler]) ENSC_INITRDDIR(initrddir) ENSC_RELEASE(RELEASE_CPPFLAGS) +# HACK: This needs to be before ENSC_DIETLIBC_NEED_COMPAT, or the alternative +# syscalls will never be enabled for glibc. +ENSC_SYSCALLNR(vserver,273,[lib/syscall-fallback.h]) +ENSC_SYSCALL + dnl ########################### dnl dnl {some dietlibc related tests @@ -147,6 +152,7 @@ case $host_cpu in (i*86|athlon) min_diet_ver=0.25;; (ia64|hppa*) min_diet_ver=0.29;; (sparc*) min_diet_ver=0.30;; + (x86_64) min_diet_ver=0.27;; (*) min_diet_ver=0.28;; esac @@ -169,7 +175,6 @@ else # below. Therefore, this macro must not be called earlier. enable_static=no - ENSC_DIETLIBC_SANITYCHECK ENSC_DIETLIBC_NEED_COMPAT(USE_DIETLIBC_COMPAT) fi @@ -279,8 +284,6 @@ dnl dnl ########################## -ENSC_SYSCALLNR(vserver,273,[lib/syscall-fallback.h]) -ENSC_SYSCALL ENSC_CHECK_EXT2FS_HEADER AC_CHECK_FUNCS([vserver]) AC_CHECK_DECLS(MS_MOVE,,,[#include ]) @@ -333,6 +336,103 @@ dnl beecrypt stuff ends here} dnl dnl ######################## +dnl ######################## +dnl +dnl {check for libnl +dnl + +ensc_have_libnl=yes +LIBNL_ROOT=`readlink -f ../libnl*/` +if test -d "$LIBNL_ROOT"; then + CFLAGS="$CFLAGS -I ${LIBNL_ROOT}/include" + LDFLAGS="$LDFLAGS -L${LIBNL_ROOT}/lib" +fi + +if test x"$ensc_have_libnl" = xyes; then + AC_CHECK_HEADERS([asm/types.h stdint.h], [ : ], + [ ensc_have_libnl=no ]) + AC_CHECK_TYPES([__s64], [ : ], [AC_DEFINE_UNQUOTED([__s64], [int64_t], + [Define this to a signed 64-bit integer type])], + [AC_INCLUDES_DEFAULT() +#ifdef HAVE_ASM_TYPES_H +# include +#endif]) + AC_CHECK_TYPES([__u64], [ : ], [AC_DEFINE_UNQUOTED([__u64], [uint64_t], + [Define this to an unsigned 64-bit integer type])], + [AC_INCLUDES_DEFAULT() +#ifdef HAVE_ASM_TYPES_H +# include +#endif]) +fi + +if test x"$ensc_have_libnl" = xyes; then + AC_CHECK_HEADERS([netlink/netlink.h netlink/route/addr.h], [ : ], + [ ensc_have_libnl=no ], [AC_INCLUDES_DEFAULT() +#ifdef HAVE_ASM_TYPES_H +# include +#endif] + ) +fi + +if test x"$ensc_have_libnl" = xyes; then + AC_CHECK_LIB(nl, nlmsg_get_src, [ : ], + [ ensc_have_libnl=no ]) +fi + +if test x"$ensc_have_libnl" != xyes; then + AC_MSG_WARN([ +**** +**** 'libnl' could not be found; +**** this will disable the build of 'vip6-autod' +****]) +fi + +AM_CONDITIONAL(ENSC_HAVE_LIBNL, test x"$ensc_have_libnl" = xyes) + +dnl +dnl libnl stuff ends here} +dnl +dnl ####################### + +dnl +dnl Get python includes +dnl + +AC_MSG_CHECKING([for python includes]) +PYTHON_INCLUDES=`python-config --includes 2>/dev/null` +if test x"$PYTHON_INCLUDES" = x; then + python_inc_plat=`$PYTHON -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)"` + python_inc=`$PYTHON -c "from distutils.sysconfig import get_python_inc; print get_python_inc()"` + if test x"$python_inc_plat" != x; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I$python_inc_plat" + fi + if test x"$python_inc" != x; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I$python_inc" + fi +fi +AC_MSG_RESULT([$PYTHON_INCLUDES]) +AC_SUBST(PYTHON_INCLUDES) + + +dnl Check what distro this is, use Gentoo initscripts if appropriate +AC_MSG_CHECKING([for host initscripts]) +AC_ARG_WITH(initscripts, AC_HELP_STRING([--with-initscripts=TYPE], [force host initscripts; valid values are 'gentoo' and 'sysv' (default: guess)]), [ + case "$withval" in + gentoo) ensc_with_init=gentoo;; + sysv) ensc_with_init=sysv;; + *) AC_MSG_ERROR([invalid initscripts value, only gentoo and sysv are supported]);; + esac + ], [ + if test -e /etc/gentoo-release; then + ensc_with_init=gentoo + else + ensc_with_init=sysv + fi + ]) +AC_MSG_RESULT([$ensc_with_init]) +AM_CONDITIONAL(HAVE_GENTOO_INIT, test x"$ensc_with_init" = xgentoo) +AM_CONDITIONAL(HAVE_SYSV_INIT, test x"$ensc_with_init" = xsysv) + dnl BIG HACK! Do some autodetection here! AC_DEFINE(UTMP_GID, [22], [The utmp gid-number]) @@ -392,7 +492,7 @@ dnl final info-page ends here} dnl dnl ######################## -AC_CONFIG_FILES([util-vserver.spec Makefile distrib/Makefile lib/apidoc/Doxyfile]) +AC_CONFIG_FILES([util-vserver.spec Makefile distrib/Makefile lib/apidoc/Doxyfile python/Makefile]) AC_OUTPUT AC_MSG_NOTICE([