X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=configure.in;h=c339fe5cea54682da6632fd810008715acad30a3;hp=2f888fbcf8cb67574901357e0f09fa6bf90a16c6;hb=ef996ac4c4bd1aaaf5ccaba5012a799527a7a372;hpb=90af793705b8b19373f7deb159011b8afcfc8b6f diff --git a/configure.in b/configure.in index 2f888fb..c339fe5 100644 --- a/configure.in +++ b/configure.in @@ -25,25 +25,6 @@ dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS(socket strerror) -dnl Checks for kernel source directory. -AC_MSG_CHECKING([kernel source directory]) -KSRC="/lib/modules/`uname -r`/build" -AC_ARG_WITH(kernel, - --with-kernel=DIR kernel source directory, - [ KSRC="$withval" ], -) -# Check if kernel source directory has been configured -if test -f "$KSRC/include/linux/version.h" ; then - # Get kernel version number - eval KVER=$(echo "#include " | cpp -I "$KSRC/include" -dM - | awk '/UTS_RELEASE/ { print $3 }') - AC_MSG_RESULT([$KVER]) -else - AC_MSG_RESULT([$KSRC/include/linux/version.h not found]) - AC_MSG_ERROR(kernel source directory not specified or not configured) -fi -AC_SUBST(KSRC) -AC_SUBST(KVER) - dnl NetFlow prerequisites. AC_ARG_WITH(proper, --with-proper= proper installed in , @@ -65,10 +46,6 @@ dnl test for MySQL dnl AC_ARG_WITH(mysql, --with-mysql= mysql installed in ,[ -if test $withval == no -then - AC_MSG_WARN("mysql disabled.") -else if test $withval != yes then dir=$withval @@ -126,8 +103,7 @@ else AC_MSG_RESULT(found new MySQL) fi -fi -fi +fi ]) @@ -146,6 +122,86 @@ AC_ARG_WITH(mysql-log-ip-as-string, AC_MSG_WARN(the use of --with-mysql-log-ip-as-string is discouraged) ]) +dnl +dnl test for libxml2 +dnl +AC_ARG_WITH(libxml2, --with-libxml= libxml2 installed in ,[ +if test $withval != yes +then + dir=$withval +else + dir="/usr/local" +fi]) + +libxmldir="" +AC_MSG_CHECKING(for LIBXML2 files) +for d in $dir/bin /usr/bin /usr/local/bin /usr/local/libxml2/bin /opt/libxml2/bin /opt/packages/libxml2/bin +do + if test -x $d/xml2-config + then + AC_MSG_RESULT(found xml2-config in $d) + libxmldir=$d + break + fi +done + +if test x$libxmldir = x +then + AC_MSG_ERROR(xml2-config not found) +else + XMLINCLUDES=`$libxmldir/xml2-config --cflags` + AC_SUBST(XMLINCLUDES) + + XMLLIBS=`$libxmldir/xml2-config --libs` + AC_SUBST(XMLLIBS) +fi + +dnl +dnl check for zookeeper library +dnl +zkdir="/usr/local/lib" + +AC_ARG_WITH(zookeeper, --with-zookeeperlib= zookeeper shared object located in ,[ +if test $withval = no +then + zkdir=no + AC_MSG_WARN(Building without zookeeper support.) +else + zkdir=$withval +fi]) + +zklib="" +if test $zkdir != no +then + AC_MSG_CHECKING(for zookeeper libraries) + for d in $zkdir /usr/local/lib /lib /usr/lib + do + if test -f $d/libzookeeper_mt.so + then + AC_MSG_RESULT(found libzookeeper_mt.so in $d) + zklib=$d/libzookeeper_mt.so + break + fi + done + + if test x$zklib = x + then + dnl no zklib + AC_MSG_WARN(Zookeeper libraries not found.) + ZKLIBS="" + AC_SUBST(ZKLIBS) + + ZKFLAGS="" + AC_SUBST(ZKFLAGS) + else + dnl found it + ZKLIBS=$zklib + AC_SUBST(ZKLIBS) + + ZKFLAGS="-DTHREADED -DBUILD_ZOOKEEPER" + AC_SUBST(ZKFLAGS) + fi +fi dnl dnl test for PostgreSQL