annotate ltmain.sh @ 104:39ba19372732

many fixes in pst2ldif by Robert Harris
author Carl Byington <carl@five-ten-sg.com>
date Thu, 09 Oct 2008 12:04:40 -0700
parents ec7e344e0dfb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1 # ltmain.sh - Provide generalized library-building support services.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2 # NOTE: Changing this file will not affect anything until you rerun configure.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5 # Free Software Foundation, Inc.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
7 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
8 # This program is free software; you can redistribute it and/or modify
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
10 # the Free Software Foundation; either version 2 of the License, or
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
11 # (at your option) any later version.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
12 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
16 # General Public License for more details.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
17 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
19 # along with this program; if not, write to the Free Software
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
21 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
23 # distribute this file as part of a program that contains a
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
26
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
27 basename="s,^.*/,,g"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
28
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
30 # is ksh but when the shell is invoked as "sh" and the current value of
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
31 # the _XPG environment variable is not equal to 1 (one), the special
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
32 # positional parameter $0, within a function call, is the name of the
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
33 # function.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
34 progpath="$0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
35
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
36 # RH: define SED for historic ltconfig's generated by Libtool 1.3
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
37 [ -z "$SED" ] && SED=sed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
38
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
39 # The name of this program:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
40 progname=`echo "$progpath" | $SED $basename`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
41 modename="$progname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
42
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
43 # Global variables:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
44 EXIT_SUCCESS=0
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
45 EXIT_FAILURE=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
46
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
47 PROGRAM=ltmain.sh
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
48 PACKAGE=libtool
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
49 VERSION=1.5.6
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
50 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
51
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
52
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
53 # Check that we have a working $echo.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
54 if test "X$1" = X--no-reexec; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
55 # Discard the --no-reexec flag, and continue.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
56 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
57 elif test "X$1" = X--fallback-echo; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
58 # Avoid inline document here, it may be left over
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
59 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
60 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
61 # Yippee, $echo works!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
62 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
63 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
64 # Restart under the correct shell, and then maybe $echo will work.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
65 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
66 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
67
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
68 if test "X$1" = X--fallback-echo; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
69 # used as fallback echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
70 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
71 cat <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
72 $*
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
73 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
74 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
75 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
76
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
77 default_mode=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
78 help="Try \`$progname --help' for more information."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
79 magic="%%%MAGIC variable%%%"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
80 mkdir="mkdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
81 mv="mv -f"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
82 rm="rm -f"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
83
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
84 # Sed substitution that helps us do robust quoting. It backslashifies
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
85 # metacharacters that are still active within double-quoted strings.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
86 Xsed="${SED}"' -e 1s/^X//'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
87 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
88 # test EBCDIC or ASCII
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
89 case `echo A|tr A '\301'` in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
90 A) # EBCDIC based system
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
91 SP2NL="tr '\100' '\n'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
92 NL2SP="tr '\r\n' '\100\100'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
93 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
94 *) # Assume ASCII based system
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
95 SP2NL="tr '\040' '\012'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
96 NL2SP="tr '\015\012' '\040\040'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
97 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
98 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
99
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
100 # NLS nuisances.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
101 # Only set LANG and LC_ALL to C if already set.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
102 # These must not be set unconditionally because not all systems understand
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
103 # e.g. LANG=C (notably SCO).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
104 # We save the old values to restore during execute mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
105 if test "${LC_ALL+set}" = set; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
106 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
107 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
108 if test "${LANG+set}" = set; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
109 save_LANG="$LANG"; LANG=C; export LANG
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
110 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
111
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
112 # Make sure IFS has a sensible default
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
113 : ${IFS="
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
114 "}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
115
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
116 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
117 $echo "$modename: not configured to build any kind of library" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
118 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
119 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
120 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
121
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
122 # Global variables.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
123 mode=$default_mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
124 nonopt=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
125 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
126 prevopt=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
127 run=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
128 show="$echo"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
129 show_help=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
130 execute_dlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
131 lo2o="s/\\.lo\$/.${objext}/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
132 o2lo="s/\\.${objext}\$/.lo/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
133
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
134 #####################################
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
135 # Shell function definitions:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
136 # This seems to be the best place for them
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
137
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
138 # func_win32_libid arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
139 # return the library type of file 'arg'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
140 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
141 # Need a lot of goo to handle *both* DLLs and import libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
142 # Has to be a shell function in order to 'eat' the argument
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
143 # that is supplied when $file_magic_command is called.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
144 func_win32_libid () {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
145 win32_libid_type="unknown"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
146 win32_fileres=`file -L $1 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
147 case $win32_fileres in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
148 *ar\ archive\ import\ library*) # definitely import
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
149 win32_libid_type="x86 archive import"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
150 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
151 *ar\ archive*) # could be an import, or static
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
152 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
153 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
154 win32_nmres=`eval $NM -f posix -A $1 | \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
155 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
156 if test "X$win32_nmres" = "Ximport" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
157 win32_libid_type="x86 archive import"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
158 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
159 win32_libid_type="x86 archive static"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
160 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
161 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
162 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
163 *DLL*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
164 win32_libid_type="x86 DLL"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
165 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
166 *executable*) # but shell scripts are "executable" too...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
167 case $win32_fileres in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
168 *MS\ Windows\ PE\ Intel*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
169 win32_libid_type="x86 DLL"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
170 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
171 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
172 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
173 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
174 $echo $win32_libid_type
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
175 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
176
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
177
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
178 # func_infer_tag arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
179 # Infer tagged configuration to use if any are available and
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
180 # if one wasn't chosen via the "--tag" command line option.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
181 # Only attempt this if the compiler in the base compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
182 # command doesn't match the default compiler.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
183 # arg is usually of the form 'gcc ...'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
184 func_infer_tag () {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
185 if test -n "$available_tags" && test -z "$tagname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
186 CC_quoted=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
187 for arg in $CC; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
188 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
189 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
190 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
191 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
192 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
193 CC_quoted="$CC_quoted $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
194 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
195 case $@ in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
196 # Blanks in the command may have been stripped by the calling shell,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
197 # but not from the CC environment variable when configure was run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
198 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
199 # Blanks at the start of $base_compile will cause this to fail
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
200 # if we don't check for them as well.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
201 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
202 for z in $available_tags; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
203 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
204 # Evaluate the configuration.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
205 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
206 CC_quoted=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
207 for arg in $CC; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
208 # Double-quote args containing other shell metacharacters.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
209 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
210 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
211 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
212 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
213 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
214 CC_quoted="$CC_quoted $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
215 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
216 case "$@ " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
217 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
218 # The compiler in the base compile command matches
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
219 # the one in the tagged configuration.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
220 # Assume this is the tagged configuration we want.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
221 tagname=$z
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
222 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
223 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
224 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
225 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
226 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
227 # If $tagname still isn't set, then no tagged configuration
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
228 # was found and let the user know that the "--tag" command
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
229 # line option must be used.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
230 if test -z "$tagname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
231 $echo "$modename: unable to infer tagged configuration"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
232 $echo "$modename: specify a tag with \`--tag'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
233 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
234 # else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
235 # $echo "$modename: using $tagname tagged configuration"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
236 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
237 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
238 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
239 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
240 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
241 # End of Shell function definitions
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
242 #####################################
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
243
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
244 # Darwin sucks
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
245 eval std_shrext=\"$shrext_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
246
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
247 # Parse our command line options once, thoroughly.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
248 while test "$#" -gt 0
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
249 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
250 arg="$1"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
251 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
252
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
253 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
254 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
255 *) optarg= ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
256 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
257
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
258 # If the previous option needs an argument, assign it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
259 if test -n "$prev"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
260 case $prev in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
261 execute_dlfiles)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
262 execute_dlfiles="$execute_dlfiles $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
263 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
264 tag)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
265 tagname="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
266 preserve_args="${preserve_args}=$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
267
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
268 # Check whether tagname contains only valid characters
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
269 case $tagname in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
270 *[!-_A-Za-z0-9,/]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
271 $echo "$progname: invalid tag name: $tagname" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
272 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
273 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
274 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
275
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
276 case $tagname in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
277 CC)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
278 # Don't test for the "default" C tag, as we know, it's there, but
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
279 # not specially marked.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
280 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
281 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
282 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
283 taglist="$taglist $tagname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
284 # Evaluate the configuration.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
285 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
286 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
287 $echo "$progname: ignoring unknown tag $tagname" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
288 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
289 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
290 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
291 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
292 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
293 eval "$prev=\$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
294 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
295 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
296
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
297 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
298 prevopt=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
299 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
300 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
301
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
302 # Have we seen a non-optional argument yet?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
303 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
304 --help)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
305 show_help=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
306 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
307
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
308 --version)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
309 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
310 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
311 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
312 $echo "This is free software; see the source for copying conditions. There is NO"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
313 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
314 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
315 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
316
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
317 --config)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
318 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
319 # Now print the configurations for the tags.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
320 for tagname in $taglist; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
321 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
322 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
323 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
324 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
325
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
326 --debug)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
327 $echo "$progname: enabling shell trace mode"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
328 set -x
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
329 preserve_args="$preserve_args $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
330 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
331
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
332 --dry-run | -n)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
333 run=:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
334 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
335
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
336 --features)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
337 $echo "host: $host"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
338 if test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
339 $echo "enable shared libraries"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
340 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
341 $echo "disable shared libraries"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
342 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
343 if test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
344 $echo "enable static libraries"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
345 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
346 $echo "disable static libraries"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
347 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
348 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
349 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
350
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
351 --finish) mode="finish" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
352
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
353 --mode) prevopt="--mode" prev=mode ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
354 --mode=*) mode="$optarg" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
355
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
356 --preserve-dup-deps) duplicate_deps="yes" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
357
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
358 --quiet | --silent)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
359 show=:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
360 preserve_args="$preserve_args $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
361 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
362
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
363 --tag) prevopt="--tag" prev=tag ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
364 --tag=*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
365 set tag "$optarg" ${1+"$@"}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
366 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
367 prev=tag
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
368 preserve_args="$preserve_args --tag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
369 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
370
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
371 -dlopen)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
372 prevopt="-dlopen"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
373 prev=execute_dlfiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
374 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
375
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
376 -*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
377 $echo "$modename: unrecognized option \`$arg'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
378 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
379 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
380 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
381
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
382 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
383 nonopt="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
384 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
385 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
386 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
387 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
388
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
389 if test -n "$prevopt"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
390 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
391 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
392 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
393 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
394
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
395 # If this variable is set in any of the actions, the command in it
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
396 # will be execed at the end. This prevents here-documents from being
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
397 # left over by shells.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
398 exec_cmd=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
399
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
400 if test -z "$show_help"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
401
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
402 # Infer the operation mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
403 if test -z "$mode"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
404 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
405 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
406 case $nonopt in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
407 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
408 mode=link
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
409 for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
410 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
411 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
412 -c)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
413 mode=compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
414 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
415 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
416 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
417 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
418 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
419 *db | *dbx | *strace | *truss)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
420 mode=execute
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
421 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
422 *install*|cp|mv)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
423 mode=install
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
424 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
425 *rm)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
426 mode=uninstall
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
427 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
428 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
429 # If we have no mode, but dlfiles were specified, then do execute mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
430 test -n "$execute_dlfiles" && mode=execute
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
431
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
432 # Just use the default operation mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
433 if test -z "$mode"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
434 if test -n "$nonopt"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
435 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
436 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
437 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
438 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
439 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
440 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
441 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
442 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
443
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
444 # Only execute mode is allowed to have -dlopen flags.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
445 if test -n "$execute_dlfiles" && test "$mode" != execute; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
446 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
447 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
448 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
449 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
450
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
451 # Change the help message to a mode-specific one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
452 generic_help="$help"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
453 help="Try \`$modename --help --mode=$mode' for more information."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
454
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
455 # These modes are in order of execution frequency so that they run quickly.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
456 case $mode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
457 # libtool compile mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
458 compile)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
459 modename="$modename: compile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
460 # Get the compilation command and the source file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
461 base_compile=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
462 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
463 suppress_opt=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
464 suppress_output=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
465 arg_mode=normal
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
466 libobj=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
467 later=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
468
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
469 for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
470 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
471 case "$arg_mode" in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
472 arg )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
473 # do not "continue". Instead, add this to base_compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
474 lastarg="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
475 arg_mode=normal
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
476 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
477
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
478 target )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
479 libobj="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
480 arg_mode=normal
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
481 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
482 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
483
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
484 normal )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
485 # Accept any command-line options.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
486 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
487 -o)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
488 if test -n "$libobj" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
489 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
490 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
491 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
492 arg_mode=target
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
493 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
494 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
495
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
496 -static | -prefer-pic | -prefer-non-pic)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
497 later="$later $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
498 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
499 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
500
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
501 -no-suppress)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
502 suppress_opt=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
503 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
504 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
505
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
506 -Xcompiler)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
507 arg_mode=arg # the next one goes into the "base_compile" arg list
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
508 continue # The current "srcfile" will either be retained or
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
509 ;; # replaced later. I would guess that would be a bug.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
510
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
511 -Wc,*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
512 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
513 lastarg=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
514 save_ifs="$IFS"; IFS=','
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
515 for arg in $args; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
516 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
517
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
518 # Double-quote args containing other shell metacharacters.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
519 # Many Bourne shells cannot handle close brackets correctly
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
520 # in scan sets, so we specify it separately.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
521 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
522 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
523 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
524 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
525 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
526 lastarg="$lastarg $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
527 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
528 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
529 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
530
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
531 # Add the arguments to base_compile.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
532 base_compile="$base_compile $lastarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
533 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
534 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
535
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
536 * )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
537 # Accept the current argument as the source file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
538 # The previous "srcfile" becomes the current argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
539 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
540 lastarg="$srcfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
541 srcfile="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
542 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
543 esac # case $arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
544 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
545 esac # case $arg_mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
546
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
547 # Aesthetically quote the previous argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
548 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
549
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
550 case $lastarg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
551 # Double-quote args containing other shell metacharacters.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
552 # Many Bourne shells cannot handle close brackets correctly
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
553 # in scan sets, so we specify it separately.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
554 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
555 lastarg="\"$lastarg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
556 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
557 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
558
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
559 base_compile="$base_compile $lastarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
560 done # for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
561
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
562 case $arg_mode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
563 arg)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
564 $echo "$modename: you must specify an argument for -Xcompile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
565 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
566 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
567 target)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
568 $echo "$modename: you must specify a target with \`-o'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
569 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
570 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
571 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
572 # Get the name of the library object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
573 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
574 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
575 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
576
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
577 # Recognize several different file suffixes.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
578 # If the user specifies -o file.o, it is replaced with file.lo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
579 xform='[cCFSifmso]'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
580 case $libobj in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
581 *.ada) xform=ada ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
582 *.adb) xform=adb ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
583 *.ads) xform=ads ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
584 *.asm) xform=asm ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
585 *.c++) xform=c++ ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
586 *.cc) xform=cc ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
587 *.ii) xform=ii ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
588 *.class) xform=class ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
589 *.cpp) xform=cpp ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
590 *.cxx) xform=cxx ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
591 *.f90) xform=f90 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
592 *.for) xform=for ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
593 *.java) xform=java ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
594 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
595
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
596 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
597
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
598 case $libobj in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
599 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
600 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
601 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
602 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
603 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
604 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
605
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
606 func_infer_tag $base_compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
607
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
608 for arg in $later; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
609 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
610 -static)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
611 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
612 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
613 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
614
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
615 -prefer-pic)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
616 pic_mode=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
617 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
618 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
619
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
620 -prefer-non-pic)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
621 pic_mode=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
622 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
623 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
624 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
625 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
626
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
627 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
628 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
629 if test "X$xdir" = "X$obj"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
630 xdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
631 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
632 xdir=$xdir/
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
633 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
634 lobj=${xdir}$objdir/$objname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
635
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
636 if test -z "$base_compile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
637 $echo "$modename: you must specify a compilation command" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
638 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
639 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
640 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
641
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
642 # Delete any leftover library objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
643 if test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
644 removelist="$obj $lobj $libobj ${libobj}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
645 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
646 removelist="$lobj $libobj ${libobj}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
647 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
648
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
649 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
650 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
651
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
652 # On Cygwin there's no "real" PIC flag so we must build both object types
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
653 case $host_os in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
654 cygwin* | mingw* | pw32* | os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
655 pic_mode=default
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
656 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
657 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
658 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
659 # non-PIC code in shared libraries is not supported
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
660 pic_mode=default
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
661 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
662
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
663 # Calculate the filename of the output object if compiler does
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
664 # not support -o with -c
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
665 if test "$compiler_c_o" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
666 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
667 lockfile="$output_obj.lock"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
668 removelist="$removelist $output_obj $lockfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
669 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
670 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
671 output_obj=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
672 need_locks=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
673 lockfile=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
674 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
675
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
676 # Lock this critical section if it is needed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
677 # We use this script file to make the link, it avoids creating a new file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
678 if test "$need_locks" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
679 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
680 $show "Waiting for $lockfile to be removed"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
681 sleep 2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
682 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
683 elif test "$need_locks" = warn; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
684 if test -f "$lockfile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
685 $echo "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
686 *** ERROR, $lockfile exists and contains:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
687 `cat $lockfile 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
688
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
689 This indicates that another process is trying to use the same
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
690 temporary object file, and libtool could not work around it because
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
691 your compiler does not support \`-c' and \`-o' together. If you
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
692 repeat this compilation, it may succeed, by chance, but you had better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
693 avoid parallel builds (make -j) in this platform, or get a better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
694 compiler."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
695
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
696 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
697 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
698 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
699 $echo $srcfile > "$lockfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
700 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
701
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
702 if test -n "$fix_srcfile_path"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
703 eval srcfile=\"$fix_srcfile_path\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
704 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
705
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
706 $run $rm "$libobj" "${libobj}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
707
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
708 # Create a libtool object file (analogous to a ".la" file),
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
709 # but don't create it if we're doing a dry run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
710 test -z "$run" && cat > ${libobj}T <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
711 # $libobj - a libtool object file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
712 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
713 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
714 # Please DO NOT delete this file!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
715 # It is necessary for linking the library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
716
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
717 # Name of the PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
718 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
719
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
720 # Only build a PIC object if we are building libtool libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
721 if test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
722 # Without this assignment, base_compile gets emptied.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
723 fbsd_hideous_sh_bug=$base_compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
724
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
725 if test "$pic_mode" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
726 command="$base_compile $srcfile $pic_flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
727 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
728 # Don't build PIC code
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
729 command="$base_compile $srcfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
730 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
731
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
732 if test ! -d "${xdir}$objdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
733 $show "$mkdir ${xdir}$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
734 $run $mkdir ${xdir}$objdir
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
735 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
736 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
737 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
738 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
739 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
740
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
741 if test -z "$output_obj"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
742 # Place PIC objects in $objdir
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
743 command="$command -o $lobj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
744 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
745
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
746 $run $rm "$lobj" "$output_obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
747
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
748 $show "$command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
749 if $run eval "$command"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
750 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
751 test -n "$output_obj" && $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
752 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
753 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
754
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
755 if test "$need_locks" = warn &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
756 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
757 $echo "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
758 *** ERROR, $lockfile contains:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
759 `cat $lockfile 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
760
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
761 but it should contain:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
762 $srcfile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
763
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
764 This indicates that another process is trying to use the same
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
765 temporary object file, and libtool could not work around it because
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
766 your compiler does not support \`-c' and \`-o' together. If you
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
767 repeat this compilation, it may succeed, by chance, but you had better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
768 avoid parallel builds (make -j) in this platform, or get a better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
769 compiler."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
770
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
771 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
772 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
773 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
774
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
775 # Just move the object if needed, then go on to compile the next one
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
776 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
777 $show "$mv $output_obj $lobj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
778 if $run $mv $output_obj $lobj; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
779 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
780 error=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
781 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
782 exit $error
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
783 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
784 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
785
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
786 # Append the name of the PIC object to the libtool object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
787 test -z "$run" && cat >> ${libobj}T <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
788 pic_object='$objdir/$objname'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
789
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
790 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
791
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
792 # Allow error messages only from the first compilation.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
793 if test "$suppress_opt" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
794 suppress_output=' >/dev/null 2>&1'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
795 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
796 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
797 # No PIC object so indicate it doesn't exist in the libtool
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
798 # object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
799 test -z "$run" && cat >> ${libobj}T <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
800 pic_object=none
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
801
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
802 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
803 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
804
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
805 # Only build a position-dependent object if we build old libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
806 if test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
807 if test "$pic_mode" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
808 # Don't build PIC code
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
809 command="$base_compile $srcfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
810 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
811 command="$base_compile $srcfile $pic_flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
812 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
813 if test "$compiler_c_o" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
814 command="$command -o $obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
815 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
816
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
817 # Suppress compiler output if we already did a PIC compilation.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
818 command="$command$suppress_output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
819 $run $rm "$obj" "$output_obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
820 $show "$command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
821 if $run eval "$command"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
822 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
823 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
824 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
825 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
826
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
827 if test "$need_locks" = warn &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
828 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
829 $echo "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
830 *** ERROR, $lockfile contains:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
831 `cat $lockfile 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
832
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
833 but it should contain:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
834 $srcfile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
835
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
836 This indicates that another process is trying to use the same
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
837 temporary object file, and libtool could not work around it because
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
838 your compiler does not support \`-c' and \`-o' together. If you
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
839 repeat this compilation, it may succeed, by chance, but you had better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
840 avoid parallel builds (make -j) in this platform, or get a better
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
841 compiler."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
842
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
843 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
844 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
845 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
846
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
847 # Just move the object if needed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
848 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
849 $show "$mv $output_obj $obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
850 if $run $mv $output_obj $obj; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
851 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
852 error=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
853 $run $rm $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
854 exit $error
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
855 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
856 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
857
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
858 # Append the name of the non-PIC object the libtool object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
859 # Only append if the libtool object file exists.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
860 test -z "$run" && cat >> ${libobj}T <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
861 # Name of the non-PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
862 non_pic_object='$objname'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
863
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
864 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
865 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
866 # Append the name of the non-PIC object the libtool object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
867 # Only append if the libtool object file exists.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
868 test -z "$run" && cat >> ${libobj}T <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
869 # Name of the non-PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
870 non_pic_object=none
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
871
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
872 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
873 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
874
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
875 $run $mv "${libobj}T" "${libobj}"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
876
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
877 # Unlock the critical section if it was locked
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
878 if test "$need_locks" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
879 $run $rm "$lockfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
880 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
881
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
882 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
883 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
884
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
885 # libtool link mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
886 link | relink)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
887 modename="$modename: link"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
888 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
889 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
890 # It is impossible to link a dll without this setting, and
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
891 # we shouldn't force the makefile maintainer to figure out
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
892 # which system we are compiling for in order to pass an extra
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
893 # flag for every libtool invocation.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
894 # allow_undefined=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
895
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
896 # FIXME: Unfortunately, there are problems with the above when trying
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
897 # to make a dll which has undefined symbols, in which case not
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
898 # even a static library is built. For now, we need to specify
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
899 # -no-undefined on the libtool link line when we can be certain
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
900 # that all symbols are satisfied, otherwise we get a static library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
901 allow_undefined=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
902 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
903 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
904 allow_undefined=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
905 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
906 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
907 libtool_args="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
908 base_compile="$nonopt $@"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
909 compile_command="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
910 finalize_command="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
911
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
912 compile_rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
913 finalize_rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
914 compile_shlibpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
915 finalize_shlibpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
916 convenience=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
917 old_convenience=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
918 deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
919 old_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
920 compiler_flags=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
921 linker_flags=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
922 dllsearchpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
923 lib_search_path=`pwd`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
924 inst_prefix_dir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
925
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
926 avoid_version=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
927 dlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
928 dlprefiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
929 dlself=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
930 export_dynamic=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
931 export_symbols=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
932 export_symbols_regex=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
933 generated=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
934 libobjs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
935 ltlibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
936 module=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
937 no_install=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
938 objs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
939 non_pic_objects=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
940 precious_files_regex=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
941 prefer_static_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
942 preload=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
943 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
944 prevarg=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
945 release=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
946 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
947 xrpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
948 perm_rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
949 temp_rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
950 thread_safe=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
951 vinfo=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
952 vinfo_number=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
953
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
954 func_infer_tag $base_compile
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
955
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
956 # We need to know -static, to get the right output filenames.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
957 for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
958 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
959 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
960 -all-static | -static)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
961 if test "X$arg" = "X-all-static"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
962 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
963 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
964 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
965 if test -n "$link_static_flag"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
966 dlopen_self=$dlopen_self_static
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
967 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
968 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
969 if test -z "$pic_flag" && test -n "$link_static_flag"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
970 dlopen_self=$dlopen_self_static
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
971 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
972 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
973 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
974 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
975 prefer_static_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
976 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
977 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
978 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
979 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
980
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
981 # See if our shared archives depend on static archives.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
982 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
983
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
984 # Go through the arguments, transforming them on the way.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
985 while test "$#" -gt 0; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
986 arg="$1"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
987 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
988 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
989 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
990 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
991 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
992 *) qarg=$arg ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
993 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
994 libtool_args="$libtool_args $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
995
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
996 # If the previous option needs an argument, assign it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
997 if test -n "$prev"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
998 case $prev in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
999 output)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1000 compile_command="$compile_command @OUTPUT@"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1001 finalize_command="$finalize_command @OUTPUT@"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1002 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1003 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1004
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1005 case $prev in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1006 dlfiles|dlprefiles)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1007 if test "$preload" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1008 # Add the symbol object into the linking commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1009 compile_command="$compile_command @SYMFILE@"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1010 finalize_command="$finalize_command @SYMFILE@"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1011 preload=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1012 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1013 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1014 *.la | *.lo) ;; # We handle these cases below.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1015 force)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1016 if test "$dlself" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1017 dlself=needless
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1018 export_dynamic=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1019 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1020 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1021 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1022 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1023 self)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1024 if test "$prev" = dlprefiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1025 dlself=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1026 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1027 dlself=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1028 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1029 dlself=needless
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1030 export_dynamic=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1031 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1032 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1033 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1034 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1035 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1036 if test "$prev" = dlfiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1037 dlfiles="$dlfiles $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1038 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1039 dlprefiles="$dlprefiles $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1040 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1041 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1042 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1043 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1044 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1045 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1046 expsyms)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1047 export_symbols="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1048 if test ! -f "$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1049 $echo "$modename: symbol file \`$arg' does not exist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1050 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1051 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1052 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1053 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1054 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1055 expsyms_regex)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1056 export_symbols_regex="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1057 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1058 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1059 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1060 inst_prefix)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1061 inst_prefix_dir="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1062 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1063 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1064 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1065 precious_regex)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1066 precious_files_regex="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1067 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1068 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1069 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1070 release)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1071 release="-$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1072 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1073 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1074 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1075 objectlist)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1076 if test -f "$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1077 save_arg=$arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1078 moreargs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1079 for fil in `cat $save_arg`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1080 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1081 # moreargs="$moreargs $fil"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1082 arg=$fil
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1083 # A libtool-controlled object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1084
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1085 # Check to see that this really is a libtool object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1086 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1087 pic_object=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1088 non_pic_object=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1089
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1090 # Read the .lo file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1091 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1092 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1093 */* | *\\*) . $arg ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1094 *) . ./$arg ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1095 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1096
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1097 if test -z "$pic_object" || \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1098 test -z "$non_pic_object" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1099 test "$pic_object" = none && \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1100 test "$non_pic_object" = none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1101 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1102 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1103 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1104
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1105 # Extract subdirectory from the argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1106 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1107 if test "X$xdir" = "X$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1108 xdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1109 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1110 xdir="$xdir/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1111 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1112
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1113 if test "$pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1114 # Prepend the subdirectory the object is found in.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1115 pic_object="$xdir$pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1116
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1117 if test "$prev" = dlfiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1118 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1119 dlfiles="$dlfiles $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1120 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1121 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1122 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1123 # If libtool objects are unsupported, then we need to preload.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1124 prev=dlprefiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1125 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1126 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1127
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1128 # CHECK ME: I think I busted this. -Ossama
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1129 if test "$prev" = dlprefiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1130 # Preload the old-style object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1131 dlprefiles="$dlprefiles $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1132 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1133 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1134
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1135 # A PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1136 libobjs="$libobjs $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1137 arg="$pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1138 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1139
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1140 # Non-PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1141 if test "$non_pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1142 # Prepend the subdirectory the object is found in.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1143 non_pic_object="$xdir$non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1144
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1145 # A standard non-PIC object
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1146 non_pic_objects="$non_pic_objects $non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1147 if test -z "$pic_object" || test "$pic_object" = none ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1148 arg="$non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1149 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1150 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1151 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1152 # Only an error if not doing a dry-run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1153 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1154 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1155 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1156 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1157 # Dry-run case.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1158
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1159 # Extract subdirectory from the argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1160 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1161 if test "X$xdir" = "X$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1162 xdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1163 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1164 xdir="$xdir/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1165 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1166
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1167 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1168 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1169 libobjs="$libobjs $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1170 non_pic_objects="$non_pic_objects $non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1171 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1172 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1173 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1174 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1175 $echo "$modename: link input file \`$save_arg' does not exist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1176 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1177 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1178 arg=$save_arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1179 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1180 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1181 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1182 rpath | xrpath)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1183 # We need an absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1184 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1185 [\\/]* | [A-Za-z]:[\\/]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1186 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1187 $echo "$modename: only absolute run-paths are allowed" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1188 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1189 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1190 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1191 if test "$prev" = rpath; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1192 case "$rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1193 *" $arg "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1194 *) rpath="$rpath $arg" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1195 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1196 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1197 case "$xrpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1198 *" $arg "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1199 *) xrpath="$xrpath $arg" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1200 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1201 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1202 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1203 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1204 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1205 xcompiler)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1206 compiler_flags="$compiler_flags $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1207 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1208 compile_command="$compile_command $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1209 finalize_command="$finalize_command $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1210 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1211 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1212 xlinker)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1213 linker_flags="$linker_flags $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1214 compiler_flags="$compiler_flags $wl$qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1215 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1216 compile_command="$compile_command $wl$qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1217 finalize_command="$finalize_command $wl$qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1218 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1219 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1220 xcclinker)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1221 linker_flags="$linker_flags $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1222 compiler_flags="$compiler_flags $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1223 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1224 compile_command="$compile_command $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1225 finalize_command="$finalize_command $qarg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1226 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1227 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1228 shrext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1229 shrext_cmds="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1230 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1231 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1232 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1233 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1234 eval "$prev=\"\$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1235 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1236 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1237 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1238 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1239 fi # test -n "$prev"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1240
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1241 prevarg="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1242
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1243 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1244 -all-static)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1245 if test -n "$link_static_flag"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1246 compile_command="$compile_command $link_static_flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1247 finalize_command="$finalize_command $link_static_flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1248 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1249 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1250 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1251
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1252 -allow-undefined)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1253 # FIXME: remove this flag sometime in the future.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1254 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1255 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1256 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1257
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1258 -avoid-version)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1259 avoid_version=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1260 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1261 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1262
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1263 -dlopen)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1264 prev=dlfiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1265 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1266 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1267
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1268 -dlpreopen)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1269 prev=dlprefiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1270 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1271 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1272
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1273 -export-dynamic)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1274 export_dynamic=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1275 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1276 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1277
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1278 -export-symbols | -export-symbols-regex)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1279 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1280 $echo "$modename: more than one -exported-symbols argument is not allowed"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1281 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1282 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1283 if test "X$arg" = "X-export-symbols"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1284 prev=expsyms
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1285 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1286 prev=expsyms_regex
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1287 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1288 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1289 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1290
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1291 -inst-prefix-dir)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1292 prev=inst_prefix
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1293 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1294 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1295
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1296 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1297 # so, if we see these flags be careful not to treat them like -L
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1298 -L[A-Z][A-Z]*:*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1299 case $with_gcc/$host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1300 no/*-*-irix* | /*-*-irix*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1301 compile_command="$compile_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1302 finalize_command="$finalize_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1303 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1304 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1305 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1306 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1307
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1308 -L*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1309 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1310 # We need an absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1311 case $dir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1312 [\\/]* | [A-Za-z]:[\\/]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1313 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1314 absdir=`cd "$dir" && pwd`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1315 if test -z "$absdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1316 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1317 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1318 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1319 dir="$absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1320 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1321 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1322 case "$deplibs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1323 *" -L$dir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1324 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1325 deplibs="$deplibs -L$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1326 lib_search_path="$lib_search_path $dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1327 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1328 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1329 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1330 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1331 case :$dllsearchpath: in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1332 *":$dir:"*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1333 *) dllsearchpath="$dllsearchpath:$dir";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1334 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1335 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1336 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1337 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1338 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1339
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1340 -l*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1341 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1342 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1343 *-*-cygwin* | *-*-pw32* | *-*-beos*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1344 # These systems don't actually have a C or math library (as such)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1345 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1346 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1347 *-*-mingw* | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1348 # These systems don't actually have a C library (as such)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1349 test "X$arg" = "X-lc" && continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1350 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1351 *-*-openbsd* | *-*-freebsd*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1352 # Do not include libc due to us having libc/libc_r.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1353 test "X$arg" = "X-lc" && continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1354 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1355 *-*-rhapsody* | *-*-darwin1.[012])
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1356 # Rhapsody C and math libraries are in the System framework
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1357 deplibs="$deplibs -framework System"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1358 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1359 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1360 elif test "X$arg" = "X-lc_r"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1361 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1362 *-*-openbsd* | *-*-freebsd*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1363 # Do not include libc_r directly, use -pthread flag.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1364 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1365 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1366 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1367 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1368 deplibs="$deplibs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1369 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1370 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1371
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1372 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1373 deplibs="$deplibs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1374 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1375 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1376
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1377 -module)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1378 module=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1379 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1380 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1381
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1382 # gcc -m* arguments should be passed to the linker via $compiler_flags
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1383 # in order to pass architecture information to the linker
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1384 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1385 # but this is not reliable with gcc because gcc may use -mfoo to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1386 # select a different linker, different libraries, etc, while
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1387 # -Wl,-mfoo simply passes -mfoo to the linker.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1388 -m*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1389 # Unknown arguments in both finalize_command and compile_command need
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1390 # to be aesthetically quoted because they are evaled later.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1391 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1392 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1393 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1394 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1395 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1396 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1397 compile_command="$compile_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1398 finalize_command="$finalize_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1399 if test "$with_gcc" = "yes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1400 compiler_flags="$compiler_flags $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1401 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1402 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1403 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1404
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1405 -shrext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1406 prev=shrext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1407 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1408 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1409
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1410 -no-fast-install)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1411 fast_install=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1412 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1413 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1414
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1415 -no-install)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1416 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1417 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1418 # The PATH hackery in wrapper scripts is required on Windows
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1419 # in order for the loader to find any dlls it needs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1420 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1421 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1422 fast_install=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1423 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1424 *) no_install=yes ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1425 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1426 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1427 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1428
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1429 -no-undefined)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1430 allow_undefined=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1431 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1432 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1433
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1434 -objectlist)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1435 prev=objectlist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1436 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1437 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1438
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1439 -o) prev=output ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1440
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1441 -precious-files-regex)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1442 prev=precious_regex
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1443 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1444 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1445
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1446 -release)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1447 prev=release
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1448 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1449 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1450
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1451 -rpath)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1452 prev=rpath
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1453 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1454 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1455
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1456 -R)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1457 prev=xrpath
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1458 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1459 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1460
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1461 -R*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1462 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1463 # We need an absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1464 case $dir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1465 [\\/]* | [A-Za-z]:[\\/]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1466 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1467 $echo "$modename: only absolute run-paths are allowed" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1468 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1469 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1470 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1471 case "$xrpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1472 *" $dir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1473 *) xrpath="$xrpath $dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1474 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1475 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1476 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1477
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1478 -static)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1479 # The effects of -static are defined in a previous loop.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1480 # We used to do the same as -all-static on platforms that
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1481 # didn't have a PIC flag, but the assumption that the effects
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1482 # would be equivalent was wrong. It would break on at least
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1483 # Digital Unix and AIX.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1484 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1485 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1486
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1487 -thread-safe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1488 thread_safe=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1489 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1490 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1491
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1492 -version-info)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1493 prev=vinfo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1494 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1495 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1496 -version-number)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1497 prev=vinfo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1498 vinfo_number=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1499 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1500 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1501
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1502 -Wc,*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1503 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1504 arg=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1505 save_ifs="$IFS"; IFS=','
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1506 for flag in $args; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1507 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1508 case $flag in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1509 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1510 flag="\"$flag\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1511 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1512 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1513 arg="$arg $wl$flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1514 compiler_flags="$compiler_flags $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1515 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1516 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1517 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1518 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1519
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1520 -Wl,*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1521 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1522 arg=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1523 save_ifs="$IFS"; IFS=','
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1524 for flag in $args; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1525 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1526 case $flag in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1527 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1528 flag="\"$flag\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1529 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1530 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1531 arg="$arg $wl$flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1532 compiler_flags="$compiler_flags $wl$flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1533 linker_flags="$linker_flags $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1534 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1535 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1536 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1537 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1538
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1539 -Xcompiler)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1540 prev=xcompiler
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1541 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1542 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1543
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1544 -Xlinker)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1545 prev=xlinker
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1546 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1547 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1548
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1549 -XCClinker)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1550 prev=xcclinker
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1551 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1552 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1553
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1554 # Some other compiler flag.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1555 -* | +*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1556 # Unknown arguments in both finalize_command and compile_command need
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1557 # to be aesthetically quoted because they are evaled later.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1558 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1559 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1560 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1561 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1562 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1563 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1564 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1565
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1566 *.$objext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1567 # A standard object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1568 objs="$objs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1569 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1570
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1571 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1572 # A libtool-controlled object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1573
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1574 # Check to see that this really is a libtool object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1575 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1576 pic_object=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1577 non_pic_object=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1578
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1579 # Read the .lo file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1580 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1581 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1582 */* | *\\*) . $arg ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1583 *) . ./$arg ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1584 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1585
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1586 if test -z "$pic_object" || \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1587 test -z "$non_pic_object" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1588 test "$pic_object" = none && \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1589 test "$non_pic_object" = none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1590 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1591 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1592 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1593
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1594 # Extract subdirectory from the argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1595 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1596 if test "X$xdir" = "X$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1597 xdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1598 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1599 xdir="$xdir/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1600 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1601
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1602 if test "$pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1603 # Prepend the subdirectory the object is found in.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1604 pic_object="$xdir$pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1605
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1606 if test "$prev" = dlfiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1607 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1608 dlfiles="$dlfiles $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1609 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1610 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1611 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1612 # If libtool objects are unsupported, then we need to preload.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1613 prev=dlprefiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1614 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1615 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1616
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1617 # CHECK ME: I think I busted this. -Ossama
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1618 if test "$prev" = dlprefiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1619 # Preload the old-style object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1620 dlprefiles="$dlprefiles $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1621 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1622 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1623
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1624 # A PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1625 libobjs="$libobjs $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1626 arg="$pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1627 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1628
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1629 # Non-PIC object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1630 if test "$non_pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1631 # Prepend the subdirectory the object is found in.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1632 non_pic_object="$xdir$non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1633
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1634 # A standard non-PIC object
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1635 non_pic_objects="$non_pic_objects $non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1636 if test -z "$pic_object" || test "$pic_object" = none ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1637 arg="$non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1638 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1639 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1640 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1641 # Only an error if not doing a dry-run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1642 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1643 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1644 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1645 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1646 # Dry-run case.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1647
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1648 # Extract subdirectory from the argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1649 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1650 if test "X$xdir" = "X$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1651 xdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1652 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1653 xdir="$xdir/"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1654 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1655
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1656 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1657 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1658 libobjs="$libobjs $pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1659 non_pic_objects="$non_pic_objects $non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1660 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1661 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1662 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1663
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1664 *.$libext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1665 # An archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1666 deplibs="$deplibs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1667 old_deplibs="$old_deplibs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1668 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1669 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1670
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1671 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1672 # A libtool-controlled library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1673
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1674 if test "$prev" = dlfiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1675 # This library was specified with -dlopen.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1676 dlfiles="$dlfiles $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1677 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1678 elif test "$prev" = dlprefiles; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1679 # The library was specified with -dlpreopen.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1680 dlprefiles="$dlprefiles $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1681 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1682 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1683 deplibs="$deplibs $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1684 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1685 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1686 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1687
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1688 # Some other compiler argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1689 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1690 # Unknown arguments in both finalize_command and compile_command need
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1691 # to be aesthetically quoted because they are evaled later.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1692 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1693 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1694 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1695 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1696 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1697 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1698 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1699 esac # arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1700
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1701 # Now actually substitute the argument into the commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1702 if test -n "$arg"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1703 compile_command="$compile_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1704 finalize_command="$finalize_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1705 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1706 done # argument parsing loop
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1707
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1708 if test -n "$prev"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1709 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1710 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1711 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1712 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1713
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1714 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1715 eval arg=\"$export_dynamic_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1716 compile_command="$compile_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1717 finalize_command="$finalize_command $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1718 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1719
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1720 oldlibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1721 # calculate the name of the file, without its directory
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1722 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1723 libobjs_save="$libobjs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1724
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1725 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1726 # get the directories listed in $shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1727 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1728 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1729 shlib_search_path=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1730 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1731 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1732 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1733
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1734 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1735 if test "X$output_objdir" = "X$output"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1736 output_objdir="$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1737 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1738 output_objdir="$output_objdir/$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1739 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1740 # Create the object directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1741 if test ! -d "$output_objdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1742 $show "$mkdir $output_objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1743 $run $mkdir $output_objdir
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1744 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1745 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1746 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1747 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1748 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1749
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1750 # Determine the type of output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1751 case $output in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1752 "")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1753 $echo "$modename: you must specify an output file" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1754 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1755 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1756 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1757 *.$libext) linkmode=oldlib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1758 *.lo | *.$objext) linkmode=obj ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1759 *.la) linkmode=lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1760 *) linkmode=prog ;; # Anything else should be a program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1761 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1762
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1763 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1764 *cygwin* | *mingw* | *pw32*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1765 # don't eliminate duplications in $postdeps and $predeps
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1766 duplicate_compiler_generated_deps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1767 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1768 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1769 duplicate_compiler_generated_deps=$duplicate_deps
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1770 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1771 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1772 specialdeplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1773
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1774 libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1775 # Find all interdependent deplibs by searching for libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1776 # that are linked more than once (e.g. -la -lb -la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1777 for deplib in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1778 if test "X$duplicate_deps" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1779 case "$libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1780 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1781 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1782 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1783 libs="$libs $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1784 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1785
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1786 if test "$linkmode" = lib; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1787 libs="$predeps $libs $compiler_lib_search_path $postdeps"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1788
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1789 # Compute libraries that are listed more than once in $predeps
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1790 # $postdeps and mark them as special (i.e., whose duplicates are
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1791 # not to be eliminated).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1792 pre_post_deps=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1793 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1794 for pre_post_dep in $predeps $postdeps; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1795 case "$pre_post_deps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1796 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1797 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1798 pre_post_deps="$pre_post_deps $pre_post_dep"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1799 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1800 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1801 pre_post_deps=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1802 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1803
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1804 deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1805 newdependency_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1806 newlib_search_path=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1807 need_relink=no # whether we're linking any uninstalled libtool libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1808 notinst_deplibs= # not-installed libtool libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1809 notinst_path= # paths that contain not-installed libtool libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1810 case $linkmode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1811 lib)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1812 passes="conv link"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1813 for file in $dlfiles $dlprefiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1814 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1815 *.la) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1816 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1817 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1818 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1819 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1820 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1821 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1822 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1823 prog)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1824 compile_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1825 finalize_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1826 alldeplibs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1827 newdlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1828 newdlprefiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1829 passes="conv scan dlopen dlpreopen link"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1830 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1831 *) passes="conv"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1832 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1833 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1834 for pass in $passes; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1835 if test "$linkmode,$pass" = "lib,link" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1836 test "$linkmode,$pass" = "prog,scan"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1837 libs="$deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1838 deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1839 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1840 if test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1841 case $pass in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1842 dlopen) libs="$dlfiles" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1843 dlpreopen) libs="$dlprefiles" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1844 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1845 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1846 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1847 if test "$pass" = dlopen; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1848 # Collect dlpreopened libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1849 save_deplibs="$deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1850 deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1851 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1852 for deplib in $libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1853 lib=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1854 found=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1855 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1856 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1857 if test "$linkmode,$pass" = "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1858 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1859 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1860 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1861 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1862 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1863 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1864 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1865 -l*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1866 if test "$linkmode" != lib && test "$linkmode" != prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1867 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1868 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1869 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1870 if test "$pass" = conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1871 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1872 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1873 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1874 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1875 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1876 for search_ext in .la $std_shrext .so .a; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1877 # Search the libtool library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1878 lib="$searchdir/lib${name}${search_ext}"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1879 if test -f "$lib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1880 if test "$search_ext" = ".la"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1881 found=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1882 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1883 found=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1884 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1885 break 2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1886 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1887 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1888 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1889 if test "$found" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1890 # deplib doesn't seem to be a libtool library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1891 if test "$linkmode,$pass" = "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1892 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1893 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1894 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1895 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1896 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1897 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1898 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1899 else # deplib is a libtool library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1900 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1901 # We need to do some special things here, and not later.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1902 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1903 case " $predeps $postdeps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1904 *" $deplib "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1905 if (${SED} -e '2q' $lib |
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1906 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1907 library_names=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1908 old_library=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1909 case $lib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1910 */* | *\\*) . $lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1911 *) . ./$lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1912 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1913 for l in $old_library $library_names; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1914 ll="$l"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1915 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1916 if test "X$ll" = "X$old_library" ; then # only static version available
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1917 found=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1918 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1919 test "X$ladir" = "X$lib" && ladir="."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1920 lib=$ladir/$old_library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1921 if test "$linkmode,$pass" = "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1922 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1923 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1924 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1925 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1926 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1927 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1928 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1929 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1930 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1931 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1932 *) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1933 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1934 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1935 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1936 ;; # -l
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1937 -L*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1938 case $linkmode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1939 lib)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1940 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1941 test "$pass" = conv && continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1942 newdependency_libs="$deplib $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1943 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1944 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1945 prog)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1946 if test "$pass" = conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1947 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1948 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1949 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1950 if test "$pass" = scan; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1951 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1952 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1953 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1954 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1955 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1956 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1957 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1958 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1959 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1960 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1961 esac # linkmode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1962 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1963 ;; # -L
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1964 -R*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1965 if test "$pass" = link; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1966 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1967 # Make sure the xrpath contains only unique directories.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1968 case "$xrpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1969 *" $dir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1970 *) xrpath="$xrpath $dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1971 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1972 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1973 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1974 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1975 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1976 *.la) lib="$deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1977 *.$libext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1978 if test "$pass" = conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1979 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1980 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1981 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1982 case $linkmode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1983 lib)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1984 if test "$deplibs_check_method" != pass_all; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1985 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1986 $echo "*** Warning: Trying to link with static lib archive $deplib."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1987 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1988 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1989 $echo "*** shared version of the library, which you do not appear to have"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1990 $echo "*** because the file extensions .$libext of this argument makes me believe"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1991 $echo "*** that it is just a static archive that I should not used here."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1992 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1993 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1994 $echo "*** Warning: Linking the shared library $output against the"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1995 $echo "*** static library $deplib is not portable!"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1996 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1997 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1998 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
1999 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2000 prog)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2001 if test "$pass" != link; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2002 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2003 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2004 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2005 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2006 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2007 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2008 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2009 esac # linkmode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2010 ;; # *.$libext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2011 *.lo | *.$objext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2012 if test "$pass" = conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2013 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2014 elif test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2015 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2016 # If there is no dlopen support or we're linking statically,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2017 # we need to preload.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2018 newdlprefiles="$newdlprefiles $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2019 compile_deplibs="$deplib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2020 finalize_deplibs="$deplib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2021 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2022 newdlfiles="$newdlfiles $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2023 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2024 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2025 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2026 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2027 %DEPLIBS%)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2028 alldeplibs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2029 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2030 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2031 esac # case $deplib
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2032 if test "$found" = yes || test -f "$lib"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2033 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2034 $echo "$modename: cannot find the library \`$lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2035 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2036 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2037
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2038 # Check to see that this really is a libtool archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2039 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2040 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2041 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2042 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2043 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2044
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2045 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2046 test "X$ladir" = "X$lib" && ladir="."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2047
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2048 dlname=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2049 dlopen=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2050 dlpreopen=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2051 libdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2052 library_names=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2053 old_library=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2054 # If the library was installed with an old release of libtool,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2055 # it will not redefine variables installed, or shouldnotlink
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2056 installed=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2057 shouldnotlink=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2058
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2059 # Read the .la file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2060 case $lib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2061 */* | *\\*) . $lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2062 *) . ./$lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2063 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2064
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2065 if test "$linkmode,$pass" = "lib,link" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2066 test "$linkmode,$pass" = "prog,scan" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2067 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2068 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2069 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2070 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2071
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2072 if test "$pass" = conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2073 # Only check for convenience libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2074 deplibs="$lib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2075 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2076 if test -z "$old_library"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2077 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2078 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2079 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2080 # It is a libtool convenience library, so add in its objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2081 convenience="$convenience $ladir/$objdir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2082 old_convenience="$old_convenience $ladir/$objdir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2083 tmp_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2084 for deplib in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2085 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2086 if test "X$duplicate_deps" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2087 case "$tmp_libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2088 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2089 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2090 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2091 tmp_libs="$tmp_libs $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2092 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2093 elif test "$linkmode" != prog && test "$linkmode" != lib; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2094 $echo "$modename: \`$lib' is not a convenience library" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2095 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2096 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2097 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2098 fi # $pass = conv
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2099
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2100
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2101 # Get the name of the library we link against.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2102 linklib=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2103 for l in $old_library $library_names; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2104 linklib="$l"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2105 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2106 if test -z "$linklib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2107 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2108 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2109 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2110
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2111 # This library was specified with -dlopen.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2112 if test "$pass" = dlopen; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2113 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2114 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2115 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2116 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2117 if test -z "$dlname" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2118 test "$dlopen_support" != yes ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2119 test "$build_libtool_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2120 # If there is no dlname, no dlopen support or we're linking
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2121 # statically, we need to preload. We also need to preload any
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2122 # dependent libraries so libltdl's deplib preloader doesn't
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2123 # bomb out in the load deplibs phase.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2124 dlprefiles="$dlprefiles $lib $dependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2125 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2126 newdlfiles="$newdlfiles $lib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2127 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2128 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2129 fi # $pass = dlopen
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2130
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2131 # We need an absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2132 case $ladir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2133 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2134 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2135 abs_ladir=`cd "$ladir" && pwd`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2136 if test -z "$abs_ladir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2137 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2138 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2139 abs_ladir="$ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2140 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2141 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2142 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2143 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2144
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2145 # Find the relevant object directory and library name.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2146 if test "X$installed" = Xyes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2147 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2148 $echo "$modename: warning: library \`$lib' was moved." 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2149 dir="$ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2150 absdir="$abs_ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2151 libdir="$abs_ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2152 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2153 dir="$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2154 absdir="$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2155 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2156 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2157 dir="$ladir/$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2158 absdir="$abs_ladir/$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2159 # Remove this search path later
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2160 notinst_path="$notinst_path $abs_ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2161 fi # $installed = yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2162 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2163
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2164 # This library was specified with -dlpreopen.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2165 if test "$pass" = dlpreopen; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2166 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2167 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2168 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2169 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2170 # Prefer using a static library (so that no silly _DYNAMIC symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2171 # are required to link).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2172 if test -n "$old_library"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2173 newdlprefiles="$newdlprefiles $dir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2174 # Otherwise, use the dlname, so that lt_dlopen finds it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2175 elif test -n "$dlname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2176 newdlprefiles="$newdlprefiles $dir/$dlname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2177 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2178 newdlprefiles="$newdlprefiles $dir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2179 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2180 fi # $pass = dlpreopen
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2181
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2182 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2183 # Link the convenience library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2184 if test "$linkmode" = lib; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2185 deplibs="$dir/$old_library $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2186 elif test "$linkmode,$pass" = "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2187 compile_deplibs="$dir/$old_library $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2188 finalize_deplibs="$dir/$old_library $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2189 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2190 deplibs="$lib $deplibs" # used for prog,scan pass
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2191 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2192 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2193 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2194
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2195
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2196 if test "$linkmode" = prog && test "$pass" != link; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2197 newlib_search_path="$newlib_search_path $ladir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2198 deplibs="$lib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2199
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2200 linkalldeplibs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2201 if test "$link_all_deplibs" != no || test -z "$library_names" ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2202 test "$build_libtool_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2203 linkalldeplibs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2204 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2205
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2206 tmp_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2207 for deplib in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2208 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2209 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2210 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2211 # Need to link against all dependency_libs?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2212 if test "$linkalldeplibs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2213 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2214 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2215 # Need to hardcode shared library paths
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2216 # or/and link against static libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2217 newdependency_libs="$deplib $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2218 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2219 if test "X$duplicate_deps" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2220 case "$tmp_libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2221 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2222 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2223 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2224 tmp_libs="$tmp_libs $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2225 done # for deplib
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2226 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2227 fi # $linkmode = prog...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2228
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2229 if test "$linkmode,$pass" = "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2230 if test -n "$library_names" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2231 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2232 # We need to hardcode the library path
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2233 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2234 # Make sure the rpath contains only unique directories.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2235 case "$temp_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2236 *" $dir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2237 *" $absdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2238 *) temp_rpath="$temp_rpath $dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2239 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2240 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2241
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2242 # Hardcode the library path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2243 # Skip directories that are in the system default run-time
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2244 # search path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2245 case " $sys_lib_dlsearch_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2246 *" $absdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2247 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2248 case "$compile_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2249 *" $absdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2250 *) compile_rpath="$compile_rpath $absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2251 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2252 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2253 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2254 case " $sys_lib_dlsearch_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2255 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2256 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2257 case "$finalize_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2258 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2259 *) finalize_rpath="$finalize_rpath $libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2260 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2261 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2262 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2263 fi # $linkmode,$pass = prog,link...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2264
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2265 if test "$alldeplibs" = yes &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2266 { test "$deplibs_check_method" = pass_all ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2267 { test "$build_libtool_libs" = yes &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2268 test -n "$library_names"; }; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2269 # We only need to search for static libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2270 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2271 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2272 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2273
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2274 link_static=no # Whether the deplib will be linked statically
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2275 if test -n "$library_names" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2276 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2277 if test "$installed" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2278 notinst_deplibs="$notinst_deplibs $lib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2279 need_relink=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2280 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2281 # This is a shared library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2282
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2283 # Warn about portability, can't link against -module's on
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2284 # some systems (darwin)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2285 if test "$shouldnotlink" = yes && test "$pass" = link ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2286 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2287 if test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2288 $echo "*** Warning: Linking the executable $output against the loadable module"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2289 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2290 $echo "*** Warning: Linking the shared library $output against the loadable module"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2291 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2292 $echo "*** $linklib is not portable!"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2293 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2294 if test "$linkmode" = lib &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2295 test "$hardcode_into_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2296 # Hardcode the library path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2297 # Skip directories that are in the system default run-time
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2298 # search path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2299 case " $sys_lib_dlsearch_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2300 *" $absdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2301 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2302 case "$compile_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2303 *" $absdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2304 *) compile_rpath="$compile_rpath $absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2305 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2306 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2307 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2308 case " $sys_lib_dlsearch_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2309 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2310 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2311 case "$finalize_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2312 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2313 *) finalize_rpath="$finalize_rpath $libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2314 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2315 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2316 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2317 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2318
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2319 if test -n "$old_archive_from_expsyms_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2320 # figure out the soname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2321 set dummy $library_names
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2322 realname="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2323 shift; shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2324 libname=`eval \\$echo \"$libname_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2325 # use dlname if we got it. it's perfectly good, no?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2326 if test -n "$dlname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2327 soname="$dlname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2328 elif test -n "$soname_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2329 # bleh windows
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2330 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2331 *cygwin* | mingw*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2332 major=`expr $current - $age`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2333 versuffix="-$major"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2334 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2335 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2336 eval soname=\"$soname_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2337 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2338 soname="$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2339 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2340
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2341 # Make a new name for the extract_expsyms_cmds to use
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2342 soroot="$soname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2343 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2344 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2345
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2346 # If the library has no export list, then create one now
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2347 if test -f "$output_objdir/$soname-def"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2348 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2349 $show "extracting exported symbol list from \`$soname'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2350 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2351 cmds=$extract_expsyms_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2352 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2353 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2354 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2355 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2356 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2357 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2358 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2359 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2360
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2361 # Create $newlib
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2362 if test -f "$output_objdir/$newlib"; then :; else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2363 $show "generating import library for \`$soname'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2364 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2365 cmds=$old_archive_from_expsyms_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2366 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2367 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2368 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2369 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2370 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2371 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2372 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2373 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2374 # make sure the library variables are pointing to the new library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2375 dir=$output_objdir
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2376 linklib=$newlib
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2377 fi # test -n "$old_archive_from_expsyms_cmds"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2378
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2379 if test "$linkmode" = prog || test "$mode" != relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2380 add_shlibpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2381 add_dir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2382 add=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2383 lib_linked=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2384 case $hardcode_action in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2385 immediate | unsupported)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2386 if test "$hardcode_direct" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2387 add="$dir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2388 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2389 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2390 *-*-darwin* )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2391 # if the lib is a module then we can not link against
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2392 # it, someone is ignoring the new warnings I added
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2393 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2394 $echo "** Warning, lib $linklib is a module, not a shared library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2395 if test -z "$old_library" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2396 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2397 $echo "** And there doesn't seem to be a static archive available"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2398 $echo "** The link will probably fail, sorry"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2399 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2400 add="$dir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2401 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2402 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2403 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2404 elif test "$hardcode_minus_L" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2405 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2406 *-*-sunos*) add_shlibpath="$dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2407 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2408 add_dir="-L$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2409 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2410 elif test "$hardcode_shlibpath_var" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2411 add_shlibpath="$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2412 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2413 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2414 lib_linked=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2415 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2416 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2417 relink)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2418 if test "$hardcode_direct" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2419 add="$dir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2420 elif test "$hardcode_minus_L" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2421 add_dir="-L$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2422 # Try looking first in the location we're being installed to.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2423 if test -n "$inst_prefix_dir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2424 case "$libdir" in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2425 [\\/]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2426 add_dir="$add_dir -L$inst_prefix_dir$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2427 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2428 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2429 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2430 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2431 elif test "$hardcode_shlibpath_var" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2432 add_shlibpath="$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2433 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2434 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2435 lib_linked=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2436 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2437 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2438 *) lib_linked=no ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2439 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2440
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2441 if test "$lib_linked" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2442 $echo "$modename: configuration error: unsupported hardcode properties"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2443 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2444 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2445
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2446 if test -n "$add_shlibpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2447 case :$compile_shlibpath: in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2448 *":$add_shlibpath:"*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2449 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2450 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2451 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2452 if test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2453 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2454 test -n "$add" && compile_deplibs="$add $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2455 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2456 test -n "$add_dir" && deplibs="$add_dir $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2457 test -n "$add" && deplibs="$add $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2458 if test "$hardcode_direct" != yes && \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2459 test "$hardcode_minus_L" != yes && \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2460 test "$hardcode_shlibpath_var" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2461 case :$finalize_shlibpath: in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2462 *":$libdir:"*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2463 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2464 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2465 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2466 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2467 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2468
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2469 if test "$linkmode" = prog || test "$mode" = relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2470 add_shlibpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2471 add_dir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2472 add=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2473 # Finalize command for both is simple: just hardcode it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2474 if test "$hardcode_direct" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2475 add="$libdir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2476 elif test "$hardcode_minus_L" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2477 add_dir="-L$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2478 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2479 elif test "$hardcode_shlibpath_var" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2480 case :$finalize_shlibpath: in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2481 *":$libdir:"*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2482 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2483 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2484 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2485 elif test "$hardcode_automatic" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2486 if test -n "$inst_prefix_dir" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2487 test -f "$inst_prefix_dir$libdir/$linklib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2488 add="$inst_prefix_dir$libdir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2489 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2490 add="$libdir/$linklib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2491 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2492 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2493 # We cannot seem to hardcode it, guess we'll fake it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2494 add_dir="-L$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2495 # Try looking first in the location we're being installed to.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2496 if test -n "$inst_prefix_dir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2497 case "$libdir" in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2498 [\\/]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2499 add_dir="$add_dir -L$inst_prefix_dir$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2500 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2501 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2502 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2503 add="-l$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2504 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2505
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2506 if test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2507 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2508 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2509 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2510 test -n "$add_dir" && deplibs="$add_dir $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2511 test -n "$add" && deplibs="$add $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2512 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2513 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2514 elif test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2515 # Here we assume that one of hardcode_direct or hardcode_minus_L
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2516 # is not unsupported. This is valid on all known static and
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2517 # shared platforms.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2518 if test "$hardcode_direct" != unsupported; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2519 test -n "$old_library" && linklib="$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2520 compile_deplibs="$dir/$linklib $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2521 finalize_deplibs="$dir/$linklib $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2522 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2523 compile_deplibs="-l$name -L$dir $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2524 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2525 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2526 elif test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2527 # Not a shared library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2528 if test "$deplibs_check_method" != pass_all; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2529 # We're trying link a shared library against a static one
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2530 # but the system doesn't support it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2531
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2532 # Just print a warning and add the library to dependency_libs so
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2533 # that the program can be linked against the static library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2534 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2535 $echo "*** Warning: This system can not link to static lib archive $lib."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2536 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2537 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2538 $echo "*** shared version of the library, which you do not appear to have."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2539 if test "$module" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2540 $echo "*** But as you try to build a module library, libtool will still create "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2541 $echo "*** a static module, that should work as long as the dlopening application"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2542 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2543 if test -z "$global_symbol_pipe"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2544 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2545 $echo "*** However, this would only work if libtool was able to extract symbol"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2546 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2547 $echo "*** not find such a program. So, this module is probably useless."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2548 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2549 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2550 if test "$build_old_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2551 build_libtool_libs=module
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2552 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2553 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2554 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2555 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2556 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2557 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2558 convenience="$convenience $dir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2559 old_convenience="$old_convenience $dir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2560 deplibs="$dir/$old_library $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2561 link_static=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2562 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2563 fi # link shared/static library?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2564
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2565 if test "$linkmode" = lib; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2566 if test -n "$dependency_libs" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2567 { test "$hardcode_into_libs" != yes ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2568 test "$build_old_libs" = yes ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2569 test "$link_static" = yes; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2570 # Extract -R from dependency_libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2571 temp_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2572 for libdir in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2573 case $libdir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2574 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2575 case " $xrpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2576 *" $temp_xrpath "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2577 *) xrpath="$xrpath $temp_xrpath";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2578 esac;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2579 *) temp_deplibs="$temp_deplibs $libdir";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2580 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2581 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2582 dependency_libs="$temp_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2583 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2584
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2585 newlib_search_path="$newlib_search_path $absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2586 # Link against this library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2587 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2588 # ... and its dependency_libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2589 tmp_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2590 for deplib in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2591 newdependency_libs="$deplib $newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2592 if test "X$duplicate_deps" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2593 case "$tmp_libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2594 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2595 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2596 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2597 tmp_libs="$tmp_libs $deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2598 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2599
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2600 if test "$link_all_deplibs" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2601 # Add the search paths of all dependency libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2602 for deplib in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2603 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2604 -L*) path="$deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2605 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2606 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2607 test "X$dir" = "X$deplib" && dir="."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2608 # We need an absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2609 case $dir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2610 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2611 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2612 absdir=`cd "$dir" && pwd`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2613 if test -z "$absdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2614 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2615 absdir="$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2616 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2617 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2618 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2619 if grep "^installed=no" $deplib > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2620 path="$absdir/$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2621 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2622 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2623 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2624 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2625 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2626 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2627 if test "$absdir" != "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2628 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2629 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2630 path="$absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2631 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2632 depdepl=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2633 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2634 *-*-darwin*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2635 # we do not want to link against static libs,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2636 # but need to link against shared
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2637 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2638 if test -n "$deplibrary_names" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2639 for tmp in $deplibrary_names ; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2640 depdepl=$tmp
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2641 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2642 if test -f "$path/$depdepl" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2643 depdepl="$path/$depdepl"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2644 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2645 # do not add paths which are already there
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2646 case " $newlib_search_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2647 *" $path "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2648 *) newlib_search_path="$newlib_search_path $path";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2649 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2650 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2651 path=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2652 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2653 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2654 path="-L$path"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2655 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2656 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2657 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2658 -l*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2659 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2660 *-*-darwin*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2661 # Again, we only want to link against shared libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2662 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2663 for tmp in $newlib_search_path ; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2664 if test -f "$tmp/lib$tmp_libs.dylib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2665 eval depdepl="$tmp/lib$tmp_libs.dylib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2666 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2667 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2668 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2669 path=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2670 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2671 *) continue ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2672 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2673 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2674 *) continue ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2675 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2676 case " $deplibs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2677 *" $depdepl "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2678 *) deplibs="$depdepl $deplibs" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2679 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2680 case " $deplibs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2681 *" $path "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2682 *) deplibs="$deplibs $path" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2683 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2684 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2685 fi # link_all_deplibs != no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2686 fi # linkmode = lib
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2687 done # for deplib in $libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2688 dependency_libs="$newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2689 if test "$pass" = dlpreopen; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2690 # Link the dlpreopened libraries before other libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2691 for deplib in $save_deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2692 deplibs="$deplib $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2693 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2694 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2695 if test "$pass" != dlopen; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2696 if test "$pass" != conv; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2697 # Make sure lib_search_path contains only unique directories.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2698 lib_search_path=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2699 for dir in $newlib_search_path; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2700 case "$lib_search_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2701 *" $dir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2702 *) lib_search_path="$lib_search_path $dir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2703 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2704 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2705 newlib_search_path=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2706 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2707
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2708 if test "$linkmode,$pass" != "prog,link"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2709 vars="deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2710 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2711 vars="compile_deplibs finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2712 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2713 for var in $vars dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2714 # Add libraries to $var in reverse order
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2715 eval tmp_libs=\"\$$var\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2716 new_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2717 for deplib in $tmp_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2718 # FIXME: Pedantically, this is the right thing to do, so
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2719 # that some nasty dependency loop isn't accidentally
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2720 # broken:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2721 #new_libs="$deplib $new_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2722 # Pragmatically, this seems to cause very few problems in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2723 # practice:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2724 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2725 -L*) new_libs="$deplib $new_libs" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2726 -R*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2727 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2728 # And here is the reason: when a library appears more
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2729 # than once as an explicit dependence of a library, or
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2730 # is implicitly linked in more than once by the
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2731 # compiler, it is considered special, and multiple
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2732 # occurrences thereof are not removed. Compare this
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2733 # with having the same library being listed as a
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2734 # dependency of multiple other libraries: in this case,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2735 # we know (pedantically, we assume) the library does not
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2736 # need to be listed more than once, so we keep only the
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2737 # last copy. This is not always right, but it is rare
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2738 # enough that we require users that really mean to play
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2739 # such unportable linking tricks to link the library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2740 # using -Wl,-lname, so that libtool does not consider it
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2741 # for duplicate removal.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2742 case " $specialdeplibs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2743 *" $deplib "*) new_libs="$deplib $new_libs" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2744 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2745 case " $new_libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2746 *" $deplib "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2747 *) new_libs="$deplib $new_libs" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2748 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2749 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2750 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2751 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2752 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2753 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2754 tmp_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2755 for deplib in $new_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2756 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2757 -L*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2758 case " $tmp_libs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2759 *" $deplib "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2760 *) tmp_libs="$tmp_libs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2761 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2762 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2763 *) tmp_libs="$tmp_libs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2764 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2765 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2766 eval $var=\"$tmp_libs\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2767 done # for var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2768 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2769 # Last step: remove runtime libs from dependency_libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2770 # (they stay in deplibs)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2771 tmp_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2772 for i in $dependency_libs ; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2773 case " $predeps $postdeps $compiler_lib_search_path " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2774 *" $i "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2775 i=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2776 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2777 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2778 if test -n "$i" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2779 tmp_libs="$tmp_libs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2780 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2781 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2782 dependency_libs=$tmp_libs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2783 done # for pass
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2784 if test "$linkmode" = prog; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2785 dlfiles="$newdlfiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2786 dlprefiles="$newdlprefiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2787 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2788
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2789 case $linkmode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2790 oldlib)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2791 if test -n "$deplibs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2792 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2793 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2794
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2795 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2796 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2797 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2798
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2799 if test -n "$rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2800 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2801 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2802
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2803 if test -n "$xrpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2804 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2805 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2806
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2807 if test -n "$vinfo"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2808 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2809 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2810
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2811 if test -n "$release"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2812 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2813 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2814
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2815 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2816 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2817 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2818
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2819 # Now set the variables for building old libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2820 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2821 oldlibs="$output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2822 objs="$objs$old_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2823 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2824
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2825 lib)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2826 # Make sure we only generate libraries of the form `libNAME.la'.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2827 case $outputname in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2828 lib*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2829 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2830 eval shared_ext=\"$shrext_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2831 eval libname=\"$libname_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2832 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2833 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2834 if test "$module" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2835 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2836 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2837 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2838 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2839 if test "$need_lib_prefix" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2840 # Add the "lib" prefix for modules if required
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2841 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2842 eval shared_ext=\"$shrext_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2843 eval libname=\"$libname_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2844 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2845 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2846 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2847 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2848 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2849
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2850 if test -n "$objs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2851 if test "$deplibs_check_method" != pass_all; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2852 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2853 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2854 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2855 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2856 $echo "*** Warning: Linking the shared library $output against the non-libtool"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2857 $echo "*** objects $objs is not portable!"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2858 libobjs="$libobjs $objs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2859 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2860 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2861
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2862 if test "$dlself" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2863 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2864 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2865
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2866 set dummy $rpath
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2867 if test "$#" -gt 2; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2868 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2869 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2870 install_libdir="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2871
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2872 oldlibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2873 if test -z "$rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2874 if test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2875 # Building a libtool convenience library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2876 # Some compilers have problems with a `.al' extension so
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2877 # convenience libraries should have the same extension an
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2878 # archive normally would.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2879 oldlibs="$output_objdir/$libname.$libext $oldlibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2880 build_libtool_libs=convenience
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2881 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2882 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2883
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2884 if test -n "$vinfo"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2885 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2886 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2887
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2888 if test -n "$release"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2889 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2890 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2891 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2892
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2893 # Parse the version information argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2894 save_ifs="$IFS"; IFS=':'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2895 set dummy $vinfo 0 0 0
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2896 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2897
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2898 if test -n "$8"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2899 $echo "$modename: too many parameters to \`-version-info'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2900 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2901 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2902 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2903
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2904 # convert absolute version numbers to libtool ages
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2905 # this retains compatibility with .la files and attempts
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2906 # to make the code below a bit more comprehensible
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2907
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2908 case $vinfo_number in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2909 yes)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2910 number_major="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2911 number_minor="$3"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2912 number_revision="$4"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2913 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2914 # There are really only two kinds -- those that
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2915 # use the current revision as the major version
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2916 # and those that subtract age and use age as
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2917 # a minor version. But, then there is irix
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2918 # which has an extra 1 added just for fun
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2919 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2920 case $version_type in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2921 darwin|linux|osf|windows)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2922 current=`expr $number_major + $number_minor`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2923 age="$number_minor"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2924 revision="$number_revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2925 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2926 freebsd-aout|freebsd-elf|sunos)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2927 current="$number_major"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2928 revision="$number_minor"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2929 age="0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2930 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2931 irix|nonstopux)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2932 current=`expr $number_major + $number_minor - 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2933 age="$number_minor"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2934 revision="$number_minor"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2935 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2936 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2937 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2938 no)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2939 current="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2940 revision="$3"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2941 age="$4"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2942 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2943 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2944
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2945 # Check that each of the things are valid numbers.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2946 case $current in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2947 [0-9]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2948 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2949 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2950 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2951 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2952 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2953 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2954
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2955 case $revision in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2956 [0-9]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2957 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2958 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2959 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2960 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2961 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2962 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2963
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2964 case $age in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2965 [0-9]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2966 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2967 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2968 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2969 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2970 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2971 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2972
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2973 if test "$age" -gt "$current"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2974 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2975 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2976 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2977 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2978
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2979 # Calculate the version variables.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2980 major=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2981 versuffix=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2982 verstring=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2983 case $version_type in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2984 none) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2985
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2986 darwin)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2987 # Like Linux, but with the current version available in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2988 # verstring for coding it into the library header
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2989 major=.`expr $current - $age`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2990 versuffix="$major.$age.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2991 # Darwin ld doesn't like 0 for these options...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2992 minor_current=`expr $current + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2993 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2994 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2995
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2996 freebsd-aout)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2997 major=".$current"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2998 versuffix=".$current.$revision";
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
2999 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3000
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3001 freebsd-elf)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3002 major=".$current"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3003 versuffix=".$current";
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3004 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3005
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3006 irix | nonstopux)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3007 major=`expr $current - $age + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3008
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3009 case $version_type in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3010 nonstopux) verstring_prefix=nonstopux ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3011 *) verstring_prefix=sgi ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3012 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3013 verstring="$verstring_prefix$major.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3014
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3015 # Add in all the interfaces that we are compatible with.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3016 loop=$revision
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3017 while test "$loop" -ne 0; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3018 iface=`expr $revision - $loop`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3019 loop=`expr $loop - 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3020 verstring="$verstring_prefix$major.$iface:$verstring"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3021 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3022
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3023 # Before this point, $major must not contain `.'.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3024 major=.$major
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3025 versuffix="$major.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3026 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3027
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3028 linux)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3029 major=.`expr $current - $age`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3030 versuffix="$major.$age.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3031 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3032
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3033 osf)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3034 major=.`expr $current - $age`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3035 versuffix=".$current.$age.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3036 verstring="$current.$age.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3037
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3038 # Add in all the interfaces that we are compatible with.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3039 loop=$age
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3040 while test "$loop" -ne 0; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3041 iface=`expr $current - $loop`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3042 loop=`expr $loop - 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3043 verstring="$verstring:${iface}.0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3044 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3045
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3046 # Make executables depend on our current version.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3047 verstring="$verstring:${current}.0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3048 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3049
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3050 sunos)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3051 major=".$current"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3052 versuffix=".$current.$revision"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3053 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3054
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3055 windows)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3056 # Use '-' rather than '.', since we only want one
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3057 # extension on DOS 8.3 filesystems.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3058 major=`expr $current - $age`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3059 versuffix="-$major"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3060 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3061
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3062 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3063 $echo "$modename: unknown library version type \`$version_type'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3064 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3065 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3066 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3067 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3068
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3069 # Clear the version info if we defaulted, and they specified a release.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3070 if test -z "$vinfo" && test -n "$release"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3071 major=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3072 case $version_type in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3073 darwin)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3074 # we can't check for "0.0" in archive_cmds due to quoting
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3075 # problems, so we reset it completely
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3076 verstring=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3077 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3078 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3079 verstring="0.0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3080 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3081 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3082 if test "$need_version" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3083 versuffix=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3084 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3085 versuffix=".0.0"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3086 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3087 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3088
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3089 # Remove version info from name if versioning should be avoided
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3090 if test "$avoid_version" = yes && test "$need_version" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3091 major=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3092 versuffix=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3093 verstring=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3094 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3095
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3096 # Check to see if the archive will have undefined symbols.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3097 if test "$allow_undefined" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3098 if test "$allow_undefined_flag" = unsupported; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3099 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3100 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3101 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3102 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3103 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3104 # Don't allow undefined symbols.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3105 allow_undefined_flag="$no_undefined_flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3106 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3107 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3108
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3109 if test "$mode" != relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3110 # Remove our outputs, but don't remove object files since they
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3111 # may have been created when compiling PIC objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3112 removelist=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3113 tempremovelist=`$echo "$output_objdir/*"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3114 for p in $tempremovelist; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3115 case $p in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3116 *.$objext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3117 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3118 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3119 if test "X$precious_files_regex" != "X"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3120 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3121 then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3122 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3123 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3124 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3125 removelist="$removelist $p"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3126 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3127 *) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3128 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3129 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3130 if test -n "$removelist"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3131 $show "${rm}r $removelist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3132 $run ${rm}r $removelist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3133 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3134 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3135
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3136 # Now set the variables for building old libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3137 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3138 oldlibs="$oldlibs $output_objdir/$libname.$libext"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3139
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3140 # Transform .lo files to .o files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3141 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3142 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3143
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3144 # Eliminate all temporary directories.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3145 for path in $notinst_path; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3146 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3147 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3148 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3149 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3150
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3151 if test -n "$xrpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3152 # If the user specified any rpath flags, then add them.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3153 temp_xrpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3154 for libdir in $xrpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3155 temp_xrpath="$temp_xrpath -R$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3156 case "$finalize_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3157 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3158 *) finalize_rpath="$finalize_rpath $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3159 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3160 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3161 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3162 dependency_libs="$temp_xrpath $dependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3163 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3164 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3165
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3166 # Make sure dlfiles contains only unique files that won't be dlpreopened
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3167 old_dlfiles="$dlfiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3168 dlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3169 for lib in $old_dlfiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3170 case " $dlprefiles $dlfiles " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3171 *" $lib "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3172 *) dlfiles="$dlfiles $lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3173 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3174 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3175
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3176 # Make sure dlprefiles contains only unique files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3177 old_dlprefiles="$dlprefiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3178 dlprefiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3179 for lib in $old_dlprefiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3180 case "$dlprefiles " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3181 *" $lib "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3182 *) dlprefiles="$dlprefiles $lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3183 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3184 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3185
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3186 if test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3187 if test -n "$rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3188 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3189 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3190 # these systems don't actually have a c library (as such)!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3191 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3192 *-*-rhapsody* | *-*-darwin1.[012])
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3193 # Rhapsody C library is in the System framework
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3194 deplibs="$deplibs -framework System"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3195 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3196 *-*-netbsd*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3197 # Don't link with libc until the a.out ld.so is fixed.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3198 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3199 *-*-openbsd* | *-*-freebsd*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3200 # Do not include libc due to us having libc/libc_r.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3201 test "X$arg" = "X-lc" && continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3202 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3203 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3204 # Add libc to deplibs on all other systems if necessary.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3205 if test "$build_libtool_need_lc" = "yes"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3206 deplibs="$deplibs -lc"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3207 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3208 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3209 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3210 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3211
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3212 # Transform deplibs into only deplibs that can be linked in shared.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3213 name_save=$name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3214 libname_save=$libname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3215 release_save=$release
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3216 versuffix_save=$versuffix
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3217 major_save=$major
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3218 # I'm not sure if I'm treating the release correctly. I think
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3219 # release should show up in the -l (ie -lgmp5) so we don't want to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3220 # add it in twice. Is that correct?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3221 release=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3222 versuffix=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3223 major=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3224 newdeplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3225 droppeddeps=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3226 case $deplibs_check_method in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3227 pass_all)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3228 # Don't check for shared/static. Everything works.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3229 # This might be a little naive. We might want to check
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3230 # whether the library exists or not. But this is on
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3231 # osf3 & osf4 and I'm not really sure... Just
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3232 # implementing what was already the behavior.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3233 newdeplibs=$deplibs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3234 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3235 test_compile)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3236 # This code stresses the "libraries are programs" paradigm to its
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3237 # limits. Maybe even breaks it. We compile a program, linking it
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3238 # against the deplibs as a proxy for the library. Then we can check
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3239 # whether they linked in statically or dynamically with ldd.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3240 $rm conftest.c
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3241 cat > conftest.c <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3242 int main() { return 0; }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3243 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3244 $rm conftest
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3245 $LTCC -o conftest conftest.c $deplibs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3246 if test "$?" -eq 0 ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3247 ldd_output=`ldd conftest`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3248 for i in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3249 name="`expr $i : '-l\(.*\)'`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3250 # If $name is empty we are operating on a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3251 if test "$name" != "" && test "$name" -ne "0"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3252 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3253 case " $predeps $postdeps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3254 *" $i "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3255 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3256 i=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3257 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3258 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3259 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3260 if test -n "$i" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3261 libname=`eval \\$echo \"$libname_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3262 deplib_matches=`eval \\$echo \"$library_names_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3263 set dummy $deplib_matches
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3264 deplib_match=$2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3265 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3266 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3267 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3268 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3269 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3270 $echo "*** Warning: dynamic linker does not accept needed library $i."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3271 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3272 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3273 $echo "*** shared version of the library, which I believe you do not have"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3274 $echo "*** because a test_compile did reveal that the linker did not use it for"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3275 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3276 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3277 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3278 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3279 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3280 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3281 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3282 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3283 # Error occurred in the first compile. Let's try to salvage
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3284 # the situation: Compile a separate program for each library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3285 for i in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3286 name="`expr $i : '-l\(.*\)'`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3287 # If $name is empty we are operating on a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3288 if test "$name" != "" && test "$name" != "0"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3289 $rm conftest
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3290 $LTCC -o conftest conftest.c $i
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3291 # Did it work?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3292 if test "$?" -eq 0 ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3293 ldd_output=`ldd conftest`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3294 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3295 case " $predeps $postdeps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3296 *" $i "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3297 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3298 i=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3299 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3300 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3301 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3302 if test -n "$i" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3303 libname=`eval \\$echo \"$libname_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3304 deplib_matches=`eval \\$echo \"$library_names_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3305 set dummy $deplib_matches
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3306 deplib_match=$2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3307 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3308 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3309 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3310 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3311 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3312 $echo "*** Warning: dynamic linker does not accept needed library $i."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3313 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3314 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3315 $echo "*** shared version of the library, which you do not appear to have"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3316 $echo "*** because a test_compile did reveal that the linker did not use this one"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3317 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3318 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3319 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3320 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3321 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3322 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3323 $echo "*** Warning! Library $i is needed by this library but I was not able to"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3324 $echo "*** make it link in! You will probably need to install it or some"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3325 $echo "*** library that it depends on before this library will be fully"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3326 $echo "*** functional. Installing it before continuing would be even better."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3327 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3328 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3329 newdeplibs="$newdeplibs $i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3330 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3331 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3332 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3333 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3334 file_magic*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3335 set dummy $deplibs_check_method
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3336 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3337 for a_deplib in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3338 name="`expr $a_deplib : '-l\(.*\)'`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3339 # If $name is empty we are operating on a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3340 if test "$name" != "" && test "$name" != "0"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3341 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3342 case " $predeps $postdeps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3343 *" $a_deplib "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3344 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3345 a_deplib=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3346 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3347 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3348 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3349 if test -n "$a_deplib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3350 libname=`eval \\$echo \"$libname_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3351 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3352 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3353 for potent_lib in $potential_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3354 # Follow soft links.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3355 if ls -lLd "$potent_lib" 2>/dev/null \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3356 | grep " -> " >/dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3357 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3358 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3359 # The statement above tries to avoid entering an
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3360 # endless loop below, in case of cyclic links.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3361 # We might still enter an endless loop, since a link
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3362 # loop can be closed while we follow links,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3363 # but so what?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3364 potlib="$potent_lib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3365 while test -h "$potlib" 2>/dev/null; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3366 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3367 case $potliblink in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3368 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3369 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3370 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3371 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3372 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3373 | ${SED} 10q \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3374 | $EGREP "$file_magic_regex" > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3375 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3376 a_deplib=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3377 break 2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3378 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3379 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3380 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3381 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3382 if test -n "$a_deplib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3383 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3384 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3385 $echo "*** Warning: linker path does not have real file for library $a_deplib."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3386 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3387 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3388 $echo "*** shared version of the library, which you do not appear to have"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3389 $echo "*** because I did check the linker path looking for a file starting"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3390 if test -z "$potlib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3391 $echo "*** with $libname but no candidates were found. (...for file magic test)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3392 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3393 $echo "*** with $libname and none of the candidates passed a file format test"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3394 $echo "*** using a file magic. Last file checked: $potlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3395 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3396 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3397 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3398 # Add a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3399 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3400 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3401 done # Gone through all deplibs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3402 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3403 match_pattern*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3404 set dummy $deplibs_check_method
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3405 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3406 for a_deplib in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3407 name="`expr $a_deplib : '-l\(.*\)'`"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3408 # If $name is empty we are operating on a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3409 if test -n "$name" && test "$name" != "0"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3410 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3411 case " $predeps $postdeps " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3412 *" $a_deplib "*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3413 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3414 a_deplib=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3415 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3416 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3417 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3418 if test -n "$a_deplib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3419 libname=`eval \\$echo \"$libname_spec\"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3420 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3421 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3422 for potent_lib in $potential_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3423 potlib="$potent_lib" # see symlink-check above in file_magic test
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3424 if eval $echo \"$potent_lib\" 2>/dev/null \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3425 | ${SED} 10q \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3426 | $EGREP "$match_pattern_regex" > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3427 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3428 a_deplib=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3429 break 2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3430 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3431 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3432 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3433 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3434 if test -n "$a_deplib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3435 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3436 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3437 $echo "*** Warning: linker path does not have real file for library $a_deplib."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3438 $echo "*** I have the capability to make that library automatically link in when"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3439 $echo "*** you link to this library. But I can only do this if you have a"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3440 $echo "*** shared version of the library, which you do not appear to have"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3441 $echo "*** because I did check the linker path looking for a file starting"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3442 if test -z "$potlib" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3443 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3444 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3445 $echo "*** with $libname and none of the candidates passed a file format test"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3446 $echo "*** using a regex pattern. Last file checked: $potlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3447 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3448 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3449 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3450 # Add a -L argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3451 newdeplibs="$newdeplibs $a_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3452 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3453 done # Gone through all deplibs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3454 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3455 none | unknown | *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3456 newdeplibs=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3457 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3458 -e 's/ -[LR][^ ]*//g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3459 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3460 for i in $predeps $postdeps ; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3461 # can't use Xsed below, because $i might contain '/'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3462 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3463 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3464 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3465 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3466 | grep . >/dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3467 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3468 if test "X$deplibs_check_method" = "Xnone"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3469 $echo "*** Warning: inter-library dependencies are not supported in this platform."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3470 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3471 $echo "*** Warning: inter-library dependencies are not known to be supported."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3472 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3473 $echo "*** All declared inter-library dependencies are being dropped."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3474 droppeddeps=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3475 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3476 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3477 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3478 versuffix=$versuffix_save
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3479 major=$major_save
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3480 release=$release_save
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3481 libname=$libname_save
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3482 name=$name_save
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3483
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3484 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3485 *-*-rhapsody* | *-*-darwin1.[012])
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3486 # On Rhapsody replace the C library is the System framework
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3487 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3488 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3489 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3490
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3491 if test "$droppeddeps" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3492 if test "$module" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3493 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3494 $echo "*** Warning: libtool could not satisfy all declared inter-library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3495 $echo "*** dependencies of module $libname. Therefore, libtool will create"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3496 $echo "*** a static module, that should work as long as the dlopening"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3497 $echo "*** application is linked with the -dlopen flag."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3498 if test -z "$global_symbol_pipe"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3499 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3500 $echo "*** However, this would only work if libtool was able to extract symbol"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3501 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3502 $echo "*** not find such a program. So, this module is probably useless."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3503 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3504 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3505 if test "$build_old_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3506 oldlibs="$output_objdir/$libname.$libext"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3507 build_libtool_libs=module
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3508 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3509 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3510 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3511 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3512 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3513 $echo "*** The inter-library dependencies that have been dropped here will be"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3514 $echo "*** automatically added whenever a program is linked with this library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3515 $echo "*** or is declared to -dlopen it."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3516
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3517 if test "$allow_undefined" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3518 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3519 $echo "*** Since this library must not contain undefined symbols,"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3520 $echo "*** because either the platform does not support them or"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3521 $echo "*** it was explicitly requested with -no-undefined,"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3522 $echo "*** libtool will only create a static version of it."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3523 if test "$build_old_libs" = no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3524 oldlibs="$output_objdir/$libname.$libext"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3525 build_libtool_libs=module
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3526 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3527 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3528 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3529 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3530 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3531 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3532 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3533 # Done checking deplibs!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3534 deplibs=$newdeplibs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3535 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3536
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3537 # All the library-specific variables (install_libdir is set above).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3538 library_names=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3539 old_library=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3540 dlname=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3541
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3542 # Test again, we may have decided not to build it any more
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3543 if test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3544 if test "$hardcode_into_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3545 # Hardcode the library paths
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3546 hardcode_libdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3547 dep_rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3548 rpath="$finalize_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3549 test "$mode" != relink && rpath="$compile_rpath$rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3550 for libdir in $rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3551 if test -n "$hardcode_libdir_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3552 if test -n "$hardcode_libdir_separator"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3553 if test -z "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3554 hardcode_libdirs="$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3555 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3556 # Just accumulate the unique libdirs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3557 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3558 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3559 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3560 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3561 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3562 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3563 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3564 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3565 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3566 eval flag=\"$hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3567 dep_rpath="$dep_rpath $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3568 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3569 elif test -n "$runpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3570 case "$perm_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3571 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3572 *) perm_rpath="$perm_rpath $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3573 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3574 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3575 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3576 # Substitute the hardcoded libdirs into the rpath.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3577 if test -n "$hardcode_libdir_separator" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3578 test -n "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3579 libdir="$hardcode_libdirs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3580 if test -n "$hardcode_libdir_flag_spec_ld"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3581 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3582 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3583 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3584 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3585 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3586 if test -n "$runpath_var" && test -n "$perm_rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3587 # We should set the runpath_var.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3588 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3589 for dir in $perm_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3590 rpath="$rpath$dir:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3591 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3592 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3593 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3594 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3595 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3596
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3597 shlibpath="$finalize_shlibpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3598 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3599 if test -n "$shlibpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3600 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3601 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3602
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3603 # Get the real and link names of the library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3604 eval shared_ext=\"$shrext_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3605 eval library_names=\"$library_names_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3606 set dummy $library_names
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3607 realname="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3608 shift; shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3609
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3610 if test -n "$soname_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3611 eval soname=\"$soname_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3612 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3613 soname="$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3614 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3615 if test -z "$dlname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3616 dlname=$soname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3617 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3618
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3619 lib="$output_objdir/$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3620 for link
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3621 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3622 linknames="$linknames $link"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3623 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3624
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3625 # Use standard objects if they are pic
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3626 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3627
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3628 # Prepare the list of exported symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3629 if test -z "$export_symbols"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3630 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3631 $show "generating symbol list for \`$libname.la'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3632 export_symbols="$output_objdir/$libname.exp"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3633 $run $rm $export_symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3634 cmds=$export_symbols_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3635 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3636 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3637 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3638 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3639 if len=`expr "X$cmd" : ".*"` &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3640 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3641 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3642 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3643 skipped_export=false
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3644 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3645 # The command line is too long to execute in one step.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3646 $show "using reloadable object file for export list..."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3647 skipped_export=:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3648 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3649 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3650 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3651 if test -n "$export_symbols_regex"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3652 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3653 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3654 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3655 $run eval '$mv "${export_symbols}T" "$export_symbols"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3656 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3657 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3658 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3659
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3660 if test -n "$export_symbols" && test -n "$include_expsyms"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3661 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3662 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3663
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3664 tmp_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3665 for test_deplib in $deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3666 case " $convenience " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3667 *" $test_deplib "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3668 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3669 tmp_deplibs="$tmp_deplibs $test_deplib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3670 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3671 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3672 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3673 deplibs="$tmp_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3674
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3675 if test -n "$convenience"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3676 if test -n "$whole_archive_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3677 save_libobjs=$libobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3678 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3679 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3680 gentop="$output_objdir/${outputname}x"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3681 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3682 $run ${rm}r "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3683 $show "$mkdir $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3684 $run $mkdir "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3685 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3686 if test "$status" -ne 0 && test ! -d "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3687 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3688 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3689 generated="$generated $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3690
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3691 for xlib in $convenience; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3692 # Extract the objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3693 case $xlib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3694 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3695 *) xabs=`pwd`"/$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3696 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3697 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3698 xdir="$gentop/$xlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3699
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3700 $show "${rm}r $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3701 $run ${rm}r "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3702 $show "$mkdir $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3703 $run $mkdir "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3704 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3705 if test "$status" -ne 0 && test ! -d "$xdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3706 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3707 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3708 # We will extract separately just the conflicting names and we will no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3709 # longer touch any unique names. It is faster to leave these extract
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3710 # automatically by $AR in one run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3711 $show "(cd $xdir && $AR x $xabs)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3712 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3713 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3714 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3715 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3716 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3717 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3718 $AR t "$xabs" | sort | uniq -cd | while read -r count name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3719 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3720 i=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3721 while test "$i" -le "$count"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3722 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3723 # Put our $i before any first dot (extension)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3724 # Never overwrite any file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3725 name_to="$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3726 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3727 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3728 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3729 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3730 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3731 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3732 i=`expr $i + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3733 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3734 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3735 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3736
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3737 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3738 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3739 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3740 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3741
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3742 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3743 eval flag=\"$thread_safe_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3744 linker_flags="$linker_flags $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3745 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3746
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3747 # Make a backup of the uninstalled library when relinking
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3748 if test "$mode" = relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3749 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3750 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3751
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3752 # Do each of the archive commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3753 if test "$module" = yes && test -n "$module_cmds" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3754 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3755 eval test_cmds=\"$module_expsym_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3756 cmds=$module_expsym_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3757 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3758 eval test_cmds=\"$module_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3759 cmds=$module_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3760 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3761 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3762 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3763 eval test_cmds=\"$archive_expsym_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3764 cmds=$archive_expsym_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3765 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3766 eval test_cmds=\"$archive_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3767 cmds=$archive_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3768 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3769 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3770
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3771 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3772 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3773 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3774 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3775 # The command line is too long to link in one step, link piecewise.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3776 $echo "creating reloadable object files..."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3777
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3778 # Save the value of $output and $libobjs because we want to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3779 # use them later. If we have whole_archive_flag_spec, we
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3780 # want to use save_libobjs as it was before
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3781 # whole_archive_flag_spec was expanded, because we can't
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3782 # assume the linker understands whole_archive_flag_spec.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3783 # This may have to be revisited, in case too many
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3784 # convenience libraries get linked in and end up exceeding
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3785 # the spec.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3786 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3787 save_libobjs=$libobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3788 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3789 save_output=$output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3790
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3791 # Clear the reloadable object creation command queue and
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3792 # initialize k to one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3793 test_cmds=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3794 concat_cmds=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3795 objlist=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3796 delfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3797 last_robj=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3798 k=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3799 output=$output_objdir/$save_output-${k}.$objext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3800 # Loop over the list of objects to be linked.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3801 for obj in $save_libobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3802 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3803 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3804 if test "X$objlist" = X ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3805 { len=`expr "X$test_cmds" : ".*"` &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3806 test "$len" -le "$max_cmd_len"; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3807 objlist="$objlist $obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3808 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3809 # The command $test_cmds is almost too long, add a
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3810 # command to the queue.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3811 if test "$k" -eq 1 ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3812 # The first file doesn't have a previous command to add.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3813 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3814 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3815 # All subsequent reloadable object files will link in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3816 # the last one created.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3817 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3818 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3819 last_robj=$output_objdir/$save_output-${k}.$objext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3820 k=`expr $k + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3821 output=$output_objdir/$save_output-${k}.$objext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3822 objlist=$obj
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3823 len=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3824 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3825 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3826 # Handle the remaining objects by creating one last
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3827 # reloadable object file. All subsequent reloadable object
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3828 # files will link in the last one created.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3829 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3830 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3831
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3832 if ${skipped_export-false}; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3833 $show "generating symbol list for \`$libname.la'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3834 export_symbols="$output_objdir/$libname.exp"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3835 $run $rm $export_symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3836 libobjs=$output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3837 # Append the command to create the export file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3838 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3839 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3840
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3841 # Set up a command to remove the reloadale object files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3842 # after they are used.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3843 i=0
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3844 while test "$i" -lt "$k"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3845 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3846 i=`expr $i + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3847 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3848 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3849
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3850 $echo "creating a temporary reloadable object file: $output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3851
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3852 # Loop through the commands generated above and execute them.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3853 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3854 for cmd in $concat_cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3855 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3856 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3857 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3858 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3859 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3860
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3861 libobjs=$output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3862 # Restore the value of output.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3863 output=$save_output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3864
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3865 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3866 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3867 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3868 # Expand the library linking commands again to reset the
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3869 # value of $libobjs for piecewise linking.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3870
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3871 # Do each of the archive commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3872 if test "$module" = yes && test -n "$module_cmds" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3873 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3874 cmds=$module_expsym_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3875 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3876 cmds=$module_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3877 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3878 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3879 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3880 cmds=$archive_expsym_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3881 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3882 cmds=$archive_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3883 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3884 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3885
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3886 # Append the command to remove the reloadable object files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3887 # to the just-reset $cmds.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3888 eval cmds=\"\$cmds~\$rm $delfiles\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3889 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3890 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3891 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3892 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3893 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3894 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3895 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3896 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3897 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3898
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3899 # Restore the uninstalled library and exit
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3900 if test "$mode" = relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3901 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3902 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3903 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3904
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3905 # Create links to the real library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3906 for linkname in $linknames; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3907 if test "$realname" != "$linkname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3908 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3909 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3910 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3911 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3912
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3913 # If -module or -export-dynamic was specified, set the dlname.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3914 if test "$module" = yes || test "$export_dynamic" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3915 # On all known operating systems, these are identical.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3916 dlname="$soname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3917 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3918 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3919 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3920
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3921 obj)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3922 if test -n "$deplibs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3923 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3924 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3925
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3926 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3927 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3928 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3929
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3930 if test -n "$rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3931 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3932 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3933
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3934 if test -n "$xrpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3935 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3936 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3937
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3938 if test -n "$vinfo"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3939 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3940 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3941
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3942 if test -n "$release"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3943 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3944 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3945
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3946 case $output in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3947 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3948 if test -n "$objs$old_deplibs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3949 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3950 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3951 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3952 libobj="$output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3953 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3954 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3955 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3956 libobj=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3957 obj="$output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3958 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3959 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3960
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3961 # Delete the old objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3962 $run $rm $obj $libobj
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3963
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3964 # Objects from convenience libraries. This assumes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3965 # single-version convenience libraries. Whenever we create
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3966 # different ones for PIC/non-PIC, this we'll have to duplicate
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3967 # the extraction.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3968 reload_conv_objs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3969 gentop=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3970 # reload_cmds runs $LD directly, so let us get rid of
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3971 # -Wl from whole_archive_flag_spec
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3972 wl=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3973
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3974 if test -n "$convenience"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3975 if test -n "$whole_archive_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3976 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3977 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3978 gentop="$output_objdir/${obj}x"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3979 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3980 $run ${rm}r "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3981 $show "$mkdir $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3982 $run $mkdir "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3983 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3984 if test "$status" -ne 0 && test ! -d "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3985 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3986 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3987 generated="$generated $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3988
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3989 for xlib in $convenience; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3990 # Extract the objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3991 case $xlib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3992 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3993 *) xabs=`pwd`"/$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3994 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3995 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3996 xdir="$gentop/$xlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3997
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3998 $show "${rm}r $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
3999 $run ${rm}r "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4000 $show "$mkdir $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4001 $run $mkdir "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4002 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4003 if test "$status" -ne 0 && test ! -d "$xdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4004 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4005 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4006 # We will extract separately just the conflicting names and we will no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4007 # longer touch any unique names. It is faster to leave these extract
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4008 # automatically by $AR in one run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4009 $show "(cd $xdir && $AR x $xabs)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4010 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4011 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4012 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4013 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4014 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4015 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4016 $AR t "$xabs" | sort | uniq -cd | while read -r count name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4017 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4018 i=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4019 while test "$i" -le "$count"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4020 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4021 # Put our $i before any first dot (extension)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4022 # Never overwrite any file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4023 name_to="$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4024 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4025 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4026 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4027 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4028 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4029 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4030 i=`expr $i + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4031 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4032 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4033 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4034
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4035 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4036 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4037 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4038 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4039
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4040 # Create the old-style object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4041 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
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4042
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4043 output="$obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4044 cmds=$reload_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4045 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4046 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4047 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4048 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4049 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4050 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4051 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4052 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4053
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4054 # Exit if we aren't doing a library object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4055 if test -z "$libobj"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4056 if test -n "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4057 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4058 $run ${rm}r $gentop
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4059 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4060
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4061 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4062 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4063
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4064 if test "$build_libtool_libs" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4065 if test -n "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4066 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4067 $run ${rm}r $gentop
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4068 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4069
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4070 # Create an invalid libtool object if no PIC, so that we don't
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4071 # accidentally link it into a program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4072 # $show "echo timestamp > $libobj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4073 # $run eval "echo timestamp > $libobj" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4074 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4075 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4076
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4077 if test -n "$pic_flag" || test "$pic_mode" != default; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4078 # Only do commands if we really have different PIC objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4079 reload_objs="$libobjs $reload_conv_objs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4080 output="$libobj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4081 cmds=$reload_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4082 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4083 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4084 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4085 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4086 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4087 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4088 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4089 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4090 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4091
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4092 if test -n "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4093 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4094 $run ${rm}r $gentop
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4095 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4096
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4097 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4098 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4099
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4100 prog)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4101 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4102 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4103 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4104 if test -n "$vinfo"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4105 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4106 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4107
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4108 if test -n "$release"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4109 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4110 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4111
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4112 if test "$preload" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4113 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4114 test "$dlopen_self_static" = unknown; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4115 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4116 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4117 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4118
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4119 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4120 *-*-rhapsody* | *-*-darwin1.[012])
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4121 # On Rhapsody replace the C library is the System framework
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4122 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4123 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4124 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4125 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4126
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4127 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4128 *darwin*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4129 # Don't allow lazy linking, it breaks C++ global constructors
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4130 if test "$tagname" = CXX ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4131 compile_command="$compile_command ${wl}-bind_at_load"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4132 finalize_command="$finalize_command ${wl}-bind_at_load"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4133 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4134 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4135 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4136
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4137 compile_command="$compile_command $compile_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4138 finalize_command="$finalize_command $finalize_deplibs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4139
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4140 if test -n "$rpath$xrpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4141 # If the user specified any rpath flags, then add them.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4142 for libdir in $rpath $xrpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4143 # This is the magic to use -rpath.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4144 case "$finalize_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4145 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4146 *) finalize_rpath="$finalize_rpath $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4147 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4148 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4149 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4150
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4151 # Now hardcode the library paths
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4152 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4153 hardcode_libdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4154 for libdir in $compile_rpath $finalize_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4155 if test -n "$hardcode_libdir_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4156 if test -n "$hardcode_libdir_separator"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4157 if test -z "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4158 hardcode_libdirs="$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4159 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4160 # Just accumulate the unique libdirs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4161 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4162 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4163 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4164 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4165 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4166 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4167 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4168 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4169 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4170 eval flag=\"$hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4171 rpath="$rpath $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4172 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4173 elif test -n "$runpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4174 case "$perm_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4175 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4176 *) perm_rpath="$perm_rpath $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4177 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4178 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4179 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4180 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4181 case :$dllsearchpath: in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4182 *":$libdir:"*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4183 *) dllsearchpath="$dllsearchpath:$libdir";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4184 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4185 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4186 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4187 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4188 # Substitute the hardcoded libdirs into the rpath.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4189 if test -n "$hardcode_libdir_separator" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4190 test -n "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4191 libdir="$hardcode_libdirs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4192 eval rpath=\" $hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4193 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4194 compile_rpath="$rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4195
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4196 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4197 hardcode_libdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4198 for libdir in $finalize_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4199 if test -n "$hardcode_libdir_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4200 if test -n "$hardcode_libdir_separator"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4201 if test -z "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4202 hardcode_libdirs="$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4203 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4204 # Just accumulate the unique libdirs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4205 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4206 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4207 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4208 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4209 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4210 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4211 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4212 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4213 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4214 eval flag=\"$hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4215 rpath="$rpath $flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4216 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4217 elif test -n "$runpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4218 case "$finalize_perm_rpath " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4219 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4220 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4221 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4222 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4223 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4224 # Substitute the hardcoded libdirs into the rpath.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4225 if test -n "$hardcode_libdir_separator" &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4226 test -n "$hardcode_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4227 libdir="$hardcode_libdirs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4228 eval rpath=\" $hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4229 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4230 finalize_rpath="$rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4231
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4232 if test -n "$libobjs" && test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4233 # Transform all the library objects into standard objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4234 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4235 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4236 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4237
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4238 dlsyms=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4239 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4240 if test -n "$NM" && test -n "$global_symbol_pipe"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4241 dlsyms="${outputname}S.c"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4242 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4243 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4244 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4245 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4246
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4247 if test -n "$dlsyms"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4248 case $dlsyms in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4249 "") ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4250 *.c)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4251 # Discover the nlist of each of the dlfiles.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4252 nlist="$output_objdir/${outputname}.nm"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4253
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4254 $show "$rm $nlist ${nlist}S ${nlist}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4255 $run $rm "$nlist" "${nlist}S" "${nlist}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4256
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4257 # Parse the name list into a source file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4258 $show "creating $output_objdir/$dlsyms"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4259
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4260 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4261 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4262 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4263
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4264 #ifdef __cplusplus
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4265 extern \"C\" {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4266 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4267
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4268 /* Prevent the only kind of declaration conflicts we can make. */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4269 #define lt_preloaded_symbols some_other_symbol
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4270
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4271 /* External symbol declarations for the compiler. */\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4272 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4273
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4274 if test "$dlself" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4275 $show "generating symbol list for \`$output'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4276
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4277 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4278
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4279 # Add our own program objects to the symbol list.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4280 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4281 for arg in $progfiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4282 $show "extracting global C symbols from \`$arg'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4283 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4284 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4285
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4286 if test -n "$exclude_expsyms"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4287 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4288 $run eval '$mv "$nlist"T "$nlist"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4289 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4290
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4291 if test -n "$export_symbols_regex"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4292 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4293 $run eval '$mv "$nlist"T "$nlist"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4294 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4295
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4296 # Prepare the list of exported symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4297 if test -z "$export_symbols"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4298 export_symbols="$output_objdir/$output.exp"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4299 $run $rm $export_symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4300 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4301 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4302 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4303 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4304 $run eval 'mv "$nlist"T "$nlist"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4305 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4306 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4307
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4308 for arg in $dlprefiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4309 $show "extracting global C symbols from \`$arg'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4310 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4311 $run eval '$echo ": $name " >> "$nlist"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4312 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4313 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4314
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4315 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4316 # Make sure we have at least an empty file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4317 test -f "$nlist" || : > "$nlist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4318
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4319 if test -n "$exclude_expsyms"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4320 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4321 $mv "$nlist"T "$nlist"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4322 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4323
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4324 # Try sorting and uniquifying the output.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4325 if grep -v "^: " < "$nlist" |
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4326 if sort -k 3 </dev/null >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4327 sort -k 3
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4328 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4329 sort +2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4330 fi |
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4331 uniq > "$nlist"S; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4332 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4333 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4334 grep -v "^: " < "$nlist" > "$nlist"S
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4335 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4336
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4337 if test -f "$nlist"S; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4338 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4339 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4340 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4341 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4342
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4343 $echo >> "$output_objdir/$dlsyms" "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4344
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4345 #undef lt_preloaded_symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4346
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4347 #if defined (__STDC__) && __STDC__
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4348 # define lt_ptr void *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4349 #else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4350 # define lt_ptr char *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4351 # define const
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4352 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4353
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4354 /* The mapping between symbol names and symbols. */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4355 const struct {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4356 const char *name;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4357 lt_ptr address;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4358 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4359 lt_preloaded_symbols[] =
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4360 {\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4361 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4362
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4363 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4364
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4365 $echo >> "$output_objdir/$dlsyms" "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4366 {0, (lt_ptr) 0}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4367 };
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4368
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4369 /* This works around a problem in FreeBSD linker */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4370 #ifdef FREEBSD_WORKAROUND
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4371 static const void *lt_preloaded_setup() {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4372 return lt_preloaded_symbols;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4373 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4374 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4375
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4376 #ifdef __cplusplus
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4377 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4378 #endif\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4379 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4380 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4381
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4382 pic_flag_for_symtable=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4383 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4384 # compiling the symbol table file with pic_flag works around
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4385 # a FreeBSD bug that causes programs to crash when -lm is
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4386 # linked before any other PIC object. But we must not use
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4387 # pic_flag when linking with -static. The problem exists in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4388 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4389 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4390 case "$compile_command " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4391 *" -static "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4392 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4393 esac;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4394 *-*-hpux*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4395 case "$compile_command " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4396 *" -static "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4397 *) pic_flag_for_symtable=" $pic_flag";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4398 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4399 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4400
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4401 # Now compile the dynamic symbol file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4402 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4403 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4404
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4405 # Clean up the generated files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4406 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4407 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4408
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4409 # Transform the symbol file into the correct name.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4410 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4411 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4412 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4413 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4414 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4415 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4416 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4417 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4418 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4419 # We keep going just in case the user didn't refer to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4420 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4421 # really was required.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4422
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4423 # Nullify the symbol file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4424 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4425 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4426 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4427
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4428 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4429 # Replace the output file specification.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4430 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4431 link_command="$compile_command$compile_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4432
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4433 # We have no uninstalled library dependencies, so finalize right now.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4434 $show "$link_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4435 $run eval "$link_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4436 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4437
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4438 # Delete the generated files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4439 if test -n "$dlsyms"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4440 $show "$rm $output_objdir/${outputname}S.${objext}"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4441 $run $rm "$output_objdir/${outputname}S.${objext}"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4442 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4443
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4444 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4445 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4446
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4447 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4448 # We should set the shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4449 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4450 for dir in $temp_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4451 case $dir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4452 [\\/]* | [A-Za-z]:[\\/]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4453 # Absolute path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4454 rpath="$rpath$dir:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4455 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4456 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4457 # Relative path: add a thisdir entry.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4458 rpath="$rpath\$thisdir/$dir:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4459 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4460 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4461 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4462 temp_rpath="$rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4463 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4464
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4465 if test -n "$compile_shlibpath$finalize_shlibpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4466 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4467 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4468 if test -n "$finalize_shlibpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4469 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4470 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4471
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4472 compile_var=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4473 finalize_var=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4474 if test -n "$runpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4475 if test -n "$perm_rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4476 # We should set the runpath_var.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4477 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4478 for dir in $perm_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4479 rpath="$rpath$dir:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4480 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4481 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4482 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4483 if test -n "$finalize_perm_rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4484 # We should set the runpath_var.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4485 rpath=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4486 for dir in $finalize_perm_rpath; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4487 rpath="$rpath$dir:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4488 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4489 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4490 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4491 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4492
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4493 if test "$no_install" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4494 # We don't need to create a wrapper script.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4495 link_command="$compile_var$compile_command$compile_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4496 # Replace the output file specification.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4497 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4498 # Delete the old output file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4499 $run $rm $output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4500 # Link the executable and exit
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4501 $show "$link_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4502 $run eval "$link_command" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4503 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4504 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4505
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4506 if test "$hardcode_action" = relink; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4507 # Fast installation is not supported
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4508 link_command="$compile_var$compile_command$compile_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4509 relink_command="$finalize_var$finalize_command$finalize_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4510
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4511 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4512 $echo "$modename: \`$output' will be relinked during installation" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4513 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4514 if test "$fast_install" != no; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4515 link_command="$finalize_var$compile_command$finalize_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4516 if test "$fast_install" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4517 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4518 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4519 # fast_install is set to needless
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4520 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4521 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4522 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4523 link_command="$compile_var$compile_command$compile_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4524 relink_command="$finalize_var$finalize_command$finalize_rpath"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4525 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4526 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4527
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4528 # Replace the output file specification.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4529 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4530
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4531 # Delete the old output files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4532 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4533
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4534 $show "$link_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4535 $run eval "$link_command" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4536
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4537 # Now create the wrapper script.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4538 $show "creating $output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4539
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4540 # Quote the relink command for shipping.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4541 if test -n "$relink_command"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4542 # Preserve any variables that may affect compiler behavior
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4543 for var in $variables_saved_for_relink; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4544 if eval test -z \"\${$var+set}\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4545 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4546 elif eval var_value=\$$var; test -z "$var_value"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4547 relink_command="$var=; export $var; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4548 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4549 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4550 relink_command="$var=\"$var_value\"; export $var; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4551 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4552 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4553 relink_command="(cd `pwd`; $relink_command)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4554 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4555 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4556
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4557 # Quote $echo for shipping.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4558 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4559 case $progpath in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4560 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4561 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4562 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4563 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4564 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4565 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4566 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4567
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4568 # Only actually do things if our run command is non-null.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4569 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4570 # win32 will think the script is a binary if it has
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4571 # a .exe suffix, so we strip it off here.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4572 case $output in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4573 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4574 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4575 # test for cygwin because mv fails w/o .exe extensions
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4576 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4577 *cygwin*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4578 exeext=.exe
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4579 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4580 *) exeext= ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4581 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4582 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4583 *cygwin* | *mingw* )
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4584 cwrappersource=`$echo ${objdir}/lt-${output}.c`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4585 cwrapper=`$echo ${output}.exe`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4586 $rm $cwrappersource $cwrapper
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4587 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4588
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4589 cat > $cwrappersource <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4590
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4591 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4592 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4593
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4594 The $output program cannot be directly executed until all the libtool
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4595 libraries that it depends on are installed.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4596
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4597 This wrapper executable should never be moved out of the build directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4598 If it is, it will not operate correctly.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4599
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4600 Currently, it simply execs the wrapper *script* "/bin/sh $output",
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4601 but could eventually absorb all of the scripts functionality and
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4602 exec $objdir/$outputname directly.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4603 */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4604 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4605 cat >> $cwrappersource<<"EOF"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4606 #include <stdio.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4607 #include <stdlib.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4608 #include <unistd.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4609 #include <malloc.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4610 #include <stdarg.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4611 #include <assert.h>
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4612
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4613 #if defined(PATH_MAX)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4614 # define LT_PATHMAX PATH_MAX
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4615 #elif defined(MAXPATHLEN)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4616 # define LT_PATHMAX MAXPATHLEN
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4617 #else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4618 # define LT_PATHMAX 1024
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4619 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4620
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4621 #ifndef DIR_SEPARATOR
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4622 #define DIR_SEPARATOR '/'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4623 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4624
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4625 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4626 defined (__OS2__)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4627 #define HAVE_DOS_BASED_FILE_SYSTEM
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4628 #ifndef DIR_SEPARATOR_2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4629 #define DIR_SEPARATOR_2 '\\'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4630 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4631 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4632
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4633 #ifndef DIR_SEPARATOR_2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4634 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4635 #else /* DIR_SEPARATOR_2 */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4636 # define IS_DIR_SEPARATOR(ch) \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4637 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4638 #endif /* DIR_SEPARATOR_2 */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4639
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4640 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4641 #define XFREE(stale) do { \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4642 if (stale) { free ((void *) stale); stale = 0; } \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4643 } while (0)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4644
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4645 const char *program_name = NULL;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4646
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4647 void * xmalloc (size_t num);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4648 char * xstrdup (const char *string);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4649 char * basename (const char *name);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4650 char * fnqualify(const char *path);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4651 char * strendzap(char *str, const char *pat);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4652 void lt_fatal (const char *message, ...);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4653
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4654 int
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4655 main (int argc, char *argv[])
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4656 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4657 char **newargz;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4658 int i;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4659
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4660 program_name = (char *) xstrdup ((char *) basename (argv[0]));
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4661 newargz = XMALLOC(char *, argc+2);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4662 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4663
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4664 cat >> $cwrappersource <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4665 newargz[0] = "$SHELL";
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4666 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4667
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4668 cat >> $cwrappersource <<"EOF"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4669 newargz[1] = fnqualify(argv[0]);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4670 /* we know the script has the same name, without the .exe */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4671 /* so make sure newargz[1] doesn't end in .exe */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4672 strendzap(newargz[1],".exe");
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4673 for (i = 1; i < argc; i++)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4674 newargz[i+1] = xstrdup(argv[i]);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4675 newargz[argc+1] = NULL;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4676 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4677
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4678 cat >> $cwrappersource <<EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4679 execv("$SHELL",newargz);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4680 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4681
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4682 cat >> $cwrappersource <<"EOF"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4683 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4684
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4685 void *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4686 xmalloc (size_t num)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4687 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4688 void * p = (void *) malloc (num);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4689 if (!p)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4690 lt_fatal ("Memory exhausted");
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4691
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4692 return p;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4693 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4694
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4695 char *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4696 xstrdup (const char *string)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4697 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4698 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4699 ;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4700 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4701
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4702 char *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4703 basename (const char *name)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4704 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4705 const char *base;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4706
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4707 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4708 /* Skip over the disk name in MSDOS pathnames. */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4709 if (isalpha (name[0]) && name[1] == ':')
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4710 name += 2;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4711 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4712
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4713 for (base = name; *name; name++)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4714 if (IS_DIR_SEPARATOR (*name))
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4715 base = name + 1;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4716 return (char *) base;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4717 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4718
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4719 char *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4720 fnqualify(const char *path)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4721 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4722 size_t size;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4723 char *p;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4724 char tmp[LT_PATHMAX + 1];
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4725
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4726 assert(path != NULL);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4727
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4728 /* Is it qualified already? */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4729 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4730 if (isalpha (path[0]) && path[1] == ':')
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4731 return xstrdup (path);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4732 #endif
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4733 if (IS_DIR_SEPARATOR (path[0]))
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4734 return xstrdup (path);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4735
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4736 /* prepend the current directory */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4737 /* doesn't handle '~' */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4738 if (getcwd (tmp, LT_PATHMAX) == NULL)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4739 lt_fatal ("getcwd failed");
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4740 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4741 p = XMALLOC(char, size);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4742 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4743 return p;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4744 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4745
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4746 char *
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4747 strendzap(char *str, const char *pat)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4748 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4749 size_t len, patlen;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4750
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4751 assert(str != NULL);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4752 assert(pat != NULL);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4753
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4754 len = strlen(str);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4755 patlen = strlen(pat);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4756
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4757 if (patlen <= len)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4758 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4759 str += len - patlen;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4760 if (strcmp(str, pat) == 0)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4761 *str = '\0';
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4762 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4763 return str;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4764 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4765
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4766 static void
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4767 lt_error_core (int exit_status, const char * mode,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4768 const char * message, va_list ap)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4769 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4770 fprintf (stderr, "%s: %s: ", program_name, mode);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4771 vfprintf (stderr, message, ap);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4772 fprintf (stderr, ".\n");
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4773
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4774 if (exit_status >= 0)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4775 exit (exit_status);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4776 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4777
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4778 void
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4779 lt_fatal (const char *message, ...)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4780 {
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4781 va_list ap;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4782 va_start (ap, message);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4783 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4784 va_end (ap);
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4785 }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4786 EOF
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4787 # we should really use a build-platform specific compiler
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4788 # here, but OTOH, the wrappers (shell script and this C one)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4789 # are only useful if you want to execute the "real" binary.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4790 # Since the "real" binary is built for $host, then this
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4791 # wrapper might as well be built for $host, too.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4792 $run $LTCC -s -o $cwrapper $cwrappersource
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4793 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4794 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4795 $rm $output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4796 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4797
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4798 $echo > $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4799 #! $SHELL
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4800
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4801 # $output - temporary wrapper script for $objdir/$outputname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4802 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4803 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4804 # The $output program cannot be directly executed until all the libtool
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4805 # libraries that it depends on are installed.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4806 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4807 # This wrapper script should never be moved out of the build directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4808 # If it is, it will not operate correctly.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4809
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4810 # Sed substitution that helps us do robust quoting. It backslashifies
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4811 # metacharacters that are still active within double-quoted strings.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4812 Xsed='${SED} -e 1s/^X//'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4813 sed_quote_subst='$sed_quote_subst'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4814
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4815 # The HP-UX ksh and POSIX shell print the target directory to stdout
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4816 # if CDPATH is set.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4817 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4818
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4819 relink_command=\"$relink_command\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4820
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4821 # This environment variable determines our operation mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4822 if test \"\$libtool_install_magic\" = \"$magic\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4823 # install mode needs the following variable:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4824 notinst_deplibs='$notinst_deplibs'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4825 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4826 # When we are sourced in execute mode, \$file and \$echo are already set.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4827 if test \"\$libtool_execute_magic\" != \"$magic\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4828 echo=\"$qecho\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4829 file=\"\$0\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4830 # Make sure echo works.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4831 if test \"X\$1\" = X--no-reexec; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4832 # Discard the --no-reexec flag, and continue.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4833 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4834 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4835 # Yippee, \$echo works!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4836 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4837 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4838 # Restart under the correct shell, and then maybe \$echo will work.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4839 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4840 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4841 fi\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4842 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4843 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4844
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4845 # Find the directory that this script lives in.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4846 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4847 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4848
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4849 # Follow symbolic links until we get to the real thisdir.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4850 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4851 while test -n \"\$file\"; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4852 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4853
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4854 # If there was a directory component, then change thisdir.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4855 if test \"x\$destdir\" != \"x\$file\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4856 case \"\$destdir\" in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4857 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4858 *) thisdir=\"\$thisdir/\$destdir\" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4859 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4860 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4861
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4862 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4863 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4864 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4865
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4866 # Try to get the absolute directory name.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4867 absdir=\`cd \"\$thisdir\" && pwd\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4868 test -n \"\$absdir\" && thisdir=\"\$absdir\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4869 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4870
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4871 if test "$fast_install" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4872 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4873 program=lt-'$outputname'$exeext
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4874 progdir=\"\$thisdir/$objdir\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4875
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4876 if test ! -f \"\$progdir/\$program\" || \\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4877 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4878 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4879
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4880 file=\"\$\$-\$program\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4881
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4882 if test ! -d \"\$progdir\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4883 $mkdir \"\$progdir\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4884 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4885 $rm \"\$progdir/\$file\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4886 fi"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4887
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4888 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4889
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4890 # relink executable if necessary
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4891 if test -n \"\$relink_command\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4892 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4893 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4894 $echo \"\$relink_command_output\" >&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4895 $rm \"\$progdir/\$file\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4896 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4897 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4898 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4899
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4900 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4901 { $rm \"\$progdir/\$program\";
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4902 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4903 $rm \"\$progdir/\$file\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4904 fi"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4905 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4906 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4907 program='$outputname'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4908 progdir=\"\$thisdir/$objdir\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4909 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4910 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4911
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4912 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4913
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4914 if test -f \"\$progdir/\$program\"; then"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4915
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4916 # Export our shlibpath_var if we have one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4917 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4918 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4919 # Add our own library path to $shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4920 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4921
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4922 # Some systems cannot cope with colon-terminated $shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4923 # The second colon is a workaround for a bug in BeOS R4 sed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4924 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4925
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4926 export $shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4927 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4928 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4929
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4930 # fixup the dll searchpath if we need to.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4931 if test -n "$dllsearchpath"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4932 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4933 # Add the dll search path components to the executable PATH
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4934 PATH=$dllsearchpath:\$PATH
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4935 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4936 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4937
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4938 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4939 if test \"\$libtool_execute_magic\" != \"$magic\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4940 # Run the actual program with our arguments.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4941 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4942 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4943 # Backslashes separate directories on plain windows
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4944 *-*-mingw | *-*-os2*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4945 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4946 exec \$progdir\\\\\$program \${1+\"\$@\"}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4947 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4948 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4949
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4950 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4951 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4952 exec \$progdir/\$program \${1+\"\$@\"}
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4953 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4954 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4955 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4956 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4957 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4958 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4959 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4960 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4961 # The program doesn't exist.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4962 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4963 \$echo \"This script is just a wrapper for \$program.\" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4964 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4965 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4966 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4967 fi\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4968 "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4969 chmod +x $output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4970 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4971 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4972 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4973 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4974
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4975 # See if we need to build an old-fashioned archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4976 for oldlib in $oldlibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4977
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4978 if test "$build_libtool_libs" = convenience; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4979 oldobjs="$libobjs_save"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4980 addlibs="$convenience"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4981 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4982 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4983 if test "$build_libtool_libs" = module; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4984 oldobjs="$libobjs_save"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4985 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4986 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4987 oldobjs="$old_deplibs $non_pic_objects"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4988 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4989 addlibs="$old_convenience"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4990 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4991
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4992 if test -n "$addlibs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4993 gentop="$output_objdir/${outputname}x"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4994 $show "${rm}r $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4995 $run ${rm}r "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4996 $show "$mkdir $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4997 $run $mkdir "$gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4998 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
4999 if test "$status" -ne 0 && test ! -d "$gentop"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5000 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5001 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5002 generated="$generated $gentop"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5003
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5004 # Add in members from convenience archives.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5005 for xlib in $addlibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5006 # Extract the objects.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5007 case $xlib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5008 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5009 *) xabs=`pwd`"/$xlib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5010 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5011 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5012 xdir="$gentop/$xlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5013
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5014 $show "${rm}r $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5015 $run ${rm}r "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5016 $show "$mkdir $xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5017 $run $mkdir "$xdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5018 status=$?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5019 if test "$status" -ne 0 && test ! -d "$xdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5020 exit $status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5021 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5022 # We will extract separately just the conflicting names and we will no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5023 # longer touch any unique names. It is faster to leave these extract
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5024 # automatically by $AR in one run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5025 $show "(cd $xdir && $AR x $xabs)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5026 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5027 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5028 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5029 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5030 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5031 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5032 $AR t "$xabs" | sort | uniq -cd | while read -r count name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5033 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5034 i=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5035 while test "$i" -le "$count"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5036 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5037 # Put our $i before any first dot (extension)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5038 # Never overwrite any file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5039 name_to="$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5040 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5041 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5042 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5043 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5044 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5045 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5046 i=`expr $i + 1`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5047 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5048 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5049 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5050
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5051 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5052 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5053 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5054
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5055 # Do each command in the archive commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5056 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5057 cmds=$old_archive_from_new_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5058 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5059 eval cmds=\"$old_archive_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5060
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5061 if len=`expr "X$cmds" : ".*"` &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5062 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5063 cmds=$old_archive_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5064 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5065 # the command line is too long to link in one step, link in parts
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5066 $echo "using piecewise archive linking..."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5067 save_RANLIB=$RANLIB
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5068 RANLIB=:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5069 objlist=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5070 concat_cmds=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5071 save_oldobjs=$oldobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5072 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5073 # encoded into archives. This makes 'ar r' malfunction in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5074 # this piecewise linking case whenever conflicting object
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5075 # names appear in distinct ar calls; check, warn and compensate.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5076 if (for obj in $save_oldobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5077 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5078 $echo "X$obj" | $Xsed -e 's%^.*/%%'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5079 done | sort | sort -uc >/dev/null 2>&1); then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5080 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5081 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5082 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5083 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5084 AR_FLAGS=cq
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5085 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5086 # Is there a better way of finding the last object in the list?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5087 for obj in $save_oldobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5088 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5089 last_oldobj=$obj
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5090 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5091 for obj in $save_oldobjs
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5092 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5093 oldobjs="$objlist $obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5094 objlist="$objlist $obj"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5095 eval test_cmds=\"$old_archive_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5096 if len=`expr "X$test_cmds" : ".*"` &&
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5097 test "$len" -le "$max_cmd_len"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5098 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5099 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5100 # the above command should be used before it gets too long
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5101 oldobjs=$objlist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5102 if test "$obj" = "$last_oldobj" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5103 RANLIB=$save_RANLIB
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5104 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5105 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5106 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5107 objlist=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5108 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5109 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5110 RANLIB=$save_RANLIB
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5111 oldobjs=$objlist
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5112 if test "X$oldobjs" = "X" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5113 eval cmds=\"\$concat_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5114 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5115 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5116 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5117 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5118 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5119 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5120 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5121 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5122 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5123 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5124 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5125 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5126 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5127 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5128
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5129 if test -n "$generated"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5130 $show "${rm}r$generated"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5131 $run ${rm}r$generated
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5132 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5133
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5134 # Now create the libtool archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5135 case $output in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5136 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5137 old_library=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5138 test "$build_old_libs" = yes && old_library="$libname.$libext"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5139 $show "creating $output"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5140
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5141 # Preserve any variables that may affect compiler behavior
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5142 for var in $variables_saved_for_relink; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5143 if eval test -z \"\${$var+set}\"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5144 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5145 elif eval var_value=\$$var; test -z "$var_value"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5146 relink_command="$var=; export $var; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5147 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5148 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5149 relink_command="$var=\"$var_value\"; export $var; $relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5150 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5151 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5152 # Quote the link command for shipping.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5153 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5154 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5155 if test "$hardcode_automatic" = yes ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5156 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5157 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5158
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5159
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5160 # Only create the output if not a dry run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5161 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5162 for installed in no yes; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5163 if test "$installed" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5164 if test -z "$install_libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5165 break
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5166 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5167 output="$output_objdir/$outputname"i
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5168 # Replace all uninstalled libtool libraries with the installed ones
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5169 newdependency_libs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5170 for deplib in $dependency_libs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5171 case $deplib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5172 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5173 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5174 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5175 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5176 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5177 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5178 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5179 newdependency_libs="$newdependency_libs $libdir/$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5180 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5181 *) newdependency_libs="$newdependency_libs $deplib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5182 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5183 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5184 dependency_libs="$newdependency_libs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5185 newdlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5186 for lib in $dlfiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5187 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5188 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5189 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5190 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5191 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5192 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5193 newdlfiles="$newdlfiles $libdir/$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5194 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5195 dlfiles="$newdlfiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5196 newdlprefiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5197 for lib in $dlprefiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5198 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5199 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5200 if test -z "$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5201 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5202 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5203 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5204 newdlprefiles="$newdlprefiles $libdir/$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5205 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5206 dlprefiles="$newdlprefiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5207 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5208 newdlfiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5209 for lib in $dlfiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5210 case $lib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5211 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5212 *) abs=`pwd`"/$lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5213 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5214 newdlfiles="$newdlfiles $abs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5215 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5216 dlfiles="$newdlfiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5217 newdlprefiles=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5218 for lib in $dlprefiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5219 case $lib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5220 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5221 *) abs=`pwd`"/$lib" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5222 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5223 newdlprefiles="$newdlprefiles $abs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5224 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5225 dlprefiles="$newdlprefiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5226 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5227 $rm $output
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5228 # place dlname in correct position for cygwin
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5229 tdlname=$dlname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5230 case $host,$output,$installed,$module,$dlname in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5231 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5232 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5233 $echo > $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5234 # $outputname - a libtool library file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5235 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5236 #
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5237 # Please DO NOT delete this file!
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5238 # It is necessary for linking the library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5239
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5240 # The name that we can dlopen(3).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5241 dlname='$tdlname'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5242
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5243 # Names of this library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5244 library_names='$library_names'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5245
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5246 # The name of the static archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5247 old_library='$old_library'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5248
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5249 # Libraries that this one depends upon.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5250 dependency_libs='$dependency_libs'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5251
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5252 # Version information for $libname.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5253 current=$current
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5254 age=$age
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5255 revision=$revision
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5256
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5257 # Is this an already installed library?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5258 installed=$installed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5259
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5260 # Should we warn about portability when linking against -modules?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5261 shouldnotlink=$module
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5262
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5263 # Files to dlopen/dlpreopen
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5264 dlopen='$dlfiles'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5265 dlpreopen='$dlprefiles'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5266
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5267 # Directory that this library needs to be installed in:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5268 libdir='$install_libdir'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5269 if test "$installed" = no && test "$need_relink" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5270 $echo >> $output "\
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5271 relink_command=\"$relink_command\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5272 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5273 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5274 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5275
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5276 # Do a symbolic link so that the libtool archive can be found in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5277 # LD_LIBRARY_PATH before the program is installed.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5278 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5279 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5280 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5281 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5282 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5283 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5284
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5285 # libtool install mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5286 install)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5287 modename="$modename: install"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5288
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5289 # There may be an optional sh(1) argument at the beginning of
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5290 # install_prog (especially on Windows NT).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5291 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5292 # Allow the use of GNU shtool's install command.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5293 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5294 # Aesthetically quote it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5295 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5296 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5297 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5298 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5299 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5300 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5301 install_prog="$arg "
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5302 arg="$1"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5303 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5304 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5305 install_prog=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5306 arg="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5307 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5308
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5309 # The real first argument should be the name of the installation program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5310 # Aesthetically quote it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5311 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5312 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5313 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5314 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5315 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5316 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5317 install_prog="$install_prog$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5318
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5319 # We need to accept at least all the BSD install flags.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5320 dest=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5321 files=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5322 opts=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5323 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5324 install_type=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5325 isdir=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5326 stripme=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5327 for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5328 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5329 if test -n "$dest"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5330 files="$files $dest"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5331 dest="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5332 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5333 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5334
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5335 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5336 -d) isdir=yes ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5337 -f) prev="-f" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5338 -g) prev="-g" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5339 -m) prev="-m" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5340 -o) prev="-o" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5341 -s)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5342 stripme=" -s"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5343 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5344 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5345 -*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5346
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5347 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5348 # If the previous option needed an argument, then skip it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5349 if test -n "$prev"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5350 prev=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5351 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5352 dest="$arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5353 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5354 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5355 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5356 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5357
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5358 # Aesthetically quote the argument.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5359 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5360 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5361 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5362 arg="\"$arg\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5363 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5364 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5365 install_prog="$install_prog $arg"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5366 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5367
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5368 if test -z "$install_prog"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5369 $echo "$modename: you must specify an install program" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5370 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5371 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5372 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5373
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5374 if test -n "$prev"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5375 $echo "$modename: the \`$prev' option requires an argument" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5376 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5377 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5378 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5379
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5380 if test -z "$files"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5381 if test -z "$dest"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5382 $echo "$modename: no file or destination specified" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5383 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5384 $echo "$modename: you must specify a destination" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5385 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5386 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5387 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5388 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5389
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5390 # Strip any trailing slash from the destination.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5391 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5392
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5393 # Check to see that the destination is a directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5394 test -d "$dest" && isdir=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5395 if test "$isdir" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5396 destdir="$dest"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5397 destname=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5398 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5399 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5400 test "X$destdir" = "X$dest" && destdir=.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5401 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5402
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5403 # Not a directory, so check to see that there is only one file specified.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5404 set dummy $files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5405 if test "$#" -gt 2; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5406 $echo "$modename: \`$dest' is not a directory" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5407 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5408 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5409 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5410 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5411 case $destdir in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5412 [\\/]* | [A-Za-z]:[\\/]*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5413 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5414 for file in $files; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5415 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5416 *.lo) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5417 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5418 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5419 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5420 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5421 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5422 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5423 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5424 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5425 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5426
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5427 # This variable tells wrapper scripts just to set variables rather
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5428 # than running their programs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5429 libtool_install_magic="$magic"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5430
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5431 staticlibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5432 future_libdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5433 current_libdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5434 for file in $files; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5435
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5436 # Do each installation.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5437 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5438 *.$libext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5439 # Do the static libraries later.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5440 staticlibs="$staticlibs $file"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5441 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5442
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5443 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5444 # Check to see that this really is a libtool archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5445 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5446 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5447 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5448 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5449 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5450 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5451
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5452 library_names=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5453 old_library=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5454 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5455 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5456 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5457 */* | *\\*) . $file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5458 *) . ./$file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5459 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5460
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5461 # Add the libdir to current_libdirs if it is the destination.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5462 if test "X$destdir" = "X$libdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5463 case "$current_libdirs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5464 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5465 *) current_libdirs="$current_libdirs $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5466 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5467 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5468 # Note the libdir as a future libdir.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5469 case "$future_libdirs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5470 *" $libdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5471 *) future_libdirs="$future_libdirs $libdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5472 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5473 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5474
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5475 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5476 test "X$dir" = "X$file/" && dir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5477 dir="$dir$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5478
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5479 if test -n "$relink_command"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5480 # Determine the prefix the user has applied to our future dir.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5481 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5482
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5483 # Don't allow the user to place us outside of our expected
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5484 # location b/c this prevents finding dependent libraries that
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5485 # are installed to the same prefix.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5486 # At present, this check doesn't affect windows .dll's that
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5487 # are installed into $libdir/../bin (currently, that works fine)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5488 # but it's something to keep an eye on.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5489 if test "$inst_prefix_dir" = "$destdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5490 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5491 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5492 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5493
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5494 if test -n "$inst_prefix_dir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5495 # Stick the inst_prefix_dir data into the link command.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5496 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5497 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5498 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5499 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5500
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5501 $echo "$modename: warning: relinking \`$file'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5502 $show "$relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5503 if $run eval "$relink_command"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5504 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5505 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5506 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5507 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5508 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5509
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5510 # See the names of the shared library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5511 set dummy $library_names
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5512 if test -n "$2"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5513 realname="$2"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5514 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5515 shift
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5516
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5517 srcname="$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5518 test -n "$relink_command" && srcname="$realname"T
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5519
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5520 # Install the shared library and build the symlinks.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5521 $show "$install_prog $dir/$srcname $destdir/$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5522 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5523 if test -n "$stripme" && test -n "$striplib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5524 $show "$striplib $destdir/$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5525 $run eval "$striplib $destdir/$realname" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5526 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5527
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5528 if test "$#" -gt 0; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5529 # Delete the old symlinks, and create new ones.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5530 for linkname
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5531 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5532 if test "$linkname" != "$realname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5533 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5534 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5535 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5536 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5537 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5538
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5539 # Do each command in the postinstall commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5540 lib="$destdir/$realname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5541 cmds=$postinstall_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5542 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5543 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5544 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5545 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5546 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5547 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5548 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5549 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5550 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5551
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5552 # Install the pseudo-library for information purposes.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5553 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5554 instname="$dir/$name"i
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5555 $show "$install_prog $instname $destdir/$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5556 $run eval "$install_prog $instname $destdir/$name" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5557
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5558 # Maybe install the static library, too.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5559 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5560 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5561
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5562 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5563 # Install (i.e. copy) a libtool object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5564
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5565 # Figure out destination file name, if it wasn't already specified.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5566 if test -n "$destname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5567 destfile="$destdir/$destname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5568 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5569 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5570 destfile="$destdir/$destfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5571 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5572
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5573 # Deduce the name of the destination old-style object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5574 case $destfile in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5575 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5576 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5577 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5578 *.$objext)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5579 staticdest="$destfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5580 destfile=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5581 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5582 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5583 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5584 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5585 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5586 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5587 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5588
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5589 # Install the libtool object if requested.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5590 if test -n "$destfile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5591 $show "$install_prog $file $destfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5592 $run eval "$install_prog $file $destfile" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5593 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5594
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5595 # Install the old object if enabled.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5596 if test "$build_old_libs" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5597 # Deduce the name of the old-style object file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5598 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5599
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5600 $show "$install_prog $staticobj $staticdest"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5601 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5602 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5603 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5604 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5605
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5606 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5607 # Figure out destination file name, if it wasn't already specified.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5608 if test -n "$destname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5609 destfile="$destdir/$destname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5610 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5611 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5612 destfile="$destdir/$destfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5613 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5614
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5615 # If the file is missing, and there is a .exe on the end, strip it
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5616 # because it is most likely a libtool script we actually want to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5617 # install
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5618 stripped_ext=""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5619 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5620 *.exe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5621 if test ! -f "$file"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5622 file=`$echo $file|${SED} 's,.exe$,,'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5623 stripped_ext=".exe"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5624 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5625 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5626 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5627
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5628 # Do a test to see if this is really a libtool program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5629 case $host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5630 *cygwin*|*mingw*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5631 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5632 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5633 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5634 wrapper=$file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5635 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5636 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5637 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5638 notinst_deplibs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5639 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5640
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5641 # To insure that "foo" is sourced, and not "foo.exe",
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5642 # finese the cygwin/MSYS system by explicitly sourcing "foo."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5643 # which disallows the automatic-append-.exe behavior.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5644 case $build in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5645 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5646 *) wrapperdot=${wrapper} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5647 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5648 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5649 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5650 */* | *\\*) . ${wrapperdot} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5651 *) . ./${wrapperdot} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5652 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5653
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5654 # Check the variables that should have been set.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5655 if test -z "$notinst_deplibs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5656 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5657 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5658 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5659
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5660 finalize=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5661 for lib in $notinst_deplibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5662 # Check to see that each library is installed.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5663 libdir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5664 if test -f "$lib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5665 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5666 case $lib in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5667 */* | *\\*) . $lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5668 *) . ./$lib ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5669 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5670 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5671 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5672 if test -n "$libdir" && test ! -f "$libfile"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5673 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5674 finalize=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5675 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5676 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5677
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5678 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5679 # To insure that "foo" is sourced, and not "foo.exe",
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5680 # finese the cygwin/MSYS system by explicitly sourcing "foo."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5681 # which disallows the automatic-append-.exe behavior.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5682 case $build in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5683 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5684 *) wrapperdot=${wrapper} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5685 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5686 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5687 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5688 */* | *\\*) . ${wrapperdot} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5689 *) . ./${wrapperdot} ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5690 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5691
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5692 outputname=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5693 if test "$fast_install" = no && test -n "$relink_command"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5694 if test "$finalize" = yes && test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5695 tmpdir="/tmp"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5696 test -n "$TMPDIR" && tmpdir="$TMPDIR"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5697 tmpdir="$tmpdir/libtool-$$"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5698 save_umask=`umask`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5699 umask 0077
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5700 if $mkdir "$tmpdir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5701 umask $save_umask
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5702 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5703 umask $save_umask
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5704 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5705 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5706 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5707 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5708 outputname="$tmpdir/$file"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5709 # Replace the output file specification.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5710 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5711
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5712 $show "$relink_command"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5713 if $run eval "$relink_command"; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5714 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5715 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5716 ${rm}r "$tmpdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5717 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5718 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5719 file="$outputname"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5720 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5721 $echo "$modename: warning: cannot relink \`$file'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5722 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5723 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5724 # Install the binary that we compiled earlier.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5725 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5726 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5727 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5728
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5729 # remove .exe since cygwin /usr/bin/install will append another
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5730 # one anyways
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5731 case $install_prog,$host in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5732 */usr/bin/install*,*cygwin*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5733 case $file:$destfile in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5734 *.exe:*.exe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5735 # this is ok
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5736 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5737 *.exe:*)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5738 destfile=$destfile.exe
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5739 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5740 *:*.exe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5741 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5742 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5743 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5744 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5745 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5746 $show "$install_prog$stripme $file $destfile"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5747 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5748 test -n "$outputname" && ${rm}r "$tmpdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5749 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5750 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5751 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5752
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5753 for file in $staticlibs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5754 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5755
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5756 # Set up the ranlib parameters.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5757 oldlib="$destdir/$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5758
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5759 $show "$install_prog $file $oldlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5760 $run eval "$install_prog \$file \$oldlib" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5761
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5762 if test -n "$stripme" && test -n "$old_striplib"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5763 $show "$old_striplib $oldlib"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5764 $run eval "$old_striplib $oldlib" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5765 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5766
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5767 # Do each command in the postinstall commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5768 cmds=$old_postinstall_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5769 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5770 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5771 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5772 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5773 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5774 $run eval "$cmd" || exit $?
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5775 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5776 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5777 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5778
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5779 if test -n "$future_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5780 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5781 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5782
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5783 if test -n "$current_libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5784 # Maybe just do a dry run.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5785 test -n "$run" && current_libdirs=" -n$current_libdirs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5786 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5787 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5788 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5789 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5790 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5791
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5792 # libtool finish mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5793 finish)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5794 modename="$modename: finish"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5795 libdirs="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5796 admincmds=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5797
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5798 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5799 for dir
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5800 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5801 libdirs="$libdirs $dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5802 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5803
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5804 for libdir in $libdirs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5805 if test -n "$finish_cmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5806 # Do each command in the finish commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5807 cmds=$finish_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5808 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5809 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5810 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5811 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5812 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5813 $run eval "$cmd" || admincmds="$admincmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5814 $cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5815 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5816 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5817 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5818 if test -n "$finish_eval"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5819 # Do the single finish_eval.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5820 eval cmds=\"$finish_eval\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5821 $run eval "$cmds" || admincmds="$admincmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5822 $cmds"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5823 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5824 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5825 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5826
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5827 # Exit here if they wanted silent mode.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5828 test "$show" = : && exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5829
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5830 $echo "----------------------------------------------------------------------"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5831 $echo "Libraries have been installed in:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5832 for libdir in $libdirs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5833 $echo " $libdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5834 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5835 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5836 $echo "If you ever happen to want to link against installed libraries"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5837 $echo "in a given directory, LIBDIR, you must either use libtool, and"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5838 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5839 $echo "flag during linking and do at least one of the following:"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5840 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5841 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5842 $echo " during execution"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5843 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5844 if test -n "$runpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5845 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5846 $echo " during linking"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5847 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5848 if test -n "$hardcode_libdir_flag_spec"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5849 libdir=LIBDIR
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5850 eval flag=\"$hardcode_libdir_flag_spec\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5851
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5852 $echo " - use the \`$flag' linker flag"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5853 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5854 if test -n "$admincmds"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5855 $echo " - have your system administrator run these commands:$admincmds"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5856 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5857 if test -f /etc/ld.so.conf; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5858 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5859 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5860 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5861 $echo "See any operating system documentation about shared libraries for"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5862 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5863 $echo "----------------------------------------------------------------------"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5864 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5865 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5866
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5867 # libtool execute mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5868 execute)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5869 modename="$modename: execute"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5870
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5871 # The first argument is the command name.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5872 cmd="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5873 if test -z "$cmd"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5874 $echo "$modename: you must specify a COMMAND" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5875 $echo "$help"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5876 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5877 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5878
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5879 # Handle -dlopen flags immediately.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5880 for file in $execute_dlfiles; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5881 if test ! -f "$file"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5882 $echo "$modename: \`$file' is not a file" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5883 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5884 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5885 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5886
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5887 dir=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5888 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5889 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5890 # Check to see that this really is a libtool archive.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5891 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5892 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5893 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5894 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5895 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5896 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5897
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5898 # Read the libtool library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5899 dlname=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5900 library_names=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5901
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5902 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5903 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5904 */* | *\\*) . $file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5905 *) . ./$file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5906 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5907
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5908 # Skip this library if it cannot be dlopened.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5909 if test -z "$dlname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5910 # Warn if it was a shared library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5911 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5912 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5913 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5914
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5915 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5916 test "X$dir" = "X$file" && dir=.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5917
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5918 if test -f "$dir/$objdir/$dlname"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5919 dir="$dir/$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5920 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5921 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5922 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5923 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5924 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5925
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5926 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5927 # Just add the directory containing the .lo file.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5928 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5929 test "X$dir" = "X$file" && dir=.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5930 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5931
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5932 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5933 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5934 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5935 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5936 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5937
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5938 # Get the absolute pathname.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5939 absdir=`cd "$dir" && pwd`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5940 test -n "$absdir" && dir="$absdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5941
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5942 # Now add the directory to shlibpath_var.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5943 if eval "test -z \"\$$shlibpath_var\""; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5944 eval "$shlibpath_var=\"\$dir\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5945 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5946 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5947 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5948 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5949
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5950 # This variable tells wrapper scripts just to set shlibpath_var
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5951 # rather than running their programs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5952 libtool_execute_magic="$magic"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5953
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5954 # Check if any of the arguments is a wrapper script.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5955 args=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5956 for file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5957 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5958 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5959 -*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5960 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5961 # Do a test to see if this is really a libtool program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5962 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5963 # If there is no directory component, then add one.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5964 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5965 */* | *\\*) . $file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5966 *) . ./$file ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5967 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5968
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5969 # Transform arg to wrapped name.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5970 file="$progdir/$program"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5971 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5972 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5973 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5974 # Quote arguments (to preserve shell metacharacters).
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5975 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5976 args="$args \"$file\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5977 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5978
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5979 if test -z "$run"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5980 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5981 # Export the shlibpath_var.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5982 eval "export $shlibpath_var"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5983 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5984
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5985 # Restore saved environment variables
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5986 if test "${save_LC_ALL+set}" = set; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5987 LC_ALL="$save_LC_ALL"; export LC_ALL
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5988 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5989 if test "${save_LANG+set}" = set; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5990 LANG="$save_LANG"; export LANG
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5991 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5992
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5993 # Now prepare to actually exec the command.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5994 exec_cmd="\$cmd$args"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5995 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5996 # Display what would be done.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5997 if test -n "$shlibpath_var"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5998 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
5999 $echo "export $shlibpath_var"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6000 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6001 $echo "$cmd$args"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6002 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6003 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6004 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6005
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6006 # libtool clean and uninstall mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6007 clean | uninstall)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6008 modename="$modename: $mode"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6009 rm="$nonopt"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6010 files=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6011 rmforce=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6012 exit_status=0
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6013
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6014 # This variable tells wrapper scripts just to set variables rather
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6015 # than running their programs.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6016 libtool_install_magic="$magic"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6017
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6018 for arg
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6019 do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6020 case $arg in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6021 -f) rm="$rm $arg"; rmforce=yes ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6022 -*) rm="$rm $arg" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6023 *) files="$files $arg" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6024 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6025 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6026
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6027 if test -z "$rm"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6028 $echo "$modename: you must specify an RM program" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6029 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6030 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6031 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6032
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6033 rmdirs=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6034
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6035 origobjdir="$objdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6036 for file in $files; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6037 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6038 if test "X$dir" = "X$file"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6039 dir=.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6040 objdir="$origobjdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6041 else
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6042 objdir="$dir/$origobjdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6043 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6044 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6045 test "$mode" = uninstall && objdir="$dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6046
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6047 # Remember objdir for removal later, being careful to avoid duplicates
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6048 if test "$mode" = clean; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6049 case " $rmdirs " in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6050 *" $objdir "*) ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6051 *) rmdirs="$rmdirs $objdir" ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6052 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6053 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6054
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6055 # Don't error if the file doesn't exist and rm -f was used.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6056 if (test -L "$file") >/dev/null 2>&1 \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6057 || (test -h "$file") >/dev/null 2>&1 \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6058 || test -f "$file"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6059 :
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6060 elif test -d "$file"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6061 exit_status=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6062 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6063 elif test "$rmforce" = yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6064 continue
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6065 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6066
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6067 rmfiles="$file"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6068
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6069 case $name in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6070 *.la)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6071 # Possibly a libtool archive, so verify it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6072 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6073 . $dir/$name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6074
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6075 # Delete the libtool libraries and symlinks.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6076 for n in $library_names; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6077 rmfiles="$rmfiles $objdir/$n"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6078 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6079 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6080 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6081
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6082 if test "$mode" = uninstall; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6083 if test -n "$library_names"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6084 # Do each command in the postuninstall commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6085 cmds=$postuninstall_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6086 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6087 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6088 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6089 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6090 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6091 $run eval "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6092 if test "$?" -ne 0 && test "$rmforce" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6093 exit_status=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6094 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6095 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6096 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6097 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6098
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6099 if test -n "$old_library"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6100 # Do each command in the old_postuninstall commands.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6101 cmds=$old_postuninstall_cmds
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6102 save_ifs="$IFS"; IFS='~'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6103 for cmd in $cmds; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6104 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6105 eval cmd=\"$cmd\"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6106 $show "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6107 $run eval "$cmd"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6108 if test "$?" -ne 0 && test "$rmforce" != yes; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6109 exit_status=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6110 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6111 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6112 IFS="$save_ifs"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6113 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6114 # FIXME: should reinstall the best remaining shared library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6115 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6116 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6117 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6118
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6119 *.lo)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6120 # Possibly a libtool object, so verify it.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6121 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6122
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6123 # Read the .lo file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6124 . $dir/$name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6125
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6126 # Add PIC object to the list of files to remove.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6127 if test -n "$pic_object" \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6128 && test "$pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6129 rmfiles="$rmfiles $dir/$pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6130 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6131
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6132 # Add non-PIC object to the list of files to remove.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6133 if test -n "$non_pic_object" \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6134 && test "$non_pic_object" != none; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6135 rmfiles="$rmfiles $dir/$non_pic_object"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6136 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6137 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6138 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6139
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6140 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6141 if test "$mode" = clean ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6142 noexename=$name
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6143 case $file in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6144 *.exe)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6145 file=`$echo $file|${SED} 's,.exe$,,'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6146 noexename=`$echo $name|${SED} 's,.exe$,,'`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6147 # $file with .exe has already been added to rmfiles,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6148 # add $file without .exe
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6149 rmfiles="$rmfiles $file"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6150 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6151 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6152 # Do a test to see if this is a libtool program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6153 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6154 relink_command=
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6155 . $dir/$noexename
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6156
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6157 # note $name still contains .exe if it was in $file originally
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6158 # as does the version of $file that was added into $rmfiles
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6159 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6160 if test "$fast_install" = yes && test -n "$relink_command"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6161 rmfiles="$rmfiles $objdir/lt-$name"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6162 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6163 if test "X$noexename" != "X$name" ; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6164 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6165 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6166 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6167 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6168 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6169 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6170 $show "$rm $rmfiles"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6171 $run $rm $rmfiles || exit_status=1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6172 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6173 objdir="$origobjdir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6174
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6175 # Try to remove the ${objdir}s in the directories where we deleted files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6176 for dir in $rmdirs; do
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6177 if test -d "$dir"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6178 $show "rmdir $dir"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6179 $run rmdir $dir >/dev/null 2>&1
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6180 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6181 done
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6182
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6183 exit $exit_status
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6184 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6185
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6186 "")
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6187 $echo "$modename: you must specify a MODE" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6188 $echo "$generic_help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6189 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6190 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6191 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6192
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6193 if test -z "$exec_cmd"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6194 $echo "$modename: invalid operation mode \`$mode'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6195 $echo "$generic_help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6196 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6197 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6198 fi # test -z "$show_help"
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6199
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6200 if test -n "$exec_cmd"; then
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6201 eval exec $exec_cmd
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6202 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6203 fi
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6204
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6205 # We need to display help for each of the modes.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6206 case $mode in
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6207 "") $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6208 "Usage: $modename [OPTION]... [MODE-ARG]...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6209
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6210 Provide generalized library-building support services.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6211
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6212 --config show all configuration variables
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6213 --debug enable verbose shell tracing
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6214 -n, --dry-run display commands without modifying any files
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6215 --features display basic configuration information and exit
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6216 --finish same as \`--mode=finish'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6217 --help display this help message and exit
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6218 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6219 --quiet same as \`--silent'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6220 --silent don't print informational messages
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6221 --tag=TAG use configuration variables from tag TAG
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6222 --version print version information
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6223
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6224 MODE must be one of the following:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6225
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6226 clean remove files from the build directory
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6227 compile compile a source file into a libtool object
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6228 execute automatically set library path, then run a program
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6229 finish complete the installation of libtool libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6230 install install libraries or executables
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6231 link create a library or an executable
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6232 uninstall remove libraries from an installed directory
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6233
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6234 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6235 a more detailed description of MODE.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6236
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6237 Report bugs to <bug-libtool@gnu.org>."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6238 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6239 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6240
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6241 clean)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6242 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6243 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6244
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6245 Remove files from the build directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6246
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6247 RM is the name of the program to use to delete files associated with each FILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6248 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6249 to RM.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6250
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6251 If FILE is a libtool library, object or program, all the files associated
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6252 with it are deleted. Otherwise, only FILE itself is deleted using RM."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6253 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6254
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6255 compile)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6256 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6257 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6258
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6259 Compile a source file into a libtool library object.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6260
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6261 This mode accepts the following additional options:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6262
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6263 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6264 -prefer-pic try to building PIC objects only
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6265 -prefer-non-pic try to building non-PIC objects only
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6266 -static always build a \`.o' file suitable for static linking
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6267
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6268 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6269 from the given SOURCEFILE.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6270
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6271 The output file name is determined by removing the directory component from
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6272 SOURCEFILE, then substituting the C source code suffix \`.c' with the
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6273 library object suffix, \`.lo'."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6274 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6275
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6276 execute)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6277 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6278 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6279
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6280 Automatically set library path, then run a program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6281
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6282 This mode accepts the following additional options:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6283
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6284 -dlopen FILE add the directory containing FILE to the library path
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6285
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6286 This mode sets the library path environment variable according to \`-dlopen'
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6287 flags.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6288
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6289 If any of the ARGS are libtool executable wrappers, then they are translated
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6290 into their corresponding uninstalled binary, and any of their required library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6291 directories are added to the library path.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6292
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6293 Then, COMMAND is executed, with ARGS as arguments."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6294 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6295
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6296 finish)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6297 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6298 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6299
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6300 Complete the installation of libtool libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6301
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6302 Each LIBDIR is a directory that contains libtool libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6303
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6304 The commands that this mode executes may require superuser privileges. Use
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6305 the \`--dry-run' option if you just want to see what would be executed."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6306 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6307
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6308 install)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6309 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6310 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6311
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6312 Install executables or libraries.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6313
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6314 INSTALL-COMMAND is the installation command. The first component should be
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6315 either the \`install' or \`cp' program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6316
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6317 The rest of the components are interpreted as arguments to that command (only
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6318 BSD-compatible install options are recognized)."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6319 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6320
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6321 link)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6322 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6323 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6324
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6325 Link object files or libraries together to form another library, or to
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6326 create an executable program.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6327
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6328 LINK-COMMAND is a command using the C compiler that you would use to create
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6329 a program from several object files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6330
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6331 The following components of LINK-COMMAND are treated specially:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6332
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6333 -all-static do not do any dynamic linking at all
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6334 -avoid-version do not add a version suffix if possible
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6335 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6336 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6337 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6338 -export-symbols SYMFILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6339 try to export only the symbols listed in SYMFILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6340 -export-symbols-regex REGEX
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6341 try to export only the symbols matching REGEX
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6342 -LLIBDIR search LIBDIR for required installed libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6343 -lNAME OUTPUT-FILE requires the installed library libNAME
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6344 -module build a library that can dlopened
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6345 -no-fast-install disable the fast-install mode
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6346 -no-install link a not-installable executable
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6347 -no-undefined declare that a library does not refer to external symbols
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6348 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6349 -objectlist FILE Use a list of object files found in FILE to specify objects
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6350 -precious-files-regex REGEX
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6351 don't remove output files matching REGEX
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6352 -release RELEASE specify package release information
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6353 -rpath LIBDIR the created library will eventually be installed in LIBDIR
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6354 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6355 -static do not do any dynamic linking of libtool libraries
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6356 -version-info CURRENT[:REVISION[:AGE]]
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6357 specify library version info [each variable defaults to 0]
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6358
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6359 All other options (arguments beginning with \`-') are ignored.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6360
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6361 Every other argument is treated as a filename. Files ending in \`.la' are
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6362 treated as uninstalled libtool libraries, other files are standard or library
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6363 object files.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6364
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6365 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6366 only library objects (\`.lo' files) may be specified, and \`-rpath' is
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6367 required, except when creating a convenience library.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6368
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6369 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6370 using \`ar' and \`ranlib', or on Windows using \`lib'.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6371
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6372 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6373 is created, otherwise an executable program is created."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6374 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6375
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6376 uninstall)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6377 $echo \
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6378 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6379
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6380 Remove libraries from an installation directory.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6381
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6382 RM is the name of the program to use to delete files associated with each FILE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6383 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6384 to RM.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6385
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6386 If FILE is a libtool library, all the files associated with it are deleted.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6387 Otherwise, only FILE itself is deleted using RM."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6388 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6389
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6390 *)
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6391 $echo "$modename: invalid operation mode \`$mode'" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6392 $echo "$help" 1>&2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6393 exit $EXIT_FAILURE
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6394 ;;
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6395 esac
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6396
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6397 $echo
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6398 $echo "Try \`$modename --help' for more information about other modes."
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6399
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6400 exit $EXIT_SUCCESS
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6401
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6402 # The TAGs below are defined such that we never get into a situation
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6403 # in which we disable both kinds of libraries. Given conflicting
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6404 # choices, we go for a static library, that is the most portable,
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6405 # since we can't tell whether shared libraries were disabled because
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6406 # the user asked for that or because the platform doesn't support
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6407 # them. This is particularly important on AIX, because we don't
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6408 # support having both static and shared libraries enabled at the same
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6409 # time on that platform, so we default to a shared-only configuration.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6410 # If a disable-shared tag is given, we'll fallback to a static-only
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6411 # configuration. But we'll never go from static-only to shared-only.
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6412
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6413 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6414 build_libtool_libs=no
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6415 build_old_libs=yes
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6416 # ### END LIBTOOL TAG CONFIG: disable-shared
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6417
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6418 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6419 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6420 # ### END LIBTOOL TAG CONFIG: disable-static
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6421
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6422 # Local Variables:
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6423 # mode:shell-script
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6424 # sh-indentation:2
ec7e344e0dfb switch to automake/autoconf
carl
parents:
diff changeset
6425 # End: