From 144955464d1d12fc955fabafb21996d399dc2d96 Mon Sep 17 00:00:00 2001 From: seb Date: Fri, 30 Nov 2012 22:09:48 +0100 Subject: [PATCH] Now install sadc in $prefix/lib64 directory on 64 bit machines even if $prefix/lib also exists. $prefix/lib no longer takes precedence on $prefix/lib64 directory if this latter exists on 64 bit machines. CPU is 64 bit if it has the lm (long mode) flag in /proc/cpuinfo. Mail from Wayne Lin 14/11/2012: Subject: why 64 bit sa1 sa2 sadc are in /usr/lib and not in /usr/lib64? We like the sysstat package, we are just curious why by default when built on 64 bit system and targeting 64 bit system, the /sa and its content sa1, sa2, sadc are being put in /usr/lib and not /usr/lib64? Should we just use sa_lib_dir to configure the redirect? --- CHANGES | 2 ++ configure | 12 ++++++------ configure.in | 13 +++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 8563401..6edf9c2 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ xxxx/xx/xx: Version 10.1.3 - Sebastien Godard (sysstat orange.fr) * [John Lau]: sadc didn't collect all its activities when it had to overwrite an old sysstat data file with some unknown activity formats. This is now fixed. + * Now install sadc in $prefix/lib64 directory on 64 bit machines + even if $prefix/lib directory also exists. * Fixed DTD document: If computer has run all day without restart, XML output file from sadf -x has no boot elements. * iostat manual page updated. diff --git a/configure b/configure index 3fa53db..f7c8b5b 100755 --- a/configure +++ b/configure @@ -4864,12 +4864,12 @@ else AuxPrefix=/usr/local fi -if test -d $AuxPrefix/lib; then - SADC_DIR=$AuxPrefix/lib -elif test -d $AuxPrefix/lib64; then - SADC_DIR=$AuxPrefix/lib64 -else - SADC_DIR=$AuxPrefix/lib +SADC_DIR=$AuxPrefix/lib +if test -d $AuxPrefix/lib64; then + grep " lm " /proc/cpuinfo >/dev/null 2>&1 + if test $? = 0; then + SADC_DIR=$AuxPrefix/lib64 + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking sadc directory" >&5 diff --git a/configure.in b/configure.in index c03d7c6..6208a37 100644 --- a/configure.in +++ b/configure.in @@ -206,12 +206,13 @@ else AuxPrefix=/usr/local fi -if test -d $AuxPrefix/lib; then - SADC_DIR=$AuxPrefix/lib -elif test -d $AuxPrefix/lib64; then - SADC_DIR=$AuxPrefix/lib64 -else - SADC_DIR=$AuxPrefix/lib +SADC_DIR=$AuxPrefix/lib +if test -d $AuxPrefix/lib64; then + # Look for lm (long mode) flag to know if CPU is 64 bit + grep " lm " /proc/cpuinfo >/dev/null 2>&1 + if test $? = 0; then + SADC_DIR=$AuxPrefix/lib64 + fi fi AC_MSG_CHECKING(sadc directory) -- 2.40.0