| lib-prefix.m4 | lib-prefix.m4 | |||
|---|---|---|---|---|
| # 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-2010 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. | |||
| dnl From Bruno Haible. | dnl From Bruno Haible. | |||
| dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | |||
| dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | |||
| dnl require excessive bracketing. | dnl require excessive bracketing. | |||
| ifdef([AC_HELP_STRING], | ifdef([AC_HELP_STRING], | |||
| skipping to change at line 156 | skipping to change at line 156 | |||
| [ | [ | |||
| acl_save_prefix="$prefix" | acl_save_prefix="$prefix" | |||
| prefix="$acl_final_prefix" | prefix="$acl_final_prefix" | |||
| acl_save_exec_prefix="$exec_prefix" | acl_save_exec_prefix="$exec_prefix" | |||
| exec_prefix="$acl_final_exec_prefix" | exec_prefix="$acl_final_exec_prefix" | |||
| $1 | $1 | |||
| exec_prefix="$acl_save_exec_prefix" | exec_prefix="$acl_save_exec_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, eit | |||
| her | ||||
| 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 sear | |||
| dnl of its elements ends in /lib64 or points to a directory whose absolut | ch | |||
| e | 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 | |||
| dnl default, namely "lib". | ABI. | |||
| dnl Otherwise we use the default, namely "lib". | ||||
| dnl On Solaris systems, the current practice is that on a system supporti | ||||
| ng | ||||
| 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, | acl_libdirstem2= | |||
| ^libraries: ,,p' | sed -e 's,^=,,'` | case "$host_os" in | |||
| if test -n "$searchpath"; then | solaris*) | |||
| acl_save_IFS="${IFS= }"; IFS=":" | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Dev | |||
| for searchdir in $searchpath; do | eloper'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 | |||
| */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | the 64 symbolic link." | |||
| *) searchdir=`cd "$searchdir" && pwd` | dnl But we want to recognize the sparcv9 or amd64 subdirectory also i | |||
| case "$searchdir" in | f the | |||
| */lib64 ) acl_libdirstem=lib64 ;; | dnl symlink is missing, so we set acl_libdirstem2 too. | |||
| esac ;; | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | |||
| [AC_EGREP_CPP([sixtyfour bits], [ | ||||
| #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 misleadi | ||||
| ng. | ||||
| ;; | ||||
| *) 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" | ||||
| ]) | ]) | |||
| End of changes. 5 change blocks. | ||||
| 28 lines changed or deleted | 74 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||