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 <wlin@mvista.com> 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?
* [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.
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
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)