From 0a3cf365418e4ac9a8d7c1d1069740743673a09a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 11 Jun 2015 14:34:01 +0100 Subject: [PATCH] configure.ac: Ask users to build 64-bit Solaris binaries. By default, the compilers will build 32-bit binaries on Solaris. This is sub-optimal for us, for example reading /proc entries for 64-bit processes doesn't work when collectd is 32-bit. Fixes: #1077 --- configure.ac | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 461f24c1..64609651 100644 --- a/configure.ac +++ b/configure.ac @@ -113,7 +113,20 @@ if test "x$ac_system" = "xSolaris" then AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.]) AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.]) + + AC_MSG_CHECKING([whether compiler builds 64bit binaries]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ + #ifndef _LP64 + # error "Compiler not in 64bit mode." + #endif + ])], + [AC_MSG_RESULT([yes])], + [ + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([Solaris detected. Please consider building a 64-bit binary.]) + ]) fi + if test "x$ac_system" = "xAIX" then AC_DEFINE(_THREAD_SAFE_ERRNO, 1, [Define to use the thread-safe version of errno under AIX.]) @@ -394,18 +407,6 @@ AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"], #endif ]) -if test "x$have_sys_swap_h$ac_system" = "xnoSolaris" -then - hint_64="" - if test "x$GCC" = "xyes" - then - hint_64="CFLAGS='-m64'" - else - hint_64="CFLAGS='-xarch=v9'" - fi - AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).]) -fi - # For load module # For the processes plugin # For users module -- 2.11.0