diff --git a/configure.in b/configure.in
index bed13f8e2d0c000caeae75fffad8d2c941d0272f..062f8aa55a471a05438bccaf83fbbf58f6d45272 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
+
+m4_ifdef([LT_PACKAGE_VERSION],
+ # libtool >= 2.2
+ [
+ LT_CONFIG_LTDL_DIR([libltdl])
+ LT_INIT([dlopen])
+ LTDL_INIT([convenience])
+ ]
+,
+ # libtool <= 1.5
+ [
+ AC_LIBLTDL_CONVENIENCE
+ AC_SUBST(LTDLINCL)
+ AC_SUBST(LIBLTDL)
+ AC_LIBTOOL_DLOPEN
+ AC_CONFIG_SUBDIRS(libltdl)
+ ]
+)
+
AM_INIT_AUTOMAKE(dist-bzip2)
AC_LANG(C)
AM_PROG_CC_C_O
AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
-dnl configure libtool
AC_DISABLE_STATIC
-AC_LIBLTDL_CONVENIENCE
-AC_SUBST(LTDLINCL)
-AC_SUBST(LIBLTDL)
-AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PROG_LEX
AC_PROG_YACC
PKG_PROG_PKG_CONFIG
-AC_CONFIG_SUBDIRS(libltdl)
AC_MSG_CHECKING([for kernel type ($host_os)])
case $host_os in
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
+AC_HEADER_STDBOOL
-AC_CHECK_HEADERS(stdio.h stdint.h stdbool.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
+AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
# For ping library
AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
# For the swap module
have_sys_swap_h="yes"
-AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"],
+AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
[
+#undef _FILE_OFFSET_BITS
+#undef _LARGEFILE64_SOURCE
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
then
- AC_MSG_NOTICE([Solaris detected and sys/swap.h not found: Try building a 64bit binary.])
+ hint_64=""
+ if test "x$GCC" = "xyes"
+ then
+ hint_64="CFLAGS='-m64'"
+ else
+ hint_64="CFLAGS='-xarch=v9'"
+ fi
+ AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
fi
# For load module
[with_libmysql="yes"],
[with_libmysql="no (symbol 'mysql_init' not found)"],
[$with_mysql_libs])
+
+ AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
+ [with_libmysql="yes"],
+ [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
+ [$with_mysql_libs])
fi
fi
if test "x$with_libmysql" = "xyes"
enable_perl="no (needs libperl)"
fi
+if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
+then
+ enable_perl="no (libperl doesn't support ithreads)"
+fi
+
if test "x$with_perl_bindings" = "xyes" \
&& test "x$PERL_BINDINGS_OPTIONS" != "x"
then