X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.in;h=27c6cd316b916a0047cfe389face9b5b40d0af9b;hb=38d06a8f868293466f4eee943555c65457a5e560;hp=a20a25f48e81f5eabd97800b57cd0981cae7b3fe;hpb=6c769cf76d74ac758252062668ff07037eb421f1;p=collectd.git diff --git a/configure.in b/configure.in index a20a25f4..27c6cd31 100644 --- a/configure.in +++ b/configure.in @@ -49,6 +49,13 @@ AC_PROG_YACC PKG_PROG_PKG_CONFIG AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) +AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h], + [have_protobuf_c_h="yes"], + [have_protobuf_c_h="no"]) +if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes" +then + have_protoc_c="no (unable to find )" +fi AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes") AC_MSG_CHECKING([for kernel type ($host_os)]) @@ -71,6 +78,10 @@ case $host_os in AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel]) ac_system="AIX" ;; + *freebsd*) + AC_DEFINE([KERNEL_FREEBSD], 1, [True if program is to be compiled for a FreeBSD kernel]) + ac_system="FreeBSD" + ;; *) ac_system="unknown" esac @@ -128,7 +139,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_DIRENT AC_HEADER_STDBOOL -AC_CHECK_HEADERS(stdio.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 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 fnmatch.h libgen.h) # For ping library AC_CHECK_HEADERS(netinet/in_systm.h, [], [], @@ -270,7 +281,19 @@ if test "x$ac_system" = "xDarwin" then AC_CHECK_HEADERS(mach/mach_init.h mach/host_priv.h mach/mach_error.h mach/mach_host.h mach/mach_port.h mach/mach_types.h mach/message.h mach/processor_set.h mach/processor.h mach/processor_info.h mach/task.h mach/thread_act.h mach/vm_region.h mach/vm_map.h mach/vm_prot.h mach/vm_statistics.h mach/kern_return.h) AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h) + # For the battery plugin + AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], +[ +#if HAVE_IOKIT_IOKITLIB_H +# include +#endif +#if HAVE_IOKIT_IOTYPES_H +# include +#endif +]) + fi + AC_CHECK_HEADERS(sys/sysctl.h, [], [], [ #if HAVE_SYS_TYPES_H @@ -298,7 +321,7 @@ else fi # For hddtemp module -AC_CHECK_HEADERS(linux/major.h libgen.h) +AC_CHECK_HEADERS(linux/major.h) # For md module (Linux only) if test "x$ac_system" = "xLinux" @@ -315,17 +338,6 @@ else have_linux_raid_md_u_h="no" fi -# For the battery plugin -AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], -[ -#if HAVE_IOKIT_IOKITLIB_H -# include -#endif -#if HAVE_IOKIT_IOTYPES_H -# include -#endif -]) - # For the swap module have_linux_wireless_h="no" if test "x$ac_system" = "xLinux" @@ -598,7 +610,7 @@ AC_CACHE_CHECK([for strtok_r], saveptr = NULL; while ((token = strtok_r (dummy, ",", &saveptr)) != NULL) { - dummy = NULL; + dummy = NULL; printf ("token = %s;\n", token); } ]]] @@ -631,7 +643,7 @@ then saveptr = NULL; while ((token = strtok_r (dummy, ",", &saveptr)) != NULL) { - dummy = NULL; + dummy = NULL; printf ("token = %s;\n", token); } ]]] @@ -1354,6 +1366,8 @@ fi m4_divert_once([HELP_WITH], [ collectd additional packages:]) +AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"]) + AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"]) if test "x$ac_system" = "xAIX" @@ -1836,6 +1850,8 @@ then if test "$with_libgcrypt" != "no"; then AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)") + GCRYPT_CPPFLAGS="$LIBGCRYPT_CPPFLAGS $LIBGCRYPT_CFLAGS" + GCRYPT_LIBS="$LIBGCRYPT_LIBS" fi fi @@ -1999,31 +2015,31 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR" else AC_MSG_RESULT([not found]) fi AC_MSG_CHECKING([for jni_md.h]) - TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR" else AC_MSG_RESULT([not found]) fi AC_MSG_CHECKING([for libjvm.so]) - TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPVAR -Wl,-rpath -Wl,$TMPVAR" else AC_MSG_RESULT([not found]) fi @@ -2031,10 +2047,10 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPDIR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - JAVAC="$TMPDIR" + JAVAC="$TMPVAR" AC_MSG_RESULT([$JAVAC]) else AC_MSG_RESULT([not found]) @@ -2043,10 +2059,10 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPDIR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - JAR="$TMPDIR" + JAR="$TMPVAR" AC_MSG_RESULT([$JAR]) else AC_MSG_RESULT([not found]) @@ -2142,6 +2158,58 @@ AC_SUBST(JAVA_LIBS) AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes") # }}} +# --with-liblvm2app {{{ +with_liblvm2app_cppflags="" +with_liblvm2app_ldflags="" +AC_ARG_WITH(liblvm2app, [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_liblvm2app_cppflags="-I$withval/include" + with_liblvm2app_ldflags="-L$withval/lib" + with_liblvm2app="yes" + else + with_liblvm2app="$withval" + fi +], +[ + with_liblvm2app="yes" +]) +if test "x$with_liblvm2app" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags" + + AC_CHECK_HEADERS(lvm2app.h, [with_liblvm2app="yes"], [with_liblvm2app="no (lvm2app.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi + +if test "x$with_liblvm2app" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags" + LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags" + + AC_CHECK_LIB(lvm2app, lvm_init, [with_liblvm2app="yes"], [with_liblvm2app="no (Symbol 'lvm_init' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_liblvm2app" = "xyes" +then + BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags" + BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags" + BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app" + AC_SUBST(BUILD_WITH_LIBLVM2APP_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBLVM2APP_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBLVM2APP_LIBS) + AC_DEFINE(HAVE_LIBLVM2APP, 1, [Define if liblvm2app is present and usable.]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBLVM2APP, test "x$with_liblvm2app" = "xyes") +# }}} + # --with-libmemcached {{{ with_libmemcached_cppflags="" with_libmemcached_ldflags="" @@ -4142,6 +4210,63 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes") # }}} +# --with-mic {{{ +with_mic_cflags="-I/opt/intel/mic/sysmgmt/sdk/include" +with_mic_ldpath="-L/opt/intel/mic/sysmgmt/sdk/lib/Linux" +with_mic_libs="" +AC_ARG_WITH(mic,[AS_HELP_STRING([--with-mic@<:@=PREFIX@:>@], [Path to Intel MIC Access API.])], +[ + if test "x$withval" = "xno" + then + with_mic="no" + else if test "x$withval" = "xyes" + then + with_mic="yes" + else if test -d "$with_mic/lib" + then + AC_MSG_NOTICE([Not checking for Intel Mic: Manually configured]) + with_mic_cflags="-I$withval/include" + with_mic_ldpath="-L$withval/lib/Linux" + with_mic_libs="-lMicAccessSDK -lscif -lpthread" + with_mic="yes" + fi; fi; fi +], +[with_mic="yes"]) +if test "x$with_mic" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_mic_cflags" + AC_CHECK_HEADERS(MicAccessApi.h,[],[with_mic="no (MicAccessApi not found)"]) + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_mic" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + + CPPFLAGS="$CPPFLAGS $with_mic_cflags" + LDFLAGS="$LDFLAGS $with_mic_ldpath" + + AC_CHECK_LIB(MicAccessSDK, MicInitAPI, + [with_mic_ldpath="$with_mic_ldpath" + with_mic_libs="-lMicAccessSDK -lscif -lpthread"], + [with_mic="no (symbol MicInitAPI not found)"],[-lscif -lpthread]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi + +if test "x$with_mic" = "xyes" +then + BUILD_WITH_MIC_CPPFLAGS="$with_mic_cflags" + BUILD_WITH_MIC_LIBPATH="$with_mic_ldpath" + BUILD_WITH_MIC_LDADD="$with_mic_libs" + AC_SUBST(BUILD_WITH_MIC_CPPFLAGS) + AC_SUBST(BUILD_WITH_MIC_LIBPATH) + AC_SUBST(BUILD_WITH_MIC_LDADD) +fi +#}}} + # --with-libvarnish {{{ with_libvarnish_cppflags="" with_libvarnish_cflags="" @@ -4568,6 +4693,7 @@ dependency_error="no" plugin_ascent="no" plugin_battery="no" plugin_bind="no" +plugin_cgroups="no" plugin_conntrack="no" plugin_contextswitch="no" plugin_cpu="no" @@ -4611,6 +4737,7 @@ then plugin_battery="yes" plugin_conntrack="yes" plugin_contextswitch="yes" + plugin_cgroups="yes" plugin_cpu="yes" plugin_cpufreq="yes" plugin_disk="yes" @@ -4619,6 +4746,7 @@ then plugin_interface="yes" plugin_irq="yes" plugin_load="yes" + plugin_lvm="yes" plugin_memory="yes" plugin_nfs="yes" plugin_numa="yes" @@ -4658,6 +4786,14 @@ then plugin_tcpconns="yes" fi +# FreeBSD + +if test "x$ac_system" = "xFreeBSD" +then + plugin_zfs_arc="yes" +fi + + if test "x$with_perfstat" = "xyes" then plugin_cpu="yes" @@ -4893,6 +5029,7 @@ AC_PLUGIN([csv], [yes], [CSV output plugin]) AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics]) AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics]) AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics]) +AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting]) AC_PLUGIN([dbi], [$with_libdbi], [General database statistics]) AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics]) AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics]) @@ -4915,6 +5052,7 @@ AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics]) AC_PLUGIN([load], [$plugin_load], [System load]) AC_PLUGIN([logfile], [yes], [File logging plugin]) AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics]) +AC_PLUGIN([lvm], [$with_liblvm2app], [LVM statistics]) AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics]) AC_PLUGIN([match_empty_counter], [yes], [The empty counter match]) AC_PLUGIN([match_hashed], [yes], [The hashed match]) @@ -4926,6 +5064,7 @@ AC_PLUGIN([md], [$have_linux_raid_md_u_h], [md (Linux software RAID) de AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics]) AC_PLUGIN([memcached], [yes], [memcached statistics]) AC_PLUGIN([memory], [$plugin_memory], [Memory usage]) +AC_PLUGIN([mic], [$with_mic], [Intel Many Integrated Core stats]) AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin]) AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values]) AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics]) @@ -4964,6 +5103,7 @@ AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin]) AC_PLUGIN([table], [yes], [Parsing of tabular data]) AC_PLUGIN([tail], [yes], [Parsing of logfiles]) +AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files]) AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics]) AC_PLUGIN([target_notification], [yes], [The notification target]) AC_PLUGIN([target_replace], [yes], [The replace target]) @@ -4986,8 +5126,9 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics]) AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics]) AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin]) AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin]) -AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin]) AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin]) +AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin]) +AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics]) @@ -5159,6 +5300,7 @@ cat <