version 1.1, 2017/01/24 14:48:55
|
version 1.1.1.2, 2021/03/17 00:49:17
|
Line 1
|
Line 1
|
# lib-prefix.m4 serial 5 (gettext-0.15) | # lib-prefix.m4 serial 7 (gettext-0.18) |
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
Line 153 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
Line 153 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
prefix="$acl_save_prefix" |
prefix="$acl_save_prefix" |
]) |
]) |
|
|
dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | dnl AC_LIB_PREPARE_MULTILIB creates |
dnl the basename of the libdir, either "lib" or "lib64". | dnl - a variable acl_libdirstem, containing the basename of the libdir, either |
| dnl "lib" or "lib64" or "lib/64", |
| dnl - a variable acl_libdirstem2, as a secondary possible value for |
| dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or |
| dnl "lib/amd64". |
AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
[ |
[ |
dnl There is no formal standard regarding lib and lib64. The current | dnl There is no formal standard regarding lib and lib64. |
dnl practice is that on a system supporting 32-bit and 64-bit instruction | dnl On glibc systems, the current practice is that on a system supporting |
dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
dnl libraries go under $prefix/lib. We determine the compiler's default | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine |
dnl mode by looking at the compiler's library search path. If at least | dnl the compiler's default mode by looking at the compiler's library search |
dnl of its elements ends in /lib64 or points to a directory whose absolute | dnl path. If at least one of its elements ends in /lib64 or points to a |
dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. |
dnl default, namely "lib". | dnl Otherwise we use the default, namely "lib". |
| dnl On Solaris systems, the current practice is that on a system supporting |
| dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
| dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
| dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
| AC_REQUIRE([AC_CANONICAL_HOST]) |
acl_libdirstem=lib |
acl_libdirstem=lib |
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | acl_libdirstem2= |
if test -n "$searchpath"; then | case "$host_os" in |
acl_save_IFS="${IFS= }"; IFS=":" | solaris*) |
for searchdir in $searchpath; do | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
if test -d "$searchdir"; then | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
case "$searchdir" in | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
*) searchdir=`cd "$searchdir" && pwd` | dnl symlink is missing, so we set acl_libdirstem2 too. |
case "$searchdir" in | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], |
*/lib64 ) acl_libdirstem=lib64 ;; | [AC_EGREP_CPP([sixtyfour bits], [ |
esac ;; | #ifdef _LP64 |
| sixtyfour bits |
| #endif |
| ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) |
| ]) |
| if test $gl_cv_solaris_64bit = yes; then |
| acl_libdirstem=lib/64 |
| case "$host_cpu" in |
| sparc*) acl_libdirstem2=lib/sparcv9 ;; |
| i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; |
esac |
esac |
fi |
fi |
done | ;; |
IFS="$acl_save_IFS" | *) |
fi | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
| if test -n "$searchpath"; then |
| acl_save_IFS="${IFS= }"; IFS=":" |
| for searchdir in $searchpath; do |
| if test -d "$searchdir"; then |
| case "$searchdir" in |
| */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
| */../ | */.. ) |
| # Better ignore directories of this form. They are misleading. |
| ;; |
| *) searchdir=`cd "$searchdir" && pwd` |
| case "$searchdir" in |
| */lib64 ) acl_libdirstem=lib64 ;; |
| esac ;; |
| esac |
| fi |
| done |
| IFS="$acl_save_IFS" |
| fi |
| ;; |
| esac |
| test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" |
]) |
]) |