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 <linux/version.h>" | 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=<directory> proper installed in <directory>,
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=<directory> libxml2 installed in <directory>,[
+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=<directory> zookeeper shared object located in <directory>,[
+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