X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=configure.in;h=3c7f9df278848a18d254fefd69a1c39b9844384c;hb=1aaedbca424b623f83a4f6cf837cf91574fe0e67;hp=d416e696eeee7c990416cfcddd82cab317dd5ebe;hpb=2f712e8af3ae9461df24fe92098b44a0ee07d291;p=collectd.git diff --git a/configure.in b/configure.in index d416e696..3c7f9df2 100644 --- a/configure.in +++ b/configure.in @@ -65,6 +65,11 @@ then AC_SUBST(KERNEL_CFLAGS) fi +if test "x$ac_system" = "xSolaris" +then + CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" +fi + # # Checks for header files. # @@ -240,7 +245,8 @@ AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], ]) # For the swap module -AC_CHECK_HEADERS(sys/swap.h, [], [], +have_sys_swap_h="yes" +AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"], [ #if HAVE_SYS_TYPES_H # include @@ -250,6 +256,11 @@ AC_CHECK_HEADERS(sys/swap.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.]) +fi + # For load module # For the processes plugin # For users module @@ -610,8 +621,13 @@ if test "x$fp_layout_type" = "xunknown"; then [[[[ #include #include -#include #include +#if HAVE_STDINT_H +# include +#endif +#if HAVE_STDBOOL_H +# include +#endif ]]]], [[[[ uint64_t i0; @@ -649,8 +665,13 @@ if test "x$fp_layout_type" = "xunknown"; then [[[[ #include #include -#include #include +#if HAVE_STDINT_H +# include +#endif +#if HAVE_STDBOOL_H +# include +#endif #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \ (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \ (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \ @@ -696,8 +717,13 @@ if test "x$fp_layout_type" = "xunknown"; then [[[[ #include #include -#include #include +#if HAVE_STDINT_H +# include +#endif +#if HAVE_STDBOOL_H +# include +#endif #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \ (((uint64_t)(A) & 0x00000000ffffffffLL) << 32)) ]]]], @@ -986,6 +1012,15 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes") +AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"]) +if test "x$with_kvm_openfiles" = "xyes" +then + AC_DEFINE(HAVE_LIBKVM_NLIST, 1, + [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)]) + with_libkvm="yes" +fi +AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes") + # --with-libcurl {{{ with_curl_config="curl-config" with_curl_cflags="" @@ -1246,12 +1281,24 @@ then if test $mysql_config_status -ne 0 then - with_libmysql="no" + with_libmysql="no ($with_mysql_config failed)" else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_mysql_cflags" - AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], []) + have_mysql_h="no" + have_mysql_mysql_h="no" + AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"]) + + if test "x$have_mysql_h" = "xno" + then + AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"]) + fi + + if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono" + then + with_libmysql="no (mysql.h not found)" + fi CPPFLAGS="$SAVE_CPPFLAGS" fi @@ -1263,7 +1310,7 @@ then if test $mysql_config_status -ne 0 then - with_libmysql="no" + with_libmysql="no ($with_mysql_config failed)" else AC_CHECK_LIB(mysqlclient, mysql_init, [with_libmysql="yes"], @@ -1554,6 +1601,75 @@ AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes") AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes") # }}} +# --with-oracle {{{ +with_oracle_cppflags="" +with_oracle_libs="" +AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])], +[ + if test "x$withval" = "xyes" + then + if test "x$ORACLE_HOME" = "x" + then + AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.]) + fi + with_oracle="yes" + else if test "x$withval" = "xno" + then + with_oracle="no" + else + with_oracle="yes" + ORACLE_HOME="$withval" + fi; fi +], +[ + if test "x$ORACLE_HOME" = "x" + then + with_oracle="no (ORACLE_HOME is not set)" + else + with_oracle="yes" + fi +]) +if test "x$ORACLE_HOME" != "x" +then + with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public" + + if test -e "$ORACLE_HOME/lib/ldflags" + then + with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"` + fi + #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh" + with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh" +fi +if test "x$with_oracle" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_oracle_cppflags" + + AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_oracle" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_oracle_cppflags" + LDFLAGS="$LDFLAGS $with_oracle_libs" + + AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_oracle" = "xyes" +then + BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags" + BUILD_WITH_ORACLE_LIBS="$with_oracle_libs" + AC_SUBST(BUILD_WITH_ORACLE_CFLAGS) + AC_SUBST(BUILD_WITH_ORACLE_LIBS) +fi +# }}} + # --with-libowcapi {{{ with_libowcapi_cppflags="" with_libowcapi_libs="-lowcapi" @@ -1641,6 +1757,78 @@ AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap], AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes") # }}} +# --with-libpcre {{{ +with_pcre_config="pcre-config" +with_pcre_cflags="" +with_pcre_libs="" +AC_ARG_WITH(libpcre, [AS_HELP_STRING([--with-libpcre@<:@=PREFIX@:>@], + [Path to libpcre.])], + [ + if test "x$withval" = "xno" + then + with_libpcre="no" + else if test "x$withval" = "xyes" + then + with_libpcre="yes" + else + if test -f "$withval" && test -x "$withval" + then + with_pcre_config="$withval" + else if test -x "$withval/bin/pcre-config" + then + with_pcre_config="$withval/bin/pcre-config" + fi; fi + with_libpcre="yes" + fi; fi + ], + [ + with_libpcre="yes" + ]) + +if test "x$with_libpcre" = "xyes" +then + with_pcre_cflags=`$with_pcre_config --cflags 2>/dev/null` + pcre_config_status=$? + + if test $pcre_config_status -ne 0 + then + with_libpcre="no ($with_pcre_config failed)" + else + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_pcre_cflags" + + AC_CHECK_HEADERS(pcre.h, [], [with_libpcre="no (pcre.h not found)"], []) + + CPPFLAGS="$SAVE_CPPFLAGS" + fi +fi + +if test "x$with_libpcre" = "xyes" +then + with_pcre_libs=`$with_pcre_config --libs 2>/dev/null` + pcre_config_status=$? + + if test $pcre_config_status -ne 0 + then + with_libpcre="no ($with_pcre_config failed)" + else + AC_CHECK_LIB(pcre, pcre_compile, + [with_libpcre="yes"], + [with_libpcre="no (symbol 'pcre_compile' not found)"], + [$with_pcre_libs]) + fi +fi + +if test "x$with_libpcre" = "xyes" +then + BUILD_WITH_LIBPCRE_CFLAGS="$with_pcre_cflags" + BUILD_WITH_LIBPCRE_LIBS="$with_pcre_libs" + AC_SUBST(BUILD_WITH_LIBPCRE_CFLAGS) + AC_SUBST(BUILD_WITH_LIBPCRE_LIBS) +fi +AM_CONDITIONAL(BUILD_WITH_LIBPCRE, test "x$with_libpcre" = "xyes") +# }}} + # --with-libperl {{{ perl_interpreter="perl" AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])], @@ -2663,10 +2851,14 @@ then plugin_disk="yes" plugin_interface="yes" plugin_memory="yes" - plugin_swap="yes" plugin_tape="yes" fi +if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris" +then + plugin_swap="yes" +fi + # libstatgrab if test "x$with_libstatgrab" = "xyes" then @@ -2755,7 +2947,7 @@ then plugin_swap="yes" fi -if test "x$with_kvm_nlist" = "xyes" +if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes" then plugin_tcpconns="yes" fi @@ -2791,6 +2983,7 @@ AC_PLUGIN([email], [yes], [EMail statistics]) AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics]) AC_PLUGIN([exec], [yes], [Execution of external programs]) AC_PLUGIN([filecount], [yes], [Count files in directories]) +AC_PLUGIN([filter_ignore], [yes], [Ignore specific values]) AC_PLUGIN([hddtemp], [yes], [Query hddtempd]) AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics]) AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) @@ -2800,6 +2993,8 @@ AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics]) AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics]) AC_PLUGIN([load], [$plugin_load], [System load]) AC_PLUGIN([logfile], [yes], [File logging plugin]) +AC_PLUGIN([match_regex], [yes], [The regex match]) +AC_PLUGIN([match_value], [yes], [The value match]) AC_PLUGIN([mbmon], [yes], [Query mbmond]) AC_PLUGIN([memcached], [yes], [memcached statistics]) AC_PLUGIN([memory], [$plugin_memory], [Memory usage]) @@ -2813,6 +3008,7 @@ 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([onewire], [$with_libowcapi], [OneWire sensor statistics]) +AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin]) AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter]) AC_PLUGIN([ping], [$with_liboping], [Network latency statistics]) AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics]) @@ -2827,6 +3023,8 @@ AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin]) AC_PLUGIN([tail], [yes], [Parsing of logfiles]) AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics]) +AC_PLUGIN([target_replace], [yes], [The replace target]) +AC_PLUGIN([target_set], [yes], [The set target]) AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics]) AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics]) AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics]) @@ -2875,7 +3073,7 @@ fi AC_SUBST(PERL_BINDINGS) AC_SUBST(PERL_BINDINGS_OPTIONS) -AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile) +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile) if test "x$with_librrd" = "xyes" \ && test "x$librrd_threadsafe" != "xyes" @@ -2926,6 +3124,7 @@ Configuration: libopenipmi . . . . . $with_libopenipmipthread liboping . . . . . . $with_liboping libpcap . . . . . . . $with_libpcap + libpcre . . . . . . . $with_libpcre libperl . . . . . . . $with_libperl libpthread . . . . . $with_libpthread libpq . . . . . . . . $with_libpq @@ -2936,6 +3135,7 @@ Configuration: libvirt . . . . . . . $with_libvirt libxml2 . . . . . . . $with_libxml2 libxmms . . . . . . . $with_libxmms + oracle . . . . . . . $with_oracle Features: daemon mode . . . . . $enable_daemon @@ -2961,6 +3161,7 @@ Configuration: entropy . . . . . . . $enable_entropy exec . . . . . . . . $enable_exec filecount . . . . . . $enable_filecount + filter_ignore . . . . $enable_filter_ignore hddtemp . . . . . . . $enable_hddtemp interface . . . . . . $enable_interface iptables . . . . . . $enable_iptables @@ -2970,6 +3171,8 @@ Configuration: libvirt . . . . . . . $enable_libvirt load . . . . . . . . $enable_load logfile . . . . . . . $enable_logfile + match_regex . . . . . $enable_match_regex + match_value . . . . . $enable_match_value mbmon . . . . . . . . $enable_mbmon memcached . . . . . . $enable_memcached memory . . . . . . . $enable_memory @@ -2984,6 +3187,7 @@ Configuration: ntpd . . . . . . . . $enable_ntpd nut . . . . . . . . . $enable_nut onewire . . . . . . . $enable_onewire + oracle . . . . . . . $enable_oracle perl . . . . . . . . $enable_perl ping . . . . . . . . $enable_ping postgresql . . . . . $enable_postgresql @@ -2998,6 +3202,8 @@ Configuration: syslog . . . . . . . $enable_syslog tail . . . . . . . . $enable_tail tape . . . . . . . . $enable_tape + target_replace . . . $enable_target_replace + target_set . . . . . $enable_target_set tcpconns . . . . . . $enable_tcpconns teamspeak2 . . . . . $enable_teamspeak2 thermal . . . . . . . $enable_thermal