X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=configure.in;h=77f0e49c69adb189bbecae2e6ef40d0edc56a52d;hb=18fdfeca8b587baf819ded68f68a8fa4b196d035;hp=2cb067b7c6ddabd679022956c9e084455eb6f231;hpb=d9256059b2a356625feabe5bb44539eef0660d5a;p=collectd.git diff --git a/configure.in b/configure.in index 2cb067b7..77f0e49c 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(collectd, 4.0.0-rc5) +AC_INIT(collectd, 4.0.2) AC_CONFIG_SRCDIR(src/collectd.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) @@ -7,6 +7,8 @@ AC_LANG(C) AC_PREFIX_DEFAULT("/opt/collectd") +AC_SYS_LARGEFILE + # # Checks for programs. # @@ -208,6 +210,7 @@ AC_CHECK_HEADERS(mach/kern_return.h) # For hddtemp module AC_CHECK_HEADERS(linux/major.h) +AC_CHECK_HEADERS(libgen.h) # For the apple_sensors module AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h) @@ -280,7 +283,7 @@ AC_CHECK_HEADERS(linux/netdevice.h, [], [], AC_CHECK_HEADERS(curl/curl.h) # For quota module -AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h) +AC_CHECK_HEADERS(pwd.h sys/ucred.h) AC_CHECK_HEADERS(ctype.h) AC_CHECK_HEADERS(limits.h) AC_CHECK_HEADERS(sys/quota.h) @@ -410,7 +413,17 @@ AC_CHECK_FUNCS(getgrgid getpwuid) AC_CHECK_FUNCS(getifaddrs) # Check for NAN -nan_type="none" +AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])], +[ + if test "x$withval" = "xno"; then + nan_type="none" + else if test "x$withval" = "xyes"; then + nan_type="zero" + else + nan_type="$withval" + fi; fi +], +[nan_type="none"]) if test "x$nan_type" = "xnone"; then AC_CACHE_CHECK([whether NAN is defined by default], [have_nan_default], @@ -433,9 +446,7 @@ static float foo = NAN; ) if test "x$have_nan_default" = "xyes" then - nan_type="default" - AC_DEFINE(NAN_STATIC_DEFAULT, 1, - [Define if NAN is defined by default and can initialize static variables.]) + nan_type="default" fi fi if test "x$nan_type" = "xnone"; then @@ -461,9 +472,7 @@ static float foo = NAN; ) if test "x$have_nan_isoc" = "xyes" then - nan_type="isoc99" - AC_DEFINE(NAN_STATIC_ISOC, 1, - [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) + nan_type="isoc99" fi fi if test "x$nan_type" = "xnone"; then @@ -495,14 +504,22 @@ static float foo = NAN; ) if test "x$have_nan_zero" = "xyes" then - nan_type="zero" - AC_DEFINE(NAN_ZERO_ZERO, 1, - [Define if NAN can be defined as (0.0 / 0.0)]) + nan_type="zero" fi fi -if test "x$nan_type" = "xnone"; then + +if test "x$nan_type" = "xdefault"; then + AC_DEFINE(NAN_STATIC_DEFAULT, 1, + [Define if NAN is defined by default and can initialize static variables.]) +else if test "x$nan_type" = "xisoc99"; then + AC_DEFINE(NAN_STATIC_ISOC, 1, + [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) +else if test "x$nan_type" = "xzero"; then + AC_DEFINE(NAN_ZERO_ZERO, 1, + [Define if NAN can be defined as (0.0 / 0.0)]) +else AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.]) -fi +fi; fi; fi # For mount interface #AC_CHECK_FUNCS(getfsent getvfsent) @@ -984,6 +1001,53 @@ AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql], [Wether or not to use mysql library]) AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes") +with_own_liboconfig="no" +liboconfig_LDFLAGS="$LDFLAGS" +liboconfig_CPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + if test -d "$withval/lib" + then + liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib" + fi + if test -d "$withval/include" + then + liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include" + fi + fi + if test "x$withval" = "xno" + then + AC_MSG_ERROR("liboconfig is required") + fi +], +[ + with_liboconfig="yes" +]) + +save_LDFLAGS="$LDFLAGS" +save_CPPFLAGS="$CPPFLAGS" +LDFLAGS="$liboconfig_LDFLAGS" +CPPFLAGS="$liboconfig_CPPFLAGS" +AC_CHECK_LIB(oconfig, oconfig_parse_fh, +[ + with_liboconfig="yes" + with_own_liboconfig="no" +], +[ + with_liboconfig="yes" + with_own_liboconfig="yes" + LDFLAGS="$save_LDFLAGS" + CPPFLAGS="$save_CPPFLAGS" +]) + +AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes") +if test "x$with_own_liboconfig" = "xyes" +then + with_liboconfig="yes (shipped version)" +fi + #with_liboping="yes" with_own_liboping="no" liboping_LDFLAGS="$LDFLAGS" @@ -1326,6 +1390,7 @@ Configuration: libiptc . . . . . . $with_libiptc libkstat . . . . . $with_kstat libmysql . . . . . $with_libmysql + liboconfig . . . . $with_liboconfig liboping . . . . . $with_liboping libpcap . . . . . . $with_libpcap libperl . . . . . . $with_libperl