From 15e2832f8f3efffa195b1185b4fdc2ddb64bde79 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Mon, 3 Feb 2014 01:08:00 +0100 Subject: [PATCH] auto{conf,make} kernel-related macros consistency - add AC_DEFINEs for 2 kernels which were missing them. - declare AM_CONDITIONALs for all kernels we know about + move declaration at a more sensible location in the file. --- configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index f1c7b8ab..d3687b38 100644 --- a/configure.ac +++ b/configure.ac @@ -70,9 +70,11 @@ case $host_os in ac_system="Solaris" ;; *darwin*) + AC_DEFINE([KERNEL_DARWIN], 1, [True if program is to be compiled for a Darwin kernel]) ac_system="Darwin" ;; *openbsd*) + AC_DEFINE([KERNEL_OPENBSD], 1, [True if program is to be compiled for an OpenBSD kernel]) ac_system="OpenBSD" ;; *aix*) @@ -88,6 +90,13 @@ case $host_os in esac AC_MSG_RESULT([$ac_system]) +AM_CONDITIONAL([BUILD_LINUX],[test "x$x$ac_system" = "xLinux"]) +AM_CONDITIONAL([BUILD_SOLARIS],[test "x$x$ac_system" = "xSolaris"]) +AM_CONDITIONAL([BUILD_DARWIN],[test "x$x$ac_system" = "xDarwin"]) +AM_CONDITIONAL([BUILD_OPENBSD],[test "x$x$ac_system" = "xOpenBSD"]) +AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"]) +AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"]) + if test "x$ac_system" = "xLinux" then AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources]) @@ -1378,10 +1387,6 @@ 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" then with_perfstat="yes" -- 2.11.0