From 1862f170da675eb9bbf53193b93e3e9cbcb97540 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 3 Dec 2008 22:07:24 +0100 Subject: [PATCH] configure.in: Some improvements for Solaris, expecially the swap plugin. If Solaris is detected, "-D_POSIX_PTHREAD_SEMANTICS" will be added to CPPFLAGS automatically now. If sys/swap.h is not found, print a message suggesting to build a 64bit binary. (sys/swap.h cannot be included when a 32bit binary is being built, but it's most likely present under Solaris.) Enable the swap plugin only if sys/swap.h has been found (when under Solaris). --- configure.in | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 6fd080a6..8332429e 100644 --- a/configure.in +++ b/configure.in @@ -62,6 +62,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. # @@ -237,7 +242,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 @@ -247,6 +253,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 @@ -2379,10 +2390,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 -- 2.11.0