X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=9c1910ef49981d48585c56526dc14a55d55bf358;hb=79dee3a21d6aaca1b06ea65673dff858538f2ba6;hp=7b82b8bd8196452da923fbdbfce9a185b5ec23ef;hpb=568006186417f6b2404790969599f4cd0d2eee22;p=collectd.git diff --git a/configure.in b/configure.in index 7b82b8bd..9c1910ef 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,25 @@ dnl Process this file with autoconf to produce a configure script. 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) @@ -20,17 +39,11 @@ AC_PROG_MAKE_SET 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 @@ -267,6 +280,8 @@ AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], have_sys_swap_h="yes" 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 #endif @@ -1501,7 +1516,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPDIR=`find -L "$with_java_home" -name jni.h -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1511,7 +1526,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPDIR=`find -L "$with_java_home" -name jni_md.h -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1521,11 +1536,11 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPDIR=`find -L "$with_java_home" -name libjvm.so -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) - JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR" + JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR" else AC_MSG_RESULT([not found]) fi @@ -1533,7 +1548,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPDIR=`find -L "$with_java_home" -name javac | head -n 1` + TMPDIR=`find -L "$with_java_home" -name javac -type f | head -n 1` if test "x$TMPDIR" != "x" then JAVAC="$TMPDIR" @@ -2951,6 +2966,57 @@ AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you ha AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes") # }}} +# --with-libyajl {{{ +with_libyajl_cppflags="" +with_libyajl_ldflags="" +AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_libyajl_cppflags="-I$withval/include" + with_libyajl_ldflags="-L$withval/lib" + with_libyajl="yes" + else + with_libyajl="$withval" + fi +], +[ + with_libyajl="yes" +]) +if test "x$with_libyajl" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags" + + AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_libyajl" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags" + LDFLAGS="$LDFLAGS $with_libyajl_ldflags" + + AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_libyajl" = "xyes" +then + BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags" + BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags" + BUILD_WITH_LIBYAJL_LIBS="-lyajl" + AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBYAJL_LIBS) + AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes") +# }}} + # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{ with_libxml2="no (pkg-config isn't available)" with_libxml2_cflags="" @@ -3283,6 +3349,7 @@ plugin_ascent="no" plugin_battery="no" plugin_bind="no" plugin_conntrack="no" +plugin_couchdb="no" plugin_cpu="no" plugin_cpufreq="no" plugin_df="no" @@ -3400,6 +3467,11 @@ then plugin_ipmi="yes" fi +if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes" +then + plugin_couchdb="yes" +fi + if test "x$have_processor_info" = "xyes" then plugin_cpu="yes" @@ -3547,6 +3619,7 @@ AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics]) AC_PLUGIN([battery], [$plugin_battery], [Battery statistics]) AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics]) AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics]) +AC_PLUGIN([couchdb], [$plugin_couchdb], [CouchDB statistics]) AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics]) AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics]) AC_PLUGIN([csv], [yes], [CSV output plugin]) @@ -3588,6 +3661,7 @@ AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications]) AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier]) AC_PLUGIN([ntpd], [yes], [NTPd statistics]) AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics]) +AC_PLUGIN([olsrd], [yes], [olsrd statistics]) AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics]) AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics]) AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin]) @@ -3777,6 +3851,11 @@ else 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 @@ -3790,12 +3869,14 @@ Configuration: libcurl . . . . . . . $with_libcurl libdbi . . . . . . . $with_libdbi libesmtp . . . . . . $with_libesmtp + libganglia . . . . . $with_libganglia libgcrypt . . . . . . $with_libgcrypt libiokit . . . . . . $with_libiokit libiptc . . . . . . . $with_libiptc libjvm . . . . . . . $with_java libkstat . . . . . . $with_kstat libkvm . . . . . . . $with_libkvm + libmemcached . . . . $with_libmemcached libmysql . . . . . . $with_libmysql libnetlink . . . . . $with_libnetlink libnetsnmp . . . . . $with_libnetsnmp @@ -3814,6 +3895,7 @@ Configuration: libvirt . . . . . . . $with_libvirt libxml2 . . . . . . . $with_libxml2 libxmms . . . . . . . $with_libxmms + libyajl . . . . . . . $with_libyajl oracle . . . . . . . $with_oracle Features: @@ -3831,6 +3913,7 @@ Configuration: battery . . . . . . . $enable_battery bind . . . . . . . . $enable_bind conntrack . . . . . . $enable_conntrack + couchdb . . . . . . . $enable_couchdb cpu . . . . . . . . . $enable_cpu cpufreq . . . . . . . $enable_cpufreq csv . . . . . . . . . $enable_csv @@ -3872,6 +3955,7 @@ Configuration: notify_email . . . . $enable_notify_email ntpd . . . . . . . . $enable_ntpd nut . . . . . . . . . $enable_nut + olsrd . . . . . . . . $enable_olsrd onewire . . . . . . . $enable_onewire openvpn . . . . . . . $enable_openvpn oracle . . . . . . . $enable_oracle