summaryrefslogtreecommitdiffstats
path: root/m4/lib-link.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/lib-link.m4')
-rw-r--r--m4/lib-link.m440
1 files changed, 20 insertions, 20 deletions
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 6b94251..244a779 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,13 +1,13 @@
1# lib-link.m4 serial 3 (gettext-0.11.3) 1# lib-link.m4 serial 7 (gettext-0.15)
2dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
9AC_PREREQ(2.50)
10
11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12dnl the libraries corresponding to explicit and implicit dependencies. 12dnl the libraries corresponding to explicit and implicit dependencies.
13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
@@ -92,10 +92,11 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
92 92
93dnl Determine the platform dependent parameters needed to use rpath: 93dnl Determine the platform dependent parameters needed to use rpath:
94dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 94dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
95dnl hardcode_direct, hardcode_minus_L, 95dnl hardcode_direct, hardcode_minus_L.
96dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
97AC_DEFUN([AC_LIB_RPATH], 96AC_DEFUN([AC_LIB_RPATH],
98[ 97[
98 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
99 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
99 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 100 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
100 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 101 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
101 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 102 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
@@ -114,8 +115,6 @@ AC_DEFUN([AC_LIB_RPATH],
114 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 115 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
115 hardcode_direct="$acl_cv_hardcode_direct" 116 hardcode_direct="$acl_cv_hardcode_direct"
116 hardcode_minus_L="$acl_cv_hardcode_minus_L" 117 hardcode_minus_L="$acl_cv_hardcode_minus_L"
117 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
118 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
119 dnl Determine whether the user wants rpath handling at all. 118 dnl Determine whether the user wants rpath handling at all.
120 AC_ARG_ENABLE(rpath, 119 AC_ARG_ENABLE(rpath,
121 [ --disable-rpath do not hardcode runtime library paths], 120 [ --disable-rpath do not hardcode runtime library paths],
@@ -127,6 +126,7 @@ dnl the libraries corresponding to explicit and implicit dependencies.
127dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 126dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
128AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 127AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
129[ 128[
129 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
130 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 130 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
131 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 131 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
132 dnl By default, look in $includedir and $libdir. 132 dnl By default, look in $includedir and $libdir.
@@ -135,7 +135,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
135 eval additional_includedir=\"$includedir\" 135 eval additional_includedir=\"$includedir\"
136 eval additional_libdir=\"$libdir\" 136 eval additional_libdir=\"$libdir\"
137 ]) 137 ])
138 AC_ARG_WITH([lib$1-prefix], 138 AC_LIB_ARG_WITH([lib$1-prefix],
139[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 139[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
140 --without-lib$1-prefix don't search for lib$1 in includedir and libdir], 140 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
141[ 141[
@@ -149,7 +149,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
149 ]) 149 ])
150 else 150 else
151 additional_includedir="$withval/include" 151 additional_includedir="$withval/include"
152 additional_libdir="$withval/lib" 152 additional_libdir="$withval/$acl_libdirstem"
153 fi 153 fi
154 fi 154 fi
155]) 155])
@@ -249,7 +249,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
249 dnl Linking with a shared library. We attempt to hardcode its 249 dnl Linking with a shared library. We attempt to hardcode its
250 dnl directory into the executable's runpath, unless it's the 250 dnl directory into the executable's runpath, unless it's the
251 dnl standard /usr/lib. 251 dnl standard /usr/lib.
252 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 252 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
253 dnl No hardcoding is needed. 253 dnl No hardcoding is needed.
254 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 254 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
255 else 255 else
@@ -335,8 +335,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
335 dnl Assume the include files are nearby. 335 dnl Assume the include files are nearby.
336 additional_includedir= 336 additional_includedir=
337 case "$found_dir" in 337 case "$found_dir" in
338 */lib | */lib/) 338 */$acl_libdirstem | */$acl_libdirstem/)
339 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 339 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
340 additional_includedir="$basedir/include" 340 additional_includedir="$basedir/include"
341 ;; 341 ;;
342 esac 342 esac
@@ -353,7 +353,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
353 if test "X$additional_includedir" = "X/usr/local/include"; then 353 if test "X$additional_includedir" = "X/usr/local/include"; then
354 if test -n "$GCC"; then 354 if test -n "$GCC"; then
355 case $host_os in 355 case $host_os in
356 linux*) haveit=yes;; 356 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
357 esac 357 esac
358 fi 358 fi
359 fi 359 fi
@@ -397,12 +397,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
397 dnl 3. if it's already present in $LDFLAGS or the already 397 dnl 3. if it's already present in $LDFLAGS or the already
398 dnl constructed $LIBNAME, 398 dnl constructed $LIBNAME,
399 dnl 4. if it doesn't exist as a directory. 399 dnl 4. if it doesn't exist as a directory.
400 if test "X$additional_libdir" != "X/usr/lib"; then 400 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
401 haveit= 401 haveit=
402 if test "X$additional_libdir" = "X/usr/local/lib"; then 402 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
403 if test -n "$GCC"; then 403 if test -n "$GCC"; then
404 case $host_os in 404 case $host_os in
405 linux*) haveit=yes;; 405 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
406 esac 406 esac
407 fi 407 fi
408 fi 408 fi