diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index fff8ecf7e..beb151a20 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,27 @@ if test ${prefix} = ${ac_default_prefix} || test ${prefix} = 'NONE'; then fi fi +# +# The following code for detecting lib64 was taken from Fedora's +# /usr/share/config.site with a modification to check that the +# /usr/lib64 directory actually exists. This prevents libdir from +# being set to /usr/lib64 on 64-bit systems that still use /usr/lib. +# +if test "$prefix" = /usr ||\ + { test "$prefix" = NONE && test "$ac_default_prefix" = /usr ; } +then + for i in x86_64 ppc64 s390x aarch64; do + if test $host_cpu = $i; then + if test "$libdir" = '${exec_prefix}/lib' &&\ + { test -d "${exec_prefix}/lib64" || test -d "${ac_default_prefix}/lib64" ; } ; then + libdir='${exec_prefix}/lib64' + AC_MSG_NOTICE([ Setting libdir=${libdir} ]) + fi + break + fi + done +fi + BUILD_PLATFORM=${build} BUILD_CPU=${build_cpu} BUILD_VENDOR=${build_vendor} |