From 562fb2da84e5b9e65a8279f5bae893236035a212 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 28 Jul 2006 13:12:36 +0000 Subject: Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- Update to gettext 0.15 to support new autoconf: 2006-07-28 Thorsten Kukuk * ABOUT-NLS: Upgrade to gettext-0.15. * config.rpath: Likewise. * m4/gettext.m4: Upgrade to gettext-0.15. * m4/inttypes-h.m4: New file, from gettext-0.15. * m4/inttypes-pri.m4: Upgrade to gettext-0.15. * m4/lib-link.m4: Upgrade to gettext-0.15. * m4/lib-prefix.m4: Upgrade to gettext-0.15. * m4/lock.m4: New file, from gettext-0.15. * m4/longdouble.m4: Upgrade to gettext-0.15. * m4/nls.m4: Upgrade to gettext-0.15. * m4/po.m4: Upgrade to gettext-0.15. * m4/size_max.m4: Upgrade to gettext-0.15. * m4/visibility.m4: New file, from gettext-0.15. * po/Makefile.in.in: Upgrade to gettext-0.15. --- m4/lib-link.m4 | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 85 insertions(+), 8 deletions(-) (limited to 'm4/lib-link.m4') diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index ea0b0c4e..92929193 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 6 (gettext-0.14.3) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +# lib-link.m4 serial 8 (gettext-0.15) +dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -126,6 +126,7 @@ dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. @@ -148,7 +149,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ]) else additional_includedir="$withval/include" - additional_libdir="$withval/lib" + additional_libdir="$withval/$acl_libdirstem" fi fi ]) @@ -248,7 +249,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -334,8 +335,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in - */lib | */lib/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac @@ -396,9 +397,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/lib"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -551,3 +552,79 @@ AC_DEFUN([AC_LIB_APPENDTOVAR], fi done ]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) -- cgit v1.2.3