Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/lib-link.m4 @ 11386:23f58a4ffca0
Followup to 2008-12-22: Remove unnecessary AC_FUNC_MBRTOWC invocations.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 10 Mar 2009 01:19:40 +0100 |
parents | f6cba5a556ce |
children | 0ef1bc4d4c97 |
rev | line source |
---|---|
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10983
diff
changeset
|
1 # lib-link.m4 serial 18 (gettext-0.18) |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10983
diff
changeset
|
2 dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. |
5585
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4536
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4536
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4536
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 dnl From Bruno Haible. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10983
diff
changeset
|
9 AC_PREREQ([2.54]) |
5700
eea92bfb3f7d
Upgrade to GNU gettext 0.14.3.
Bruno Haible <bruno@clisp.org>
parents:
5659
diff
changeset
|
10 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 dnl the libraries corresponding to explicit and implicit dependencies. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 dnl augments the CPPFLAGS variable. |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
15 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname |
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
16 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 AC_DEFUN([AC_LIB_LINKFLAGS], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 AC_REQUIRE([AC_LIB_RPATH]) |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
21 pushdef([Name],[translit([$1],[./-], [___])]) |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
22 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
29 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
34 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 AC_SUBST([LIB]NAME) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 AC_SUBST([LTLIB]NAME) |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
38 AC_SUBST([LIB]NAME[_PREFIX]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 dnl results of this search when this library appears as a dependency. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 HAVE_LIB[]NAME=yes |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
42 popdef([NAME]) |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
43 popdef([Name]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 dnl searches for libname and the libraries corresponding to explicit and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 dnl implicit dependencies, together with the specified include files and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 dnl the ability to compile and link the specified testcode. If found, it |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
54 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname |
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
55 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 AC_REQUIRE([AC_LIB_RPATH]) |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
60 pushdef([Name],[translit([$1],[./-], [___])]) |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
61 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
62 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
65 dnl accordingly. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
66 AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
67 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
68 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
69 dnl because if the user has installed lib[]Name and not disabled its use |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
70 dnl via --without-lib[]Name-prefix, he wants to use it. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
71 ac_save_CPPFLAGS="$CPPFLAGS" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
72 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
73 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
74 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 ac_save_LIBS="$LIBS" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 LIBS="$LIBS $LIB[]NAME" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
77 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
78 LIBS="$ac_save_LIBS" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
79 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
80 if test "$ac_cv_lib[]Name" = yes; then |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
81 HAVE_LIB[]NAME=yes |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
82 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
83 AC_MSG_CHECKING([how to link with lib[]$1]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
84 AC_MSG_RESULT([$LIB[]NAME]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
85 else |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
86 HAVE_LIB[]NAME=no |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
87 dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
88 dnl $INC[]NAME either. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
89 CPPFLAGS="$ac_save_CPPFLAGS" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 LIB[]NAME= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 LTLIB[]NAME= |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
92 LIB[]NAME[]_PREFIX= |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 AC_SUBST([HAVE_LIB]NAME) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 AC_SUBST([LIB]NAME) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 AC_SUBST([LTLIB]NAME) |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
97 AC_SUBST([LIB]NAME[_PREFIX]) |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
98 popdef([NAME]) |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
99 popdef([Name]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
100 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
101 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
102 dnl Determine the platform dependent parameters needed to use rpath: |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
103 dnl acl_libext, |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
104 dnl acl_shlibext, |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
105 dnl acl_hardcode_libdir_flag_spec, |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
106 dnl acl_hardcode_libdir_separator, |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
107 dnl acl_hardcode_direct, |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
108 dnl acl_hardcode_minus_L. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
109 AC_DEFUN([AC_LIB_RPATH], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
110 [ |
5700
eea92bfb3f7d
Upgrade to GNU gettext 0.14.3.
Bruno Haible <bruno@clisp.org>
parents:
5659
diff
changeset
|
111 dnl Tell automake >= 1.10 to complain if config.rpath is missing. |
eea92bfb3f7d
Upgrade to GNU gettext 0.14.3.
Bruno Haible <bruno@clisp.org>
parents:
5659
diff
changeset
|
112 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
113 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
114 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
115 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
116 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10983
diff
changeset
|
117 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
118 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
119 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
120 . ./conftest.sh |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
121 rm -f ./conftest.sh |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
122 acl_cv_rpath=done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
123 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
124 wl="$acl_cv_wl" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
125 acl_libext="$acl_cv_libext" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
126 acl_shlibext="$acl_cv_shlibext" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
127 acl_libname_spec="$acl_cv_libname_spec" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
128 acl_library_names_spec="$acl_cv_library_names_spec" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
129 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
130 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
131 acl_hardcode_direct="$acl_cv_hardcode_direct" |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
132 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
133 dnl Determine whether the user wants rpath handling at all. |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10983
diff
changeset
|
134 AC_ARG_ENABLE([rpath], |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
135 [ --disable-rpath do not hardcode runtime library paths], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
136 :, enable_rpath=yes) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
137 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
138 |
9787
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
139 dnl AC_LIB_FROMPACKAGE(name, package) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
140 dnl declares that libname comes from the given package. The configure file |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
141 dnl will then not have a --with-libname-prefix option but a |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
142 dnl --with-package-prefix option. Several libraries can come from the same |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
143 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
144 dnl macro call that searches for libname. |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
145 AC_DEFUN([AC_LIB_FROMPACKAGE], |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
146 [ |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
147 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
148 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
149 define([acl_frompackage_]NAME, [$2]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
150 popdef([NAME]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
151 pushdef([PACK],[$2]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
152 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
153 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
154 define([acl_libsinpackage_]PACKUP, |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
155 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
156 popdef([PACKUP]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
157 popdef([PACK]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
158 ]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
159 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
160 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
161 dnl the libraries corresponding to explicit and implicit dependencies. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
162 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
163 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found |
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
164 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
165 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
166 [ |
6200
dae7c9179bef
Support for lib vs. lib64 distinction on biarch platforms.
Bruno Haible <bruno@clisp.org>
parents:
5700
diff
changeset
|
167 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
168 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
169 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
9787
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
170 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
171 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
172 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
173 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) |
7649
eed291337d97
Support for library names with dots.
Bruno Haible <bruno@clisp.org>
parents:
7576
diff
changeset
|
174 dnl Autoconf >= 2.61 supports dots in --with options. |
9787
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
175 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
176 dnl By default, look in $includedir and $libdir. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
177 use_additional=yes |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
178 AC_LIB_WITH_FINAL_PREFIX([ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
179 eval additional_includedir=\"$includedir\" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
180 eval additional_libdir=\"$libdir\" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
181 ]) |
9787
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
182 AC_ARG_WITH(P_A_C_K[-prefix], |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
183 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
184 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
185 [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
186 if test "X$withval" = "Xno"; then |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
187 use_additional=no |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
188 else |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
189 if test "X$withval" = "X"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
190 AC_LIB_WITH_FINAL_PREFIX([ |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
191 eval additional_includedir=\"$includedir\" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
192 eval additional_libdir=\"$libdir\" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
193 ]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
194 else |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
195 additional_includedir="$withval/include" |
6200
dae7c9179bef
Support for lib vs. lib64 distinction on biarch platforms.
Bruno Haible <bruno@clisp.org>
parents:
5700
diff
changeset
|
196 additional_libdir="$withval/$acl_libdirstem" |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
197 if test "$acl_libdirstem2" != "$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
198 && ! test -d "$withval/$acl_libdirstem"; then |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
199 additional_libdir="$withval/$acl_libdirstem2" |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
200 fi |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
201 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
202 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
203 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
204 dnl Search the library and its dependencies in $additional_libdir and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
205 dnl $LDFLAGS. Using breadth-first-seach. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
206 LIB[]NAME= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
207 LTLIB[]NAME= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
208 INC[]NAME= |
7650
528289ff3071
More support for GNOME libraries.
Bruno Haible <bruno@clisp.org>
parents:
7649
diff
changeset
|
209 LIB[]NAME[]_PREFIX= |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
210 rpathdirs= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
211 ltrpathdirs= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
212 names_already_handled= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
213 names_next_round='$1 $2' |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
214 while test -n "$names_next_round"; do |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
215 names_this_round="$names_next_round" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
216 names_next_round= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
217 for name in $names_this_round; do |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
218 already_handled= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
219 for n in $names_already_handled; do |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
220 if test "$n" = "$name"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
221 already_handled=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
222 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
223 fi |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
224 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
225 if test -z "$already_handled"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
226 names_already_handled="$names_already_handled $name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
227 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
228 dnl or AC_LIB_HAVE_LINKFLAGS call. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
229 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
230 eval value=\"\$HAVE_LIB$uppername\" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
231 if test -n "$value"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
232 if test "$value" = yes; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
233 eval value=\"\$LIB$uppername\" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
234 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
235 eval value=\"\$LTLIB$uppername\" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
236 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
237 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
238 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
239 dnl that this library doesn't exist. So just drop it. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
240 : |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
241 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
242 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
243 dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
244 dnl and the already constructed $LIBNAME/$LTLIBNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
245 found_dir= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
246 found_la= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
247 found_so= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
248 found_a= |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
249 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
250 if test -n "$acl_shlibext"; then |
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
251 shrext=".$acl_shlibext" # typically: shrext=.so |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
252 else |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
253 shrext= |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
254 fi |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
255 if test $use_additional = yes; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
256 dir="$additional_libdir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
257 dnl The same code as in the loop below: |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
258 dnl First look for a shared library. |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
259 if test -n "$acl_shlibext"; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
260 if test -f "$dir/$libname$shrext"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
261 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
262 found_so="$dir/$libname$shrext" |
7249 | 263 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
264 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
265 ver=`(cd "$dir" && \ |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
266 for f in "$libname$shrext".*; do echo "$f"; done \ |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
267 | sed -e "s,^$libname$shrext\\\\.,," \ |
7787
df203603907e
Simplify the sorting command from the last patch.
Bruno Haible <bruno@clisp.org>
parents:
7770
diff
changeset
|
268 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
269 | sed 1q ) 2>/dev/null` |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
270 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
271 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
272 found_so="$dir/$libname$shrext.$ver" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
273 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
274 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
275 eval library_names=\"$acl_library_names_spec\" |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
276 for f in $library_names; do |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
277 if test -f "$dir/$f"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
278 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
279 found_so="$dir/$f" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
280 break |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
281 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
282 done |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
283 fi |
7249 | 284 fi |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
285 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
286 dnl Then look for a static library. |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
287 if test "X$found_dir" = "X"; then |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
288 if test -f "$dir/$libname.$acl_libext"; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
289 found_dir="$dir" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
290 found_a="$dir/$libname.$acl_libext" |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
291 fi |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
292 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
293 if test "X$found_dir" != "X"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
294 if test -f "$dir/$libname.la"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
295 found_la="$dir/$libname.la" |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
296 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
297 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
298 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
299 if test "X$found_dir" = "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
300 for x in $LDFLAGS $LTLIB[]NAME; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
301 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
302 case "$x" in |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
303 -L*) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
304 dir=`echo "X$x" | sed -e 's/^X-L//'` |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
305 dnl First look for a shared library. |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
306 if test -n "$acl_shlibext"; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
307 if test -f "$dir/$libname$shrext"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
308 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
309 found_so="$dir/$libname$shrext" |
7249 | 310 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
311 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
312 ver=`(cd "$dir" && \ |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
313 for f in "$libname$shrext".*; do echo "$f"; done \ |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
314 | sed -e "s,^$libname$shrext\\\\.,," \ |
7787
df203603907e
Simplify the sorting command from the last patch.
Bruno Haible <bruno@clisp.org>
parents:
7770
diff
changeset
|
315 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
316 | sed 1q ) 2>/dev/null` |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
317 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
318 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
319 found_so="$dir/$libname$shrext.$ver" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
320 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
321 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
322 eval library_names=\"$acl_library_names_spec\" |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
323 for f in $library_names; do |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
324 if test -f "$dir/$f"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
325 found_dir="$dir" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
326 found_so="$dir/$f" |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
327 break |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
328 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
329 done |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
330 fi |
7249 | 331 fi |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
332 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
333 dnl Then look for a static library. |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
334 if test "X$found_dir" = "X"; then |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
335 if test -f "$dir/$libname.$acl_libext"; then |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
336 found_dir="$dir" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
337 found_a="$dir/$libname.$acl_libext" |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
338 fi |
7770
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
339 fi |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
340 if test "X$found_dir" != "X"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
341 if test -f "$dir/$libname.la"; then |
15d36d1dc32d
Improve support for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents:
7705
diff
changeset
|
342 found_la="$dir/$libname.la" |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
343 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
344 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
345 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
346 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
347 if test "X$found_dir" != "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
348 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
349 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
350 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
351 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
352 if test "X$found_dir" != "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
353 dnl Found the library. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
354 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
355 if test "X$found_so" != "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
356 dnl Linking with a shared library. We attempt to hardcode its |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
357 dnl directory into the executable's runpath, unless it's the |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
358 dnl standard /usr/lib. |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
359 if test "$enable_rpath" = no \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
360 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
361 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
362 dnl No hardcoding is needed. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
363 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
364 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
365 dnl Use an explicit option to hardcode DIR into the resulting |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
366 dnl binary. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
367 dnl Potentially add DIR to ltrpathdirs. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
368 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
369 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
370 for x in $ltrpathdirs; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
371 if test "X$x" = "X$found_dir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
372 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
373 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
374 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
375 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
376 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
377 ltrpathdirs="$ltrpathdirs $found_dir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
378 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
379 dnl The hardcoding into $LIBNAME is system dependent. |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
380 if test "$acl_hardcode_direct" = yes; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
381 dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
382 dnl resulting binary. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
383 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
384 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
385 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
386 dnl Use an explicit option to hardcode DIR into the resulting |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
387 dnl binary. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
388 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
389 dnl Potentially add DIR to rpathdirs. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
390 dnl The rpathdirs will be appended to $LIBNAME at the end. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
391 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
392 for x in $rpathdirs; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
393 if test "X$x" = "X$found_dir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
394 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
395 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
396 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
397 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
398 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
399 rpathdirs="$rpathdirs $found_dir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
400 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
401 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
402 dnl Rely on "-L$found_dir". |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
403 dnl But don't add it if it's already contained in the LDFLAGS |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
404 dnl or the already constructed $LIBNAME |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
405 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
406 for x in $LDFLAGS $LIB[]NAME; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
407 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
408 if test "X$x" = "X-L$found_dir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
409 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
410 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
411 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
412 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
413 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
414 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
415 fi |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
416 if test "$acl_hardcode_minus_L" != no; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
417 dnl FIXME: Not sure whether we should use |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
418 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
419 dnl here. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
420 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
421 else |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
422 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
423 dnl here, because this doesn't fit in flags passed to the |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
424 dnl compiler. So give up. No hardcoding. This affects only |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
425 dnl very old systems. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
426 dnl FIXME: Not sure whether we should use |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
427 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
428 dnl here. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
429 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
430 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
431 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
432 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
433 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
434 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
435 if test "X$found_a" != "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
436 dnl Linking with a static library. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
437 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
438 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
439 dnl We shouldn't come here, but anyway it's good to have a |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
440 dnl fallback. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
441 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
442 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
443 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
444 dnl Assume the include files are nearby. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
445 additional_includedir= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
446 case "$found_dir" in |
6200
dae7c9179bef
Support for lib vs. lib64 distinction on biarch platforms.
Bruno Haible <bruno@clisp.org>
parents:
5700
diff
changeset
|
447 */$acl_libdirstem | */$acl_libdirstem/) |
dae7c9179bef
Support for lib vs. lib64 distinction on biarch platforms.
Bruno Haible <bruno@clisp.org>
parents:
5700
diff
changeset
|
448 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
10983
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
449 if test "$name" = '$1'; then |
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
450 LIB[]NAME[]_PREFIX="$basedir" |
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
451 fi |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
452 additional_includedir="$basedir/include" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
453 ;; |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
454 */$acl_libdirstem2 | */$acl_libdirstem2/) |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
455 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` |
10983
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
456 if test "$name" = '$1'; then |
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
457 LIB[]NAME[]_PREFIX="$basedir" |
7680401c433e
Fix a bug in the determination of LIB${NAME}_PREFIX.
Bruno Haible <bruno@clisp.org>
parents:
10386
diff
changeset
|
458 fi |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
459 additional_includedir="$basedir/include" |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
460 ;; |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
461 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
462 if test "X$additional_includedir" != "X"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
463 dnl Potentially add $additional_includedir to $INCNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
464 dnl But don't add it |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
465 dnl 1. if it's the standard /usr/include, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
466 dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
467 dnl 3. if it's already present in $CPPFLAGS or the already |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
468 dnl constructed $INCNAME, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
469 dnl 4. if it doesn't exist as a directory. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
470 if test "X$additional_includedir" != "X/usr/include"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
471 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
472 if test "X$additional_includedir" = "X/usr/local/include"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
473 if test -n "$GCC"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
474 case $host_os in |
5659
be44f23226e0
Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents:
5585
diff
changeset
|
475 linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
476 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
477 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
478 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
479 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
480 for x in $CPPFLAGS $INC[]NAME; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
481 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
482 if test "X$x" = "X-I$additional_includedir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
483 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
484 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
485 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
486 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
487 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
488 if test -d "$additional_includedir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
489 dnl Really add $additional_includedir to $INCNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
490 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
491 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
492 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
493 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
494 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
495 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
496 dnl Look for dependencies. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
497 if test -n "$found_la"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
498 dnl Read the .la file. It defines the variables |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
499 dnl dlname, library_names, old_library, dependency_libs, current, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
500 dnl age, revision, installed, dlopen, dlpreopen, libdir. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
501 save_libdir="$libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
502 case "$found_la" in |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
503 */* | *\\*) . "$found_la" ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
504 *) . "./$found_la" ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
505 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
506 libdir="$save_libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
507 dnl We use only dependency_libs. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
508 for dep in $dependency_libs; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
509 case "$dep" in |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
510 -L*) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
511 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
512 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
513 dnl But don't add it |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
514 dnl 1. if it's the standard /usr/lib, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
515 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
516 dnl 3. if it's already present in $LDFLAGS or the already |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
517 dnl constructed $LIBNAME, |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
518 dnl 4. if it doesn't exist as a directory. |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
519 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
520 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
521 haveit= |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
522 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
523 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
524 if test -n "$GCC"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
525 case $host_os in |
5659
be44f23226e0
Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents:
5585
diff
changeset
|
526 linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
527 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
528 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
529 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
530 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
531 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
532 for x in $LDFLAGS $LIB[]NAME; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
533 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
534 if test "X$x" = "X-L$additional_libdir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
535 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
536 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
537 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
538 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
539 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
540 if test -d "$additional_libdir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
541 dnl Really add $additional_libdir to $LIBNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
542 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
543 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
544 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
545 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
546 for x in $LDFLAGS $LTLIB[]NAME; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
547 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
548 if test "X$x" = "X-L$additional_libdir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
549 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
550 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
551 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
552 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
553 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
554 if test -d "$additional_libdir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
555 dnl Really add $additional_libdir to $LTLIBNAME. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
556 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
557 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
558 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
559 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
560 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
561 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
562 -R*) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
563 dir=`echo "X$dep" | sed -e 's/^X-R//'` |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
564 if test "$enable_rpath" != no; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
565 dnl Potentially add DIR to rpathdirs. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
566 dnl The rpathdirs will be appended to $LIBNAME at the end. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
567 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
568 for x in $rpathdirs; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
569 if test "X$x" = "X$dir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
570 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
571 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
572 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
573 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
574 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
575 rpathdirs="$rpathdirs $dir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
576 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
577 dnl Potentially add DIR to ltrpathdirs. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
578 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
579 haveit= |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
580 for x in $ltrpathdirs; do |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
581 if test "X$x" = "X$dir"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
582 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
583 break |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
584 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
585 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
586 if test -z "$haveit"; then |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
587 ltrpathdirs="$ltrpathdirs $dir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
588 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
589 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
590 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
591 -l*) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
592 dnl Handle this in the next round. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
593 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
594 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
595 *.la) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
596 dnl Handle this in the next round. Throw away the .la's |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
597 dnl directory; it is already contained in a preceding -L |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
598 dnl option. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
599 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
600 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
601 *) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
602 dnl Most likely an immediate library name. |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
603 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
604 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
605 ;; |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
606 esac |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
607 done |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
608 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
609 else |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
610 dnl Didn't find the library; assume it is in the system directories |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
611 dnl known to the linker and runtime loader. (All the system |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
612 dnl directories known to the linker should also be known to the |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
613 dnl runtime loader, otherwise the system is severely misconfigured.) |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
614 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
615 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
616 fi |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
617 fi |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
618 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
619 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
620 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
621 if test "X$rpathdirs" != "X"; then |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
622 if test -n "$acl_hardcode_libdir_separator"; then |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
623 dnl Weird platform: only the last -rpath option counts, the user must |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
624 dnl pass all path elements in one option. We can arrange that for a |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
625 dnl single library, but not when more than one $LIBNAMEs are used. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
626 alldirs= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
627 for found_dir in $rpathdirs; do |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
628 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
629 done |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
630 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
631 acl_save_libdir="$libdir" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
632 libdir="$alldirs" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
633 eval flag=\"$acl_hardcode_libdir_flag_spec\" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
634 libdir="$acl_save_libdir" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
635 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
636 else |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
637 dnl The -rpath options are cumulative. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
638 for found_dir in $rpathdirs; do |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
639 acl_save_libdir="$libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
640 libdir="$found_dir" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
641 eval flag=\"$acl_hardcode_libdir_flag_spec\" |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
642 libdir="$acl_save_libdir" |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
643 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
644 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
645 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
646 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
647 if test "X$ltrpathdirs" != "X"; then |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
648 dnl When using libtool, the option that works for both libraries and |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
649 dnl executables is -R. The -R options are cumulative. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
650 for found_dir in $ltrpathdirs; do |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
651 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
652 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
653 fi |
9787
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
654 popdef([P_A_C_K]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
655 popdef([PACKLIBS]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
656 popdef([PACKUP]) |
932a22d80734
Extend AC_LIB_LINKFLAGS to the situation of several libraries provided by a single package.
Bruno Haible <bruno@clisp.org>
parents:
9785
diff
changeset
|
657 popdef([PACK]) |
9785
dd4957ea4e80
Avoid conflicts between local macro definitions.
Bruno Haible <bruno@clisp.org>
parents:
9457
diff
changeset
|
658 popdef([NAME]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
659 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
660 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
661 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
662 dnl unless already present in VAR. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
663 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
664 dnl contains two or three consecutive elements that belong together. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
665 AC_DEFUN([AC_LIB_APPENDTOVAR], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
666 [ |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
667 for element in [$2]; do |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
668 haveit= |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
669 for x in $[$1]; do |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
670 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
671 if test "X$x" = "X$element"; then |
4536
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
672 haveit=yes |
3358eb550c86
Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents:
4533
diff
changeset
|
673 break |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
674 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
675 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
676 if test -z "$haveit"; then |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
677 [$1]="${[$1]}${[$1]:+ }$element" |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
678 fi |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
679 done |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
680 ]) |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
681 |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
682 dnl For those cases where a variable contains several -L and -l options |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
683 dnl referring to unknown libraries and directories, this macro determines the |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
684 dnl necessary additional linker options for the runtime path. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
685 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
686 dnl sets LDADDVAR to linker options needed together with LIBSVALUE. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
687 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
688 dnl otherwise linking without libtool is assumed. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
689 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
690 [ |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
691 AC_REQUIRE([AC_LIB_RPATH]) |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
692 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
693 $1= |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
694 if test "$enable_rpath" != no; then |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
695 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
696 dnl Use an explicit option to hardcode directories into the resulting |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
697 dnl binary. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
698 rpathdirs= |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
699 next= |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
700 for opt in $2; do |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
701 if test -n "$next"; then |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
702 dir="$next" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
703 dnl No need to hardcode the standard /usr/lib. |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
704 if test "X$dir" != "X/usr/$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
705 && test "X$dir" != "X/usr/$acl_libdirstem2"; then |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
706 rpathdirs="$rpathdirs $dir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
707 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
708 next= |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
709 else |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
710 case $opt in |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
711 -L) next=yes ;; |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
712 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
713 dnl No need to hardcode the standard /usr/lib. |
10386
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
714 if test "X$dir" != "X/usr/$acl_libdirstem" \ |
67cf8265aeed
Assume Solaris specific bi-arch conventions on Solaris systems.
Bruno Haible <bruno@clisp.org>
parents:
9787
diff
changeset
|
715 && test "X$dir" != "X/usr/$acl_libdirstem2"; then |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
716 rpathdirs="$rpathdirs $dir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
717 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
718 next= ;; |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
719 *) next= ;; |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
720 esac |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
721 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
722 done |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
723 if test "X$rpathdirs" != "X"; then |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
724 if test -n ""$3""; then |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
725 dnl libtool is used for linking. Use -R options. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
726 for dir in $rpathdirs; do |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
727 $1="${$1}${$1:+ }-R$dir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
728 done |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
729 else |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
730 dnl The linker is used for linking directly. |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
731 if test -n "$acl_hardcode_libdir_separator"; then |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
732 dnl Weird platform: only the last -rpath option counts, the user |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
733 dnl must pass all path elements in one option. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
734 alldirs= |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
735 for dir in $rpathdirs; do |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
736 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
737 done |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
738 acl_save_libdir="$libdir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
739 libdir="$alldirs" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
740 eval flag=\"$acl_hardcode_libdir_flag_spec\" |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
741 libdir="$acl_save_libdir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
742 $1="$flag" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
743 else |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
744 dnl The -rpath options are cumulative. |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
745 for dir in $rpathdirs; do |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
746 acl_save_libdir="$libdir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
747 libdir="$dir" |
7790
bedc03670205
Avoid side effects on libtool variables.
Bruno Haible <bruno@clisp.org>
parents:
7787
diff
changeset
|
748 eval flag=\"$acl_hardcode_libdir_flag_spec\" |
7032
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
749 libdir="$acl_save_libdir" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
750 $1="${$1}${$1:+ }$flag" |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
751 done |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
752 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
753 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
754 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
755 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
756 fi |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
757 AC_SUBST([$1]) |
ef16e4d461fc
Update from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents:
6200
diff
changeset
|
758 ]) |