aboutsummaryrefslogtreecommitdiff
path: root/m4/lib-prefix.m4
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-18 19:57:24 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-18 19:57:24 +0000
commit755b04521a5b37ceac529df984c9ca1e466741c6 (patch)
treef44b464dcad4c03281027aa95ca5e1dd11b2e7b9 /m4/lib-prefix.m4
parent55406e60956ebbd4e50e0907e0bcd94df5f71d55 (diff)
downloadgnunet-755b04521a5b37ceac529df984c9ca1e466741c6.tar.gz
gnunet-755b04521a5b37ceac529df984c9ca1e466741c6.zip
-gettext and libtoolize updates
Diffstat (limited to 'm4/lib-prefix.m4')
-rw-r--r--m4/lib-prefix.m491
1 files changed, 65 insertions, 26 deletions
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index a8684e17e..31f49e40a 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
1# lib-prefix.m4 serial 5 (gettext-0.15) 1# lib-prefix.m4 serial 7 (gettext-0.18)
2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -153,33 +153,72 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
153 prefix="$acl_save_prefix" 153 prefix="$acl_save_prefix"
154]) 154])
155 155
156dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 156dnl AC_LIB_PREPARE_MULTILIB creates
157dnl the basename of the libdir, either "lib" or "lib64". 157dnl - a variable acl_libdirstem, containing the basename of the libdir, either
158dnl "lib" or "lib64" or "lib/64",
159dnl - a variable acl_libdirstem2, as a secondary possible value for
160dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
161dnl "lib/amd64".
158AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 162AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
159[ 163[
160 dnl There is no formal standard regarding lib and lib64. The current 164 dnl There is no formal standard regarding lib and lib64.
161 dnl practice is that on a system supporting 32-bit and 64-bit instruction 165 dnl On glibc systems, the current practice is that on a system supporting
162 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit 166 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
163 dnl libraries go under $prefix/lib. We determine the compiler's default 167 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
164 dnl mode by looking at the compiler's library search path. If at least 168 dnl the compiler's default mode by looking at the compiler's library search
165 dnl of its elements ends in /lib64 or points to a directory whose absolute 169 dnl path. If at least one of its elements ends in /lib64 or points to a
166 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the 170 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
167 dnl default, namely "lib". 171 dnl Otherwise we use the default, namely "lib".
172 dnl On Solaris systems, the current practice is that on a system supporting
173 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
174 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
175 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
176 AC_REQUIRE([AC_CANONICAL_HOST])
168 acl_libdirstem=lib 177 acl_libdirstem=lib
169 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 178 acl_libdirstem2=
170 if test -n "$searchpath"; then 179 case "$host_os" in
171 acl_save_IFS="${IFS= }"; IFS=":" 180 solaris*)
172 for searchdir in $searchpath; do 181 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
173 if test -d "$searchdir"; then 182 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
174 case "$searchdir" in 183 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
175 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 184 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
176 *) searchdir=`cd "$searchdir" && pwd` 185 dnl symlink is missing, so we set acl_libdirstem2 too.
177 case "$searchdir" in 186 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
178 */lib64 ) acl_libdirstem=lib64 ;; 187 [AC_EGREP_CPP([sixtyfour bits], [
179 esac ;; 188#ifdef _LP64
189sixtyfour bits
190#endif
191 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
192 ])
193 if test $gl_cv_solaris_64bit = yes; then
194 acl_libdirstem=lib/64
195 case "$host_cpu" in
196 sparc*) acl_libdirstem2=lib/sparcv9 ;;
197 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
180 esac 198 esac
181 fi 199 fi
182 done 200 ;;
183 IFS="$acl_save_IFS" 201 *)
184 fi 202 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
203 if test -n "$searchpath"; then
204 acl_save_IFS="${IFS= }"; IFS=":"
205 for searchdir in $searchpath; do
206 if test -d "$searchdir"; then
207 case "$searchdir" in
208 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
209 */../ | */.. )
210 # Better ignore directories of this form. They are misleading.
211 ;;
212 *) searchdir=`cd "$searchdir" && pwd`
213 case "$searchdir" in
214 */lib64 ) acl_libdirstem=lib64 ;;
215 esac ;;
216 esac
217 fi
218 done
219 IFS="$acl_save_IFS"
220 fi
221 ;;
222 esac
223 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
185]) 224])