summaryrefslogtreecommitdiffstats
path: root/tests/rpathlz/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rpathlz/aclocal.m4')
-rw-r--r--tests/rpathlz/aclocal.m452
1 files changed, 29 insertions, 23 deletions
diff --git a/tests/rpathlz/aclocal.m4 b/tests/rpathlz/aclocal.m4
index 0494463..2975838 100644
--- a/tests/rpathlz/aclocal.m4
+++ b/tests/rpathlz/aclocal.m4
@@ -491,7 +491,7 @@ else
$1_FALSE=
fi])
-# lib-link.m4 serial 2 (gettext-0.11.2)
+# lib-link.m4 serial 3 (gettext-0.11.3)
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
@@ -609,6 +609,10 @@ AC_DEFUN([AC_LIB_RPATH],
hardcode_minus_L="$acl_cv_hardcode_minus_L"
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
])
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
@@ -738,7 +742,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 "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -929,29 +933,31 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
;;
-R*)
dir=`echo "X$dep" | sed -e 's/^X-R//'`
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
fi
;;
-l*)