X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=8d0744ac044b9ff39a23a466538f2e2f90268995;hb=6e3c5c491b4a9c78c92352031bb480216d88622f;hp=232d45503d8f7a8cd8622e63c4a37ebfe19a6e23;hpb=3fc5e82f4a1a10008789ea3a2ec215c6a2d6b1ff;p=collectd.git diff --git a/configure.in b/configure.in index 232d4550..8d0744ac 100644 --- a/configure.in +++ b/configure.in @@ -63,6 +63,10 @@ case $host_os in *openbsd*) ac_system="OpenBSD" ;; + *aix*) + AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel]) + ac_system="AIX" + ;; *) ac_system="unknown" esac @@ -629,6 +633,8 @@ static float foo = NAN; fi fi if test "x$nan_type" = "xnone"; then + SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -lm" AC_CACHE_CHECK([whether NAN can be defined by 0/0], [c_cv_have_nan_zero], AC_RUN_IFELSE( @@ -655,6 +661,7 @@ static float foo = NAN; [c_cv_have_nan_zero="no"] ) ) + LDFLAGS=$SAVE_LDFLAGS if test "x$c_cv_have_nan_zero" = "xyes" then nan_type="zero" @@ -1054,6 +1061,38 @@ fi m4_divert_once([HELP_WITH], [ collectd additional packages:]) +AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"]) + +if test "x$ac_system" = "xAIX" +then + with_perfstat="yes" + with_procinfo="yes" +else + with_perfstat="no (AIX only)" + with_procinfo="no (AIX only)" +fi + +if test "x$with_perfstat" = "xyes" +then + AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], []) +# AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"]) +fi +if test "x$with_perfstat" = "xyes" +then + AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)]) +fi +AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes") + +# Processes plugin under AIX. +if test "x$with_procinfo" = "xyes" +then + AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"]) +fi +if test "x$with_procinfo" = "xyes" +then + AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h]) +fi + if test "x$ac_system" = "xSolaris" then with_kstat="yes" @@ -2678,6 +2717,10 @@ AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the ], [with_python="yes"]) SAVE_PATH="$PATH" +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +SAVE_LIBS="$LIBS" + PATH="$with_python_path" if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x" @@ -2693,17 +2736,15 @@ then fi fi -PATH="$SAVE_PATH" - if test "x$with_python" = "xyes" then AC_MSG_CHECKING([for Python CPPFLAGS]) - python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>/dev/null` + python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>&1` python_config_status=$? if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x" then - AC_MSG_RESULT([failed with status $python_config_status]) + AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)]) with_python="no" else AC_MSG_RESULT([$python_include_path]) @@ -2712,13 +2753,21 @@ fi if test "x$with_python" = "xyes" then + CPPFLAGS="-I$python_include_path $CPPFLAGS" + AC_CHECK_HEADERS(Python.h, + [with_python="yes"], + [with_python="no ('Python.h' not found)"]) +fi + +if test "x$with_python" = "xyes" +then AC_MSG_CHECKING([for Python LDFLAGS]) python_library_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0)" | "$with_python_prog" 2>&1` python_config_status=$? if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x" then - AC_MSG_RESULT([failed with status $python_config_status]) + AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)]) with_python="no" else AC_MSG_RESULT([$python_library_path]) @@ -2733,7 +2782,7 @@ then if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x" then - AC_MSG_RESULT([failed with status $python_config_status]) + AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)]) with_python="no" else AC_MSG_RESULT([$python_library_flags]) @@ -2742,6 +2791,21 @@ fi if test "x$with_python" = "xyes" then + LDFLAGS="-L$python_library_path $LDFLAGS" + LIBS="$python_library_flags $LIBS" + + AC_CHECK_FUNC(PyObject_CallFunction, + [with_python="yes"], + [with_python="no (Symbol 'PyObject_CallFunction' not found)"]) +fi + +PATH="$SAVE_PATH" +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" +LIBS="$SAVE_LIBS" + +if test "x$with_python" = "xyes" +then BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path" BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path" BUILD_WITH_PYTHON_LIBS="$python_library_flags" @@ -3155,7 +3219,7 @@ AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], with_libupsclient="use_libupsclient_config" else if test -x "$withval/bin/libupsclient-config" then - with_libupsclient_config="$withval/bin/net-snmp-config" + with_libupsclient_config="$withval/bin/libupsclient-config" with_libupsclient="use_libupsclient_config" else AC_MSG_NOTICE([Not checking for libupsclient: Manually configured]) @@ -3800,6 +3864,22 @@ then plugin_disk="yes" fi +# AIX +if test "x$with_perfstat" = "xyes" +then + plugin_cpu="yes" + plugin_disk="yes" + plugin_memory="yes" + plugin_swap="yes" + plugin_interface="yes" + plugin_load="yes" +fi + +if test "x$with_procinfo" = "xyes" +then + plugin_processes="yes" +fi + # Solaris if test "x$with_kstat" = "xyes" then @@ -4274,6 +4354,7 @@ Configuration: libopenipmi . . . . . $with_libopenipmipthread liboping . . . . . . $with_liboping libpcap . . . . . . . $with_libpcap + libperfstat . . . . . $with_perfstat libperl . . . . . . . $with_libperl libpq . . . . . . . . $with_libpq libpthread . . . . . $with_libpthread