annotate acsupport/ltmain.sh @ 3279:8cd345c99e6b

* src/stm32_misc.c: Ensure TIM2 clock enabled when profiling. [Bugzilla 1001953]
author jld
date Mon, 03 Mar 2014 08:18:43 +0000
parents a2fb80f5315f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1 # ltmain.sh - Provide generalized library-building support services.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2 # NOTE: Changing this file will not affect anything until you rerun configure.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3 #
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5 # 2007 Free Software Foundation, Inc.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
7 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
8 # This program is free software; you can redistribute it and/or modify
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
10 # the Free Software Foundation; either version 2 of the License, or
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
11 # (at your option) any later version.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
12 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
16 # General Public License for more details.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
17 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
19 # along with this program; if not, write to the Free Software
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
21 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
23 # distribute this file as part of a program that contains a
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
26
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
27 basename="s,^.*/,,g"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
28
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
30 # is ksh but when the shell is invoked as "sh" and the current value of
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
31 # the _XPG environment variable is not equal to 1 (one), the special
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
32 # positional parameter $0, within a function call, is the name of the
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
33 # function.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
34 progpath="$0"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
35
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
36 # The name of this program:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
37 progname=`echo "$progpath" | $SED $basename`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
38 modename="$progname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
39
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
40 # Global variables:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
41 EXIT_SUCCESS=0
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
42 EXIT_FAILURE=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
43
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
44 PROGRAM=ltmain.sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
45 PACKAGE=libtool
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
46 VERSION=1.5.24
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
47 TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
48
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
49 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
50 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
51 emulate sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
52 NULLCMD=:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
54 # is contrary to our usage. Disable this feature.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
55 alias -g '${1+"$@"}'='"$@"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
56 setopt NO_GLOB_SUBST
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
57 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
58 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
59 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
60 BIN_SH=xpg4; export BIN_SH # for Tru64
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
61 DUALCASE=1; export DUALCASE # for MKS sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
62
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
63 # Check that we have a working $echo.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
64 if test "X$1" = X--no-reexec; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
65 # Discard the --no-reexec flag, and continue.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
66 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
67 elif test "X$1" = X--fallback-echo; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
68 # Avoid inline document here, it may be left over
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
69 :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
70 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
71 # Yippee, $echo works!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
72 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
73 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
74 # Restart under the correct shell, and then maybe $echo will work.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
75 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
76 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
77
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
78 if test "X$1" = X--fallback-echo; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
79 # used as fallback echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
80 shift
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
81 cat <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
82 $*
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
83 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
84 exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
85 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
86
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
87 default_mode=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
88 help="Try \`$progname --help' for more information."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
89 magic="%%%MAGIC variable%%%"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
90 mkdir="mkdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
91 mv="mv -f"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
92 rm="rm -f"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
93
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
94 # Sed substitution that helps us do robust quoting. It backslashifies
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
95 # metacharacters that are still active within double-quoted strings.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
96 Xsed="${SED}"' -e 1s/^X//'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
97 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
98 # test EBCDIC or ASCII
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
99 case `echo X|tr X '\101'` in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
100 A) # ASCII based system
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
101 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
102 SP2NL='tr \040 \012'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
103 NL2SP='tr \015\012 \040\040'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
104 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
105 *) # EBCDIC based system
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
106 SP2NL='tr \100 \n'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
107 NL2SP='tr \r\n \100\100'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
108 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
109 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
110
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
111 # NLS nuisances.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
112 # Only set LANG and LC_ALL to C if already set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
113 # These must not be set unconditionally because not all systems understand
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
114 # e.g. LANG=C (notably SCO).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
115 # We save the old values to restore during execute mode.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
116 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
117 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
118 eval "if test \"\${$lt_var+set}\" = set; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
119 save_$lt_var=\$$lt_var
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
120 $lt_var=C
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
121 export $lt_var
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
122 fi"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
123 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
124
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
125 # Make sure IFS has a sensible default
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
126 lt_nl='
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
127 '
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
128 IFS=" $lt_nl"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
129
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
130 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
131 $echo "$modename: not configured to build any kind of library" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
132 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
133 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
134 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
135
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
136 # Global variables.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
137 mode=$default_mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
138 nonopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
139 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
140 prevopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
141 run=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
142 show="$echo"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
143 show_help=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
144 execute_dlfiles=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
145 duplicate_deps=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
146 preserve_args=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
147 lo2o="s/\\.lo\$/.${objext}/"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
148 o2lo="s/\\.${objext}\$/.lo/"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
149 extracted_archives=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
150 extracted_serial=0
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
151
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
152 #####################################
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
153 # Shell function definitions:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
154 # This seems to be the best place for them
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
155
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
156 # func_mktempdir [string]
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
157 # Make a temporary directory that won't clash with other running
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
158 # libtool processes, and avoids race conditions if possible. If
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
159 # given, STRING is the basename for that directory.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
160 func_mktempdir ()
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
161 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
162 my_template="${TMPDIR-/tmp}/${1-$progname}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
163
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
164 if test "$run" = ":"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
165 # Return a directory name, but don't create it in dry-run mode
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
166 my_tmpdir="${my_template}-$$"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
167 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
168
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
169 # If mktemp works, use that first and foremost
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
170 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
171
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
172 if test ! -d "$my_tmpdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
173 # Failing that, at least try and use $RANDOM to avoid a race
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
174 my_tmpdir="${my_template}-${RANDOM-0}$$"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
175
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
176 save_mktempdir_umask=`umask`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
177 umask 0077
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
178 $mkdir "$my_tmpdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
179 umask $save_mktempdir_umask
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
180 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
181
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
182 # If we're not in dry-run mode, bomb out on failure
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
183 test -d "$my_tmpdir" || {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
184 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
185 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
186 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
187 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
188
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
189 $echo "X$my_tmpdir" | $Xsed
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
190 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
191
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
192
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
193 # func_win32_libid arg
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
194 # return the library type of file 'arg'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
195 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
196 # Need a lot of goo to handle *both* DLLs and import libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
197 # Has to be a shell function in order to 'eat' the argument
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
198 # that is supplied when $file_magic_command is called.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
199 func_win32_libid ()
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
200 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
201 win32_libid_type="unknown"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
202 win32_fileres=`file -L $1 2>/dev/null`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
203 case $win32_fileres in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
204 *ar\ archive\ import\ library*) # definitely import
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
205 win32_libid_type="x86 archive import"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
206 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
207 *ar\ archive*) # could be an import, or static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
208 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
209 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
210 win32_nmres=`eval $NM -f posix -A $1 | \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
211 $SED -n -e '1,100{
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
212 / I /{
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
213 s,.*,import,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
214 p
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
215 q
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
216 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
217 }'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
218 case $win32_nmres in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
219 import*) win32_libid_type="x86 archive import";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
220 *) win32_libid_type="x86 archive static";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
221 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
222 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
223 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
224 *DLL*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
225 win32_libid_type="x86 DLL"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
226 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
227 *executable*) # but shell scripts are "executable" too...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
228 case $win32_fileres in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
229 *MS\ Windows\ PE\ Intel*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
230 win32_libid_type="x86 DLL"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
231 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
232 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
233 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
234 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
235 $echo $win32_libid_type
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
236 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
237
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
238
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
239 # func_infer_tag arg
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
240 # Infer tagged configuration to use if any are available and
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
241 # if one wasn't chosen via the "--tag" command line option.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
242 # Only attempt this if the compiler in the base compile
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
243 # command doesn't match the default compiler.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
244 # arg is usually of the form 'gcc ...'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
245 func_infer_tag ()
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
246 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
247 if test -n "$available_tags" && test -z "$tagname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
248 CC_quoted=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
249 for arg in $CC; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
250 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
251 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
252 arg="\"$arg\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
253 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
254 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
255 CC_quoted="$CC_quoted $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
256 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
257 case $@ in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
258 # Blanks in the command may have been stripped by the calling shell,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
259 # but not from the CC environment variable when configure was run.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
260 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
261 # Blanks at the start of $base_compile will cause this to fail
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
262 # if we don't check for them as well.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
263 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
264 for z in $available_tags; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
265 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
266 # Evaluate the configuration.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
267 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
268 CC_quoted=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
269 for arg in $CC; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
270 # Double-quote args containing other shell metacharacters.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
271 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
272 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
273 arg="\"$arg\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
274 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
275 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
276 CC_quoted="$CC_quoted $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
277 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
278 case "$@ " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
279 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
280 # The compiler in the base compile command matches
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
281 # the one in the tagged configuration.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
282 # Assume this is the tagged configuration we want.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
283 tagname=$z
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
284 break
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
285 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
286 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
287 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
288 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
289 # If $tagname still isn't set, then no tagged configuration
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
290 # was found and let the user know that the "--tag" command
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
291 # line option must be used.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
292 if test -z "$tagname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
293 $echo "$modename: unable to infer tagged configuration"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
294 $echo "$modename: specify a tag with \`--tag'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
295 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
296 # else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
297 # $echo "$modename: using $tagname tagged configuration"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
298 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
299 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
300 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
301 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
302 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
303
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
304
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
305 # func_extract_an_archive dir oldlib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
306 func_extract_an_archive ()
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
307 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
308 f_ex_an_ar_dir="$1"; shift
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
309 f_ex_an_ar_oldlib="$1"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
310
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
311 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
312 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
313 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
314 :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
315 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
316 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
317 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
318 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
319 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
320
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
321 # func_extract_archives gentop oldlib ...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
322 func_extract_archives ()
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
323 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
324 my_gentop="$1"; shift
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
325 my_oldlibs=${1+"$@"}
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
326 my_oldobjs=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
327 my_xlib=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
328 my_xabs=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
329 my_xdir=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
330 my_status=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
331
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
332 $show "${rm}r $my_gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
333 $run ${rm}r "$my_gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
334 $show "$mkdir $my_gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
335 $run $mkdir "$my_gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
336 my_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
337 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
338 exit $my_status
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
339 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
340
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
341 for my_xlib in $my_oldlibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
342 # Extract the objects.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
343 case $my_xlib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
344 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
345 *) my_xabs=`pwd`"/$my_xlib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
346 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
347 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
348 my_xlib_u=$my_xlib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
349 while :; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
350 case " $extracted_archives " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
351 *" $my_xlib_u "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
352 extracted_serial=`expr $extracted_serial + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
353 my_xlib_u=lt$extracted_serial-$my_xlib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
354 *) break ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
355 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
356 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
357 extracted_archives="$extracted_archives $my_xlib_u"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
358 my_xdir="$my_gentop/$my_xlib_u"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
359
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
360 $show "${rm}r $my_xdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
361 $run ${rm}r "$my_xdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
362 $show "$mkdir $my_xdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
363 $run $mkdir "$my_xdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
364 exit_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
365 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
366 exit $exit_status
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
367 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
368 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
369 *-darwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
370 $show "Extracting $my_xabs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
371 # Do not bother doing anything if just a dry run
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
372 if test -z "$run"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
373 darwin_orig_dir=`pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
374 cd $my_xdir || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
375 darwin_archive=$my_xabs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
376 darwin_curdir=`pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
377 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
378 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
379 if test -n "$darwin_arches"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
380 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
381 darwin_arch=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
382 $show "$darwin_base_archive has multiple architectures $darwin_arches"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
383 for darwin_arch in $darwin_arches ; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
384 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
385 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
386 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
387 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
388 cd "$darwin_curdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
389 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
390 done # $darwin_arches
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
391 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
392 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
393 darwin_file=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
394 darwin_files=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
395 for darwin_file in $darwin_filelist; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
396 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
397 lipo -create -output "$darwin_file" $darwin_files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
398 done # $darwin_filelist
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
399 ${rm}r unfat-$$
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
400 cd "$darwin_orig_dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
401 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
402 cd "$darwin_orig_dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
403 func_extract_an_archive "$my_xdir" "$my_xabs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
404 fi # $darwin_arches
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
405 fi # $run
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
406 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
407 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
408 func_extract_an_archive "$my_xdir" "$my_xabs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
409 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
410 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
411 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
412 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
413 func_extract_archives_result="$my_oldobjs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
414 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
415 # End of Shell function definitions
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
416 #####################################
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
417
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
418 # Darwin sucks
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
419 eval std_shrext=\"$shrext_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
420
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
421 disable_libs=no
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
422
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
423 # Parse our command line options once, thoroughly.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
424 while test "$#" -gt 0
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
425 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
426 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
427 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
428
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
429 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
430 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
431 *) optarg= ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
432 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
433
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
434 # If the previous option needs an argument, assign it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
435 if test -n "$prev"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
436 case $prev in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
437 execute_dlfiles)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
438 execute_dlfiles="$execute_dlfiles $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
439 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
440 tag)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
441 tagname="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
442 preserve_args="${preserve_args}=$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
443
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
444 # Check whether tagname contains only valid characters
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
445 case $tagname in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
446 *[!-_A-Za-z0-9,/]*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
447 $echo "$progname: invalid tag name: $tagname" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
448 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
449 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
450 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
451
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
452 case $tagname in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
453 CC)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
454 # Don't test for the "default" C tag, as we know, it's there, but
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
455 # not specially marked.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
456 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
457 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
458 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
459 taglist="$taglist $tagname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
460 # Evaluate the configuration.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
461 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
462 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
463 $echo "$progname: ignoring unknown tag $tagname" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
464 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
465 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
466 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
467 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
468 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
469 eval "$prev=\$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
470 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
471 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
472
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
473 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
474 prevopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
475 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
476 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
477
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
478 # Have we seen a non-optional argument yet?
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
479 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
480 --help)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
481 show_help=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
482 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
483
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
484 --version)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
485 echo "\
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
486 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
487
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
488 Copyright (C) 2007 Free Software Foundation, Inc.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
489 This is free software; see the source for copying conditions. There is NO
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
490 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
491 exit $?
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
492 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
493
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
494 --config)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
495 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
496 # Now print the configurations for the tags.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
497 for tagname in $taglist; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
498 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
499 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
500 exit $?
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
501 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
502
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
503 --debug)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
504 $echo "$progname: enabling shell trace mode"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
505 set -x
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
506 preserve_args="$preserve_args $arg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
507 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
508
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
509 --dry-run | -n)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
510 run=:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
511 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
512
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
513 --features)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
514 $echo "host: $host"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
515 if test "$build_libtool_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
516 $echo "enable shared libraries"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
517 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
518 $echo "disable shared libraries"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
519 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
520 if test "$build_old_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
521 $echo "enable static libraries"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
522 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
523 $echo "disable static libraries"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
524 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
525 exit $?
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
526 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
527
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
528 --finish) mode="finish" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
529
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
530 --mode) prevopt="--mode" prev=mode ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
531 --mode=*) mode="$optarg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
532
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
533 --preserve-dup-deps) duplicate_deps="yes" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
534
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
535 --quiet | --silent)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
536 show=:
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
537 preserve_args="$preserve_args $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
538 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
539
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
540 --tag)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
541 prevopt="--tag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
542 prev=tag
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
543 preserve_args="$preserve_args --tag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
544 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
545 --tag=*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
546 set tag "$optarg" ${1+"$@"}
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
547 shift
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
548 prev=tag
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
549 preserve_args="$preserve_args --tag"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
550 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
551
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
552 -dlopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
553 prevopt="-dlopen"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
554 prev=execute_dlfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
555 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
556
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
557 -*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
558 $echo "$modename: unrecognized option \`$arg'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
559 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
560 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
561 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
562
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
563 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
564 nonopt="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
565 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
566 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
567 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
568 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
569
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
570 if test -n "$prevopt"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
571 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
572 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
573 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
574 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
575
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
576 case $disable_libs in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
577 no)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
578 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
579 shared)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
580 build_libtool_libs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
581 build_old_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
582 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
583 static)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
584 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
585 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
586 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
587
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
588 # If this variable is set in any of the actions, the command in it
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
589 # will be execed at the end. This prevents here-documents from being
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
590 # left over by shells.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
591 exec_cmd=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
592
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
593 if test -z "$show_help"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
594
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
595 # Infer the operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
596 if test -z "$mode"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
597 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
598 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
599 case $nonopt in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
600 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
601 mode=link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
602 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
603 do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
604 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
605 -c)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
606 mode=compile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
607 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
608 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
609 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
610 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
611 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
612 *db | *dbx | *strace | *truss)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
613 mode=execute
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
614 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
615 *install*|cp|mv)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
616 mode=install
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
617 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
618 *rm)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
619 mode=uninstall
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
620 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
621 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
622 # If we have no mode, but dlfiles were specified, then do execute mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
623 test -n "$execute_dlfiles" && mode=execute
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
624
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
625 # Just use the default operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
626 if test -z "$mode"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
627 if test -n "$nonopt"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
628 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
629 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
630 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
631 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
632 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
633 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
634 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
635 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
636
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
637 # Only execute mode is allowed to have -dlopen flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
638 if test -n "$execute_dlfiles" && test "$mode" != execute; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
639 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
640 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
641 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
642 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
643
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
644 # Change the help message to a mode-specific one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
645 generic_help="$help"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
646 help="Try \`$modename --help --mode=$mode' for more information."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
647
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
648 # These modes are in order of execution frequency so that they run quickly.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
649 case $mode in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
650 # libtool compile mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
651 compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
652 modename="$modename: compile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
653 # Get the compilation command and the source file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
654 base_compile=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
655 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
656 suppress_opt=yes
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
657 suppress_output=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
658 arg_mode=normal
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
659 libobj=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
660 later=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
661
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
662 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
663 do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
664 case $arg_mode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
665 arg )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
666 # do not "continue". Instead, add this to base_compile
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
667 lastarg="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
668 arg_mode=normal
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
669 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
670
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
671 target )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
672 libobj="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
673 arg_mode=normal
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
674 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
675 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
676
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
677 normal )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
678 # Accept any command-line options.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
679 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
680 -o)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
681 if test -n "$libobj" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
682 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
683 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
684 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
685 arg_mode=target
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
686 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
687 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
688
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
689 -static | -prefer-pic | -prefer-non-pic)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
690 later="$later $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
691 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
692 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
693
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
694 -no-suppress)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
695 suppress_opt=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
696 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
697 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
698
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
699 -Xcompiler)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
700 arg_mode=arg # the next one goes into the "base_compile" arg list
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
701 continue # The current "srcfile" will either be retained or
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
702 ;; # replaced later. I would guess that would be a bug.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
703
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
704 -Wc,*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
705 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
706 lastarg=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
707 save_ifs="$IFS"; IFS=','
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
708 for arg in $args; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
709 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
710
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
711 # Double-quote args containing other shell metacharacters.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
712 # Many Bourne shells cannot handle close brackets correctly
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
713 # in scan sets, so we specify it separately.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
714 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
715 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
716 arg="\"$arg\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
717 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
718 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
719 lastarg="$lastarg $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
720 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
721 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
722 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
723
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
724 # Add the arguments to base_compile.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
725 base_compile="$base_compile $lastarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
726 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
727 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
728
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
729 * )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
730 # Accept the current argument as the source file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
731 # The previous "srcfile" becomes the current argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
732 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
733 lastarg="$srcfile"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
734 srcfile="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
735 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
736 esac # case $arg
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
737 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
738 esac # case $arg_mode
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
739
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
740 # Aesthetically quote the previous argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
741 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
742
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
743 case $lastarg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
744 # Double-quote args containing other shell metacharacters.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
745 # Many Bourne shells cannot handle close brackets correctly
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
746 # in scan sets, and some SunOS ksh mistreat backslash-escaping
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
747 # in scan sets (worked around with variable expansion),
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
748 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
749 # at all, so we specify them separately.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
750 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
751 lastarg="\"$lastarg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
752 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
753 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
754
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
755 base_compile="$base_compile $lastarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
756 done # for arg
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
757
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
758 case $arg_mode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
759 arg)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
760 $echo "$modename: you must specify an argument for -Xcompile"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
761 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
762 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
763 target)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
764 $echo "$modename: you must specify a target with \`-o'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
765 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
766 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
767 *)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
768 # Get the name of the library object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
769 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
770 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
771 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
772
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
773 # Recognize several different file suffixes.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
774 # If the user specifies -o file.o, it is replaced with file.lo
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
775 xform='[cCFSifmso]'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
776 case $libobj in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
777 *.ada) xform=ada ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
778 *.adb) xform=adb ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
779 *.ads) xform=ads ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
780 *.asm) xform=asm ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
781 *.c++) xform=c++ ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
782 *.cc) xform=cc ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
783 *.ii) xform=ii ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
784 *.class) xform=class ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
785 *.cpp) xform=cpp ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
786 *.cxx) xform=cxx ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
787 *.[fF][09]?) xform=[fF][09]. ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
788 *.for) xform=for ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
789 *.java) xform=java ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
790 *.obj) xform=obj ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
791 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
792
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
793 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
794
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
795 case $libobj in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
796 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
797 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
798 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
799 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
800 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
801 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
802
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
803 func_infer_tag $base_compile
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
804
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
805 for arg in $later; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
806 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
807 -static)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
808 build_old_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
809 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
810 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
811
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
812 -prefer-pic)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
813 pic_mode=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
814 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
815 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
816
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
817 -prefer-non-pic)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
818 pic_mode=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
819 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
820 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
821 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
822 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
823
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
824 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
825 case $qlibobj in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
826 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
827 qlibobj="\"$qlibobj\"" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
828 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
829 test "X$libobj" != "X$qlibobj" \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
830 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
831 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
832 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
833 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
834 if test "X$xdir" = "X$obj"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
835 xdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
836 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
837 xdir=$xdir/
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
838 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
839 lobj=${xdir}$objdir/$objname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
840
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
841 if test -z "$base_compile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
842 $echo "$modename: you must specify a compilation command" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
843 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
844 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
845 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
846
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
847 # Delete any leftover library objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
848 if test "$build_old_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
849 removelist="$obj $lobj $libobj ${libobj}T"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
850 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
851 removelist="$lobj $libobj ${libobj}T"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
852 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
853
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
854 $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
855 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
856
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
857 # On Cygwin there's no "real" PIC flag so we must build both object types
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
858 case $host_os in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
859 cygwin* | mingw* | pw32* | os2*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
860 pic_mode=default
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
861 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
862 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
863 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
864 # non-PIC code in shared libraries is not supported
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
865 pic_mode=default
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
866 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
867
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
868 # Calculate the filename of the output object if compiler does
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
869 # not support -o with -c
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
870 if test "$compiler_c_o" = no; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
871 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
872 lockfile="$output_obj.lock"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
873 removelist="$removelist $output_obj $lockfile"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
874 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
875 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
876 output_obj=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
877 need_locks=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
878 lockfile=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
879 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
880
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
881 # Lock this critical section if it is needed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
882 # We use this script file to make the link, it avoids creating a new file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
883 if test "$need_locks" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
884 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
885 $show "Waiting for $lockfile to be removed"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
886 sleep 2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
887 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
888 elif test "$need_locks" = warn; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
889 if test -f "$lockfile"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
890 $echo "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
891 *** ERROR, $lockfile exists and contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
892 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
893
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
894 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
895 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
896 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
897 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
898 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
899 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
900
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
901 $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
902 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
903 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
904 $echo "$srcfile" > "$lockfile"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
905 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
906
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
907 if test -n "$fix_srcfile_path"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
908 eval srcfile=\"$fix_srcfile_path\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
909 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
910 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
911 case $qsrcfile in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
912 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
913 qsrcfile="\"$qsrcfile\"" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
914 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
915
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
916 $run $rm "$libobj" "${libobj}T"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
917
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
918 # Create a libtool object file (analogous to a ".la" file),
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
919 # but don't create it if we're doing a dry run.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
920 test -z "$run" && cat > ${libobj}T <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
921 # $libobj - a libtool object file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
922 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
923 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
924 # Please DO NOT delete this file!
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
925 # It is necessary for linking the library.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
926
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
927 # Name of the PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
928 EOF
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
929
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
930 # Only build a PIC object if we are building libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
931 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
932 # Without this assignment, base_compile gets emptied.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
933 fbsd_hideous_sh_bug=$base_compile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
934
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
935 if test "$pic_mode" != no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
936 command="$base_compile $qsrcfile $pic_flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
937 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
938 # Don't build PIC code
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
939 command="$base_compile $qsrcfile"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
940 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
941
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
942 if test ! -d "${xdir}$objdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
943 $show "$mkdir ${xdir}$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
944 $run $mkdir ${xdir}$objdir
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
945 exit_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
946 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
947 exit $exit_status
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
948 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
949 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
950
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
951 if test -z "$output_obj"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
952 # Place PIC objects in $objdir
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
953 command="$command -o $lobj"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
954 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
955
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
956 $run $rm "$lobj" "$output_obj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
957
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
958 $show "$command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
959 if $run eval "$command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
960 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
961 test -n "$output_obj" && $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
962 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
963 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
964
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
965 if test "$need_locks" = warn &&
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
966 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
967 $echo "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
968 *** ERROR, $lockfile contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
969 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
970
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
971 but it should contain:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
972 $srcfile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
973
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
974 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
975 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
976 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
977 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
978 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
979 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
980
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
981 $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
982 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
983 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
984
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
985 # Just move the object if needed, then go on to compile the next one
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
986 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
987 $show "$mv $output_obj $lobj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
988 if $run $mv $output_obj $lobj; then :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
989 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
990 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
991 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
992 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
993 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
994 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
995
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
996 # Append the name of the PIC object to the libtool object file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
997 test -z "$run" && cat >> ${libobj}T <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
998 pic_object='$objdir/$objname'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
999
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1000 EOF
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1001
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1002 # Allow error messages only from the first compilation.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1003 if test "$suppress_opt" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1004 suppress_output=' >/dev/null 2>&1'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1005 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1006 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1007 # No PIC object so indicate it doesn't exist in the libtool
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1008 # object file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1009 test -z "$run" && cat >> ${libobj}T <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1010 pic_object=none
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1011
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1012 EOF
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1013 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1014
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1015 # Only build a position-dependent object if we build old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1016 if test "$build_old_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1017 if test "$pic_mode" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1018 # Don't build PIC code
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1019 command="$base_compile $qsrcfile"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1020 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1021 command="$base_compile $qsrcfile $pic_flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1022 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1023 if test "$compiler_c_o" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1024 command="$command -o $obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1025 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1026
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1027 # Suppress compiler output if we already did a PIC compilation.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1028 command="$command$suppress_output"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1029 $run $rm "$obj" "$output_obj"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1030 $show "$command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1031 if $run eval "$command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1032 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1033 $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1034 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1035 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1036
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1037 if test "$need_locks" = warn &&
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1038 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1039 $echo "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1040 *** ERROR, $lockfile contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1041 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1042
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1043 but it should contain:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1044 $srcfile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1045
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1046 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1047 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1048 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1049 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1050 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1051 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1052
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1053 $run $rm $removelist
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1054 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1055 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1056
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1057 # Just move the object if needed
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1058 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1059 $show "$mv $output_obj $obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1060 if $run $mv $output_obj $obj; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1061 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1062 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1063 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1064 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1065 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1066 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1067
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1068 # Append the name of the non-PIC object the libtool object file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1069 # Only append if the libtool object file exists.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1070 test -z "$run" && cat >> ${libobj}T <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1071 # Name of the non-PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1072 non_pic_object='$objname'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1073
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1074 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1075 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1076 # Append the name of the non-PIC object the libtool object file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1077 # Only append if the libtool object file exists.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1078 test -z "$run" && cat >> ${libobj}T <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1079 # Name of the non-PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1080 non_pic_object=none
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1081
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1082 EOF
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1083 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1084
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1085 $run $mv "${libobj}T" "${libobj}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1086
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1087 # Unlock the critical section if it was locked
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1088 if test "$need_locks" != no; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1089 $run $rm "$lockfile"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1090 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1091
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1092 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1093 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1094
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1095 # libtool link mode
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1096 link | relink)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1097 modename="$modename: link"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1098 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1099 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1100 # It is impossible to link a dll without this setting, and
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1101 # we shouldn't force the makefile maintainer to figure out
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1102 # which system we are compiling for in order to pass an extra
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1103 # flag for every libtool invocation.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1104 # allow_undefined=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1105
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1106 # FIXME: Unfortunately, there are problems with the above when trying
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1107 # to make a dll which has undefined symbols, in which case not
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1108 # even a static library is built. For now, we need to specify
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1109 # -no-undefined on the libtool link line when we can be certain
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1110 # that all symbols are satisfied, otherwise we get a static library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1111 allow_undefined=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1112 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1113 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1114 allow_undefined=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1115 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1116 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1117 libtool_args="$nonopt"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1118 base_compile="$nonopt $@"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1119 compile_command="$nonopt"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1120 finalize_command="$nonopt"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1121
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1122 compile_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1123 finalize_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1124 compile_shlibpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1125 finalize_shlibpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1126 convenience=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1127 old_convenience=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1128 deplibs=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1129 old_deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1130 compiler_flags=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1131 linker_flags=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1132 dllsearchpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1133 lib_search_path=`pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1134 inst_prefix_dir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1135
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1136 avoid_version=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1137 dlfiles=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1138 dlprefiles=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1139 dlself=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1140 export_dynamic=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1141 export_symbols=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1142 export_symbols_regex=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1143 generated=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1144 libobjs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1145 ltlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1146 module=no
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1147 no_install=no
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1148 objs=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1149 non_pic_objects=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1150 notinst_path= # paths that contain not-installed libtool libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1151 precious_files_regex=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1152 prefer_static_libs=no
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1153 preload=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1154 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1155 prevarg=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1156 release=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1157 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1158 xrpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1159 perm_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1160 temp_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1161 thread_safe=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1162 vinfo=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1163 vinfo_number=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1164
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1165 func_infer_tag $base_compile
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1166
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1167 # We need to know -static, to get the right output filenames.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1168 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1169 do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1170 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1171 -all-static | -static | -static-libtool-libs)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1172 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1173 -all-static)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1174 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1175 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1176 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1177 if test -n "$link_static_flag"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1178 dlopen_self=$dlopen_self_static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1179 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1180 prefer_static_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1181 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1182 -static)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1183 if test -z "$pic_flag" && test -n "$link_static_flag"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1184 dlopen_self=$dlopen_self_static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1185 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1186 prefer_static_libs=built
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1187 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1188 -static-libtool-libs)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1189 if test -z "$pic_flag" && test -n "$link_static_flag"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1190 dlopen_self=$dlopen_self_static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1191 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1192 prefer_static_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1193 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1194 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1195 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1196 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1197 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1198 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1199 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1200 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1201
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1202 # See if our shared archives depend on static archives.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1203 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1204
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1205 # Go through the arguments, transforming them on the way.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1206 while test "$#" -gt 0; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1207 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1208 shift
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1209 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1210 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1211 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1212 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1213 *) qarg=$arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1214 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1215 libtool_args="$libtool_args $qarg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1216
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1217 # If the previous option needs an argument, assign it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1218 if test -n "$prev"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1219 case $prev in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1220 output)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1221 compile_command="$compile_command @OUTPUT@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1222 finalize_command="$finalize_command @OUTPUT@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1223 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1224 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1225
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1226 case $prev in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1227 dlfiles|dlprefiles)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1228 if test "$preload" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1229 # Add the symbol object into the linking commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1230 compile_command="$compile_command @SYMFILE@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1231 finalize_command="$finalize_command @SYMFILE@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1232 preload=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1233 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1234 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1235 *.la | *.lo) ;; # We handle these cases below.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1236 force)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1237 if test "$dlself" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1238 dlself=needless
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1239 export_dynamic=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1240 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1241 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1242 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1243 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1244 self)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1245 if test "$prev" = dlprefiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1246 dlself=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1247 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1248 dlself=yes
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1249 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1250 dlself=needless
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1251 export_dynamic=yes
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1252 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1253 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1254 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1255 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1256 *)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1257 if test "$prev" = dlfiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1258 dlfiles="$dlfiles $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1259 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1260 dlprefiles="$dlprefiles $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1261 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1262 prev=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1263 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1264 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1265 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1266 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1267 expsyms)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1268 export_symbols="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1269 if test ! -f "$arg"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1270 $echo "$modename: symbol file \`$arg' does not exist"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1271 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1272 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1273 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1274 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1275 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1276 expsyms_regex)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1277 export_symbols_regex="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1278 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1279 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1280 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1281 inst_prefix)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1282 inst_prefix_dir="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1283 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1284 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1285 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1286 precious_regex)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1287 precious_files_regex="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1288 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1289 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1290 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1291 release)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1292 release="-$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1293 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1294 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1295 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1296 objectlist)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1297 if test -f "$arg"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1298 save_arg=$arg
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1299 moreargs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1300 for fil in `cat $save_arg`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1301 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1302 # moreargs="$moreargs $fil"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1303 arg=$fil
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1304 # A libtool-controlled object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1305
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1306 # Check to see that this really is a libtool object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1307 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1308 pic_object=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1309 non_pic_object=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1310
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1311 # Read the .lo file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1312 # If there is no directory component, then add one.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1313 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1314 */* | *\\*) . $arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1315 *) . ./$arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1316 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1317
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1318 if test -z "$pic_object" || \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1319 test -z "$non_pic_object" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1320 test "$pic_object" = none && \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1321 test "$non_pic_object" = none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1322 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1323 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1324 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1325
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1326 # Extract subdirectory from the argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1327 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1328 if test "X$xdir" = "X$arg"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1329 xdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1330 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1331 xdir="$xdir/"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1332 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1333
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1334 if test "$pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1335 # Prepend the subdirectory the object is found in.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1336 pic_object="$xdir$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1337
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1338 if test "$prev" = dlfiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1339 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1340 dlfiles="$dlfiles $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1341 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1342 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1343 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1344 # If libtool objects are unsupported, then we need to preload.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1345 prev=dlprefiles
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1346 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1347 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1348
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1349 # CHECK ME: I think I busted this. -Ossama
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1350 if test "$prev" = dlprefiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1351 # Preload the old-style object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1352 dlprefiles="$dlprefiles $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1353 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1354 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1355
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1356 # A PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1357 libobjs="$libobjs $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1358 arg="$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1359 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1360
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1361 # Non-PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1362 if test "$non_pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1363 # Prepend the subdirectory the object is found in.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1364 non_pic_object="$xdir$non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1365
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1366 # A standard non-PIC object
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1367 non_pic_objects="$non_pic_objects $non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1368 if test -z "$pic_object" || test "$pic_object" = none ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1369 arg="$non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1370 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1371 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1372 # If the PIC object exists, use it instead.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1373 # $xdir was prepended to $pic_object above.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1374 non_pic_object="$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1375 non_pic_objects="$non_pic_objects $non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1376 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1377 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1378 # Only an error if not doing a dry-run.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1379 if test -z "$run"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1380 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1381 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1382 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1383 # Dry-run case.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1384
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1385 # Extract subdirectory from the argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1386 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1387 if test "X$xdir" = "X$arg"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1388 xdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1389 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1390 xdir="$xdir/"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1391 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1392
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1393 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1394 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1395 libobjs="$libobjs $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1396 non_pic_objects="$non_pic_objects $non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1397 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1398 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1399 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1400 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1401 $echo "$modename: link input file \`$save_arg' does not exist"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1402 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1403 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1404 arg=$save_arg
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1405 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1406 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1407 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1408 rpath | xrpath)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1409 # We need an absolute path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1410 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1411 [\\/]* | [A-Za-z]:[\\/]*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1412 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1413 $echo "$modename: only absolute run-paths are allowed" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1414 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1415 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1416 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1417 if test "$prev" = rpath; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1418 case "$rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1419 *" $arg "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1420 *) rpath="$rpath $arg" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1421 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1422 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1423 case "$xrpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1424 *" $arg "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1425 *) xrpath="$xrpath $arg" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1426 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1427 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1428 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1429 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1430 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1431 xcompiler)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1432 compiler_flags="$compiler_flags $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1433 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1434 compile_command="$compile_command $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1435 finalize_command="$finalize_command $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1436 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1437 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1438 xlinker)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1439 linker_flags="$linker_flags $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1440 compiler_flags="$compiler_flags $wl$qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1441 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1442 compile_command="$compile_command $wl$qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1443 finalize_command="$finalize_command $wl$qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1444 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1445 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1446 xcclinker)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1447 linker_flags="$linker_flags $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1448 compiler_flags="$compiler_flags $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1449 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1450 compile_command="$compile_command $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1451 finalize_command="$finalize_command $qarg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1452 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1453 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1454 shrext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1455 shrext_cmds="$arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1456 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1457 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1458 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1459 darwin_framework|darwin_framework_skip)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1460 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1461 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1462 finalize_command="$finalize_command $arg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1463 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1464 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1465 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1466 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1467 eval "$prev=\"\$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1468 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1469 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1470 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1471 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1472 fi # test -n "$prev"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1473
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1474 prevarg="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1475
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1476 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1477 -all-static)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1478 if test -n "$link_static_flag"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1479 compile_command="$compile_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1480 finalize_command="$finalize_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1481 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1482 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1483 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1484
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1485 -allow-undefined)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1486 # FIXME: remove this flag sometime in the future.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1487 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1488 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1489 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1490
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1491 -avoid-version)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1492 avoid_version=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1493 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1494 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1495
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1496 -dlopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1497 prev=dlfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1498 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1499 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1500
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1501 -dlpreopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1502 prev=dlprefiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1503 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1504 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1505
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1506 -export-dynamic)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1507 export_dynamic=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1508 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1509 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1510
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1511 -export-symbols | -export-symbols-regex)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1512 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1513 $echo "$modename: more than one -exported-symbols argument is not allowed"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1514 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1515 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1516 if test "X$arg" = "X-export-symbols"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1517 prev=expsyms
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1518 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1519 prev=expsyms_regex
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1520 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1521 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1522 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1523
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1524 -framework|-arch|-isysroot)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1525 case " $CC " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1526 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1527 prev=darwin_framework_skip ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1528 *) compiler_flags="$compiler_flags $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1529 prev=darwin_framework ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1530 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1531 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1532 finalize_command="$finalize_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1533 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1534 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1535
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1536 -inst-prefix-dir)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1537 prev=inst_prefix
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1538 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1539 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1540
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1541 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1542 # so, if we see these flags be careful not to treat them like -L
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1543 -L[A-Z][A-Z]*:*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1544 case $with_gcc/$host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1545 no/*-*-irix* | /*-*-irix*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1546 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1547 finalize_command="$finalize_command $arg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1548 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1549 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1550 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1551 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1552
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1553 -L*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1554 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1555 # We need an absolute path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1556 case $dir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1557 [\\/]* | [A-Za-z]:[\\/]*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1558 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1559 absdir=`cd "$dir" && pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1560 if test -z "$absdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1561 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1562 absdir="$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1563 notinst_path="$notinst_path $dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1564 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1565 dir="$absdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1566 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1567 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1568 case "$deplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1569 *" -L$dir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1570 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1571 deplibs="$deplibs -L$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1572 lib_search_path="$lib_search_path $dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1573 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1574 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1575 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1576 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1577 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1578 case :$dllsearchpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1579 *":$dir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1580 *) dllsearchpath="$dllsearchpath:$dir";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1581 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1582 case :$dllsearchpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1583 *":$testbindir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1584 *) dllsearchpath="$dllsearchpath:$testbindir";;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1585 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1586 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1587 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1588 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1589 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1590
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1591 -l*)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1592 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1593 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1594 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1595 # These systems don't actually have a C or math library (as such)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1596 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1597 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1598 *-*-os2*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1599 # These systems don't actually have a C library (as such)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1600 test "X$arg" = "X-lc" && continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1601 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1602 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1603 # Do not include libc due to us having libc/libc_r.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1604 test "X$arg" = "X-lc" && continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1605 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1606 *-*-rhapsody* | *-*-darwin1.[012])
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1607 # Rhapsody C and math libraries are in the System framework
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1608 deplibs="$deplibs -framework System"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1609 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1610 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1611 *-*-sco3.2v5* | *-*-sco5v6*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1612 # Causes problems with __ctype
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1613 test "X$arg" = "X-lc" && continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1614 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1615 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1616 # Compiler inserts libc in the correct place for threads to work
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1617 test "X$arg" = "X-lc" && continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1618 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1619 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1620 elif test "X$arg" = "X-lc_r"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1621 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1622 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1623 # Do not include libc_r directly, use -pthread flag.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1624 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1625 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1626 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1627 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1628 deplibs="$deplibs $arg"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1629 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1630 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1631
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1632 # Tru64 UNIX uses -model [arg] to determine the layout of C++
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1633 # classes, name mangling, and exception handling.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1634 -model)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1635 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1636 compiler_flags="$compiler_flags $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1637 finalize_command="$finalize_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1638 prev=xcompiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1639 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1640 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1641
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1642 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1643 compiler_flags="$compiler_flags $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1644 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1645 finalize_command="$finalize_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1646 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1647 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1648
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1649 -module)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1650 module=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1651 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1652 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1653
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1654 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1655 # -r[0-9][0-9]* specifies the processor on the SGI compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1656 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1657 # +DA*, +DD* enable 64-bit mode on the HP compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1658 # -q* pass through compiler args for the IBM compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1659 # -m* pass through architecture-specific compiler args for GCC
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1660 # -m*, -t[45]*, -txscale* pass through architecture-specific
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1661 # compiler args for GCC
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1662 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1663 # -F/path gives path to uninstalled frameworks, gcc on darwin
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1664 # @file GCC response files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1665 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1666 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1667
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1668 # Unknown arguments in both finalize_command and compile_command need
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1669 # to be aesthetically quoted because they are evaled later.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1670 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1671 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1672 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1673 arg="\"$arg\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1674 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1675 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1676 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1677 finalize_command="$finalize_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1678 compiler_flags="$compiler_flags $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1679 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1680 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1681
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1682 -shrext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1683 prev=shrext
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1684 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1685 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1686
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1687 -no-fast-install)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1688 fast_install=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1689 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1690 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1691
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1692 -no-install)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1693 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1694 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1695 # The PATH hackery in wrapper scripts is required on Windows
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1696 # and Darwin in order for the loader to find any dlls it needs.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1697 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1698 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1699 fast_install=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1700 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1701 *) no_install=yes ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1702 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1703 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1704 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1705
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1706 -no-undefined)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1707 allow_undefined=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1708 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1709 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1710
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1711 -objectlist)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1712 prev=objectlist
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1713 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1714 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1715
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1716 -o) prev=output ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1717
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1718 -precious-files-regex)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1719 prev=precious_regex
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1720 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1721 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1722
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1723 -release)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1724 prev=release
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1725 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1726 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1727
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1728 -rpath)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1729 prev=rpath
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1730 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1731 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1732
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1733 -R)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1734 prev=xrpath
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1735 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1736 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1737
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1738 -R*)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1739 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1740 # We need an absolute path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1741 case $dir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1742 [\\/]* | [A-Za-z]:[\\/]*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1743 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1744 $echo "$modename: only absolute run-paths are allowed" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1745 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1746 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1747 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1748 case "$xrpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1749 *" $dir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1750 *) xrpath="$xrpath $dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1751 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1752 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1753 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1754
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1755 -static | -static-libtool-libs)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1756 # The effects of -static are defined in a previous loop.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1757 # We used to do the same as -all-static on platforms that
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1758 # didn't have a PIC flag, but the assumption that the effects
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1759 # would be equivalent was wrong. It would break on at least
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1760 # Digital Unix and AIX.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1761 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1762 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1763
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1764 -thread-safe)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1765 thread_safe=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1766 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1767 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1768
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1769 -version-info)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1770 prev=vinfo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1771 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1772 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1773 -version-number)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1774 prev=vinfo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1775 vinfo_number=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1776 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1777 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1778
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1779 -Wc,*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1780 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1781 arg=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1782 save_ifs="$IFS"; IFS=','
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1783 for flag in $args; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1784 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1785 case $flag in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1786 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1787 flag="\"$flag\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1788 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1789 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1790 arg="$arg $wl$flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1791 compiler_flags="$compiler_flags $flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1792 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1793 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1794 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1795 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1796
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1797 -Wl,*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1798 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1799 arg=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1800 save_ifs="$IFS"; IFS=','
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1801 for flag in $args; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1802 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1803 case $flag in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1804 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1805 flag="\"$flag\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1806 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1807 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1808 arg="$arg $wl$flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1809 compiler_flags="$compiler_flags $wl$flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1810 linker_flags="$linker_flags $flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1811 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1812 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1813 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1814 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1815
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1816 -Xcompiler)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1817 prev=xcompiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1818 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1819 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1820
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1821 -Xlinker)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1822 prev=xlinker
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1823 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1824 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1825
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1826 -XCClinker)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1827 prev=xcclinker
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1828 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1829 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1830
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1831 # Some other compiler flag.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1832 -* | +*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1833 # Unknown arguments in both finalize_command and compile_command need
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1834 # to be aesthetically quoted because they are evaled later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1835 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1836 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1837 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1838 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1839 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1840 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1841 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1842
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1843 *.$objext)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1844 # A standard object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1845 objs="$objs $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1846 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1847
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1848 *.lo)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1849 # A libtool-controlled object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1850
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1851 # Check to see that this really is a libtool object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1852 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1853 pic_object=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1854 non_pic_object=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1855
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1856 # Read the .lo file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1857 # If there is no directory component, then add one.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1858 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1859 */* | *\\*) . $arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1860 *) . ./$arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1861 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1862
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1863 if test -z "$pic_object" || \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1864 test -z "$non_pic_object" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1865 test "$pic_object" = none && \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1866 test "$non_pic_object" = none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1867 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1868 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1869 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1870
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1871 # Extract subdirectory from the argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1872 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1873 if test "X$xdir" = "X$arg"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1874 xdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1875 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1876 xdir="$xdir/"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1877 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1878
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1879 if test "$pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1880 # Prepend the subdirectory the object is found in.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1881 pic_object="$xdir$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1882
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1883 if test "$prev" = dlfiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1884 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1885 dlfiles="$dlfiles $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1886 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1887 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1888 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1889 # If libtool objects are unsupported, then we need to preload.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1890 prev=dlprefiles
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1891 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1892 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1893
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1894 # CHECK ME: I think I busted this. -Ossama
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1895 if test "$prev" = dlprefiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1896 # Preload the old-style object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1897 dlprefiles="$dlprefiles $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1898 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1899 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1900
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1901 # A PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1902 libobjs="$libobjs $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1903 arg="$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1904 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1905
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1906 # Non-PIC object.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1907 if test "$non_pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1908 # Prepend the subdirectory the object is found in.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1909 non_pic_object="$xdir$non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1910
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1911 # A standard non-PIC object
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1912 non_pic_objects="$non_pic_objects $non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1913 if test -z "$pic_object" || test "$pic_object" = none ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1914 arg="$non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1915 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1916 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1917 # If the PIC object exists, use it instead.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1918 # $xdir was prepended to $pic_object above.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1919 non_pic_object="$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1920 non_pic_objects="$non_pic_objects $non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1921 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1922 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1923 # Only an error if not doing a dry-run.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1924 if test -z "$run"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1925 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1926 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1927 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1928 # Dry-run case.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1929
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1930 # Extract subdirectory from the argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1931 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1932 if test "X$xdir" = "X$arg"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1933 xdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1934 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1935 xdir="$xdir/"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1936 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1937
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1938 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1939 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1940 libobjs="$libobjs $pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1941 non_pic_objects="$non_pic_objects $non_pic_object"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1942 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1943 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1944 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1945
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1946 *.$libext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1947 # An archive.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1948 deplibs="$deplibs $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1949 old_deplibs="$old_deplibs $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1950 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1951 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1952
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1953 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1954 # A libtool-controlled library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1955
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1956 if test "$prev" = dlfiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1957 # This library was specified with -dlopen.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1958 dlfiles="$dlfiles $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1959 prev=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1960 elif test "$prev" = dlprefiles; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1961 # The library was specified with -dlpreopen.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1962 dlprefiles="$dlprefiles $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1963 prev=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1964 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1965 deplibs="$deplibs $arg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1966 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1967 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1968 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1969
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1970 # Some other compiler argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1971 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1972 # Unknown arguments in both finalize_command and compile_command need
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1973 # to be aesthetically quoted because they are evaled later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1974 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1975 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1976 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1977 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1978 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1979 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1980 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1981 esac # arg
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1982
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1983 # Now actually substitute the argument into the commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1984 if test -n "$arg"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1985 compile_command="$compile_command $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1986 finalize_command="$finalize_command $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1987 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1988 done # argument parsing loop
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1989
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1990 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1991 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1992 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1993 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1994 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1995
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1996 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1997 eval arg=\"$export_dynamic_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1998 compile_command="$compile_command $arg"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
1999 finalize_command="$finalize_command $arg"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2000 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2001
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2002 oldlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2003 # calculate the name of the file, without its directory
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2004 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2005 libobjs_save="$libobjs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2006
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2007 if test -n "$shlibpath_var"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2008 # get the directories listed in $shlibpath_var
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2009 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2010 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2011 shlib_search_path=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2012 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2013 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2014 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2015
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2016 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2017 if test "X$output_objdir" = "X$output"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2018 output_objdir="$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2019 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2020 output_objdir="$output_objdir/$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2021 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2022 # Create the object directory.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2023 if test ! -d "$output_objdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2024 $show "$mkdir $output_objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2025 $run $mkdir $output_objdir
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2026 exit_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2027 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2028 exit $exit_status
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2029 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2030 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2031
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2032 # Determine the type of output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2033 case $output in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2034 "")
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2035 $echo "$modename: you must specify an output file" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2036 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2037 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2038 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2039 *.$libext) linkmode=oldlib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2040 *.lo | *.$objext) linkmode=obj ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2041 *.la) linkmode=lib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2042 *) linkmode=prog ;; # Anything else should be a program.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2043 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2044
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2045 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2046 *cygwin* | *mingw* | *pw32*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2047 # don't eliminate duplications in $postdeps and $predeps
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2048 duplicate_compiler_generated_deps=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2049 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2050 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2051 duplicate_compiler_generated_deps=$duplicate_deps
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2052 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2053 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2054 specialdeplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2055
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2056 libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2057 # Find all interdependent deplibs by searching for libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2058 # that are linked more than once (e.g. -la -lb -la)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2059 for deplib in $deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2060 if test "X$duplicate_deps" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2061 case "$libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2062 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2063 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2064 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2065 libs="$libs $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2066 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2067
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2068 if test "$linkmode" = lib; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2069 libs="$predeps $libs $compiler_lib_search_path $postdeps"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2070
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2071 # Compute libraries that are listed more than once in $predeps
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2072 # $postdeps and mark them as special (i.e., whose duplicates are
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2073 # not to be eliminated).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2074 pre_post_deps=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2075 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2076 for pre_post_dep in $predeps $postdeps; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2077 case "$pre_post_deps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2078 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2079 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2080 pre_post_deps="$pre_post_deps $pre_post_dep"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2081 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2082 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2083 pre_post_deps=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2084 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2085
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2086 deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2087 newdependency_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2088 newlib_search_path=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2089 need_relink=no # whether we're linking any uninstalled libtool libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2090 notinst_deplibs= # not-installed libtool libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2091 case $linkmode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2092 lib)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2093 passes="conv link"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2094 for file in $dlfiles $dlprefiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2095 case $file in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2096 *.la) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2097 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2098 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2099 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2100 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2101 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2102 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2103 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2104 prog)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2105 compile_deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2106 finalize_deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2107 alldeplibs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2108 newdlfiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2109 newdlprefiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2110 passes="conv scan dlopen dlpreopen link"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2111 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2112 *) passes="conv"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2113 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2114 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2115 for pass in $passes; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2116 if test "$linkmode,$pass" = "lib,link" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2117 test "$linkmode,$pass" = "prog,scan"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2118 libs="$deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2119 deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2120 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2121 if test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2122 case $pass in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2123 dlopen) libs="$dlfiles" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2124 dlpreopen) libs="$dlprefiles" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2125 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2126 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2127 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2128 if test "$pass" = dlopen; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2129 # Collect dlpreopened libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2130 save_deplibs="$deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2131 deplibs=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2132 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2133 for deplib in $libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2134 lib=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2135 found=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2136 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2137 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2138 if test "$linkmode,$pass" = "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2139 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2140 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2141 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2142 compiler_flags="$compiler_flags $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2143 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2144 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2145 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2146 -l*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2147 if test "$linkmode" != lib && test "$linkmode" != prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2148 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2149 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2150 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2151 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2152 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2153 for search_ext in .la $std_shrext .so .a; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2154 # Search the libtool library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2155 lib="$searchdir/lib${name}${search_ext}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2156 if test -f "$lib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2157 if test "$search_ext" = ".la"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2158 found=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2159 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2160 found=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2161 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2162 break 2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2163 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2164 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2165 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2166 if test "$found" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2167 # deplib doesn't seem to be a libtool library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2168 if test "$linkmode,$pass" = "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2169 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2170 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2171 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2172 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2173 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2174 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2175 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2176 else # deplib is a libtool library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2177 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2178 # We need to do some special things here, and not later.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2179 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2180 case " $predeps $postdeps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2181 *" $deplib "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2182 if (${SED} -e '2q' $lib |
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2183 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2184 library_names=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2185 old_library=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2186 case $lib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2187 */* | *\\*) . $lib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2188 *) . ./$lib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2189 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2190 for l in $old_library $library_names; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2191 ll="$l"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2192 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2193 if test "X$ll" = "X$old_library" ; then # only static version available
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2194 found=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2195 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2196 test "X$ladir" = "X$lib" && ladir="."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2197 lib=$ladir/$old_library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2198 if test "$linkmode,$pass" = "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2199 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2200 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2201 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2202 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2203 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2204 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2205 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2206 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2207 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2208 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2209 *) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2210 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2211 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2212 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2213 ;; # -l
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2214 -L*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2215 case $linkmode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2216 lib)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2217 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2218 test "$pass" = conv && continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2219 newdependency_libs="$deplib $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2220 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2221 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2222 prog)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2223 if test "$pass" = conv; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2224 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2225 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2226 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2227 if test "$pass" = scan; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2228 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2229 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2230 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2231 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2232 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2233 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2234 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2235 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2236 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2237 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2238 esac # linkmode
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2239 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2240 ;; # -L
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2241 -R*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2242 if test "$pass" = link; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2243 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2244 # Make sure the xrpath contains only unique directories.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2245 case "$xrpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2246 *" $dir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2247 *) xrpath="$xrpath $dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2248 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2249 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2250 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2251 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2252 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2253 *.la) lib="$deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2254 *.$libext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2255 if test "$pass" = conv; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2256 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2257 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2258 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2259 case $linkmode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2260 lib)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2261 valid_a_lib=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2262 case $deplibs_check_method in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2263 match_pattern*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2264 set dummy $deplibs_check_method
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2265 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2266 if eval $echo \"$deplib\" 2>/dev/null \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2267 | $SED 10q \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2268 | $EGREP "$match_pattern_regex" > /dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2269 valid_a_lib=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2270 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2271 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2272 pass_all)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2273 valid_a_lib=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2274 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2275 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2276 if test "$valid_a_lib" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2277 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2278 $echo "*** Warning: Trying to link with static lib archive $deplib."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2279 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2280 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2281 $echo "*** shared version of the library, which you do not appear to have"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2282 $echo "*** because the file extensions .$libext of this argument makes me believe"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2283 $echo "*** that it is just a static archive that I should not used here."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2284 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2285 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2286 $echo "*** Warning: Linking the shared library $output against the"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2287 $echo "*** static library $deplib is not portable!"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2288 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2289 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2290 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2291 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2292 prog)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2293 if test "$pass" != link; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2294 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2295 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2296 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2297 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2298 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2299 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2300 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2301 esac # linkmode
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2302 ;; # *.$libext
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2303 *.lo | *.$objext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2304 if test "$pass" = conv; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2305 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2306 elif test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2307 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2308 # If there is no dlopen support or we're linking statically,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2309 # we need to preload.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2310 newdlprefiles="$newdlprefiles $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2311 compile_deplibs="$deplib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2312 finalize_deplibs="$deplib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2313 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2314 newdlfiles="$newdlfiles $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2315 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2316 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2317 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2318 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2319 %DEPLIBS%)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2320 alldeplibs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2321 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2322 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2323 esac # case $deplib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2324 if test "$found" = yes || test -f "$lib"; then :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2325 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2326 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2327 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2328 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2329
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2330 # Check to see that this really is a libtool archive.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2331 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2332 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2333 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2334 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2335 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2336
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2337 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2338 test "X$ladir" = "X$lib" && ladir="."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2339
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2340 dlname=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2341 dlopen=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2342 dlpreopen=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2343 libdir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2344 library_names=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2345 old_library=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2346 # If the library was installed with an old release of libtool,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2347 # it will not redefine variables installed, or shouldnotlink
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2348 installed=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2349 shouldnotlink=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2350 avoidtemprpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2351
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2352
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2353 # Read the .la file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2354 case $lib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2355 */* | *\\*) . $lib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2356 *) . ./$lib ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2357 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2358
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2359 if test "$linkmode,$pass" = "lib,link" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2360 test "$linkmode,$pass" = "prog,scan" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2361 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2362 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2363 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2364 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2365
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2366 if test "$pass" = conv; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2367 # Only check for convenience libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2368 deplibs="$lib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2369 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2370 if test -z "$old_library"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2371 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2372 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2373 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2374 # It is a libtool convenience library, so add in its objects.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2375 convenience="$convenience $ladir/$objdir/$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2376 old_convenience="$old_convenience $ladir/$objdir/$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2377 tmp_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2378 for deplib in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2379 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2380 if test "X$duplicate_deps" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2381 case "$tmp_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2382 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2383 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2384 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2385 tmp_libs="$tmp_libs $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2386 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2387 elif test "$linkmode" != prog && test "$linkmode" != lib; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2388 $echo "$modename: \`$lib' is not a convenience library" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2389 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2390 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2391 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2392 fi # $pass = conv
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2393
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2394
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2395 # Get the name of the library we link against.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2396 linklib=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2397 for l in $old_library $library_names; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2398 linklib="$l"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2399 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2400 if test -z "$linklib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2401 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2402 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2403 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2404
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2405 # This library was specified with -dlopen.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2406 if test "$pass" = dlopen; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2407 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2408 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2409 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2410 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2411 if test -z "$dlname" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2412 test "$dlopen_support" != yes ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2413 test "$build_libtool_libs" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2414 # If there is no dlname, no dlopen support or we're linking
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2415 # statically, we need to preload. We also need to preload any
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2416 # dependent libraries so libltdl's deplib preloader doesn't
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2417 # bomb out in the load deplibs phase.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2418 dlprefiles="$dlprefiles $lib $dependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2419 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2420 newdlfiles="$newdlfiles $lib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2421 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2422 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2423 fi # $pass = dlopen
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2424
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2425 # We need an absolute path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2426 case $ladir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2427 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2428 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2429 abs_ladir=`cd "$ladir" && pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2430 if test -z "$abs_ladir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2431 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2432 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2433 abs_ladir="$ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2434 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2435 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2436 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2437 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2438
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2439 # Find the relevant object directory and library name.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2440 if test "X$installed" = Xyes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2441 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2442 $echo "$modename: warning: library \`$lib' was moved." 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2443 dir="$ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2444 absdir="$abs_ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2445 libdir="$abs_ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2446 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2447 dir="$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2448 absdir="$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2449 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2450 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2451 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2452 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2453 dir="$ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2454 absdir="$abs_ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2455 # Remove this search path later
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2456 notinst_path="$notinst_path $abs_ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2457 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2458 dir="$ladir/$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2459 absdir="$abs_ladir/$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2460 # Remove this search path later
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2461 notinst_path="$notinst_path $abs_ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2462 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2463 fi # $installed = yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2464 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2465
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2466 # This library was specified with -dlpreopen.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2467 if test "$pass" = dlpreopen; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2468 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2469 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2470 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2471 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2472 # Prefer using a static library (so that no silly _DYNAMIC symbols
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2473 # are required to link).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2474 if test -n "$old_library"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2475 newdlprefiles="$newdlprefiles $dir/$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2476 # Otherwise, use the dlname, so that lt_dlopen finds it.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2477 elif test -n "$dlname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2478 newdlprefiles="$newdlprefiles $dir/$dlname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2479 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2480 newdlprefiles="$newdlprefiles $dir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2481 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2482 fi # $pass = dlpreopen
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2483
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2484 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2485 # Link the convenience library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2486 if test "$linkmode" = lib; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2487 deplibs="$dir/$old_library $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2488 elif test "$linkmode,$pass" = "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2489 compile_deplibs="$dir/$old_library $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2490 finalize_deplibs="$dir/$old_library $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2491 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2492 deplibs="$lib $deplibs" # used for prog,scan pass
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2493 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2494 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2495 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2496
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2497
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2498 if test "$linkmode" = prog && test "$pass" != link; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2499 newlib_search_path="$newlib_search_path $ladir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2500 deplibs="$lib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2501
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2502 linkalldeplibs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2503 if test "$link_all_deplibs" != no || test -z "$library_names" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2504 test "$build_libtool_libs" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2505 linkalldeplibs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2506 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2507
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2508 tmp_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2509 for deplib in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2510 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2511 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2512 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2513 # Need to link against all dependency_libs?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2514 if test "$linkalldeplibs" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2515 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2516 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2517 # Need to hardcode shared library paths
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2518 # or/and link against static libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2519 newdependency_libs="$deplib $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2520 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2521 if test "X$duplicate_deps" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2522 case "$tmp_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2523 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2524 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2525 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2526 tmp_libs="$tmp_libs $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2527 done # for deplib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2528 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2529 fi # $linkmode = prog...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2530
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2531 if test "$linkmode,$pass" = "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2532 if test -n "$library_names" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2533 { { test "$prefer_static_libs" = no ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2534 test "$prefer_static_libs,$installed" = "built,yes"; } ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2535 test -z "$old_library"; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2536 # We need to hardcode the library path
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2537 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2538 # Make sure the rpath contains only unique directories.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2539 case "$temp_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2540 *" $dir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2541 *" $absdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2542 *) temp_rpath="$temp_rpath $absdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2543 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2544 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2545
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2546 # Hardcode the library path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2547 # Skip directories that are in the system default run-time
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2548 # search path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2549 case " $sys_lib_dlsearch_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2550 *" $absdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2551 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2552 case "$compile_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2553 *" $absdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2554 *) compile_rpath="$compile_rpath $absdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2555 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2556 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2557 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2558 case " $sys_lib_dlsearch_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2559 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2560 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2561 case "$finalize_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2562 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2563 *) finalize_rpath="$finalize_rpath $libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2564 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2565 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2566 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2567 fi # $linkmode,$pass = prog,link...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2568
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2569 if test "$alldeplibs" = yes &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2570 { test "$deplibs_check_method" = pass_all ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2571 { test "$build_libtool_libs" = yes &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2572 test -n "$library_names"; }; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2573 # We only need to search for static libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2574 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2575 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2576 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2577
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2578 link_static=no # Whether the deplib will be linked statically
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2579 use_static_libs=$prefer_static_libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2580 if test "$use_static_libs" = built && test "$installed" = yes ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2581 use_static_libs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2582 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2583 if test -n "$library_names" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2584 { test "$use_static_libs" = no || test -z "$old_library"; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2585 if test "$installed" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2586 notinst_deplibs="$notinst_deplibs $lib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2587 need_relink=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2588 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2589 # This is a shared library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2590
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2591 # Warn about portability, can't link against -module's on
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2592 # some systems (darwin)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2593 if test "$shouldnotlink" = yes && test "$pass" = link ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2594 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2595 if test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2596 $echo "*** Warning: Linking the executable $output against the loadable module"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2597 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2598 $echo "*** Warning: Linking the shared library $output against the loadable module"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2599 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2600 $echo "*** $linklib is not portable!"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2601 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2602 if test "$linkmode" = lib &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2603 test "$hardcode_into_libs" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2604 # Hardcode the library path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2605 # Skip directories that are in the system default run-time
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2606 # search path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2607 case " $sys_lib_dlsearch_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2608 *" $absdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2609 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2610 case "$compile_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2611 *" $absdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2612 *) compile_rpath="$compile_rpath $absdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2613 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2614 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2615 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2616 case " $sys_lib_dlsearch_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2617 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2618 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2619 case "$finalize_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2620 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2621 *) finalize_rpath="$finalize_rpath $libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2622 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2623 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2624 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2625 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2626
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2627 if test -n "$old_archive_from_expsyms_cmds"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2628 # figure out the soname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2629 set dummy $library_names
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2630 realname="$2"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2631 shift; shift
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2632 libname=`eval \\$echo \"$libname_spec\"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2633 # use dlname if we got it. it's perfectly good, no?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2634 if test -n "$dlname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2635 soname="$dlname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2636 elif test -n "$soname_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2637 # bleh windows
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2638 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2639 *cygwin* | mingw*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2640 major=`expr $current - $age`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2641 versuffix="-$major"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2642 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2643 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2644 eval soname=\"$soname_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2645 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2646 soname="$realname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2647 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2648
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2649 # Make a new name for the extract_expsyms_cmds to use
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2650 soroot="$soname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2651 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2652 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2653
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2654 # If the library has no export list, then create one now
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2655 if test -f "$output_objdir/$soname-def"; then :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2656 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2657 $show "extracting exported symbol list from \`$soname'"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2658 save_ifs="$IFS"; IFS='~'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2659 cmds=$extract_expsyms_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2660 for cmd in $cmds; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2661 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2662 eval cmd=\"$cmd\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2663 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2664 $run eval "$cmd" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2665 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2666 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2667 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2668
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2669 # Create $newlib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2670 if test -f "$output_objdir/$newlib"; then :; else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2671 $show "generating import library for \`$soname'"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2672 save_ifs="$IFS"; IFS='~'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2673 cmds=$old_archive_from_expsyms_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2674 for cmd in $cmds; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2675 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2676 eval cmd=\"$cmd\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2677 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2678 $run eval "$cmd" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2679 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2680 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2681 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2682 # make sure the library variables are pointing to the new library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2683 dir=$output_objdir
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2684 linklib=$newlib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2685 fi # test -n "$old_archive_from_expsyms_cmds"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2686
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2687 if test "$linkmode" = prog || test "$mode" != relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2688 add_shlibpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2689 add_dir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2690 add=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2691 lib_linked=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2692 case $hardcode_action in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2693 immediate | unsupported)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2694 if test "$hardcode_direct" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2695 add="$dir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2696 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2697 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2698 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2699 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2700 *-*-unixware7*) add_dir="-L$dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2701 *-*-darwin* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2702 # if the lib is a module then we can not link against
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2703 # it, someone is ignoring the new warnings I added
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2704 if /usr/bin/file -L $add 2> /dev/null |
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2705 $EGREP ": [^:]* bundle" >/dev/null ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2706 $echo "** Warning, lib $linklib is a module, not a shared library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2707 if test -z "$old_library" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2708 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2709 $echo "** And there doesn't seem to be a static archive available"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2710 $echo "** The link will probably fail, sorry"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2711 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2712 add="$dir/$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2713 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2714 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2715 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2716 elif test "$hardcode_minus_L" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2717 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2718 *-*-sunos*) add_shlibpath="$dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2719 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2720 add_dir="-L$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2721 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2722 elif test "$hardcode_shlibpath_var" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2723 add_shlibpath="$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2724 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2725 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2726 lib_linked=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2727 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2728 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2729 relink)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2730 if test "$hardcode_direct" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2731 add="$dir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2732 elif test "$hardcode_minus_L" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2733 add_dir="-L$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2734 # Try looking first in the location we're being installed to.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2735 if test -n "$inst_prefix_dir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2736 case $libdir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2737 [\\/]*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2738 add_dir="$add_dir -L$inst_prefix_dir$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2739 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2740 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2741 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2742 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2743 elif test "$hardcode_shlibpath_var" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2744 add_shlibpath="$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2745 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2746 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2747 lib_linked=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2748 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2749 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2750 *) lib_linked=no ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2751 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2752
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2753 if test "$lib_linked" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2754 $echo "$modename: configuration error: unsupported hardcode properties"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2755 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2756 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2757
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2758 if test -n "$add_shlibpath"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2759 case :$compile_shlibpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2760 *":$add_shlibpath:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2761 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2762 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2763 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2764 if test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2765 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2766 test -n "$add" && compile_deplibs="$add $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2767 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2768 test -n "$add_dir" && deplibs="$add_dir $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2769 test -n "$add" && deplibs="$add $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2770 if test "$hardcode_direct" != yes && \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2771 test "$hardcode_minus_L" != yes && \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2772 test "$hardcode_shlibpath_var" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2773 case :$finalize_shlibpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2774 *":$libdir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2775 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2776 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2777 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2778 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2779 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2780
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2781 if test "$linkmode" = prog || test "$mode" = relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2782 add_shlibpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2783 add_dir=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2784 add=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2785 # Finalize command for both is simple: just hardcode it.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2786 if test "$hardcode_direct" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2787 add="$libdir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2788 elif test "$hardcode_minus_L" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2789 add_dir="-L$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2790 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2791 elif test "$hardcode_shlibpath_var" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2792 case :$finalize_shlibpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2793 *":$libdir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2794 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2795 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2796 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2797 elif test "$hardcode_automatic" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2798 if test -n "$inst_prefix_dir" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2799 test -f "$inst_prefix_dir$libdir/$linklib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2800 add="$inst_prefix_dir$libdir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2801 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2802 add="$libdir/$linklib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2803 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2804 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2805 # We cannot seem to hardcode it, guess we'll fake it.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2806 add_dir="-L$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2807 # Try looking first in the location we're being installed to.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2808 if test -n "$inst_prefix_dir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2809 case $libdir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2810 [\\/]*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2811 add_dir="$add_dir -L$inst_prefix_dir$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2812 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2813 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2814 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2815 add="-l$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2816 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2817
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2818 if test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2819 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2820 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2821 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2822 test -n "$add_dir" && deplibs="$add_dir $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2823 test -n "$add" && deplibs="$add $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2824 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2825 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2826 elif test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2827 # Here we assume that one of hardcode_direct or hardcode_minus_L
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2828 # is not unsupported. This is valid on all known static and
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2829 # shared platforms.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2830 if test "$hardcode_direct" != unsupported; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2831 test -n "$old_library" && linklib="$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2832 compile_deplibs="$dir/$linklib $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2833 finalize_deplibs="$dir/$linklib $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2834 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2835 compile_deplibs="-l$name -L$dir $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2836 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2837 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2838 elif test "$build_libtool_libs" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2839 # Not a shared library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2840 if test "$deplibs_check_method" != pass_all; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2841 # We're trying link a shared library against a static one
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2842 # but the system doesn't support it.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2843
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2844 # Just print a warning and add the library to dependency_libs so
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2845 # that the program can be linked against the static library.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2846 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2847 $echo "*** Warning: This system can not link to static lib archive $lib."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2848 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2849 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2850 $echo "*** shared version of the library, which you do not appear to have."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2851 if test "$module" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2852 $echo "*** But as you try to build a module library, libtool will still create "
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2853 $echo "*** a static module, that should work as long as the dlopening application"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2854 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2855 if test -z "$global_symbol_pipe"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2856 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2857 $echo "*** However, this would only work if libtool was able to extract symbol"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2858 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2859 $echo "*** not find such a program. So, this module is probably useless."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2860 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2861 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2862 if test "$build_old_libs" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2863 build_libtool_libs=module
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2864 build_old_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2865 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2866 build_libtool_libs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2867 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2868 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2869 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2870 deplibs="$dir/$old_library $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2871 link_static=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2872 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2873 fi # link shared/static library?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2874
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2875 if test "$linkmode" = lib; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2876 if test -n "$dependency_libs" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2877 { test "$hardcode_into_libs" != yes ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2878 test "$build_old_libs" = yes ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2879 test "$link_static" = yes; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2880 # Extract -R from dependency_libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2881 temp_deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2882 for libdir in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2883 case $libdir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2884 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2885 case " $xrpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2886 *" $temp_xrpath "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2887 *) xrpath="$xrpath $temp_xrpath";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2888 esac;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2889 *) temp_deplibs="$temp_deplibs $libdir";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2890 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2891 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2892 dependency_libs="$temp_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2893 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2894
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2895 newlib_search_path="$newlib_search_path $absdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2896 # Link against this library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2897 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2898 # ... and its dependency_libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2899 tmp_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2900 for deplib in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2901 newdependency_libs="$deplib $newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2902 if test "X$duplicate_deps" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2903 case "$tmp_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2904 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2905 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2906 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2907 tmp_libs="$tmp_libs $deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2908 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2909
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2910 if test "$link_all_deplibs" != no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2911 # Add the search paths of all dependency libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2912 for deplib in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2913 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2914 -L*) path="$deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2915 *.la)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2916 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2917 test "X$dir" = "X$deplib" && dir="."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2918 # We need an absolute path.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2919 case $dir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2920 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2921 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2922 absdir=`cd "$dir" && pwd`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2923 if test -z "$absdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2924 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2925 absdir="$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2926 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2927 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2928 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2929 if grep "^installed=no" $deplib > /dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2930 path="$absdir/$objdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2931 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2932 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2933 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2934 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2935 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2936 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2937 if test "$absdir" != "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2938 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2939 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2940 path="$absdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2941 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2942 depdepl=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2943 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2944 *-*-darwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2945 # we do not want to link against static libs,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2946 # but need to link against shared
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2947 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2948 if test -n "$deplibrary_names" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2949 for tmp in $deplibrary_names ; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2950 depdepl=$tmp
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2951 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2952 if test -f "$path/$depdepl" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2953 depdepl="$path/$depdepl"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2954 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2955 # do not add paths which are already there
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2956 case " $newlib_search_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2957 *" $path "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2958 *) newlib_search_path="$newlib_search_path $path";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2959 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2960 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2961 path=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2962 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2963 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2964 path="-L$path"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2965 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2966 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2967 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2968 -l*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2969 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2970 *-*-darwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2971 # Again, we only want to link against shared libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2972 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2973 for tmp in $newlib_search_path ; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2974 if test -f "$tmp/lib$tmp_libs.dylib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2975 eval depdepl="$tmp/lib$tmp_libs.dylib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2976 break
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2977 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2978 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2979 path=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2980 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2981 *) continue ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2982 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2983 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2984 *) continue ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2985 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2986 case " $deplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2987 *" $path "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2988 *) deplibs="$path $deplibs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2989 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2990 case " $deplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2991 *" $depdepl "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2992 *) deplibs="$depdepl $deplibs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2993 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2994 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2995 fi # link_all_deplibs != no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2996 fi # linkmode = lib
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2997 done # for deplib in $libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2998 dependency_libs="$newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
2999 if test "$pass" = dlpreopen; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3000 # Link the dlpreopened libraries before other libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3001 for deplib in $save_deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3002 deplibs="$deplib $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3003 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3004 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3005 if test "$pass" != dlopen; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3006 if test "$pass" != conv; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3007 # Make sure lib_search_path contains only unique directories.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3008 lib_search_path=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3009 for dir in $newlib_search_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3010 case "$lib_search_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3011 *" $dir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3012 *) lib_search_path="$lib_search_path $dir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3013 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3014 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3015 newlib_search_path=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3016 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3017
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3018 if test "$linkmode,$pass" != "prog,link"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3019 vars="deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3020 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3021 vars="compile_deplibs finalize_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3022 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3023 for var in $vars dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3024 # Add libraries to $var in reverse order
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3025 eval tmp_libs=\"\$$var\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3026 new_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3027 for deplib in $tmp_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3028 # FIXME: Pedantically, this is the right thing to do, so
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3029 # that some nasty dependency loop isn't accidentally
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3030 # broken:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3031 #new_libs="$deplib $new_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3032 # Pragmatically, this seems to cause very few problems in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3033 # practice:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3034 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3035 -L*) new_libs="$deplib $new_libs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3036 -R*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3037 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3038 # And here is the reason: when a library appears more
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3039 # than once as an explicit dependence of a library, or
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3040 # is implicitly linked in more than once by the
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3041 # compiler, it is considered special, and multiple
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3042 # occurrences thereof are not removed. Compare this
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3043 # with having the same library being listed as a
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3044 # dependency of multiple other libraries: in this case,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3045 # we know (pedantically, we assume) the library does not
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3046 # need to be listed more than once, so we keep only the
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3047 # last copy. This is not always right, but it is rare
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3048 # enough that we require users that really mean to play
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3049 # such unportable linking tricks to link the library
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3050 # using -Wl,-lname, so that libtool does not consider it
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3051 # for duplicate removal.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3052 case " $specialdeplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3053 *" $deplib "*) new_libs="$deplib $new_libs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3054 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3055 case " $new_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3056 *" $deplib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3057 *) new_libs="$deplib $new_libs" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3058 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3059 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3060 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3061 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3062 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3063 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3064 tmp_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3065 for deplib in $new_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3066 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3067 -L*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3068 case " $tmp_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3069 *" $deplib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3070 *) tmp_libs="$tmp_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3071 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3072 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3073 *) tmp_libs="$tmp_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3074 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3075 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3076 eval $var=\"$tmp_libs\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3077 done # for var
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3078 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3079 # Last step: remove runtime libs from dependency_libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3080 # (they stay in deplibs)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3081 tmp_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3082 for i in $dependency_libs ; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3083 case " $predeps $postdeps $compiler_lib_search_path " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3084 *" $i "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3085 i=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3086 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3087 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3088 if test -n "$i" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3089 tmp_libs="$tmp_libs $i"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3090 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3091 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3092 dependency_libs=$tmp_libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3093 done # for pass
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3094 if test "$linkmode" = prog; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3095 dlfiles="$newdlfiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3096 dlprefiles="$newdlprefiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3097 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3098
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3099 case $linkmode in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3100 oldlib)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3101 if test -n "$deplibs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3102 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3103 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3104
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3105 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3106 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3107 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3108
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3109 if test -n "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3110 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3111 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3112
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3113 if test -n "$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3114 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3115 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3116
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3117 if test -n "$vinfo"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3118 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3119 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3120
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3121 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3122 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3123 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3124
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3125 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3126 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3127 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3128
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3129 # Now set the variables for building old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3130 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3131 oldlibs="$output"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3132 objs="$objs$old_deplibs"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3133 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3134
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3135 lib)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3136 # Make sure we only generate libraries of the form `libNAME.la'.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3137 case $outputname in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3138 lib*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3139 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3140 eval shared_ext=\"$shrext_cmds\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3141 eval libname=\"$libname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3142 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3143 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3144 if test "$module" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3145 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3146 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3147 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3148 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3149 if test "$need_lib_prefix" != no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3150 # Add the "lib" prefix for modules if required
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3151 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3152 eval shared_ext=\"$shrext_cmds\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3153 eval libname=\"$libname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3154 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3155 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3156 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3157 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3158 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3159
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3160 if test -n "$objs"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3161 if test "$deplibs_check_method" != pass_all; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3162 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3163 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3164 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3165 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3166 $echo "*** Warning: Linking the shared library $output against the non-libtool"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3167 $echo "*** objects $objs is not portable!"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3168 libobjs="$libobjs $objs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3169 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3170 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3171
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3172 if test "$dlself" != no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3173 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3174 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3175
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3176 set dummy $rpath
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3177 if test "$#" -gt 2; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3178 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3179 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3180 install_libdir="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3181
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3182 oldlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3183 if test -z "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3184 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3185 # Building a libtool convenience library.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3186 # Some compilers have problems with a `.al' extension so
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3187 # convenience libraries should have the same extension an
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3188 # archive normally would.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3189 oldlibs="$output_objdir/$libname.$libext $oldlibs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3190 build_libtool_libs=convenience
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3191 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3192 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3193
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3194 if test -n "$vinfo"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3195 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3196 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3197
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3198 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3199 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3200 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3201 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3202
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3203 # Parse the version information argument.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3204 save_ifs="$IFS"; IFS=':'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3205 set dummy $vinfo 0 0 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3206 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3207
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3208 if test -n "$8"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3209 $echo "$modename: too many parameters to \`-version-info'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3210 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3211 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3212 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3213
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3214 # convert absolute version numbers to libtool ages
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3215 # this retains compatibility with .la files and attempts
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3216 # to make the code below a bit more comprehensible
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3217
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3218 case $vinfo_number in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3219 yes)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3220 number_major="$2"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3221 number_minor="$3"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3222 number_revision="$4"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3223 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3224 # There are really only two kinds -- those that
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3225 # use the current revision as the major version
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3226 # and those that subtract age and use age as
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3227 # a minor version. But, then there is irix
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3228 # which has an extra 1 added just for fun
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3229 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3230 case $version_type in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3231 darwin|linux|osf|windows|none)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3232 current=`expr $number_major + $number_minor`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3233 age="$number_minor"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3234 revision="$number_revision"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3235 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3236 freebsd-aout|freebsd-elf|sunos)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3237 current="$number_major"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3238 revision="$number_minor"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3239 age="0"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3240 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3241 irix|nonstopux)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3242 current=`expr $number_major + $number_minor`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3243 age="$number_minor"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3244 revision="$number_minor"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3245 lt_irix_increment=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3246 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3247 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3248 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3249 no)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3250 current="$2"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3251 revision="$3"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3252 age="$4"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3253 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3254 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3255
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3256 # Check that each of the things are valid numbers.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3257 case $current in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3258 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3259 *)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3260 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3261 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3262 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3263 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3264 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3265
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3266 case $revision in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3267 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3268 *)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3269 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3270 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3271 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3272 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3273 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3274
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3275 case $age in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3276 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3277 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3278 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3279 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3280 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3281 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3282 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3283
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3284 if test "$age" -gt "$current"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3285 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3286 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3287 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3288 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3289
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3290 # Calculate the version variables.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3291 major=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3292 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3293 verstring=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3294 case $version_type in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3295 none) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3296
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3297 darwin)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3298 # Like Linux, but with the current version available in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3299 # verstring for coding it into the library header
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3300 major=.`expr $current - $age`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3301 versuffix="$major.$age.$revision"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3302 # Darwin ld doesn't like 0 for these options...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3303 minor_current=`expr $current + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3304 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3305 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3306 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3307
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3308 freebsd-aout)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3309 major=".$current"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3310 versuffix=".$current.$revision";
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3311 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3312
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3313 freebsd-elf)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3314 major=".$current"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3315 versuffix=".$current";
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3316 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3317
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3318 irix | nonstopux)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3319 if test "X$lt_irix_increment" = "Xno"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3320 major=`expr $current - $age`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3321 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3322 major=`expr $current - $age + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3323 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3324 case $version_type in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3325 nonstopux) verstring_prefix=nonstopux ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3326 *) verstring_prefix=sgi ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3327 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3328 verstring="$verstring_prefix$major.$revision"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3329
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3330 # Add in all the interfaces that we are compatible with.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3331 loop=$revision
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3332 while test "$loop" -ne 0; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3333 iface=`expr $revision - $loop`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3334 loop=`expr $loop - 1`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3335 verstring="$verstring_prefix$major.$iface:$verstring"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3336 done
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3337
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3338 # Before this point, $major must not contain `.'.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3339 major=.$major
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3340 versuffix="$major.$revision"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3341 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3342
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3343 linux)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3344 major=.`expr $current - $age`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3345 versuffix="$major.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3346 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3347
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3348 osf)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3349 major=.`expr $current - $age`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3350 versuffix=".$current.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3351 verstring="$current.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3352
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3353 # Add in all the interfaces that we are compatible with.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3354 loop=$age
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3355 while test "$loop" -ne 0; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3356 iface=`expr $current - $loop`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3357 loop=`expr $loop - 1`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3358 verstring="$verstring:${iface}.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3359 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3360
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3361 # Make executables depend on our current version.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3362 verstring="$verstring:${current}.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3363 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3364
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3365 sunos)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3366 major=".$current"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3367 versuffix=".$current.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3368 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3369
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3370 windows)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3371 # Use '-' rather than '.', since we only want one
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3372 # extension on DOS 8.3 filesystems.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3373 major=`expr $current - $age`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3374 versuffix="-$major"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3375 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3376
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3377 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3378 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3379 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3380 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3381 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3382 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3383
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3384 # Clear the version info if we defaulted, and they specified a release.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3385 if test -z "$vinfo" && test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3386 major=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3387 case $version_type in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3388 darwin)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3389 # we can't check for "0.0" in archive_cmds due to quoting
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3390 # problems, so we reset it completely
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3391 verstring=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3392 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3393 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3394 verstring="0.0"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3395 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3396 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3397 if test "$need_version" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3398 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3399 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3400 versuffix=".0.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3401 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3402 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3403
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3404 # Remove version info from name if versioning should be avoided
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3405 if test "$avoid_version" = yes && test "$need_version" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3406 major=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3407 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3408 verstring=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3409 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3410
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3411 # Check to see if the archive will have undefined symbols.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3412 if test "$allow_undefined" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3413 if test "$allow_undefined_flag" = unsupported; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3414 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3415 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3416 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3417 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3418 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3419 # Don't allow undefined symbols.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3420 allow_undefined_flag="$no_undefined_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3421 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3422 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3423
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3424 if test "$mode" != relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3425 # Remove our outputs, but don't remove object files since they
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3426 # may have been created when compiling PIC objects.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3427 removelist=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3428 tempremovelist=`$echo "$output_objdir/*"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3429 for p in $tempremovelist; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3430 case $p in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3431 *.$objext)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3432 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3433 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3434 if test "X$precious_files_regex" != "X"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3435 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3436 then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3437 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3438 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3439 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3440 removelist="$removelist $p"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3441 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3442 *) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3443 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3444 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3445 if test -n "$removelist"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3446 $show "${rm}r $removelist"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3447 $run ${rm}r $removelist
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3448 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3449 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3450
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3451 # Now set the variables for building old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3452 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3453 oldlibs="$oldlibs $output_objdir/$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3454
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3455 # Transform .lo files to .o files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3456 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3457 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3458
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3459 # Eliminate all temporary directories.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3460 #for path in $notinst_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3461 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3462 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3463 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3464 #done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3465
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3466 if test -n "$xrpath"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3467 # If the user specified any rpath flags, then add them.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3468 temp_xrpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3469 for libdir in $xrpath; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3470 temp_xrpath="$temp_xrpath -R$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3471 case "$finalize_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3472 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3473 *) finalize_rpath="$finalize_rpath $libdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3474 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3475 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3476 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3477 dependency_libs="$temp_xrpath $dependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3478 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3479 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3480
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3481 # Make sure dlfiles contains only unique files that won't be dlpreopened
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3482 old_dlfiles="$dlfiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3483 dlfiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3484 for lib in $old_dlfiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3485 case " $dlprefiles $dlfiles " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3486 *" $lib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3487 *) dlfiles="$dlfiles $lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3488 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3489 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3490
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3491 # Make sure dlprefiles contains only unique files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3492 old_dlprefiles="$dlprefiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3493 dlprefiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3494 for lib in $old_dlprefiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3495 case "$dlprefiles " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3496 *" $lib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3497 *) dlprefiles="$dlprefiles $lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3498 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3499 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3500
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3501 if test "$build_libtool_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3502 if test -n "$rpath"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3503 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3504 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3505 # these systems don't actually have a c library (as such)!
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3506 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3507 *-*-rhapsody* | *-*-darwin1.[012])
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3508 # Rhapsody C library is in the System framework
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3509 deplibs="$deplibs -framework System"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3510 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3511 *-*-netbsd*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3512 # Don't link with libc until the a.out ld.so is fixed.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3513 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3514 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3515 # Do not include libc due to us having libc/libc_r.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3516 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3517 *-*-sco3.2v5* | *-*-sco5v6*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3518 # Causes problems with __ctype
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3519 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3520 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3521 # Compiler inserts libc in the correct place for threads to work
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3522 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3523 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3524 # Add libc to deplibs on all other systems if necessary.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3525 if test "$build_libtool_need_lc" = "yes"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3526 deplibs="$deplibs -lc"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3527 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3528 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3529 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3530 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3531
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3532 # Transform deplibs into only deplibs that can be linked in shared.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3533 name_save=$name
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3534 libname_save=$libname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3535 release_save=$release
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3536 versuffix_save=$versuffix
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3537 major_save=$major
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3538 # I'm not sure if I'm treating the release correctly. I think
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3539 # release should show up in the -l (ie -lgmp5) so we don't want to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3540 # add it in twice. Is that correct?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3541 release=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3542 versuffix=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3543 major=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3544 newdeplibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3545 droppeddeps=no
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3546 case $deplibs_check_method in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3547 pass_all)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3548 # Don't check for shared/static. Everything works.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3549 # This might be a little naive. We might want to check
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3550 # whether the library exists or not. But this is on
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3551 # osf3 & osf4 and I'm not really sure... Just
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3552 # implementing what was already the behavior.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3553 newdeplibs=$deplibs
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3554 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3555 test_compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3556 # This code stresses the "libraries are programs" paradigm to its
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3557 # limits. Maybe even breaks it. We compile a program, linking it
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3558 # against the deplibs as a proxy for the library. Then we can check
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3559 # whether they linked in statically or dynamically with ldd.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3560 $rm conftest.c
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3561 cat > conftest.c <<EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3562 int main() { return 0; }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3563 EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3564 $rm conftest
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3565 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3566 ldd_output=`ldd conftest`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3567 for i in $deplibs; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3568 name=`expr $i : '-l\(.*\)'`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3569 # If $name is empty we are operating on a -L argument.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3570 if test "$name" != "" && test "$name" != "0"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3571 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3572 case " $predeps $postdeps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3573 *" $i "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3574 newdeplibs="$newdeplibs $i"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3575 i=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3576 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3577 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3578 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3579 if test -n "$i" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3580 libname=`eval \\$echo \"$libname_spec\"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3581 deplib_matches=`eval \\$echo \"$library_names_spec\"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3582 set dummy $deplib_matches
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3583 deplib_match=$2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3584 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3585 newdeplibs="$newdeplibs $i"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3586 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3587 droppeddeps=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3588 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3589 $echo "*** Warning: dynamic linker does not accept needed library $i."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3590 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3591 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3592 $echo "*** shared version of the library, which I believe you do not have"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3593 $echo "*** because a test_compile did reveal that the linker did not use it for"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3594 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3595 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3596 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3597 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3598 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3599 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3600 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3601 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3602 # Error occurred in the first compile. Let's try to salvage
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3603 # the situation: Compile a separate program for each library.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3604 for i in $deplibs; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3605 name=`expr $i : '-l\(.*\)'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3606 # If $name is empty we are operating on a -L argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3607 if test "$name" != "" && test "$name" != "0"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3608 $rm conftest
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3609 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3610 ldd_output=`ldd conftest`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3611 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3612 case " $predeps $postdeps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3613 *" $i "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3614 newdeplibs="$newdeplibs $i"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3615 i=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3616 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3617 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3618 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3619 if test -n "$i" ; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3620 libname=`eval \\$echo \"$libname_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3621 deplib_matches=`eval \\$echo \"$library_names_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3622 set dummy $deplib_matches
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3623 deplib_match=$2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3624 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3625 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3626 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3627 droppeddeps=yes
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3628 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3629 $echo "*** Warning: dynamic linker does not accept needed library $i."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3630 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3631 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3632 $echo "*** shared version of the library, which you do not appear to have"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3633 $echo "*** because a test_compile did reveal that the linker did not use this one"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3634 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3635 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3636 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3637 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3638 droppeddeps=yes
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3639 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3640 $echo "*** Warning! Library $i is needed by this library but I was not able to"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3641 $echo "*** make it link in! You will probably need to install it or some"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3642 $echo "*** library that it depends on before this library will be fully"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3643 $echo "*** functional. Installing it before continuing would be even better."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3644 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3645 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3646 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3647 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3648 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3649 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3650 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3651 file_magic*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3652 set dummy $deplibs_check_method
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3653 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3654 for a_deplib in $deplibs; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3655 name=`expr $a_deplib : '-l\(.*\)'`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3656 # If $name is empty we are operating on a -L argument.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3657 if test "$name" != "" && test "$name" != "0"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3658 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3659 case " $predeps $postdeps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3660 *" $a_deplib "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3661 newdeplibs="$newdeplibs $a_deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3662 a_deplib=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3663 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3664 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3665 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3666 if test -n "$a_deplib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3667 libname=`eval \\$echo \"$libname_spec\"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3668 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3669 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3670 for potent_lib in $potential_libs; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3671 # Follow soft links.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3672 if ls -lLd "$potent_lib" 2>/dev/null \
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3673 | grep " -> " >/dev/null; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3674 continue
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3675 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3676 # The statement above tries to avoid entering an
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3677 # endless loop below, in case of cyclic links.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3678 # We might still enter an endless loop, since a link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3679 # loop can be closed while we follow links,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3680 # but so what?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3681 potlib="$potent_lib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3682 while test -h "$potlib" 2>/dev/null; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3683 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3684 case $potliblink in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3685 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3686 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3687 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3688 done
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3689 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3690 | ${SED} 10q \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3691 | $EGREP "$file_magic_regex" > /dev/null; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3692 newdeplibs="$newdeplibs $a_deplib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3693 a_deplib=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3694 break 2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3695 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3696 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3697 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3698 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3699 if test -n "$a_deplib" ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3700 droppeddeps=yes
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3701 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3702 $echo "*** Warning: linker path does not have real file for library $a_deplib."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3703 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3704 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3705 $echo "*** shared version of the library, which you do not appear to have"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3706 $echo "*** because I did check the linker path looking for a file starting"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3707 if test -z "$potlib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3708 $echo "*** with $libname but no candidates were found. (...for file magic test)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3709 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3710 $echo "*** with $libname and none of the candidates passed a file format test"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3711 $echo "*** using a file magic. Last file checked: $potlib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3712 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3713 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3714 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3715 # Add a -L argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3716 newdeplibs="$newdeplibs $a_deplib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3717 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3718 done # Gone through all deplibs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3719 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3720 match_pattern*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3721 set dummy $deplibs_check_method
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3722 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3723 for a_deplib in $deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3724 name=`expr $a_deplib : '-l\(.*\)'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3725 # If $name is empty we are operating on a -L argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3726 if test -n "$name" && test "$name" != "0"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3727 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3728 case " $predeps $postdeps " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3729 *" $a_deplib "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3730 newdeplibs="$newdeplibs $a_deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3731 a_deplib=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3732 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3733 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3734 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3735 if test -n "$a_deplib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3736 libname=`eval \\$echo \"$libname_spec\"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3737 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3738 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3739 for potent_lib in $potential_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3740 potlib="$potent_lib" # see symlink-check above in file_magic test
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3741 if eval $echo \"$potent_lib\" 2>/dev/null \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3742 | ${SED} 10q \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3743 | $EGREP "$match_pattern_regex" > /dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3744 newdeplibs="$newdeplibs $a_deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3745 a_deplib=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3746 break 2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3747 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3748 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3749 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3750 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3751 if test -n "$a_deplib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3752 droppeddeps=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3753 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3754 $echo "*** Warning: linker path does not have real file for library $a_deplib."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3755 $echo "*** I have the capability to make that library automatically link in when"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3756 $echo "*** you link to this library. But I can only do this if you have a"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3757 $echo "*** shared version of the library, which you do not appear to have"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3758 $echo "*** because I did check the linker path looking for a file starting"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3759 if test -z "$potlib" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3760 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3761 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3762 $echo "*** with $libname and none of the candidates passed a file format test"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3763 $echo "*** using a regex pattern. Last file checked: $potlib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3764 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3765 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3766 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3767 # Add a -L argument.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3768 newdeplibs="$newdeplibs $a_deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3769 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3770 done # Gone through all deplibs.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3771 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3772 none | unknown | *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3773 newdeplibs=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3774 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3775 -e 's/ -[LR][^ ]*//g'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3776 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3777 for i in $predeps $postdeps ; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3778 # can't use Xsed below, because $i might contain '/'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3779 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3780 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3781 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3782 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3783 | grep . >/dev/null; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3784 $echo
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3785 if test "X$deplibs_check_method" = "Xnone"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3786 $echo "*** Warning: inter-library dependencies are not supported in this platform."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3787 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3788 $echo "*** Warning: inter-library dependencies are not known to be supported."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3789 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3790 $echo "*** All declared inter-library dependencies are being dropped."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3791 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3792 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3793 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3794 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3795 versuffix=$versuffix_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3796 major=$major_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3797 release=$release_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3798 libname=$libname_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3799 name=$name_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3800
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3801 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3802 *-*-rhapsody* | *-*-darwin1.[012])
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3803 # On Rhapsody replace the C library is the System framework
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3804 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3805 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3806 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3807
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3808 if test "$droppeddeps" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3809 if test "$module" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3810 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3811 $echo "*** Warning: libtool could not satisfy all declared inter-library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3812 $echo "*** dependencies of module $libname. Therefore, libtool will create"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3813 $echo "*** a static module, that should work as long as the dlopening"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3814 $echo "*** application is linked with the -dlopen flag."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3815 if test -z "$global_symbol_pipe"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3816 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3817 $echo "*** However, this would only work if libtool was able to extract symbol"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3818 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3819 $echo "*** not find such a program. So, this module is probably useless."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3820 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3821 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3822 if test "$build_old_libs" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3823 oldlibs="$output_objdir/$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3824 build_libtool_libs=module
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3825 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3826 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3827 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3828 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3829 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3830 $echo "*** The inter-library dependencies that have been dropped here will be"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3831 $echo "*** automatically added whenever a program is linked with this library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3832 $echo "*** or is declared to -dlopen it."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3833
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3834 if test "$allow_undefined" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3835 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3836 $echo "*** Since this library must not contain undefined symbols,"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3837 $echo "*** because either the platform does not support them or"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3838 $echo "*** it was explicitly requested with -no-undefined,"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3839 $echo "*** libtool will only create a static version of it."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3840 if test "$build_old_libs" = no; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3841 oldlibs="$output_objdir/$libname.$libext"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3842 build_libtool_libs=module
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3843 build_old_libs=yes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3844 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3845 build_libtool_libs=no
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3846 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3847 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3848 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3849 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3850 # Done checking deplibs!
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3851 deplibs=$newdeplibs
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3852 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3853
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3854
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3855 # move library search paths that coincide with paths to not yet
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3856 # installed libraries to the beginning of the library search list
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3857 new_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3858 for path in $notinst_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3859 case " $new_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3860 *" -L$path/$objdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3861 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3862 case " $deplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3863 *" -L$path/$objdir "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3864 new_libs="$new_libs -L$path/$objdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3865 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3866 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3867 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3868 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3869 for deplib in $deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3870 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3871 -L*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3872 case " $new_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3873 *" $deplib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3874 *) new_libs="$new_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3875 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3876 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3877 *) new_libs="$new_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3878 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3879 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3880 deplibs="$new_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3881
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3882
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3883 # All the library-specific variables (install_libdir is set above).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3884 library_names=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3885 old_library=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3886 dlname=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3887
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3888 # Test again, we may have decided not to build it any more
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3889 if test "$build_libtool_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3890 if test "$hardcode_into_libs" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3891 # Hardcode the library paths
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3892 hardcode_libdirs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3893 dep_rpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3894 rpath="$finalize_rpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3895 test "$mode" != relink && rpath="$compile_rpath$rpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3896 for libdir in $rpath; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3897 if test -n "$hardcode_libdir_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3898 if test -n "$hardcode_libdir_separator"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3899 if test -z "$hardcode_libdirs"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3900 hardcode_libdirs="$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3901 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3902 # Just accumulate the unique libdirs.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3903 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3904 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3905 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3906 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3907 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3908 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3909 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3910 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3911 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3912 eval flag=\"$hardcode_libdir_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3913 dep_rpath="$dep_rpath $flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3914 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3915 elif test -n "$runpath_var"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3916 case "$perm_rpath " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3917 *" $libdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3918 *) perm_rpath="$perm_rpath $libdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3919 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3920 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3921 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3922 # Substitute the hardcoded libdirs into the rpath.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3923 if test -n "$hardcode_libdir_separator" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3924 test -n "$hardcode_libdirs"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3925 libdir="$hardcode_libdirs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3926 if test -n "$hardcode_libdir_flag_spec_ld"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3927 case $archive_cmds in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3928 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3929 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3930 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3931 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3932 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3933 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3934 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3935 if test -n "$runpath_var" && test -n "$perm_rpath"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3936 # We should set the runpath_var.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3937 rpath=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3938 for dir in $perm_rpath; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3939 rpath="$rpath$dir:"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3940 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3941 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3942 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3943 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3944 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3945
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3946 shlibpath="$finalize_shlibpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3947 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3948 if test -n "$shlibpath"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3949 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3950 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3951
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3952 # Get the real and link names of the library.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3953 eval shared_ext=\"$shrext_cmds\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3954 eval library_names=\"$library_names_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3955 set dummy $library_names
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3956 realname="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3957 shift; shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3958
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3959 if test -n "$soname_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3960 eval soname=\"$soname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3961 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3962 soname="$realname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3963 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3964 if test -z "$dlname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3965 dlname=$soname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3966 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3967
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3968 lib="$output_objdir/$realname"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3969 linknames=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3970 for link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3971 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3972 linknames="$linknames $link"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3973 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3974
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3975 # Use standard objects if they are pic
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3976 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3977
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3978 # Prepare the list of exported symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3979 if test -z "$export_symbols"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3980 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3981 $show "generating symbol list for \`$libname.la'"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3982 export_symbols="$output_objdir/$libname.exp"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3983 $run $rm $export_symbols
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3984 cmds=$export_symbols_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3985 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3986 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3987 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3988 eval cmd=\"$cmd\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3989 if len=`expr "X$cmd" : ".*"` &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3990 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3991 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3992 $run eval "$cmd" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3993 skipped_export=false
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3994 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3995 # The command line is too long to execute in one step.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3996 $show "using reloadable object file for export list..."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3997 skipped_export=:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3998 # Break out early, otherwise skipped_export may be
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
3999 # set to false by a later but shorter cmd.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4000 break
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4001 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4002 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4003 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4004 if test -n "$export_symbols_regex"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4005 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4006 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4007 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4008 $run eval '$mv "${export_symbols}T" "$export_symbols"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4009 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4010 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4011 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4012
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4013 if test -n "$export_symbols" && test -n "$include_expsyms"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4014 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4015 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4016
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4017 tmp_deplibs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4018 for test_deplib in $deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4019 case " $convenience " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4020 *" $test_deplib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4021 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4022 tmp_deplibs="$tmp_deplibs $test_deplib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4023 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4024 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4025 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4026 deplibs="$tmp_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4027
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4028 if test -n "$convenience"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4029 if test -n "$whole_archive_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4030 save_libobjs=$libobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4031 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4032 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4033 gentop="$output_objdir/${outputname}x"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4034 generated="$generated $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4035
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4036 func_extract_archives $gentop $convenience
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4037 libobjs="$libobjs $func_extract_archives_result"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4038 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4039 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4040
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4041 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4042 eval flag=\"$thread_safe_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4043 linker_flags="$linker_flags $flag"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4044 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4045
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4046 # Make a backup of the uninstalled library when relinking
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4047 if test "$mode" = relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4048 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4049 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4050
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4051 # Do each of the archive commands.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4052 if test "$module" = yes && test -n "$module_cmds" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4053 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4054 eval test_cmds=\"$module_expsym_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4055 cmds=$module_expsym_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4056 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4057 eval test_cmds=\"$module_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4058 cmds=$module_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4059 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4060 else
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4061 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4062 eval test_cmds=\"$archive_expsym_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4063 cmds=$archive_expsym_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4064 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4065 eval test_cmds=\"$archive_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4066 cmds=$archive_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4067 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4068 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4069
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4070 if test "X$skipped_export" != "X:" &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4071 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4072 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4073 :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4074 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4075 # The command line is too long to link in one step, link piecewise.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4076 $echo "creating reloadable object files..."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4077
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4078 # Save the value of $output and $libobjs because we want to
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4079 # use them later. If we have whole_archive_flag_spec, we
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4080 # want to use save_libobjs as it was before
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4081 # whole_archive_flag_spec was expanded, because we can't
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4082 # assume the linker understands whole_archive_flag_spec.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4083 # This may have to be revisited, in case too many
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4084 # convenience libraries get linked in and end up exceeding
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4085 # the spec.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4086 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4087 save_libobjs=$libobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4088 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4089 save_output=$output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4090 output_la=`$echo "X$output" | $Xsed -e "$basename"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4091
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4092 # Clear the reloadable object creation command queue and
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4093 # initialize k to one.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4094 test_cmds=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4095 concat_cmds=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4096 objlist=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4097 delfiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4098 last_robj=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4099 k=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4100 output=$output_objdir/$output_la-${k}.$objext
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4101 # Loop over the list of objects to be linked.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4102 for obj in $save_libobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4103 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4104 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4105 if test "X$objlist" = X ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4106 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4107 test "$len" -le "$max_cmd_len"; }; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4108 objlist="$objlist $obj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4109 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4110 # The command $test_cmds is almost too long, add a
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4111 # command to the queue.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4112 if test "$k" -eq 1 ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4113 # The first file doesn't have a previous command to add.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4114 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4115 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4116 # All subsequent reloadable object files will link in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4117 # the last one created.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4118 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4119 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4120 last_robj=$output_objdir/$output_la-${k}.$objext
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4121 k=`expr $k + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4122 output=$output_objdir/$output_la-${k}.$objext
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4123 objlist=$obj
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4124 len=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4125 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4126 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4127 # Handle the remaining objects by creating one last
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4128 # reloadable object file. All subsequent reloadable object
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4129 # files will link in the last one created.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4130 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4131 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4132
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4133 if ${skipped_export-false}; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4134 $show "generating symbol list for \`$libname.la'"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4135 export_symbols="$output_objdir/$libname.exp"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4136 $run $rm $export_symbols
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4137 libobjs=$output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4138 # Append the command to create the export file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4139 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4140 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4141
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4142 # Set up a command to remove the reloadable object files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4143 # after they are used.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4144 i=0
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4145 while test "$i" -lt "$k"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4146 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4147 i=`expr $i + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4148 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4149 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4150
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4151 $echo "creating a temporary reloadable object file: $output"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4152
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4153 # Loop through the commands generated above and execute them.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4154 save_ifs="$IFS"; IFS='~'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4155 for cmd in $concat_cmds; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4156 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4157 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4158 $run eval "$cmd" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4159 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4160 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4161
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4162 libobjs=$output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4163 # Restore the value of output.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4164 output=$save_output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4165
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4166 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4167 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4168 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4169 # Expand the library linking commands again to reset the
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4170 # value of $libobjs for piecewise linking.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4171
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4172 # Do each of the archive commands.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4173 if test "$module" = yes && test -n "$module_cmds" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4174 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4175 cmds=$module_expsym_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4176 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4177 cmds=$module_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4178 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4179 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4180 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4181 cmds=$archive_expsym_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4182 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4183 cmds=$archive_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4184 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4185 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4186
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4187 # Append the command to remove the reloadable object files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4188 # to the just-reset $cmds.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4189 eval cmds=\"\$cmds~\$rm $delfiles\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4190 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4191 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4192 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4193 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4194 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4195 $show "$cmd"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4196 $run eval "$cmd" || {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4197 lt_exit=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4198
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4199 # Restore the uninstalled library and exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4200 if test "$mode" = relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4201 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4202 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4203
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4204 exit $lt_exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4205 }
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4206 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4207 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4208
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4209 # Restore the uninstalled library and exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4210 if test "$mode" = relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4211 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4212
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4213 if test -n "$convenience"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4214 if test -z "$whole_archive_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4215 $show "${rm}r $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4216 $run ${rm}r "$gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4217 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4218 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4219
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4220 exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4221 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4222
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4223 # Create links to the real library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4224 for linkname in $linknames; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4225 if test "$realname" != "$linkname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4226 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4227 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4228 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4229 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4230
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4231 # If -module or -export-dynamic was specified, set the dlname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4232 if test "$module" = yes || test "$export_dynamic" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4233 # On all known operating systems, these are identical.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4234 dlname="$soname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4235 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4236 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4237 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4238
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4239 obj)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4240 if test -n "$deplibs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4241 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4242 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4243
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4244 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4245 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4246 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4247
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4248 if test -n "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4249 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4250 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4251
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4252 if test -n "$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4253 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4254 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4255
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4256 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4257 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4258 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4259
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4260 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4261 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4262 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4263
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4264 case $output in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4265 *.lo)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4266 if test -n "$objs$old_deplibs"; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4267 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4268 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4269 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4270 libobj="$output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4271 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4272 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4273 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4274 libobj=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4275 obj="$output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4276 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4277 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4278
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4279 # Delete the old objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4280 $run $rm $obj $libobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4281
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4282 # Objects from convenience libraries. This assumes
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4283 # single-version convenience libraries. Whenever we create
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4284 # different ones for PIC/non-PIC, this we'll have to duplicate
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4285 # the extraction.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4286 reload_conv_objs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4287 gentop=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4288 # reload_cmds runs $LD directly, so let us get rid of
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4289 # -Wl from whole_archive_flag_spec and hope we can get by with
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4290 # turning comma into space..
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4291 wl=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4292
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4293 if test -n "$convenience"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4294 if test -n "$whole_archive_flag_spec"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4295 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4296 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4297 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4298 gentop="$output_objdir/${obj}x"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4299 generated="$generated $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4300
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4301 func_extract_archives $gentop $convenience
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4302 reload_conv_objs="$reload_objs $func_extract_archives_result"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4303 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4304 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4305
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4306 # Create the old-style object.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4307 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4308
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4309 output="$obj"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4310 cmds=$reload_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4311 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4312 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4313 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4314 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4315 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4316 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4317 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4318 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4319
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4320 # Exit if we aren't doing a library object file.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4321 if test -z "$libobj"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4322 if test -n "$gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4323 $show "${rm}r $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4324 $run ${rm}r $gentop
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4325 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4326
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4327 exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4328 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4329
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4330 if test "$build_libtool_libs" != yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4331 if test -n "$gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4332 $show "${rm}r $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4333 $run ${rm}r $gentop
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4334 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4335
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4336 # Create an invalid libtool object if no PIC, so that we don't
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4337 # accidentally link it into a program.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4338 # $show "echo timestamp > $libobj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4339 # $run eval "echo timestamp > $libobj" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4340 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4341 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4342
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4343 if test -n "$pic_flag" || test "$pic_mode" != default; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4344 # Only do commands if we really have different PIC objects.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4345 reload_objs="$libobjs $reload_conv_objs"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4346 output="$libobj"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4347 cmds=$reload_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4348 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4349 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4350 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4351 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4352 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4353 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4354 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4355 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4356 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4357
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4358 if test -n "$gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4359 $show "${rm}r $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4360 $run ${rm}r $gentop
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4361 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4362
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4363 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4364 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4365
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4366 prog)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4367 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4368 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4369 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4370 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4371 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4372 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4373
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4374 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4375 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4376 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4377
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4378 if test "$preload" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4379 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4380 test "$dlopen_self_static" = unknown; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4381 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4382 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4383 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4384
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4385 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4386 *-*-rhapsody* | *-*-darwin1.[012])
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4387 # On Rhapsody replace the C library is the System framework
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4388 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4389 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4390 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4391 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4392
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4393 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4394 *darwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4395 # Don't allow lazy linking, it breaks C++ global constructors
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4396 if test "$tagname" = CXX ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4397 compile_command="$compile_command ${wl}-bind_at_load"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4398 finalize_command="$finalize_command ${wl}-bind_at_load"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4399 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4400 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4401 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4402
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4403
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4404 # move library search paths that coincide with paths to not yet
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4405 # installed libraries to the beginning of the library search list
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4406 new_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4407 for path in $notinst_path; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4408 case " $new_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4409 *" -L$path/$objdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4410 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4411 case " $compile_deplibs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4412 *" -L$path/$objdir "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4413 new_libs="$new_libs -L$path/$objdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4414 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4415 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4416 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4417 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4418 for deplib in $compile_deplibs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4419 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4420 -L*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4421 case " $new_libs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4422 *" $deplib "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4423 *) new_libs="$new_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4424 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4425 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4426 *) new_libs="$new_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4427 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4428 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4429 compile_deplibs="$new_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4430
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4431
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4432 compile_command="$compile_command $compile_deplibs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4433 finalize_command="$finalize_command $finalize_deplibs"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4434
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4435 if test -n "$rpath$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4436 # If the user specified any rpath flags, then add them.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4437 for libdir in $rpath $xrpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4438 # This is the magic to use -rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4439 case "$finalize_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4440 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4441 *) finalize_rpath="$finalize_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4442 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4443 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4444 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4445
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4446 # Now hardcode the library paths
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4447 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4448 hardcode_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4449 for libdir in $compile_rpath $finalize_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4450 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4451 if test -n "$hardcode_libdir_separator"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4452 if test -z "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4453 hardcode_libdirs="$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4454 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4455 # Just accumulate the unique libdirs.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4456 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4457 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4458 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4459 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4460 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4461 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4462 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4463 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4464 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4465 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4466 rpath="$rpath $flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4467 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4468 elif test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4469 case "$perm_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4470 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4471 *) perm_rpath="$perm_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4472 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4473 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4474 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4475 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4476 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4477 case :$dllsearchpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4478 *":$libdir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4479 *) dllsearchpath="$dllsearchpath:$libdir";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4480 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4481 case :$dllsearchpath: in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4482 *":$testbindir:"*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4483 *) dllsearchpath="$dllsearchpath:$testbindir";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4484 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4485 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4486 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4487 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4488 # Substitute the hardcoded libdirs into the rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4489 if test -n "$hardcode_libdir_separator" &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4490 test -n "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4491 libdir="$hardcode_libdirs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4492 eval rpath=\" $hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4493 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4494 compile_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4495
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4496 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4497 hardcode_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4498 for libdir in $finalize_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4499 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4500 if test -n "$hardcode_libdir_separator"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4501 if test -z "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4502 hardcode_libdirs="$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4503 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4504 # Just accumulate the unique libdirs.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4505 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4506 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4507 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4508 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4509 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4510 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4511 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4512 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4513 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4514 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4515 rpath="$rpath $flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4516 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4517 elif test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4518 case "$finalize_perm_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4519 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4520 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4521 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4522 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4523 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4524 # Substitute the hardcoded libdirs into the rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4525 if test -n "$hardcode_libdir_separator" &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4526 test -n "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4527 libdir="$hardcode_libdirs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4528 eval rpath=\" $hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4529 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4530 finalize_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4531
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4532 if test -n "$libobjs" && test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4533 # Transform all the library objects into standard objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4534 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4535 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4536 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4537
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4538 dlsyms=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4539 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4540 if test -n "$NM" && test -n "$global_symbol_pipe"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4541 dlsyms="${outputname}S.c"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4542 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4543 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4544 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4545 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4546
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4547 if test -n "$dlsyms"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4548 case $dlsyms in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4549 "") ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4550 *.c)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4551 # Discover the nlist of each of the dlfiles.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4552 nlist="$output_objdir/${outputname}.nm"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4553
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4554 $show "$rm $nlist ${nlist}S ${nlist}T"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4555 $run $rm "$nlist" "${nlist}S" "${nlist}T"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4556
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4557 # Parse the name list into a source file.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4558 $show "creating $output_objdir/$dlsyms"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4559
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4560 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4561 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4562 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4563
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4564 #ifdef __cplusplus
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4565 extern \"C\" {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4566 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4567
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4568 /* Prevent the only kind of declaration conflicts we can make. */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4569 #define lt_preloaded_symbols some_other_symbol
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4570
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4571 /* External symbol declarations for the compiler. */\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4572 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4573
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4574 if test "$dlself" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4575 $show "generating symbol list for \`$output'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4576
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4577 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4578
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4579 # Add our own program objects to the symbol list.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4580 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4581 for arg in $progfiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4582 $show "extracting global C symbols from \`$arg'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4583 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4584 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4585
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4586 if test -n "$exclude_expsyms"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4587 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4588 $run eval '$mv "$nlist"T "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4589 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4590
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4591 if test -n "$export_symbols_regex"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4592 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4593 $run eval '$mv "$nlist"T "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4594 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4595
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4596 # Prepare the list of exported symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4597 if test -z "$export_symbols"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4598 export_symbols="$output_objdir/$outputname.exp"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4599 $run $rm $export_symbols
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4600 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4601 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4602 *cygwin* | *mingw* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4603 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4604 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4605 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4606 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4607 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4608 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4609 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4610 $run eval 'mv "$nlist"T "$nlist"'
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4611 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4612 *cygwin* | *mingw* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4613 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4614 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4615 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4616 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4617 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4618 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4619
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4620 for arg in $dlprefiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4621 $show "extracting global C symbols from \`$arg'"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4622 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4623 $run eval '$echo ": $name " >> "$nlist"'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4624 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4625 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4626
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4627 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4628 # Make sure we have at least an empty file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4629 test -f "$nlist" || : > "$nlist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4630
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4631 if test -n "$exclude_expsyms"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4632 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4633 $mv "$nlist"T "$nlist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4634 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4635
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4636 # Try sorting and uniquifying the output.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4637 if grep -v "^: " < "$nlist" |
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4638 if sort -k 3 </dev/null >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4639 sort -k 3
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4640 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4641 sort +2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4642 fi |
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4643 uniq > "$nlist"S; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4644 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4645 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4646 grep -v "^: " < "$nlist" > "$nlist"S
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4647 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4648
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4649 if test -f "$nlist"S; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4650 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4651 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4652 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4653 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4654
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4655 $echo >> "$output_objdir/$dlsyms" "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4656
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4657 #undef lt_preloaded_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4658
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4659 #if defined (__STDC__) && __STDC__
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4660 # define lt_ptr void *
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4661 #else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4662 # define lt_ptr char *
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4663 # define const
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4664 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4665
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4666 /* The mapping between symbol names and symbols. */
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4667 "
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4668
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4669 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4670 *cygwin* | *mingw* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4671 $echo >> "$output_objdir/$dlsyms" "\
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4672 /* DATA imports from DLLs on WIN32 can't be const, because
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4673 runtime relocations are performed -- see ld's documentation
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4674 on pseudo-relocs */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4675 struct {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4676 "
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4677 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4678 * )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4679 $echo >> "$output_objdir/$dlsyms" "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4680 const struct {
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4681 "
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4682 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4683 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4684
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4685
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4686 $echo >> "$output_objdir/$dlsyms" "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4687 const char *name;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4688 lt_ptr address;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4689 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4690 lt_preloaded_symbols[] =
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4691 {\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4692 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4693
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4694 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4695
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4696 $echo >> "$output_objdir/$dlsyms" "\
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4697 {0, (lt_ptr) 0}
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4698 };
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4699
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4700 /* This works around a problem in FreeBSD linker */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4701 #ifdef FREEBSD_WORKAROUND
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4702 static const void *lt_preloaded_setup() {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4703 return lt_preloaded_symbols;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4704 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4705 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4706
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4707 #ifdef __cplusplus
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4708 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4709 #endif\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4710 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4711 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4712
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4713 pic_flag_for_symtable=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4714 case $host in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4715 # compiling the symbol table file with pic_flag works around
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4716 # a FreeBSD bug that causes programs to crash when -lm is
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4717 # linked before any other PIC object. But we must not use
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4718 # pic_flag when linking with -static. The problem exists in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4719 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4720 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4721 case "$compile_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4722 *" -static "*) ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4723 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4724 esac;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4725 *-*-hpux*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4726 case "$compile_command " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4727 *" -static "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4728 *) pic_flag_for_symtable=" $pic_flag";;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4729 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4730 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4731
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4732 # Now compile the dynamic symbol file.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4733 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4734 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4735
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4736 # Clean up the generated files.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4737 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4738 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4739
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4740 # Transform the symbol file into the correct name.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4741 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4742 *cygwin* | *mingw* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4743 if test -f "$output_objdir/${outputname}.def" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4744 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4745 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4746 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4747 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4748 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4749 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4750 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4751 * )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4752 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4753 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4754 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4755 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4756 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4757 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4758 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4759 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4760 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4761 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4762 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4763 # We keep going just in case the user didn't refer to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4764 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4765 # really was required.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4766
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4767 # Nullify the symbol file.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4768 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4769 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4770 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4771
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4772 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4773 # Replace the output file specification.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4774 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4775 link_command="$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4776
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4777 # We have no uninstalled library dependencies, so finalize right now.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4778 $show "$link_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4779 $run eval "$link_command"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4780 exit_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4781
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4782 # Delete the generated files.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4783 if test -n "$dlsyms"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4784 $show "$rm $output_objdir/${outputname}S.${objext}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4785 $run $rm "$output_objdir/${outputname}S.${objext}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4786 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4787
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4788 exit $exit_status
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4789 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4790
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4791 if test -n "$shlibpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4792 # We should set the shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4793 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4794 for dir in $temp_rpath; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4795 case $dir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4796 [\\/]* | [A-Za-z]:[\\/]*)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4797 # Absolute path.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4798 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4799 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4800 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4801 # Relative path: add a thisdir entry.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4802 rpath="$rpath\$thisdir/$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4803 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4804 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4805 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4806 temp_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4807 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4808
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4809 if test -n "$compile_shlibpath$finalize_shlibpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4810 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4811 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4812 if test -n "$finalize_shlibpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4813 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4814 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4815
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4816 compile_var=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4817 finalize_var=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4818 if test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4819 if test -n "$perm_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4820 # We should set the runpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4821 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4822 for dir in $perm_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4823 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4824 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4825 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4826 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4827 if test -n "$finalize_perm_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4828 # We should set the runpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4829 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4830 for dir in $finalize_perm_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4831 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4832 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4833 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4834 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4835 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4836
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4837 if test "$no_install" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4838 # We don't need to create a wrapper script.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4839 link_command="$compile_var$compile_command$compile_rpath"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4840 # Replace the output file specification.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4841 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4842 # Delete the old output file.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4843 $run $rm $output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4844 # Link the executable and exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4845 $show "$link_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4846 $run eval "$link_command" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4847 exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4848 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4849
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4850 if test "$hardcode_action" = relink; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4851 # Fast installation is not supported
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4852 link_command="$compile_var$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4853 relink_command="$finalize_var$finalize_command$finalize_rpath"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4854
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4855 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4856 $echo "$modename: \`$output' will be relinked during installation" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4857 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4858 if test "$fast_install" != no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4859 link_command="$finalize_var$compile_command$finalize_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4860 if test "$fast_install" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4861 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4862 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4863 # fast_install is set to needless
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4864 relink_command=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4865 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4866 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4867 link_command="$compile_var$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4868 relink_command="$finalize_var$finalize_command$finalize_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4869 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4870 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4871
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4872 # Replace the output file specification.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4873 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4874
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4875 # Delete the old output files.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4876 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4877
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4878 $show "$link_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4879 $run eval "$link_command" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4880
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4881 # Now create the wrapper script.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4882 $show "creating $output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4883
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4884 # Quote the relink command for shipping.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4885 if test -n "$relink_command"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4886 # Preserve any variables that may affect compiler behavior
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4887 for var in $variables_saved_for_relink; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4888 if eval test -z \"\${$var+set}\"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4889 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4890 elif eval var_value=\$$var; test -z "$var_value"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4891 relink_command="$var=; export $var; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4892 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4893 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4894 relink_command="$var=\"$var_value\"; export $var; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4895 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4896 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4897 relink_command="(cd `pwd`; $relink_command)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4898 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4899 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4900
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4901 # Quote $echo for shipping.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4902 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4903 case $progpath in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4904 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4905 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4906 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4907 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4908 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4909 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4910 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4911
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4912 # Only actually do things if our run command is non-null.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4913 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4914 # win32 will think the script is a binary if it has
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4915 # a .exe suffix, so we strip it off here.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4916 case $output in
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4917 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4918 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4919 # test for cygwin because mv fails w/o .exe extensions
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4920 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4921 *cygwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4922 exeext=.exe
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4923 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4924 *) exeext= ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4925 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4926 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4927 *cygwin* | *mingw* )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4928 output_name=`basename $output`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4929 output_path=`dirname $output`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4930 cwrappersource="$output_path/$objdir/lt-$output_name.c"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4931 cwrapper="$output_path/$output_name.exe"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4932 $rm $cwrappersource $cwrapper
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4933 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4934
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4935 cat > $cwrappersource <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4936
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4937 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4938 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4939
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4940 The $output program cannot be directly executed until all the libtool
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4941 libraries that it depends on are installed.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4942
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4943 This wrapper executable should never be moved out of the build directory.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4944 If it is, it will not operate correctly.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4945
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4946 Currently, it simply execs the wrapper *script* "/bin/sh $output",
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4947 but could eventually absorb all of the scripts functionality and
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4948 exec $objdir/$outputname directly.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4949 */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4950 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4951 cat >> $cwrappersource<<"EOF"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4952 #include <stdio.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4953 #include <stdlib.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4954 #include <unistd.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4955 #include <malloc.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4956 #include <stdarg.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4957 #include <assert.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4958 #include <string.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4959 #include <ctype.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4960 #include <sys/stat.h>
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4961
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4962 #if defined(PATH_MAX)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4963 # define LT_PATHMAX PATH_MAX
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4964 #elif defined(MAXPATHLEN)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4965 # define LT_PATHMAX MAXPATHLEN
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4966 #else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4967 # define LT_PATHMAX 1024
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4968 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4969
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4970 #ifndef DIR_SEPARATOR
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4971 # define DIR_SEPARATOR '/'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4972 # define PATH_SEPARATOR ':'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4973 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4974
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4975 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4976 defined (__OS2__)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4977 # define HAVE_DOS_BASED_FILE_SYSTEM
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4978 # ifndef DIR_SEPARATOR_2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4979 # define DIR_SEPARATOR_2 '\\'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4980 # endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4981 # ifndef PATH_SEPARATOR_2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4982 # define PATH_SEPARATOR_2 ';'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4983 # endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4984 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4985
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4986 #ifndef DIR_SEPARATOR_2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4987 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4988 #else /* DIR_SEPARATOR_2 */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4989 # define IS_DIR_SEPARATOR(ch) \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4990 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4991 #endif /* DIR_SEPARATOR_2 */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4992
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4993 #ifndef PATH_SEPARATOR_2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4994 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4995 #else /* PATH_SEPARATOR_2 */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4996 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4997 #endif /* PATH_SEPARATOR_2 */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4998
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
4999 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5000 #define XFREE(stale) do { \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5001 if (stale) { free ((void *) stale); stale = 0; } \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5002 } while (0)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5003
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5004 /* -DDEBUG is fairly common in CFLAGS. */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5005 #undef DEBUG
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5006 #if defined DEBUGWRAPPER
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5007 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5008 #else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5009 # define DEBUG(format, ...)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5010 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5011
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5012 const char *program_name = NULL;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5013
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5014 void * xmalloc (size_t num);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5015 char * xstrdup (const char *string);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5016 const char * base_name (const char *name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5017 char * find_executable(const char *wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5018 int check_executable(const char *path);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5019 char * strendzap(char *str, const char *pat);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5020 void lt_fatal (const char *message, ...);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5021
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5022 int
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5023 main (int argc, char *argv[])
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5024 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5025 char **newargz;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5026 int i;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5027
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5028 program_name = (char *) xstrdup (base_name (argv[0]));
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5029 DEBUG("(main) argv[0] : %s\n",argv[0]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5030 DEBUG("(main) program_name : %s\n",program_name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5031 newargz = XMALLOC(char *, argc+2);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5032 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5033
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5034 cat >> $cwrappersource <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5035 newargz[0] = (char *) xstrdup("$SHELL");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5036 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5037
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5038 cat >> $cwrappersource <<"EOF"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5039 newargz[1] = find_executable(argv[0]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5040 if (newargz[1] == NULL)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5041 lt_fatal("Couldn't find %s", argv[0]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5042 DEBUG("(main) found exe at : %s\n",newargz[1]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5043 /* we know the script has the same name, without the .exe */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5044 /* so make sure newargz[1] doesn't end in .exe */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5045 strendzap(newargz[1],".exe");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5046 for (i = 1; i < argc; i++)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5047 newargz[i+1] = xstrdup(argv[i]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5048 newargz[argc+1] = NULL;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5049
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5050 for (i=0; i<argc+1; i++)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5051 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5052 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5053 ;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5054 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5055
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5056 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5057
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5058 case $host_os in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5059 mingw*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5060 cat >> $cwrappersource <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5061 execv("$SHELL",(char const **)newargz);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5062 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5063 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5064 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5065 cat >> $cwrappersource <<EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5066 execv("$SHELL",newargz);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5067 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5068 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5069 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5070
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5071 cat >> $cwrappersource <<"EOF"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5072 return 127;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5073 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5074
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5075 void *
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5076 xmalloc (size_t num)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5077 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5078 void * p = (void *) malloc (num);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5079 if (!p)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5080 lt_fatal ("Memory exhausted");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5081
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5082 return p;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5083 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5084
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5085 char *
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5086 xstrdup (const char *string)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5087 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5088 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5089 ;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5090 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5091
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5092 const char *
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5093 base_name (const char *name)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5094 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5095 const char *base;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5096
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5097 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5098 /* Skip over the disk name in MSDOS pathnames. */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5099 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5100 name += 2;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5101 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5102
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5103 for (base = name; *name; name++)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5104 if (IS_DIR_SEPARATOR (*name))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5105 base = name + 1;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5106 return base;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5107 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5108
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5109 int
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5110 check_executable(const char * path)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5111 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5112 struct stat st;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5113
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5114 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5115 if ((!path) || (!*path))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5116 return 0;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5117
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5118 if ((stat (path, &st) >= 0) &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5119 (
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5120 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5121 #if defined (S_IXOTH)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5122 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5123 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5124 #if defined (S_IXGRP)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5125 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5126 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5127 ((st.st_mode & S_IXUSR) == S_IXUSR))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5128 )
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5129 return 1;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5130 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5131 return 0;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5132 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5133
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5134 /* Searches for the full path of the wrapper. Returns
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5135 newly allocated full path name if found, NULL otherwise */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5136 char *
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5137 find_executable (const char* wrapper)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5138 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5139 int has_slash = 0;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5140 const char* p;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5141 const char* p_next;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5142 /* static buffer for getcwd */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5143 char tmp[LT_PATHMAX + 1];
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5144 int tmp_len;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5145 char* concat_name;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5146
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5147 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5148
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5149 if ((wrapper == NULL) || (*wrapper == '\0'))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5150 return NULL;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5151
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5152 /* Absolute path? */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5153 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5154 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5155 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5156 concat_name = xstrdup (wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5157 if (check_executable(concat_name))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5158 return concat_name;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5159 XFREE(concat_name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5160 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5161 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5162 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5163 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5164 if (IS_DIR_SEPARATOR (wrapper[0]))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5165 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5166 concat_name = xstrdup (wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5167 if (check_executable(concat_name))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5168 return concat_name;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5169 XFREE(concat_name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5170 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5171 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5172 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5173 #endif
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5174
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5175 for (p = wrapper; *p; p++)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5176 if (*p == '/')
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5177 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5178 has_slash = 1;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5179 break;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5180 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5181 if (!has_slash)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5182 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5183 /* no slashes; search PATH */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5184 const char* path = getenv ("PATH");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5185 if (path != NULL)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5186 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5187 for (p = path; *p; p = p_next)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5188 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5189 const char* q;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5190 size_t p_len;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5191 for (q = p; *q; q++)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5192 if (IS_PATH_SEPARATOR(*q))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5193 break;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5194 p_len = q - p;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5195 p_next = (*q == '\0' ? q : q + 1);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5196 if (p_len == 0)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5197 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5198 /* empty path: current directory */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5199 if (getcwd (tmp, LT_PATHMAX) == NULL)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5200 lt_fatal ("getcwd failed");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5201 tmp_len = strlen(tmp);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5202 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5203 memcpy (concat_name, tmp, tmp_len);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5204 concat_name[tmp_len] = '/';
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5205 strcpy (concat_name + tmp_len + 1, wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5206 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5207 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5208 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5209 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5210 memcpy (concat_name, p, p_len);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5211 concat_name[p_len] = '/';
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5212 strcpy (concat_name + p_len + 1, wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5213 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5214 if (check_executable(concat_name))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5215 return concat_name;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5216 XFREE(concat_name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5217 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5218 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5219 /* not found in PATH; assume curdir */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5220 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5221 /* Relative path | not found in path: prepend cwd */
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5222 if (getcwd (tmp, LT_PATHMAX) == NULL)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5223 lt_fatal ("getcwd failed");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5224 tmp_len = strlen(tmp);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5225 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5226 memcpy (concat_name, tmp, tmp_len);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5227 concat_name[tmp_len] = '/';
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5228 strcpy (concat_name + tmp_len + 1, wrapper);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5229
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5230 if (check_executable(concat_name))
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5231 return concat_name;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5232 XFREE(concat_name);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5233 return NULL;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5234 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5235
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5236 char *
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5237 strendzap(char *str, const char *pat)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5238 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5239 size_t len, patlen;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5240
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5241 assert(str != NULL);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5242 assert(pat != NULL);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5243
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5244 len = strlen(str);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5245 patlen = strlen(pat);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5246
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5247 if (patlen <= len)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5248 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5249 str += len - patlen;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5250 if (strcmp(str, pat) == 0)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5251 *str = '\0';
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5252 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5253 return str;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5254 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5255
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5256 static void
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5257 lt_error_core (int exit_status, const char * mode,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5258 const char * message, va_list ap)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5259 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5260 fprintf (stderr, "%s: %s: ", program_name, mode);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5261 vfprintf (stderr, message, ap);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5262 fprintf (stderr, ".\n");
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5263
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5264 if (exit_status >= 0)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5265 exit (exit_status);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5266 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5267
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5268 void
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5269 lt_fatal (const char *message, ...)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5270 {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5271 va_list ap;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5272 va_start (ap, message);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5273 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5274 va_end (ap);
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5275 }
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5276 EOF
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5277 # we should really use a build-platform specific compiler
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5278 # here, but OTOH, the wrappers (shell script and this C one)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5279 # are only useful if you want to execute the "real" binary.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5280 # Since the "real" binary is built for $host, then this
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5281 # wrapper might as well be built for $host, too.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5282 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5283 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5284 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5285 $rm $output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5286 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5287
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5288 $echo > $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5289 #! $SHELL
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5290
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5291 # $output - temporary wrapper script for $objdir/$outputname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5292 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5293 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5294 # The $output program cannot be directly executed until all the libtool
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5295 # libraries that it depends on are installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5296 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5297 # This wrapper script should never be moved out of the build directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5298 # If it is, it will not operate correctly.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5299
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5300 # Sed substitution that helps us do robust quoting. It backslashifies
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5301 # metacharacters that are still active within double-quoted strings.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5302 Xsed='${SED} -e 1s/^X//'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5303 sed_quote_subst='$sed_quote_subst'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5304
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5305 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5306 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5307 emulate sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5308 NULLCMD=:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5309 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5310 # is contrary to our usage. Disable this feature.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5311 alias -g '\${1+\"\$@\"}'='\"\$@\"'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5312 setopt NO_GLOB_SUBST
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5313 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5314 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5315 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5316 BIN_SH=xpg4; export BIN_SH # for Tru64
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5317 DUALCASE=1; export DUALCASE # for MKS sh
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5318
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5319 # The HP-UX ksh and POSIX shell print the target directory to stdout
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5320 # if CDPATH is set.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5321 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5322
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5323 relink_command=\"$relink_command\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5324
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5325 # This environment variable determines our operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5326 if test \"\$libtool_install_magic\" = \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5327 # install mode needs the following variable:
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5328 notinst_deplibs='$notinst_deplibs'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5329 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5330 # When we are sourced in execute mode, \$file and \$echo are already set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5331 if test \"\$libtool_execute_magic\" != \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5332 echo=\"$qecho\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5333 file=\"\$0\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5334 # Make sure echo works.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5335 if test \"X\$1\" = X--no-reexec; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5336 # Discard the --no-reexec flag, and continue.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5337 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5338 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5339 # Yippee, \$echo works!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5340 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5341 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5342 # Restart under the correct shell, and then maybe \$echo will work.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5343 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5344 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5345 fi\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5346 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5347 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5348
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5349 # Find the directory that this script lives in.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5350 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5351 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5352
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5353 # Follow symbolic links until we get to the real thisdir.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5354 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5355 while test -n \"\$file\"; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5356 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5357
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5358 # If there was a directory component, then change thisdir.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5359 if test \"x\$destdir\" != \"x\$file\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5360 case \"\$destdir\" in
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5361 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5362 *) thisdir=\"\$thisdir/\$destdir\" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5363 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5364 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5365
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5366 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5367 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5368 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5369
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5370 # Try to get the absolute directory name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5371 absdir=\`cd \"\$thisdir\" && pwd\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5372 test -n \"\$absdir\" && thisdir=\"\$absdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5373 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5374
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5375 if test "$fast_install" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5376 $echo >> $output "\
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5377 program=lt-'$outputname'$exeext
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5378 progdir=\"\$thisdir/$objdir\"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5379
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5380 if test ! -f \"\$progdir/\$program\" || \\
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5381 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5382 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5383
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5384 file=\"\$\$-\$program\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5385
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5386 if test ! -d \"\$progdir\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5387 $mkdir \"\$progdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5388 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5389 $rm \"\$progdir/\$file\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5390 fi"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5391
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5392 $echo >> $output "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5393
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5394 # relink executable if necessary
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5395 if test -n \"\$relink_command\"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5396 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5397 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5398 $echo \"\$relink_command_output\" >&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5399 $rm \"\$progdir/\$file\"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5400 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5401 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5402 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5403
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5404 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5405 { $rm \"\$progdir/\$program\";
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5406 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5407 $rm \"\$progdir/\$file\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5408 fi"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5409 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5410 $echo >> $output "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5411 program='$outputname'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5412 progdir=\"\$thisdir/$objdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5413 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5414 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5415
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5416 $echo >> $output "\
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5417
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5418 if test -f \"\$progdir/\$program\"; then"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5419
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5420 # Export our shlibpath_var if we have one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5421 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5422 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5423 # Add our own library path to $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5424 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5425
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5426 # Some systems cannot cope with colon-terminated $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5427 # The second colon is a workaround for a bug in BeOS R4 sed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5428 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5429
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5430 export $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5431 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5432 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5433
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5434 # fixup the dll searchpath if we need to.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5435 if test -n "$dllsearchpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5436 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5437 # Add the dll search path components to the executable PATH
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5438 PATH=$dllsearchpath:\$PATH
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5439 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5440 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5441
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5442 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5443 if test \"\$libtool_execute_magic\" != \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5444 # Run the actual program with our arguments.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5445 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5446 case $host in
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5447 # Backslashes separate directories on plain windows
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5448 *-*-mingw | *-*-os2*)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5449 $echo >> $output "\
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5450 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5451 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5452 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5453
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5454 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5455 $echo >> $output "\
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5456 exec \"\$progdir/\$program\" \${1+\"\$@\"}
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5457 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5458 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5459 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5460 $echo >> $output "\
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5461 \$echo \"\$0: cannot exec \$program \$*\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5462 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5463 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5464 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5465 # The program doesn't exist.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5466 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5467 \$echo \"This script is just a wrapper for \$program.\" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5468 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5469 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5470 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5471 fi\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5472 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5473 chmod +x $output
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5474 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5475 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5476 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5477 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5478
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5479 # See if we need to build an old-fashioned archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5480 for oldlib in $oldlibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5481
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5482 if test "$build_libtool_libs" = convenience; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5483 oldobjs="$libobjs_save"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5484 addlibs="$convenience"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5485 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5486 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5487 if test "$build_libtool_libs" = module; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5488 oldobjs="$libobjs_save"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5489 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5490 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5491 oldobjs="$old_deplibs $non_pic_objects"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5492 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5493 addlibs="$old_convenience"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5494 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5495
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5496 if test -n "$addlibs"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5497 gentop="$output_objdir/${outputname}x"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5498 generated="$generated $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5499
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5500 func_extract_archives $gentop $addlibs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5501 oldobjs="$oldobjs $func_extract_archives_result"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5502 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5503
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5504 # Do each command in the archive commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5505 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5506 cmds=$old_archive_from_new_cmds
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5507 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5508 # POSIX demands no paths to be encoded in archives. We have
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5509 # to avoid creating archives with duplicate basenames if we
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5510 # might have to extract them afterwards, e.g., when creating a
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5511 # static archive out of a convenience library, or when linking
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5512 # the entirety of a libtool archive into another (currently
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5513 # not supported by libtool).
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5514 if (for obj in $oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5515 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5516 $echo "X$obj" | $Xsed -e 's%^.*/%%'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5517 done | sort | sort -uc >/dev/null 2>&1); then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5518 :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5519 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5520 $echo "copying selected object files to avoid basename conflicts..."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5521
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5522 if test -z "$gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5523 gentop="$output_objdir/${outputname}x"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5524 generated="$generated $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5525
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5526 $show "${rm}r $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5527 $run ${rm}r "$gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5528 $show "$mkdir $gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5529 $run $mkdir "$gentop"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5530 exit_status=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5531 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5532 exit $exit_status
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5533 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5534 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5535
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5536 save_oldobjs=$oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5537 oldobjs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5538 counter=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5539 for obj in $save_oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5540 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5541 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5542 case " $oldobjs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5543 " ") oldobjs=$obj ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5544 *[\ /]"$objbase "*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5545 while :; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5546 # Make sure we don't pick an alternate name that also
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5547 # overlaps.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5548 newobj=lt$counter-$objbase
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5549 counter=`expr $counter + 1`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5550 case " $oldobjs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5551 *[\ /]"$newobj "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5552 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5553 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5554 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5555 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5556 $run ln "$obj" "$gentop/$newobj" ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5557 $run cp "$obj" "$gentop/$newobj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5558 oldobjs="$oldobjs $gentop/$newobj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5559 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5560 *) oldobjs="$oldobjs $obj" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5561 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5562 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5563 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5564
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5565 eval cmds=\"$old_archive_cmds\"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5566
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5567 if len=`expr "X$cmds" : ".*"` &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5568 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5569 cmds=$old_archive_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5570 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5571 # the command line is too long to link in one step, link in parts
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5572 $echo "using piecewise archive linking..."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5573 save_RANLIB=$RANLIB
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5574 RANLIB=:
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5575 objlist=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5576 concat_cmds=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5577 save_oldobjs=$oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5578
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5579 # Is there a better way of finding the last object in the list?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5580 for obj in $save_oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5581 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5582 last_oldobj=$obj
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5583 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5584 for obj in $save_oldobjs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5585 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5586 oldobjs="$objlist $obj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5587 objlist="$objlist $obj"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5588 eval test_cmds=\"$old_archive_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5589 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5590 test "$len" -le "$max_cmd_len"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5591 :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5592 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5593 # the above command should be used before it gets too long
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5594 oldobjs=$objlist
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5595 if test "$obj" = "$last_oldobj" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5596 RANLIB=$save_RANLIB
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5597 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5598 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5599 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5600 objlist=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5601 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5602 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5603 RANLIB=$save_RANLIB
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5604 oldobjs=$objlist
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5605 if test "X$oldobjs" = "X" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5606 eval cmds=\"\$concat_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5607 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5608 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5609 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5610 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5611 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5612 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5613 for cmd in $cmds; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5614 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5615 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5616 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5617 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5618 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5619 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5620 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5621
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5622 if test -n "$generated"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5623 $show "${rm}r$generated"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5624 $run ${rm}r$generated
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5625 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5626
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5627 # Now create the libtool archive.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5628 case $output in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5629 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5630 old_library=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5631 test "$build_old_libs" = yes && old_library="$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5632 $show "creating $output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5633
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5634 # Preserve any variables that may affect compiler behavior
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5635 for var in $variables_saved_for_relink; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5636 if eval test -z \"\${$var+set}\"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5637 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5638 elif eval var_value=\$$var; test -z "$var_value"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5639 relink_command="$var=; export $var; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5640 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5641 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5642 relink_command="$var=\"$var_value\"; export $var; $relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5643 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5644 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5645 # Quote the link command for shipping.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5646 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5647 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5648 if test "$hardcode_automatic" = yes ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5649 relink_command=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5650 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5651
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5652
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5653 # Only create the output if not a dry run.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5654 if test -z "$run"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5655 for installed in no yes; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5656 if test "$installed" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5657 if test -z "$install_libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5658 break
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5659 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5660 output="$output_objdir/$outputname"i
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5661 # Replace all uninstalled libtool libraries with the installed ones
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5662 newdependency_libs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5663 for deplib in $dependency_libs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5664 case $deplib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5665 *.la)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5666 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5667 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5668 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5669 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5670 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5671 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5672 newdependency_libs="$newdependency_libs $libdir/$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5673 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5674 *) newdependency_libs="$newdependency_libs $deplib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5675 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5676 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5677 dependency_libs="$newdependency_libs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5678 newdlfiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5679 for lib in $dlfiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5680 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5681 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5682 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5683 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5684 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5685 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5686 newdlfiles="$newdlfiles $libdir/$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5687 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5688 dlfiles="$newdlfiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5689 newdlprefiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5690 for lib in $dlprefiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5691 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5692 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5693 if test -z "$libdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5694 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5695 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5696 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5697 newdlprefiles="$newdlprefiles $libdir/$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5698 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5699 dlprefiles="$newdlprefiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5700 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5701 newdlfiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5702 for lib in $dlfiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5703 case $lib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5704 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5705 *) abs=`pwd`"/$lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5706 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5707 newdlfiles="$newdlfiles $abs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5708 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5709 dlfiles="$newdlfiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5710 newdlprefiles=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5711 for lib in $dlprefiles; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5712 case $lib in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5713 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5714 *) abs=`pwd`"/$lib" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5715 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5716 newdlprefiles="$newdlprefiles $abs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5717 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5718 dlprefiles="$newdlprefiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5719 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5720 $rm $output
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5721 # place dlname in correct position for cygwin
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5722 tdlname=$dlname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5723 case $host,$output,$installed,$module,$dlname in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5724 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5725 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5726 $echo > $output "\
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5727 # $outputname - a libtool library file
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5728 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5729 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5730 # Please DO NOT delete this file!
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5731 # It is necessary for linking the library.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5732
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5733 # The name that we can dlopen(3).
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5734 dlname='$tdlname'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5735
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5736 # Names of this library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5737 library_names='$library_names'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5738
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5739 # The name of the static archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5740 old_library='$old_library'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5741
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5742 # Libraries that this one depends upon.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5743 dependency_libs='$dependency_libs'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5744
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5745 # Version information for $libname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5746 current=$current
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5747 age=$age
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5748 revision=$revision
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5749
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5750 # Is this an already installed library?
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5751 installed=$installed
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5752
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5753 # Should we warn about portability when linking against -modules?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5754 shouldnotlink=$module
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5755
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5756 # Files to dlopen/dlpreopen
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5757 dlopen='$dlfiles'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5758 dlpreopen='$dlprefiles'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5759
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5760 # Directory that this library needs to be installed in:
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5761 libdir='$install_libdir'"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5762 if test "$installed" = no && test "$need_relink" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5763 $echo >> $output "\
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5764 relink_command=\"$relink_command\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5765 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5766 done
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5767 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5768
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5769 # Do a symbolic link so that the libtool archive can be found in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5770 # LD_LIBRARY_PATH before the program is installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5771 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5772 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5773 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5774 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5775 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5776 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5777
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5778 # libtool install mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5779 install)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5780 modename="$modename: install"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5781
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5782 # There may be an optional sh(1) argument at the beginning of
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5783 # install_prog (especially on Windows NT).
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5784 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5785 # Allow the use of GNU shtool's install command.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5786 $echo "X$nonopt" | grep shtool > /dev/null; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5787 # Aesthetically quote it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5788 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5789 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5790 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5791 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5792 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5793 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5794 install_prog="$arg "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5795 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5796 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5797 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5798 install_prog=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5799 arg=$nonopt
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5800 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5801
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5802 # The real first argument should be the name of the installation program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5803 # Aesthetically quote it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5804 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5805 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5806 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5807 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5808 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5809 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5810 install_prog="$install_prog$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5811
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5812 # We need to accept at least all the BSD install flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5813 dest=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5814 files=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5815 opts=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5816 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5817 install_type=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5818 isdir=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5819 stripme=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5820 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5821 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5822 if test -n "$dest"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5823 files="$files $dest"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5824 dest=$arg
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5825 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5826 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5827
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5828 case $arg in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5829 -d) isdir=yes ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5830 -f)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5831 case " $install_prog " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5832 *[\\\ /]cp\ *) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5833 *) prev=$arg ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5834 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5835 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5836 -g | -m | -o) prev=$arg ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5837 -s)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5838 stripme=" -s"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5839 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5840 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5841 -*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5842 ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5843 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5844 # If the previous option needed an argument, then skip it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5845 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5846 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5847 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5848 dest=$arg
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5849 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5850 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5851 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5852 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5853
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5854 # Aesthetically quote the argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5855 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5856 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5857 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5858 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5859 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5860 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5861 install_prog="$install_prog $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5862 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5863
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5864 if test -z "$install_prog"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5865 $echo "$modename: you must specify an install program" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5866 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5867 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5868 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5869
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5870 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5871 $echo "$modename: the \`$prev' option requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5872 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5873 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5874 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5875
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5876 if test -z "$files"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5877 if test -z "$dest"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5878 $echo "$modename: no file or destination specified" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5879 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5880 $echo "$modename: you must specify a destination" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5881 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5882 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5883 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5884 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5885
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5886 # Strip any trailing slash from the destination.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5887 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5888
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5889 # Check to see that the destination is a directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5890 test -d "$dest" && isdir=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5891 if test "$isdir" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5892 destdir="$dest"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5893 destname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5894 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5895 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5896 test "X$destdir" = "X$dest" && destdir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5897 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5898
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5899 # Not a directory, so check to see that there is only one file specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5900 set dummy $files
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5901 if test "$#" -gt 2; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5902 $echo "$modename: \`$dest' is not a directory" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5903 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5904 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5905 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5906 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5907 case $destdir in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5908 [\\/]* | [A-Za-z]:[\\/]*) ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5909 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5910 for file in $files; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5911 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5912 *.lo) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5913 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5914 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5915 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5916 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5917 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5918 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5919 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5920 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5921 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5922
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5923 # This variable tells wrapper scripts just to set variables rather
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5924 # than running their programs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5925 libtool_install_magic="$magic"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5926
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5927 staticlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5928 future_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5929 current_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5930 for file in $files; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5931
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5932 # Do each installation.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5933 case $file in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5934 *.$libext)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5935 # Do the static libraries later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5936 staticlibs="$staticlibs $file"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5937 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5938
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5939 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5940 # Check to see that this really is a libtool archive.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5941 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5942 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5943 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5944 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5945 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5946 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5947
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5948 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5949 old_library=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5950 relink_command=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5951 # If there is no directory component, then add one.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5952 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5953 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5954 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5955 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5956
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5957 # Add the libdir to current_libdirs if it is the destination.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5958 if test "X$destdir" = "X$libdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5959 case "$current_libdirs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5960 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5961 *) current_libdirs="$current_libdirs $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5962 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5963 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5964 # Note the libdir as a future libdir.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5965 case "$future_libdirs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5966 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5967 *) future_libdirs="$future_libdirs $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5968 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5969 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5970
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5971 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5972 test "X$dir" = "X$file/" && dir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5973 dir="$dir$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5974
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5975 if test -n "$relink_command"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5976 # Determine the prefix the user has applied to our future dir.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5977 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5978
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5979 # Don't allow the user to place us outside of our expected
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5980 # location b/c this prevents finding dependent libraries that
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5981 # are installed to the same prefix.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5982 # At present, this check doesn't affect windows .dll's that
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5983 # are installed into $libdir/../bin (currently, that works fine)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5984 # but it's something to keep an eye on.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5985 if test "$inst_prefix_dir" = "$destdir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5986 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5987 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5988 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5989
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5990 if test -n "$inst_prefix_dir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5991 # Stick the inst_prefix_dir data into the link command.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5992 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5993 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5994 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5995 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5996
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5997 $echo "$modename: warning: relinking \`$file'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5998 $show "$relink_command"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
5999 if $run eval "$relink_command"; then :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6000 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6001 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6002 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6003 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6004 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6005
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6006 # See the names of the shared library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6007 set dummy $library_names
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6008 if test -n "$2"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6009 realname="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6010 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6011 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6012
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6013 srcname="$realname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6014 test -n "$relink_command" && srcname="$realname"T
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6015
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6016 # Install the shared library and build the symlinks.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6017 $show "$install_prog $dir/$srcname $destdir/$realname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6018 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6019 if test -n "$stripme" && test -n "$striplib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6020 $show "$striplib $destdir/$realname"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6021 $run eval "$striplib $destdir/$realname" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6022 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6023
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6024 if test "$#" -gt 0; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6025 # Delete the old symlinks, and create new ones.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6026 # Try `ln -sf' first, because the `ln' binary might depend on
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6027 # the symlink we replace! Solaris /bin/ln does not understand -f,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6028 # so we also need to try rm && ln -s.
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6029 for linkname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6030 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6031 if test "$linkname" != "$realname"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6032 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6033 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6034 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6035 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6036 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6037
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6038 # Do each command in the postinstall commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6039 lib="$destdir/$realname"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6040 cmds=$postinstall_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6041 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6042 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6043 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6044 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6045 $show "$cmd"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6046 $run eval "$cmd" || {
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6047 lt_exit=$?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6048
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6049 # Restore the uninstalled library and exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6050 if test "$mode" = relink; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6051 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6052 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6053
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6054 exit $lt_exit
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6055 }
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6056 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6057 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6058 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6059
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6060 # Install the pseudo-library for information purposes.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6061 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6062 instname="$dir/$name"i
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6063 $show "$install_prog $instname $destdir/$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6064 $run eval "$install_prog $instname $destdir/$name" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6065
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6066 # Maybe install the static library, too.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6067 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6068 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6069
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6070 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6071 # Install (i.e. copy) a libtool object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6072
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6073 # Figure out destination file name, if it wasn't already specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6074 if test -n "$destname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6075 destfile="$destdir/$destname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6076 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6077 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6078 destfile="$destdir/$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6079 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6080
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6081 # Deduce the name of the destination old-style object file.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6082 case $destfile in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6083 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6084 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6085 ;;
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6086 *.$objext)
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6087 staticdest="$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6088 destfile=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6089 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6090 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6091 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6092 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6093 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6094 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6095 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6096
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6097 # Install the libtool object if requested.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6098 if test -n "$destfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6099 $show "$install_prog $file $destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6100 $run eval "$install_prog $file $destfile" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6101 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6102
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6103 # Install the old object if enabled.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6104 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6105 # Deduce the name of the old-style object file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6106 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6107
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6108 $show "$install_prog $staticobj $staticdest"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6109 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6110 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6111 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6112 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6113
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6114 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6115 # Figure out destination file name, if it wasn't already specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6116 if test -n "$destname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6117 destfile="$destdir/$destname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6118 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6119 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6120 destfile="$destdir/$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6121 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6122
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6123 # If the file is missing, and there is a .exe on the end, strip it
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6124 # because it is most likely a libtool script we actually want to
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6125 # install
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6126 stripped_ext=""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6127 case $file in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6128 *.exe)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6129 if test ! -f "$file"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6130 file=`$echo $file|${SED} 's,.exe$,,'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6131 stripped_ext=".exe"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6132 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6133 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6134 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6135
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6136 # Do a test to see if this is really a libtool program.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6137 case $host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6138 *cygwin*|*mingw*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6139 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6140 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6141 *)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6142 wrapper=$file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6143 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6144 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6145 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6146 notinst_deplibs=
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6147 relink_command=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6148
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6149 # Note that it is not necessary on cygwin/mingw to append a dot to
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6150 # foo even if both foo and FILE.exe exist: automatic-append-.exe
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6151 # behavior happens only for exec(3), not for open(2)! Also, sourcing
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6152 # `FILE.' does not work on cygwin managed mounts.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6153 #
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6154 # If there is no directory component, then add one.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6155 case $wrapper in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6156 */* | *\\*) . ${wrapper} ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6157 *) . ./${wrapper} ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6158 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6159
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6160 # Check the variables that should have been set.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6161 if test -z "$notinst_deplibs"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6162 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6163 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6164 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6165
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6166 finalize=yes
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6167 for lib in $notinst_deplibs; do
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6168 # Check to see that each library is installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6169 libdir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6170 if test -f "$lib"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6171 # If there is no directory component, then add one.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6172 case $lib in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6173 */* | *\\*) . $lib ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6174 *) . ./$lib ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6175 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6176 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6177 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6178 if test -n "$libdir" && test ! -f "$libfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6179 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6180 finalize=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6181 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6182 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6183
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6184 relink_command=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6185 # Note that it is not necessary on cygwin/mingw to append a dot to
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6186 # foo even if both foo and FILE.exe exist: automatic-append-.exe
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6187 # behavior happens only for exec(3), not for open(2)! Also, sourcing
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6188 # `FILE.' does not work on cygwin managed mounts.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6189 #
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6190 # If there is no directory component, then add one.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6191 case $wrapper in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6192 */* | *\\*) . ${wrapper} ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6193 *) . ./${wrapper} ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6194 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6195
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6196 outputname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6197 if test "$fast_install" = no && test -n "$relink_command"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6198 if test "$finalize" = yes && test -z "$run"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6199 tmpdir=`func_mktempdir`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6200 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6201 outputname="$tmpdir/$file"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6202 # Replace the output file specification.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6203 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6204
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6205 $show "$relink_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6206 if $run eval "$relink_command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6207 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6208 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6209 ${rm}r "$tmpdir"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6210 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6211 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6212 file="$outputname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6213 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6214 $echo "$modename: warning: cannot relink \`$file'" 1>&2
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6215 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6216 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6217 # Install the binary that we compiled earlier.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6218 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6219 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6220 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6221
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6222 # remove .exe since cygwin /usr/bin/install will append another
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6223 # one anyway
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6224 case $install_prog,$host in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6225 */usr/bin/install*,*cygwin*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6226 case $file:$destfile in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6227 *.exe:*.exe)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6228 # this is ok
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6229 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6230 *.exe:*)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6231 destfile=$destfile.exe
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6232 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6233 *:*.exe)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6234 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6235 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6236 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6237 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6238 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6239 $show "$install_prog$stripme $file $destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6240 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6241 test -n "$outputname" && ${rm}r "$tmpdir"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6242 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6243 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6244 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6245
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6246 for file in $staticlibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6247 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6248
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6249 # Set up the ranlib parameters.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6250 oldlib="$destdir/$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6251
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6252 $show "$install_prog $file $oldlib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6253 $run eval "$install_prog \$file \$oldlib" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6254
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6255 if test -n "$stripme" && test -n "$old_striplib"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6256 $show "$old_striplib $oldlib"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6257 $run eval "$old_striplib $oldlib" || exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6258 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6259
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6260 # Do each command in the postinstall commands.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6261 cmds=$old_postinstall_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6262 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6263 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6264 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6265 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6266 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6267 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6268 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6269 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6270 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6271
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6272 if test -n "$future_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6273 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6274 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6275
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6276 if test -n "$current_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6277 # Maybe just do a dry run.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6278 test -n "$run" && current_libdirs=" -n$current_libdirs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6279 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6280 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6281 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6282 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6283 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6284
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6285 # libtool finish mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6286 finish)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6287 modename="$modename: finish"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6288 libdirs="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6289 admincmds=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6290
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6291 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6292 for dir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6293 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6294 libdirs="$libdirs $dir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6295 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6296
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6297 for libdir in $libdirs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6298 if test -n "$finish_cmds"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6299 # Do each command in the finish commands.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6300 cmds=$finish_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6301 save_ifs="$IFS"; IFS='~'
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6302 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6303 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6304 eval cmd=\"$cmd\"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6305 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6306 $run eval "$cmd" || admincmds="$admincmds
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6307 $cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6308 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6309 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6310 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6311 if test -n "$finish_eval"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6312 # Do the single finish_eval.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6313 eval cmds=\"$finish_eval\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6314 $run eval "$cmds" || admincmds="$admincmds
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6315 $cmds"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6316 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6317 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6318 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6319
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6320 # Exit here if they wanted silent mode.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6321 test "$show" = : && exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6322
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6323 $echo "X----------------------------------------------------------------------" | $Xsed
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6324 $echo "Libraries have been installed in:"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6325 for libdir in $libdirs; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6326 $echo " $libdir"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6327 done
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6328 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6329 $echo "If you ever happen to want to link against installed libraries"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6330 $echo "in a given directory, LIBDIR, you must either use libtool, and"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6331 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6332 $echo "flag during linking and do at least one of the following:"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6333 if test -n "$shlibpath_var"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6334 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6335 $echo " during execution"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6336 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6337 if test -n "$runpath_var"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6338 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6339 $echo " during linking"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6340 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6341 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6342 libdir=LIBDIR
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6343 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6344
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6345 $echo " - use the \`$flag' linker flag"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6346 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6347 if test -n "$admincmds"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6348 $echo " - have your system administrator run these commands:$admincmds"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6349 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6350 if test -f /etc/ld.so.conf; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6351 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6352 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6353 $echo
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6354 $echo "See any operating system documentation about shared libraries for"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6355 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6356 $echo "X----------------------------------------------------------------------" | $Xsed
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6357 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6358 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6359
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6360 # libtool execute mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6361 execute)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6362 modename="$modename: execute"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6363
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6364 # The first argument is the command name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6365 cmd="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6366 if test -z "$cmd"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6367 $echo "$modename: you must specify a COMMAND" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6368 $echo "$help"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6369 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6370 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6371
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6372 # Handle -dlopen flags immediately.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6373 for file in $execute_dlfiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6374 if test ! -f "$file"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6375 $echo "$modename: \`$file' is not a file" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6376 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6377 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6378 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6379
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6380 dir=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6381 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6382 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6383 # Check to see that this really is a libtool archive.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6384 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6385 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6386 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6387 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6388 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6389 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6390
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6391 # Read the libtool library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6392 dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6393 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6394
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6395 # If there is no directory component, then add one.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6396 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6397 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6398 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6399 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6400
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6401 # Skip this library if it cannot be dlopened.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6402 if test -z "$dlname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6403 # Warn if it was a shared library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6404 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6405 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6406 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6407
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6408 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6409 test "X$dir" = "X$file" && dir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6410
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6411 if test -f "$dir/$objdir/$dlname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6412 dir="$dir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6413 else
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6414 if test ! -f "$dir/$dlname"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6415 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6416 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6417 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6418 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6419 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6420
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6421 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6422 # Just add the directory containing the .lo file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6423 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6424 test "X$dir" = "X$file" && dir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6425 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6426
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6427 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6428 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6429 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6430 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6431 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6432
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6433 # Get the absolute pathname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6434 absdir=`cd "$dir" && pwd`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6435 test -n "$absdir" && dir="$absdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6436
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6437 # Now add the directory to shlibpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6438 if eval "test -z \"\$$shlibpath_var\""; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6439 eval "$shlibpath_var=\"\$dir\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6440 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6441 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6442 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6443 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6444
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6445 # This variable tells wrapper scripts just to set shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6446 # rather than running their programs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6447 libtool_execute_magic="$magic"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6448
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6449 # Check if any of the arguments is a wrapper script.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6450 args=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6451 for file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6452 do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6453 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6454 -*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6455 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6456 # Do a test to see if this is really a libtool program.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6457 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6458 # If there is no directory component, then add one.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6459 case $file in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6460 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6461 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6462 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6463
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6464 # Transform arg to wrapped name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6465 file="$progdir/$program"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6466 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6467 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6468 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6469 # Quote arguments (to preserve shell metacharacters).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6470 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6471 args="$args \"$file\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6472 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6473
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6474 if test -z "$run"; then
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6475 if test -n "$shlibpath_var"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6476 # Export the shlibpath_var.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6477 eval "export $shlibpath_var"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6478 fi
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6479
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6480 # Restore saved environment variables
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6481 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6482 do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6483 eval "if test \"\${save_$lt_var+set}\" = set; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6484 $lt_var=\$save_$lt_var; export $lt_var
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6485 fi"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6486 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6487
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6488 # Now prepare to actually exec the command.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6489 exec_cmd="\$cmd$args"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6490 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6491 # Display what would be done.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6492 if test -n "$shlibpath_var"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6493 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6494 $echo "export $shlibpath_var"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6495 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6496 $echo "$cmd$args"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6497 exit $EXIT_SUCCESS
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6498 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6499 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6500
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6501 # libtool clean and uninstall mode
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6502 clean | uninstall)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6503 modename="$modename: $mode"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6504 rm="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6505 files=
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6506 rmforce=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6507 exit_status=0
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6508
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6509 # This variable tells wrapper scripts just to set variables rather
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6510 # than running their programs.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6511 libtool_install_magic="$magic"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6512
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6513 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6514 do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6515 case $arg in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6516 -f) rm="$rm $arg"; rmforce=yes ;;
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6517 -*) rm="$rm $arg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6518 *) files="$files $arg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6519 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6520 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6521
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6522 if test -z "$rm"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6523 $echo "$modename: you must specify an RM program" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6524 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6525 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6526 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6527
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6528 rmdirs=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6529
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6530 origobjdir="$objdir"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6531 for file in $files; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6532 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6533 if test "X$dir" = "X$file"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6534 dir=.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6535 objdir="$origobjdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6536 else
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6537 objdir="$dir/$origobjdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6538 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6539 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6540 test "$mode" = uninstall && objdir="$dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6541
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6542 # Remember objdir for removal later, being careful to avoid duplicates
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6543 if test "$mode" = clean; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6544 case " $rmdirs " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6545 *" $objdir "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6546 *) rmdirs="$rmdirs $objdir" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6547 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6548 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6549
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6550 # Don't error if the file doesn't exist and rm -f was used.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6551 if (test -L "$file") >/dev/null 2>&1 \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6552 || (test -h "$file") >/dev/null 2>&1 \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6553 || test -f "$file"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6554 :
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6555 elif test -d "$file"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6556 exit_status=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6557 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6558 elif test "$rmforce" = yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6559 continue
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6560 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6561
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6562 rmfiles="$file"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6563
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6564 case $name in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6565 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6566 # Possibly a libtool archive, so verify it.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6567 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6568 . $dir/$name
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6569
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6570 # Delete the libtool libraries and symlinks.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6571 for n in $library_names; do
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6572 rmfiles="$rmfiles $objdir/$n"
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6573 done
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6574 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6575
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6576 case "$mode" in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6577 clean)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6578 case " $library_names " in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6579 # " " in the beginning catches empty $dlname
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6580 *" $dlname "*) ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6581 *) rmfiles="$rmfiles $objdir/$dlname" ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6582 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6583 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6584 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6585 uninstall)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6586 if test -n "$library_names"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6587 # Do each command in the postuninstall commands.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6588 cmds=$postuninstall_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6589 save_ifs="$IFS"; IFS='~'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6590 for cmd in $cmds; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6591 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6592 eval cmd=\"$cmd\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6593 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6594 $run eval "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6595 if test "$?" -ne 0 && test "$rmforce" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6596 exit_status=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6597 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6598 done
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6599 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6600 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6601
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6602 if test -n "$old_library"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6603 # Do each command in the old_postuninstall commands.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6604 cmds=$old_postuninstall_cmds
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6605 save_ifs="$IFS"; IFS='~'
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6606 for cmd in $cmds; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6607 IFS="$save_ifs"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6608 eval cmd=\"$cmd\"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6609 $show "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6610 $run eval "$cmd"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6611 if test "$?" -ne 0 && test "$rmforce" != yes; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6612 exit_status=1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6613 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6614 done
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6615 IFS="$save_ifs"
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6616 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6617 # FIXME: should reinstall the best remaining shared library.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6618 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6619 esac
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6620 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6621 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6622
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6623 *.lo)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6624 # Possibly a libtool object, so verify it.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6625 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6626
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6627 # Read the .lo file
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6628 . $dir/$name
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6629
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6630 # Add PIC object to the list of files to remove.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6631 if test -n "$pic_object" \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6632 && test "$pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6633 rmfiles="$rmfiles $dir/$pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6634 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6635
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6636 # Add non-PIC object to the list of files to remove.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6637 if test -n "$non_pic_object" \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6638 && test "$non_pic_object" != none; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6639 rmfiles="$rmfiles $dir/$non_pic_object"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6640 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6641 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6642 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6643
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6644 *)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6645 if test "$mode" = clean ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6646 noexename=$name
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6647 case $file in
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6648 *.exe)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6649 file=`$echo $file|${SED} 's,.exe$,,'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6650 noexename=`$echo $name|${SED} 's,.exe$,,'`
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6651 # $file with .exe has already been added to rmfiles,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6652 # add $file without .exe
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6653 rmfiles="$rmfiles $file"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6654 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6655 esac
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6656 # Do a test to see if this is a libtool program.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6657 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6658 relink_command=
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6659 . $dir/$noexename
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6660
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6661 # note $name still contains .exe if it was in $file originally
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6662 # as does the version of $file that was added into $rmfiles
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6663 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6664 if test "$fast_install" = yes && test -n "$relink_command"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6665 rmfiles="$rmfiles $objdir/lt-$name"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6666 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6667 if test "X$noexename" != "X$name" ; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6668 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6669 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6670 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6671 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6672 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6673 esac
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6674 $show "$rm $rmfiles"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6675 $run $rm $rmfiles || exit_status=1
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6676 done
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6677 objdir="$origobjdir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6678
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6679 # Try to remove the ${objdir}s in the directories where we deleted files
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6680 for dir in $rmdirs; do
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6681 if test -d "$dir"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6682 $show "rmdir $dir"
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6683 $run rmdir $dir >/dev/null 2>&1
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6684 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6685 done
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6686
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6687 exit $exit_status
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6688 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6689
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6690 "")
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6691 $echo "$modename: you must specify a MODE" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6692 $echo "$generic_help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6693 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6694 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6695 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6696
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6697 if test -z "$exec_cmd"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6698 $echo "$modename: invalid operation mode \`$mode'" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6699 $echo "$generic_help" 1>&2
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6700 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6701 fi
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6702 fi # test -z "$show_help"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6703
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6704 if test -n "$exec_cmd"; then
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6705 eval exec $exec_cmd
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6706 exit $EXIT_FAILURE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6707 fi
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6708
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6709 # We need to display help for each of the modes.
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6710 case $mode in
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6711 "") $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6712 "Usage: $modename [OPTION]... [MODE-ARG]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6713
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6714 Provide generalized library-building support services.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6715
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6716 --config show all configuration variables
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6717 --debug enable verbose shell tracing
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6718 -n, --dry-run display commands without modifying any files
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6719 --features display basic configuration information and exit
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6720 --finish same as \`--mode=finish'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6721 --help display this help message and exit
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6722 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6723 --quiet same as \`--silent'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6724 --silent don't print informational messages
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6725 --tag=TAG use configuration variables from tag TAG
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6726 --version print version information
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6727
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6728 MODE must be one of the following:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6729
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6730 clean remove files from the build directory
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6731 compile compile a source file into a libtool object
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6732 execute automatically set library path, then run a program
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6733 finish complete the installation of libtool libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6734 install install libraries or executables
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6735 link create a library or an executable
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6736 uninstall remove libraries from an installed directory
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6737
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6738 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6739 a more detailed description of MODE.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6740
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6741 Report bugs to <bug-libtool@gnu.org>."
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6742 exit $EXIT_SUCCESS
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6743 ;;
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6744
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6745 clean)
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6746 $echo \
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6747 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6748
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6749 Remove files from the build directory.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6750
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6751 RM is the name of the program to use to delete files associated with each FILE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6752 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6753 to RM.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6754
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6755 If FILE is a libtool library, object or program, all the files associated
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6756 with it are deleted. Otherwise, only FILE itself is deleted using RM."
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6757 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6758
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6759 compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6760 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6761 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6762
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6763 Compile a source file into a libtool library object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6764
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6765 This mode accepts the following additional options:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6766
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6767 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6768 -prefer-pic try to building PIC objects only
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6769 -prefer-non-pic try to building non-PIC objects only
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6770 -static always build a \`.o' file suitable for static linking
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6771
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6772 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6773 from the given SOURCEFILE.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6774
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6775 The output file name is determined by removing the directory component from
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6776 SOURCEFILE, then substituting the C source code suffix \`.c' with the
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6777 library object suffix, \`.lo'."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6778 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6779
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6780 execute)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6781 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6782 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6783
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6784 Automatically set library path, then run a program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6785
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6786 This mode accepts the following additional options:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6787
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6788 -dlopen FILE add the directory containing FILE to the library path
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6789
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6790 This mode sets the library path environment variable according to \`-dlopen'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6791 flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6792
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6793 If any of the ARGS are libtool executable wrappers, then they are translated
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6794 into their corresponding uninstalled binary, and any of their required library
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6795 directories are added to the library path.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6796
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6797 Then, COMMAND is executed, with ARGS as arguments."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6798 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6799
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6800 finish)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6801 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6802 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6803
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6804 Complete the installation of libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6805
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6806 Each LIBDIR is a directory that contains libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6807
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6808 The commands that this mode executes may require superuser privileges. Use
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6809 the \`--dry-run' option if you just want to see what would be executed."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6810 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6811
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6812 install)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6813 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6814 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6815
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6816 Install executables or libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6817
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6818 INSTALL-COMMAND is the installation command. The first component should be
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6819 either the \`install' or \`cp' program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6820
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6821 The rest of the components are interpreted as arguments to that command (only
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6822 BSD-compatible install options are recognized)."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6823 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6824
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6825 link)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6826 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6827 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6828
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6829 Link object files or libraries together to form another library, or to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6830 create an executable program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6831
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6832 LINK-COMMAND is a command using the C compiler that you would use to create
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6833 a program from several object files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6834
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6835 The following components of LINK-COMMAND are treated specially:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6836
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6837 -all-static do not do any dynamic linking at all
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6838 -avoid-version do not add a version suffix if possible
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6839 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6840 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6841 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6842 -export-symbols SYMFILE
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6843 try to export only the symbols listed in SYMFILE
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6844 -export-symbols-regex REGEX
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6845 try to export only the symbols matching REGEX
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6846 -LLIBDIR search LIBDIR for required installed libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6847 -lNAME OUTPUT-FILE requires the installed library libNAME
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6848 -module build a library that can dlopened
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6849 -no-fast-install disable the fast-install mode
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6850 -no-install link a not-installable executable
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6851 -no-undefined declare that a library does not refer to external symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6852 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6853 -objectlist FILE Use a list of object files found in FILE to specify objects
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6854 -precious-files-regex REGEX
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6855 don't remove output files matching REGEX
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6856 -release RELEASE specify package release information
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6857 -rpath LIBDIR the created library will eventually be installed in LIBDIR
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6858 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6859 -static do not do any dynamic linking of uninstalled libtool libraries
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6860 -static-libtool-libs
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6861 do not do any dynamic linking of libtool libraries
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6862 -version-info CURRENT[:REVISION[:AGE]]
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6863 specify library version info [each variable defaults to 0]
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6864
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6865 All other options (arguments beginning with \`-') are ignored.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6866
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6867 Every other argument is treated as a filename. Files ending in \`.la' are
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6868 treated as uninstalled libtool libraries, other files are standard or library
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6869 object files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6870
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6871 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6872 only library objects (\`.lo' files) may be specified, and \`-rpath' is
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6873 required, except when creating a convenience library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6874
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6875 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6876 using \`ar' and \`ranlib', or on Windows using \`lib'.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6877
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6878 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6879 is created, otherwise an executable program is created."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6880 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6881
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6882 uninstall)
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6883 $echo \
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6884 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6885
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6886 Remove libraries from an installation directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6887
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6888 RM is the name of the program to use to delete files associated with each FILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6889 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6890 to RM.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6891
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6892 If FILE is a libtool library, all the files associated with it are deleted.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6893 Otherwise, only FILE itself is deleted using RM."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6894 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6895
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6896 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6897 $echo "$modename: invalid operation mode \`$mode'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6898 $echo "$help" 1>&2
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6899 exit $EXIT_FAILURE
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6900 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6901 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6902
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6903 $echo
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6904 $echo "Try \`$modename --help' for more information about other modes."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6905
2528
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6906 exit $?
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6907
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6908 # The TAGs below are defined such that we never get into a situation
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6909 # in which we disable both kinds of libraries. Given conflicting
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6910 # choices, we go for a static library, that is the most portable,
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6911 # since we can't tell whether shared libraries were disabled because
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6912 # the user asked for that or because the platform doesn't support
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6913 # them. This is particularly important on AIX, because we don't
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6914 # support having both static and shared libraries enabled at the same
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6915 # time on that platform, so we default to a shared-only configuration.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6916 # If a disable-shared tag is given, we'll fallback to a static-only
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6917 # configuration. But we'll never go from static-only to shared-only.
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6918
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6919 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6920 disable_libs=shared
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6921 # ### END LIBTOOL TAG CONFIG: disable-shared
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6922
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6923 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6924 disable_libs=static
a2fb80f5315f Update host-side configury
bartv
parents: 283
diff changeset
6925 # ### END LIBTOOL TAG CONFIG: disable-static
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6926
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6927 # Local Variables:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6928 # mode:shell-script
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6929 # sh-indentation:2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6930 # End: