On Mon, Jun 23, 2008 at 10:49:46AM -0700, Bernard Li wrote:
>
> On Sat, Jun 21, 2008 at 12:11 PM, Carlo Marcelo Arenas Belon
> <[EMAIL PROTECTED]> wrote:
>
> > Jarod suggestion above, shouldn't be difficult to implement, and was almost
> > what the current code in configure did except for :
> >
> > * wasn't done for linux only
this just needs the test to move some lines up into the linux case section.
> > * didn't respect the user provided libdir.
this can't be done reliably if you still want to override the value later, and
was bogus since it was introduced here :
861 bernardli dnl Python module config files need to know where to look
for libraries (/usr/lib vs /usr/lib64)
861 bernardli AC_SUBST_FILE(libdir)
871 bernardli if test "x$prefix" = xNONE; then
871 bernardli prefix="$ac_default_prefix"
871 bernardli fi
871 bernardli
861 bernardli if test "x$host_cpu" = "xx86_64"; then
871 bernardli libdir="$prefix/lib64"
861 bernardli else
871 bernardli libdir="$prefix/lib"
861 bernardli fi
as Jarod explained the recommended solution instead is to let a packager that
needs it (because they are using a biarch distribution) to override this value
as needed using libdir and as can be seen by the clear instructions on how to
setup libdir while doing packages from OpenSuSE (for example) :
http://en.opensuse.org/SUSE_Package_Conventions/Filesystem_Structure
> Please go ahead and implement this.
attached an implementation which fixes the 2 issues raised before and also
does some extra cleanup, but that will need more testing in different Linux
distributions and with different autoconf versions before it can be
backported.
as explained before, I don't think is a good solution though as it is just
extending the original hack (which wasn't really needed either)
> >> I will check this into trunk and submit a backport proposal for the 3.1
> >> branch.
> >
> > what is "this"? and does it fix the 2 issues raised above?
>
> "This" is the patch that I have included in this thread. In case you
> don't have it, it's here:
>
> http://www.mail-archive.com/[email protected]/msg04286.html
"That" is part of the problem, because there were 2 patches in this thread.
In case you forgot it, the first one (and the one that looked almost complete,
except that it needed to be moved around was) :
http://www.mail-archive.com/[email protected]/msg04255.html
in any case, since now there are 3 patches and to avoid confusion, I'd
committed the patch to trunk with r1452 so it has also a more accurate name to
use for comments (if you'd rather remove it from the replies for whatever
reason)
Carlo
Index: configure.in
===================================================================
--- configure.in (revision 1451)
+++ configure.in (working copy)
@@ -493,6 +493,10 @@
dnl Some operating systems require additional flags in order to get all
dnl the definitions that we're looking for in some system headers.
+if test x"$prefix" = xNONE; then
+ prefix="$ac_default_prefix"
+fi
+
dnl default VARSTATEDIR to /var/lib since that's the traditional location.
dnl
varstatedir="/var/lib"
@@ -500,14 +504,22 @@
EXPORT_SYMBOLS="-export-dynamic"
case "$host" in
*linux*)
- CFLAGS="$CFLAGS -D_REENTRANT"
- AC_DEFINE(LINUX, 1, LINUX)
+ CFLAGS="$CFLAGS -D_REENTRANT"
+ AC_DEFINE(LINUX, 1, LINUX)
dnl
dnl For fsusage.c - disk usage.
dnl
- AC_DEFINE(STAT_STATVFS, 1, STAT_STATVFS)
- AC_DEFINE(SUPPORT_GEXEC, 1, SUPPORT_GEXEC)
- ;;
+ AC_DEFINE(STAT_STATVFS, 1, STAT_STATVFS)
+ AC_DEFINE(SUPPORT_GEXEC, 1, SUPPORT_GEXEC)
+ if test x"$libdir" = x"\${exec_prefix}/lib"; then
+ if test x"$host_cpu" = xx86_64 || \
+ test x"$host_cpu" = xpowerpc64; then
+ libdir="$prefix/lib64"
+ else
+ libdir="$prefix/lib"
+ fi
+ fi
+ ;;
*ia64-*hpux*) CFLAGS="$CFLAGS -D_PSTAT64 -D_HPUX_SOURCE"
LIBS="-lpthread $LIBS"
EXPORT_SYMBOLS="-Wl,-E"
@@ -578,16 +590,7 @@
dnl Python module config files need to know where to look for libraries
(/usr/lib vs /usr/lib64)
AC_SUBST_FILE(libdir)
-if test "x$prefix" = xNONE; then
- prefix="$ac_default_prefix"
-fi
-if test "x$host_cpu" = "xx86_64"; then
- libdir="$prefix/lib64"
-else
- libdir="$prefix/lib"
-fi
-
AC_OUTPUT(Makefile
ganglia-config
tests/Makefile
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers