autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default $(libdir) and bi-arch systems


From: Paolo Bonzini
Subject: Re: default $(libdir) and bi-arch systems
Date: Wed, 10 Sep 2008 12:03:01 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

> How about changing the libdir default (currently $exec_prefix/lib) to be
> $exec_prefix/lib64 or $exec_prefix/lib/64, respectively, when
>   - not cross-compiling, and
>   - $CC $CPPFLAGS generates 64-bit mode object files, and
>   - 64-bit mode object files are installed in /usr/lib64 or /usr/lib/64,
>     not in /usr/lib ?

I think the right way would be to set the libdir default to

$exec_prefix/lib/`$CC -print-multi-os-directory $CFLAGS $CPPFLAGS`

possibly with magic to remove .. like this:

if test "$GCC" = yes; then
  ac_multilibdir=`$CC -print-multi-os-directory $CFLAGS $CPPFLAGS`
else
  ac_multilibdir=.
fi
case "$ac_multilibdir" in
  # I don't know if the first two cases can happen, but it would be a
  # bad idea to override $exec_prefix
  /* | ../../* | .) libdir=lib ;;
  ../*)             libdir=`echo $ac_multilibdir | sed 's/^...//' ` ;;
  *)                libdir=lib/$ac_multilibdir ;;
esac
libdir='${exec_prefix}/'$libdir

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]