annotate libtool @ 18:b34e716781ed stable-1-0

prevent auto-requires in rpm building
author carl
date Tue, 20 Dec 2005 17:36:18 -0800
parents 91b26521effc
children 0d65c3de34fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1 #! /bin/sh
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3 # libtoolT - Provide generalized library-building support services.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4 # Generated automatically by (GNU syslog2iptables 1.0)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
8 # Free Software Foundation, Inc.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
9 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
10 # This file is part of GNU Libtool:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
12 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
13 # This program is free software; you can redistribute it and/or modify
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
14 # it under the terms of the GNU General Public License as published by
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
15 # the Free Software Foundation; either version 2 of the License, or
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
16 # (at your option) any later version.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
17 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
18 # This program is distributed in the hope that it will be useful, but
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
21 # General Public License for more details.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
22 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
23 # You should have received a copy of the GNU General Public License
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
24 # along with this program; if not, write to the Free Software
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
26 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
27 # As a special exception to the GNU General Public License, if you
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
28 # distribute this file as part of a program that contains a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
29 # configuration script generated by Autoconf, you may include it under
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
30 # the same distribution terms that you use for the rest of that program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
31
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
32 # A sed program that does not truncate output.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
33 SED="/bin/sed"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
34
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
36 Xsed="/bin/sed -e s/^X//"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
37
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
39 # if CDPATH is set.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
40 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
41
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
42 # The names of the tagged configurations supported by this script.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
43 available_tags=" CXX F77"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
44
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
45 # ### BEGIN LIBTOOL CONFIG
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
46
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
47 # Libtool was configured on host ns.five-ten-sg.com:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
48
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
49 # Shell to use when invoking shell scripts.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
50 SHELL="/bin/sh"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
51
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
52 # Whether or not to build shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
53 build_libtool_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
54
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
55 # Whether or not to build static libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
56 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
57
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
58 # Whether or not to add -lc for building shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
59 build_libtool_need_lc=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
60
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
61 # Whether or not to disallow shared libs when runtime libs are static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
62 allow_libtool_libs_with_static_runtimes=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
63
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
64 # Whether or not to optimize for fast installation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
65 fast_install=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
66
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
67 # The host system.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
68 host_alias=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
69 host=i686-redhat-linux-gnu
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
70
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
71 # An echo program that does not interpret backslashes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
72 echo="echo"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
73
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
74 # The archiver.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
75 AR="ar"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
76 AR_FLAGS="cru"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
77
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
78 # A C compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
79 LTCC="gcc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
80
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
81 # A language-specific compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
82 CC="gcc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
83
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
84 # Is the compiler the GNU C compiler?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
85 with_gcc=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
86
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
87 # An ERE matcher.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
88 EGREP="grep -E"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
89
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
90 # The linker used to build libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
91 LD="/usr/bin/ld"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
92
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
93 # Whether we need hard or soft links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
94 LN_S="ln -s"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
95
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
96 # A BSD-compatible nm program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
97 NM="/usr/bin/nm -B"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
98
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
99 # A symbol stripping program
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
100 STRIP="strip"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
101
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
102 # Used to examine libraries when file_magic_cmd begins "file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
103 MAGIC_CMD=file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
104
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
105 # Used on cygwin: DLL creation program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
106 DLLTOOL="dlltool"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
107
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
108 # Used on cygwin: object dumper.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
109 OBJDUMP="objdump"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
110
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
111 # Used on cygwin: assembler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
112 AS="as"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
113
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
114 # The name of the directory that contains temporary libtool files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
115 objdir=.libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
116
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
117 # How to create reloadable object files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
118 reload_flag=" -r"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
119 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
120
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
121 # How to pass a linker flag through the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
122 wl="-Wl,"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
123
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
124 # Object file suffix (normally "o").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
125 objext="o"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
126
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
127 # Old archive suffix (normally "a").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
128 libext="a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
129
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
130 # Shared library suffix (normally ".so").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
131 shrext_cmds='.so'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
132
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
133 # Executable file suffix (normally "").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
134 exeext=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
135
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
136 # Additional compiler flags for building library objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
137 pic_flag=" -fPIC -DPIC"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
138 pic_mode=default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
139
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
140 # What is the maximum length of a command?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
141 max_cmd_len=32768
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
142
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
143 # Does compiler simultaneously support -c and -o options?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
144 compiler_c_o="yes"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
145
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
146 # Must we lock files when doing compilation ?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
147 need_locks="no"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
148
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
149 # Do we need the lib prefix for modules?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
150 need_lib_prefix=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
151
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
152 # Do we need a version for libraries?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
153 need_version=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
154
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
155 # Whether dlopen is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
156 dlopen_support=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
157
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
158 # Whether dlopen of programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
159 dlopen_self=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
160
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
161 # Whether dlopen of statically linked programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
162 dlopen_self_static=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
163
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
164 # Compiler flag to prevent dynamic linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
165 link_static_flag="-static"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
166
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
167 # Compiler flag to turn off builtin functions.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
168 no_builtin_flag=" -fno-builtin"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
169
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
170 # Compiler flag to allow reflexive dlopens.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
171 export_dynamic_flag_spec="\${wl}--export-dynamic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
172
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
173 # Compiler flag to generate shared objects directly from archives.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
174 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
175
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
176 # Compiler flag to generate thread-safe objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
177 thread_safe_flag_spec=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
178
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
179 # Library versioning type.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
180 version_type=linux
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
181
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
182 # Format of library name prefix.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
183 libname_spec="lib\$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
184
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
185 # List of archive names. First name is the real one, the rest are links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
186 # The last name is the one that the linker finds with -lNAME.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
187 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
188
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
189 # The coded name of the library, if different from the real name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
190 soname_spec="\${libname}\${release}\${shared_ext}\$major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
191
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
192 # Commands used to build and install an old-style archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
193 RANLIB="ranlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
194 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
195 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
196 old_postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
197
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
198 # Create an old-style archive from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
199 old_archive_from_new_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
200
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
201 # Create a temporary old-style archive to link instead of a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
202 old_archive_from_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
203
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
204 # Commands used to build and install a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
205 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
206 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
207 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
208 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
209 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
210 postinstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
211 postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
212
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
213 # Commands used to build a loadable module (assumed same as above if empty)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
214 module_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
215 module_expsym_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
216
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
217 # Commands to strip libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
218 old_striplib="strip --strip-debug"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
219 striplib="strip --strip-unneeded"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
220
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
221 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
222 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
223 predep_objects=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
224
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
225 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
226 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
227 postdep_objects=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
228
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
229 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
230 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
231 predeps=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
232
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
233 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
234 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
235 postdeps=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
236
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
237 # The library search path used internally by the compiler when linking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
238 # a shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
239 compiler_lib_search_path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
240
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
241 # Method to check whether dependent libraries are shared objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
242 deplibs_check_method="pass_all"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
243
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
244 # Command to use when deplibs_check_method == file_magic.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
245 file_magic_cmd="\$MAGIC_CMD"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
246
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
247 # Flag that allows shared libraries with undefined symbols to be built.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
248 allow_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
249
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
250 # Flag that forces no undefined symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
251 no_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
252
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
253 # Commands used to finish a libtool library installation in a directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
254 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
255
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
256 # Same as above, but a single script fragment to be evaled but not shown.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
257 finish_eval=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
258
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
259 # Take the output of nm and produce a listing of raw symbols and C names.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
260 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
261
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
262 # Transform the output of nm in a proper C declaration
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
263 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
264
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
265 # Transform the output of nm in a C name address pair
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
266 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
267
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
268 # This is the shared library runtime path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
269 runpath_var=LD_RUN_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
270
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
271 # This is the shared library path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
272 shlibpath_var=LD_LIBRARY_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
273
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
274 # Is shlibpath searched before the hard-coded library search path?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
275 shlibpath_overrides_runpath=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
276
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
277 # How to hardcode a shared library path into an executable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
278 hardcode_action=immediate
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
279
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
280 # Whether we should hardcode library paths into libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
281 hardcode_into_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
282
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
283 # Flag to hardcode $libdir into a binary during linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
284 # This must work even if $libdir does not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
285 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
286
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
287 # If ld is used when linking, flag to hardcode $libdir into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
288 # a binary during linking. This must work even if $libdir does
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
289 # not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
290 hardcode_libdir_flag_spec_ld=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
291
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
292 # Whether we need a single -rpath flag with a separated argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
293 hardcode_libdir_separator=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
294
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
295 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
296 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
297 hardcode_direct=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
298
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
299 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
300 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
301 hardcode_minus_L=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
302
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
303 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
304 # the resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
305 hardcode_shlibpath_var=unsupported
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
306
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
307 # Set to yes if building a shared library automatically hardcodes DIR into the library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
308 # and all subsequent libraries and executables linked against it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
309 hardcode_automatic=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
310
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
311 # Variables whose values should be saved in libtool wrapper scripts and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
312 # restored at relink time.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
313 variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
314
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
315 # Whether libtool must link a program against all its dependency libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
316 link_all_deplibs=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
317
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
318 # Compile-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
319 sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../ /lib/i386-redhat-linux/3.4.4/ /lib/ /usr/lib/i386-redhat-linux/3.4.4/ /usr/lib/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
320
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
321 # Run-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
322 sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf /usr/lib/wine "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
323
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
324 # Fix the shell variable $srcfile for the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
325 fix_srcfile_path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
326
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
327 # Set to yes if exported symbols are required.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
328 always_export_symbols=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
329
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
330 # The commands to list exported symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
331 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
332
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
333 # The commands to extract the exported symbol list from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
334 extract_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
335
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
336 # Symbols that should not be listed in the preloaded symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
337 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
338
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
339 # Symbols that must always be exported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
340 include_expsyms=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
341
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
342 # ### END LIBTOOL CONFIG
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
343
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
344 # ltmain.sh - Provide generalized library-building support services.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
345 # NOTE: Changing this file will not affect anything until you rerun configure.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
346 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
347 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
348 # Free Software Foundation, Inc.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
349 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
350 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
351 # This program is free software; you can redistribute it and/or modify
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
352 # it under the terms of the GNU General Public License as published by
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
353 # the Free Software Foundation; either version 2 of the License, or
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
354 # (at your option) any later version.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
355 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
356 # This program is distributed in the hope that it will be useful, but
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
357 # WITHOUT ANY WARRANTY; without even the implied warranty of
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
359 # General Public License for more details.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
360 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
361 # You should have received a copy of the GNU General Public License
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
362 # along with this program; if not, write to the Free Software
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
363 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
364 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
365 # As a special exception to the GNU General Public License, if you
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
366 # distribute this file as part of a program that contains a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
367 # configuration script generated by Autoconf, you may include it under
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
368 # the same distribution terms that you use for the rest of that program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
369
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
370 # Check that we have a working $echo.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
371 if test "X$1" = X--no-reexec; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
372 # Discard the --no-reexec flag, and continue.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
373 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
374 elif test "X$1" = X--fallback-echo; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
375 # Avoid inline document here, it may be left over
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
376 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
377 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
378 # Yippee, $echo works!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
379 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
380 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
381 # Restart under the correct shell, and then maybe $echo will work.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
382 exec $SHELL "$0" --no-reexec ${1+"$@"}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
383 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
384
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
385 if test "X$1" = X--fallback-echo; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
386 # used as fallback echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
387 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
388 cat <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
389 $*
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
390 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
391 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
392 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
393
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
394 # The name of this program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
395 progname=`$echo "$0" | ${SED} 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
396 modename="$progname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
397
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
398 # Constants.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
399 PROGRAM=ltmain.sh
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
400 PACKAGE=libtool
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
401 VERSION=1.5a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
402 TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
403
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
404 default_mode=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
405 help="Try \`$progname --help' for more information."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
406 magic="%%%MAGIC variable%%%"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
407 mkdir="mkdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
408 mv="mv -f"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
409 rm="rm -f"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
410
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
411 # Sed substitution that helps us do robust quoting. It backslashifies
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
412 # metacharacters that are still active within double-quoted strings.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
413 Xsed="${SED}"' -e 1s/^X//'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
414 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
415 # test EBCDIC or ASCII
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
416 case `echo A|tr A '\301'` in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
417 A) # EBCDIC based system
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
418 SP2NL="tr '\100' '\n'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
419 NL2SP="tr '\r\n' '\100\100'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
420 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
421 *) # Assume ASCII based system
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
422 SP2NL="tr '\040' '\012'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
423 NL2SP="tr '\015\012' '\040\040'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
424 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
425 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
426
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
427 # NLS nuisances.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
428 # Only set LANG and LC_ALL to C if already set.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
429 # These must not be set unconditionally because not all systems understand
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
430 # e.g. LANG=C (notably SCO).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
431 # We save the old values to restore during execute mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
432 if test "${LC_ALL+set}" = set; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
433 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
434 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
435 if test "${LANG+set}" = set; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
436 save_LANG="$LANG"; LANG=C; export LANG
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
437 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
438
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
439 # Make sure IFS has a sensible default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
440 : ${IFS=" "}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
441
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
442 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
443 $echo "$modename: not configured to build any kind of library" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
444 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
445 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
446 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
447
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
448 # Global variables.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
449 mode=$default_mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
450 nonopt=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
451 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
452 prevopt=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
453 run=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
454 show="$echo"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
455 show_help=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
456 execute_dlfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
457 lo2o="s/\\.lo\$/.${objext}/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
458 o2lo="s/\\.${objext}\$/.lo/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
459
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
460 #####################################
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
461 # Shell function definitions:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
462 # This seems to be the best place for them
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
463
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
464 # Need a lot of goo to handle *both* DLLs and import libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
465 # Has to be a shell function in order to 'eat' the argument
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
466 # that is supplied when $file_magic_command is called.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
467 win32_libid () {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
468 win32_libid_type="unknown"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
469 win32_fileres=`file -L $1 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
470 case $win32_fileres in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
471 *ar\ archive\ import\ library*) # definitely import
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
472 win32_libid_type="x86 archive import"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
473 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
474 *ar\ archive*) # could be an import, or static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
475 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
476 grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
477 win32_nmres=`eval $NM -f posix -A $1 | \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
478 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
479 if test "X$win32_nmres" = "Ximport" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
480 win32_libid_type="x86 archive import"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
481 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
482 win32_libid_type="x86 archive static"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
483 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
484 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
485 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
486 *DLL*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
487 win32_libid_type="x86 DLL"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
488 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
489 *executable*) # but shell scripts are "executable" too...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
490 case $win32_fileres in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
491 *MS\ Windows\ PE\ Intel*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
492 win32_libid_type="x86 DLL"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
493 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
494 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
495 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
496 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
497 $echo $win32_libid_type
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
498 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
499
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
500 # End of Shell function definitions
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
501 #####################################
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
502
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
503 # Parse our command line options once, thoroughly.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
504 while test "$#" -gt 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
505 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
506 arg="$1"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
507 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
508
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
509 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
510 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
511 *) optarg= ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
512 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
513
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
514 # If the previous option needs an argument, assign it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
515 if test -n "$prev"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
516 case $prev in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
517 execute_dlfiles)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
518 execute_dlfiles="$execute_dlfiles $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
519 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
520 tag)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
521 tagname="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
522
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
523 # Check whether tagname contains only valid characters
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
524 case $tagname in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
525 *[!-_A-Za-z0-9,/]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
526 $echo "$progname: invalid tag name: $tagname" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
527 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
528 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
529 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
530
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
531 case $tagname in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
532 CC)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
533 # Don't test for the "default" C tag, as we know, it's there, but
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
534 # not specially marked.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
535 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
536 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
537 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
538 taglist="$taglist $tagname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
539 # Evaluate the configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
540 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
541 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
542 $echo "$progname: ignoring unknown tag $tagname" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
543 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
544 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
545 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
546 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
547 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
548 eval "$prev=\$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
549 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
550 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
551
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
552 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
553 prevopt=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
554 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
555 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
556
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
557 # Have we seen a non-optional argument yet?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
558 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
559 --help)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
560 show_help=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
561 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
562
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
563 --version)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
564 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
565 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
566 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
567 $echo "This is free software; see the source for copying conditions. There is NO"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
568 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
569 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
570 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
571
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
572 --config)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
573 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
574 # Now print the configurations for the tags.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
575 for tagname in $taglist; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
576 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
577 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
578 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
579 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
580
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
581 --debug)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
582 $echo "$progname: enabling shell trace mode"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
583 set -x
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
584 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
585
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
586 --dry-run | -n)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
587 run=:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
588 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
589
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
590 --features)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
591 $echo "host: $host"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
592 if test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
593 $echo "enable shared libraries"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
594 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
595 $echo "disable shared libraries"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
596 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
597 if test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
598 $echo "enable static libraries"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
599 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
600 $echo "disable static libraries"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
601 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
602 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
603 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
604
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
605 --finish) mode="finish" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
606
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
607 --mode) prevopt="--mode" prev=mode ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
608 --mode=*) mode="$optarg" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
609
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
610 --preserve-dup-deps) duplicate_deps="yes" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
611
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
612 --quiet | --silent)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
613 show=:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
614 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
615
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
616 --tag) prevopt="--tag" prev=tag ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
617 --tag=*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
618 set tag "$optarg" ${1+"$@"}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
619 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
620 prev=tag
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
621 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
622
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
623 -dlopen)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
624 prevopt="-dlopen"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
625 prev=execute_dlfiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
626 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
627
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
628 -*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
629 $echo "$modename: unrecognized option \`$arg'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
630 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
631 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
632 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
633
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
634 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
635 nonopt="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
636 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
637 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
638 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
639 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
640
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
641 if test -n "$prevopt"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
642 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
643 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
644 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
645 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
646
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
647 # If this variable is set in any of the actions, the command in it
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
648 # will be execed at the end. This prevents here-documents from being
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
649 # left over by shells.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
650 exec_cmd=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
651
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
652 if test -z "$show_help"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
653
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
654 # Infer the operation mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
655 if test -z "$mode"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
656 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
657 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
658 case $nonopt in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
659 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
660 mode=link
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
661 for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
662 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
663 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
664 -c)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
665 mode=compile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
666 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
667 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
668 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
669 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
670 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
671 *db | *dbx | *strace | *truss)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
672 mode=execute
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
673 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
674 *install*|cp|mv)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
675 mode=install
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
676 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
677 *rm)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
678 mode=uninstall
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
679 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
680 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
681 # If we have no mode, but dlfiles were specified, then do execute mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
682 test -n "$execute_dlfiles" && mode=execute
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
683
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
684 # Just use the default operation mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
685 if test -z "$mode"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
686 if test -n "$nonopt"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
687 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
688 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
689 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
690 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
691 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
692 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
693 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
694 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
695
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
696 # Only execute mode is allowed to have -dlopen flags.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
697 if test -n "$execute_dlfiles" && test "$mode" != execute; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
698 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
699 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
700 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
701 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
702
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
703 # Change the help message to a mode-specific one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
704 generic_help="$help"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
705 help="Try \`$modename --help --mode=$mode' for more information."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
706
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
707 # These modes are in order of execution frequency so that they run quickly.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
708 case $mode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
709 # libtool compile mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
710 compile)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
711 modename="$modename: compile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
712 # Get the compilation command and the source file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
713 base_compile=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
714 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
715 suppress_output=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
716 arg_mode=normal
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
717 libobj=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
718
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
719 for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
720 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
721 case "$arg_mode" in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
722 arg )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
723 # do not "continue". Instead, add this to base_compile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
724 lastarg="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
725 arg_mode=normal
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
726 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
727
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
728 target )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
729 libobj="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
730 arg_mode=normal
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
731 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
732 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
733
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
734 normal )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
735 # Accept any command-line options.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
736 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
737 -o)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
738 if test -n "$libobj" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
739 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
740 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
741 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
742 arg_mode=target
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
743 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
744 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
745
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
746 -static)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
747 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
748 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
749 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
750
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
751 -prefer-pic)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
752 pic_mode=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
753 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
754 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
755
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
756 -prefer-non-pic)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
757 pic_mode=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
758 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
759 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
760
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
761 -Xcompiler)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
762 arg_mode=arg # the next one goes into the "base_compile" arg list
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
763 continue # The current "srcfile" will either be retained or
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
764 ;; # replaced later. I would guess that would be a bug.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
765
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
766 -Wc,*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
767 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
768 lastarg=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
769 save_ifs="$IFS"; IFS=','
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
770 for arg in $args; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
771 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
772
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
773 # Double-quote args containing other shell metacharacters.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
774 # Many Bourne shells cannot handle close brackets correctly
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
775 # in scan sets, so we specify it separately.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
776 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
777 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
778 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
779 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
780 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
781 lastarg="$lastarg $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
782 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
783 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
784 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
785
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
786 # Add the arguments to base_compile.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
787 base_compile="$base_compile $lastarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
788 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
789 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
790
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
791 * )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
792 # Accept the current argument as the source file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
793 # The previous "srcfile" becomes the current argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
794 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
795 lastarg="$srcfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
796 srcfile="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
797 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
798 esac # case $arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
799 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
800 esac # case $arg_mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
801
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
802 # Aesthetically quote the previous argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
803 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
804
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
805 case $lastarg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
806 # Double-quote args containing other shell metacharacters.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
807 # Many Bourne shells cannot handle close brackets correctly
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
808 # in scan sets, so we specify it separately.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
809 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
810 lastarg="\"$lastarg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
811 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
812 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
813
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
814 base_compile="$base_compile $lastarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
815 done # for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
816
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
817 case $arg_mode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
818 arg)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
819 $echo "$modename: you must specify an argument for -Xcompile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
820 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
821 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
822 target)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
823 $echo "$modename: you must specify a target with \`-o'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
824 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
825 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
826 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
827 # Get the name of the library object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
828 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
829 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
830 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
831
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
832 # Recognize several different file suffixes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
833 # If the user specifies -o file.o, it is replaced with file.lo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
834 xform='[cCFSifmso]'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
835 case $libobj in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
836 *.ada) xform=ada ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
837 *.adb) xform=adb ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
838 *.ads) xform=ads ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
839 *.asm) xform=asm ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
840 *.c++) xform=c++ ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
841 *.cc) xform=cc ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
842 *.ii) xform=ii ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
843 *.class) xform=class ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
844 *.cpp) xform=cpp ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
845 *.cxx) xform=cxx ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
846 *.f90) xform=f90 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
847 *.for) xform=for ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
848 *.java) xform=java ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
849 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
850
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
851 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
852
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
853 case $libobj in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
854 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
855 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
856 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
857 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
858 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
859 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
860
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
861 # Infer tagged configuration to use if any are available and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
862 # if one wasn't chosen via the "--tag" command line option.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
863 # Only attempt this if the compiler in the base compile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
864 # command doesn't match the default compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
865 if test -n "$available_tags" && test -z "$tagname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
866 case $base_compile in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
867 # Blanks in the command may have been stripped by the calling shell,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
868 # but not from the CC environment variable when configure was run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
869 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
870 # Blanks at the start of $base_compile will cause this to fail
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
871 # if we don't check for them as well.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
872 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
873 for z in $available_tags; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
874 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
875 # Evaluate the configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
876 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
877 case "$base_compile " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
878 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
879 # The compiler in the base compile command matches
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
880 # the one in the tagged configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
881 # Assume this is the tagged configuration we want.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
882 tagname=$z
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
883 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
884 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
885 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
886 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
887 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
888 # If $tagname still isn't set, then no tagged configuration
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
889 # was found and let the user know that the "--tag" command
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
890 # line option must be used.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
891 if test -z "$tagname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
892 $echo "$modename: unable to infer tagged configuration"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
893 $echo "$modename: specify a tag with \`--tag'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
894 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
895 # else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
896 # $echo "$modename: using $tagname tagged configuration"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
897 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
898 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
899 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
900 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
901
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
902 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
903 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
904 if test "X$xdir" = "X$obj"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
905 xdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
906 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
907 xdir=$xdir/
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
908 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
909 lobj=${xdir}$objdir/$objname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
910
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
911 if test -z "$base_compile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
912 $echo "$modename: you must specify a compilation command" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
913 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
914 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
915 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
916
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
917 # Delete any leftover library objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
918 if test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
919 removelist="$obj $lobj $libobj ${libobj}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
920 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
921 removelist="$lobj $libobj ${libobj}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
922 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
923
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
924 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
925 trap "$run $rm $removelist; exit 1" 1 2 15
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
926
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
927 # On Cygwin there's no "real" PIC flag so we must build both object types
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
928 case $host_os in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
929 cygwin* | mingw* | pw32* | os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
930 pic_mode=default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
931 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
932 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
933 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
934 # non-PIC code in shared libraries is not supported
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
935 pic_mode=default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
936 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
937
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
938 # Calculate the filename of the output object if compiler does
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
939 # not support -o with -c
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
940 if test "$compiler_c_o" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
941 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
942 lockfile="$output_obj.lock"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
943 removelist="$removelist $output_obj $lockfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
944 trap "$run $rm $removelist; exit 1" 1 2 15
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
945 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
946 output_obj=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
947 need_locks=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
948 lockfile=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
949 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
950
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
951 # Lock this critical section if it is needed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
952 # We use this script file to make the link, it avoids creating a new file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
953 if test "$need_locks" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
954 until $run ln "$0" "$lockfile" 2>/dev/null; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
955 $show "Waiting for $lockfile to be removed"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
956 sleep 2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
957 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
958 elif test "$need_locks" = warn; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
959 if test -f "$lockfile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
960 $echo "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
961 *** ERROR, $lockfile exists and contains:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
962 `cat $lockfile 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
963
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
964 This indicates that another process is trying to use the same
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
965 temporary object file, and libtool could not work around it because
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
966 your compiler does not support \`-c' and \`-o' together. If you
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
967 repeat this compilation, it may succeed, by chance, but you had better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
968 avoid parallel builds (make -j) in this platform, or get a better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
969 compiler."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
970
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
971 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
972 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
973 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
974 $echo $srcfile > "$lockfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
975 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
976
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
977 if test -n "$fix_srcfile_path"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
978 eval srcfile=\"$fix_srcfile_path\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
979 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
980
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
981 $run $rm "$libobj" "${libobj}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
982
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
983 # Create a libtool object file (analogous to a ".la" file),
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
984 # but don't create it if we're doing a dry run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
985 test -z "$run" && cat > ${libobj}T <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
986 # $libobj - a libtool object file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
987 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
988 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
989 # Please DO NOT delete this file!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
990 # It is necessary for linking the library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
991
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
992 # Name of the PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
993 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
994
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
995 # Only build a PIC object if we are building libtool libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
996 if test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
997 # Without this assignment, base_compile gets emptied.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
998 fbsd_hideous_sh_bug=$base_compile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
999
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1000 if test "$pic_mode" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1001 command="$base_compile $srcfile $pic_flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1002 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1003 # Don't build PIC code
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1004 command="$base_compile $srcfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1005 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1006
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1007 if test ! -d "${xdir}$objdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1008 $show "$mkdir ${xdir}$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1009 $run $mkdir ${xdir}$objdir
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1010 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1011 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1012 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1013 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1014 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1015
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1016 if test -z "$output_obj"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1017 # Place PIC objects in $objdir
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1018 command="$command -o $lobj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1019 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1020
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1021 $run $rm "$lobj" "$output_obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1022
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1023 $show "$command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1024 if $run eval "$command"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1025 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1026 test -n "$output_obj" && $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1027 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1028 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1029
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1030 if test "$need_locks" = warn &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1031 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1032 $echo "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1033 *** ERROR, $lockfile contains:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1034 `cat $lockfile 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1035
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1036 but it should contain:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1037 $srcfile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1038
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1039 This indicates that another process is trying to use the same
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1040 temporary object file, and libtool could not work around it because
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1041 your compiler does not support \`-c' and \`-o' together. If you
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1042 repeat this compilation, it may succeed, by chance, but you had better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1043 avoid parallel builds (make -j) in this platform, or get a better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1044 compiler."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1045
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1046 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1047 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1048 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1049
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1050 # Just move the object if needed, then go on to compile the next one
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1051 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1052 $show "$mv $output_obj $lobj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1053 if $run $mv $output_obj $lobj; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1054 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1055 error=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1056 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1057 exit $error
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1058 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1059 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1060
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1061 # Append the name of the PIC object to the libtool object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1062 test -z "$run" && cat >> ${libobj}T <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1063 pic_object='$objdir/$objname'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1064
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1065 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1066
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1067 # Allow error messages only from the first compilation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1068 suppress_output=' >/dev/null 2>&1'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1069 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1070 # No PIC object so indicate it doesn't exist in the libtool
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1071 # object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1072 test -z "$run" && cat >> ${libobj}T <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1073 pic_object=none
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1074
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1075 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1076 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1077
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1078 # Only build a position-dependent object if we build old libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1079 if test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1080 if test "$pic_mode" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1081 # Don't build PIC code
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1082 command="$base_compile $srcfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1083 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1084 command="$base_compile $srcfile $pic_flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1085 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1086 if test "$compiler_c_o" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1087 command="$command -o $obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1088 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1089
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1090 # Suppress compiler output if we already did a PIC compilation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1091 command="$command$suppress_output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1092 $run $rm "$obj" "$output_obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1093 $show "$command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1094 if $run eval "$command"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1095 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1096 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1097 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1098 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1099
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1100 if test "$need_locks" = warn &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1101 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1102 $echo "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1103 *** ERROR, $lockfile contains:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1104 `cat $lockfile 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1105
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1106 but it should contain:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1107 $srcfile
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1108
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1109 This indicates that another process is trying to use the same
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1110 temporary object file, and libtool could not work around it because
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1111 your compiler does not support \`-c' and \`-o' together. If you
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1112 repeat this compilation, it may succeed, by chance, but you had better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1113 avoid parallel builds (make -j) in this platform, or get a better
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1114 compiler."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1115
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1116 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1117 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1118 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1119
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1120 # Just move the object if needed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1121 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1122 $show "$mv $output_obj $obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1123 if $run $mv $output_obj $obj; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1124 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1125 error=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1126 $run $rm $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1127 exit $error
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1128 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1129 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1130
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1131 # Append the name of the non-PIC object the libtool object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1132 # Only append if the libtool object file exists.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1133 test -z "$run" && cat >> ${libobj}T <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1134 # Name of the non-PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1135 non_pic_object='$objname'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1136
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1137 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1138 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1139 # Append the name of the non-PIC object the libtool object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1140 # Only append if the libtool object file exists.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1141 test -z "$run" && cat >> ${libobj}T <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1142 # Name of the non-PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1143 non_pic_object=none
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1144
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1145 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1146 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1147
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1148 $run $mv "${libobj}T" "${libobj}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1149
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1150 # Unlock the critical section if it was locked
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1151 if test "$need_locks" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1152 $run $rm "$lockfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1153 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1154
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1155 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1156 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1157
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1158 # libtool link mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1159 link | relink)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1160 modename="$modename: link"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1161 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1162 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1163 # It is impossible to link a dll without this setting, and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1164 # we shouldn't force the makefile maintainer to figure out
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1165 # which system we are compiling for in order to pass an extra
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1166 # flag for every libtool invocation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1167 # allow_undefined=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1168
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1169 # FIXME: Unfortunately, there are problems with the above when trying
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1170 # to make a dll which has undefined symbols, in which case not
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1171 # even a static library is built. For now, we need to specify
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1172 # -no-undefined on the libtool link line when we can be certain
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1173 # that all symbols are satisfied, otherwise we get a static library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1174 allow_undefined=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1175 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1176 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1177 allow_undefined=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1178 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1179 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1180 libtool_args="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1181 base_compile="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1182 compile_command="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1183 finalize_command="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1184
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1185 compile_rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1186 finalize_rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1187 compile_shlibpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1188 finalize_shlibpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1189 convenience=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1190 old_convenience=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1191 deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1192 old_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1193 add_flags=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1194 compiler_flags=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1195 linker_flags=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1196 dllsearchpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1197 lib_search_path=`pwd`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1198 inst_prefix_dir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1199
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1200 avoid_version=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1201 dlfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1202 dlprefiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1203 dlself=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1204 export_dynamic=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1205 export_symbols=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1206 export_symbols_regex=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1207 generated=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1208 libobjs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1209 ltlibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1210 module=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1211 no_install=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1212 objs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1213 non_pic_objects=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1214 prefer_static_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1215 preload=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1216 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1217 prevarg=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1218 release=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1219 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1220 xrpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1221 perm_rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1222 temp_rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1223 thread_safe=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1224 vinfo=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1225 vinfo_number=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1226
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1227 # We need to know -static, to get the right output filenames.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1228 for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1229 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1230 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1231 -all-static | -static)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1232 if test "X$arg" = "X-all-static"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1233 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1234 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1235 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1236 if test -n "$link_static_flag"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1237 dlopen_self=$dlopen_self_static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1238 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1239 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1240 if test -z "$pic_flag" && test -n "$link_static_flag"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1241 dlopen_self=$dlopen_self_static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1242 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1243 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1244 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1245 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1246 prefer_static_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1247 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1248 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1249 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1250 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1251
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1252 # See if our shared archives depend on static archives.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1253 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1254
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1255 # Go through the arguments, transforming them on the way.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1256 while test "$#" -gt 0; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1257 arg="$1"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1258 base_compile="$base_compile $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1259 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1260 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1261 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1262 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1263 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1264 *) qarg=$arg ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1265 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1266 libtool_args="$libtool_args $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1267
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1268 # If the previous option needs an argument, assign it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1269 if test -n "$prev"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1270 case $prev in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1271 output)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1272 compile_command="$compile_command @OUTPUT@"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1273 finalize_command="$finalize_command @OUTPUT@"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1274 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1275 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1276
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1277 case $prev in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1278 dlfiles|dlprefiles)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1279 if test "$preload" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1280 # Add the symbol object into the linking commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1281 compile_command="$compile_command @SYMFILE@"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1282 finalize_command="$finalize_command @SYMFILE@"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1283 preload=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1284 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1285 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1286 *.la | *.lo) ;; # We handle these cases below.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1287 force)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1288 if test "$dlself" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1289 dlself=needless
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1290 export_dynamic=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1291 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1292 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1293 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1294 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1295 self)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1296 if test "$prev" = dlprefiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1297 dlself=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1298 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1299 dlself=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1300 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1301 dlself=needless
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1302 export_dynamic=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1303 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1304 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1305 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1306 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1307 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1308 if test "$prev" = dlfiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1309 dlfiles="$dlfiles $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1310 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1311 dlprefiles="$dlprefiles $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1312 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1313 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1314 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1315 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1316 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1317 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1318 expsyms)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1319 export_symbols="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1320 if test ! -f "$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1321 $echo "$modename: symbol file \`$arg' does not exist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1322 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1323 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1324 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1325 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1326 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1327 expsyms_regex)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1328 export_symbols_regex="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1329 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1330 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1331 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1332 inst_prefix)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1333 inst_prefix_dir="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1334 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1335 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1336 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1337 release)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1338 release="-$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1339 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1340 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1341 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1342 objectlist)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1343 if test -f "$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1344 save_arg=$arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1345 moreargs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1346 for fil in `cat $save_arg`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1347 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1348 # moreargs="$moreargs $fil"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1349 arg=$fil
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1350 # A libtool-controlled object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1351
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1352 # Check to see that this really is a libtool object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1353 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1354 pic_object=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1355 non_pic_object=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1356
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1357 # Read the .lo file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1358 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1359 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1360 */* | *\\*) . $arg ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1361 *) . ./$arg ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1362 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1363
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1364 if test -z "$pic_object" || \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1365 test -z "$non_pic_object" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1366 test "$pic_object" = none && \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1367 test "$non_pic_object" = none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1368 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1369 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1370 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1371
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1372 # Extract subdirectory from the argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1373 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1374 if test "X$xdir" = "X$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1375 xdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1376 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1377 xdir="$xdir/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1378 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1379
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1380 if test "$pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1381 # Prepend the subdirectory the object is found in.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1382 pic_object="$xdir$pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1383
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1384 if test "$prev" = dlfiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1385 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1386 dlfiles="$dlfiles $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1387 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1388 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1389 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1390 # If libtool objects are unsupported, then we need to preload.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1391 prev=dlprefiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1392 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1393 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1394
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1395 # CHECK ME: I think I busted this. -Ossama
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1396 if test "$prev" = dlprefiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1397 # Preload the old-style object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1398 dlprefiles="$dlprefiles $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1399 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1400 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1401
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1402 # A PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1403 libobjs="$libobjs $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1404 arg="$pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1405 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1406
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1407 # Non-PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1408 if test "$non_pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1409 # Prepend the subdirectory the object is found in.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1410 non_pic_object="$xdir$non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1411
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1412 # A standard non-PIC object
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1413 non_pic_objects="$non_pic_objects $non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1414 if test -z "$pic_object" || test "$pic_object" = none ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1415 arg="$non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1416 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1417 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1418 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1419 # Only an error if not doing a dry-run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1420 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1421 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1422 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1423 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1424 # Dry-run case.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1425
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1426 # Extract subdirectory from the argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1427 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1428 if test "X$xdir" = "X$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1429 xdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1430 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1431 xdir="$xdir/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1432 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1433
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1434 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1435 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1436 libobjs="$libobjs $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1437 non_pic_objects="$non_pic_objects $non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1438 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1439 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1440 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1441 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1442 $echo "$modename: link input file \`$save_arg' does not exist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1443 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1444 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1445 arg=$save_arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1446 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1447 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1448 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1449 rpath | xrpath)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1450 # We need an absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1451 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1452 [\\/]* | [A-Za-z]:[\\/]*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1453 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1454 $echo "$modename: only absolute run-paths are allowed" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1455 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1456 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1457 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1458 if test "$prev" = rpath; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1459 case "$rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1460 *" $arg "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1461 *) rpath="$rpath $arg" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1462 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1463 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1464 case "$xrpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1465 *" $arg "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1466 *) xrpath="$xrpath $arg" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1467 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1468 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1469 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1470 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1471 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1472 xcompiler)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1473 compiler_flags="$compiler_flags $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1474 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1475 compile_command="$compile_command $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1476 finalize_command="$finalize_command $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1477 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1478 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1479 xlinker)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1480 linker_flags="$linker_flags $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1481 compiler_flags="$compiler_flags $wl$qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1482 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1483 compile_command="$compile_command $wl$qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1484 finalize_command="$finalize_command $wl$qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1485 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1486 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1487 xcclinker)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1488 linker_flags="$linker_flags $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1489 compiler_flags="$compiler_flags $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1490 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1491 compile_command="$compile_command $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1492 finalize_command="$finalize_command $qarg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1493 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1494 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1495 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1496 eval "$prev=\"\$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1497 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1498 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1499 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1500 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1501 fi # test -n "$prev"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1502
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1503 prevarg="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1504
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1505 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1506 -all-static)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1507 if test -n "$link_static_flag"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1508 compile_command="$compile_command $link_static_flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1509 finalize_command="$finalize_command $link_static_flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1510 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1511 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1512 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1513
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1514 -allow-undefined)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1515 # FIXME: remove this flag sometime in the future.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1516 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1517 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1518 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1519
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1520 -avoid-version)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1521 avoid_version=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1522 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1523 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1524
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1525 -dlopen)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1526 prev=dlfiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1527 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1528 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1529
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1530 -dlpreopen)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1531 prev=dlprefiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1532 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1533 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1534
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1535 -export-dynamic)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1536 export_dynamic=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1537 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1538 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1539
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1540 -export-symbols | -export-symbols-regex)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1541 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1542 $echo "$modename: more than one -exported-symbols argument is not allowed"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1543 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1544 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1545 if test "X$arg" = "X-export-symbols"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1546 prev=expsyms
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1547 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1548 prev=expsyms_regex
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1549 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1550 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1551 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1552
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1553 -inst-prefix-dir)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1554 prev=inst_prefix
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1555 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1556 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1557
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1558 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1559 # so, if we see these flags be careful not to treat them like -L
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1560 -L[A-Z][A-Z]*:*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1561 case $with_gcc/$host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1562 no/*-*-irix* | /*-*-irix*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1563 compile_command="$compile_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1564 finalize_command="$finalize_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1565 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1566 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1567 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1568 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1569
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1570 -L*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1571 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1572 # We need an absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1573 case $dir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1574 [\\/]* | [A-Za-z]:[\\/]*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1575 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1576 absdir=`cd "$dir" && pwd`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1577 if test -z "$absdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1578 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1579 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1580 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1581 dir="$absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1582 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1583 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1584 case "$deplibs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1585 *" -L$dir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1586 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1587 deplibs="$deplibs -L$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1588 lib_search_path="$lib_search_path $dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1589 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1590 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1591 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1592 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1593 case :$dllsearchpath: in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1594 *":$dir:"*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1595 *) dllsearchpath="$dllsearchpath:$dir";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1596 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1597 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1598 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1599 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1600 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1601
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1602 -l*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1603 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1604 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1605 *-*-cygwin* | *-*-pw32* | *-*-beos*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1606 # These systems don't actually have a C or math library (as such)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1607 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1608 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1609 *-*-freebsd*-gnu*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1610 # prevent being parsed by the freebsd regexp below
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1611 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1612 *-*-mingw* | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1613 # These systems don't actually have a C library (as such)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1614 test "X$arg" = "X-lc" && continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1615 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1616 *-*-openbsd* | *-*-freebsd*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1617 # Do not include libc due to us having libc/libc_r.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1618 test "X$arg" = "X-lc" && continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1619 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1620 *-*-rhapsody* | *-*-darwin1.[012])
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1621 # Rhapsody C and math libraries are in the System framework
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1622 deplibs="$deplibs -framework System"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1623 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1624 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1625 elif test "X$arg" = "X-lc_r"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1626 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1627 *-*-freebsd*-gnu*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1628 # prevent being parsed by the freebsd regexp below
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1629 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1630 *-*-openbsd*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1631 # Do not include libc_r directly, use -pthread flag.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1632 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1633 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1634 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1635 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1636 deplibs="$deplibs $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1637 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1638 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1639
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1640 -module)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1641 module=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1642 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1643 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1644
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1645 # gcc -m* arguments should be passed to the linker via $compiler_flags
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1646 # in order to pass architecture information to the linker
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1647 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1648 # but this is not reliable with gcc because gcc may use -mfoo to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1649 # select a different linker, different libraries, etc, while
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1650 # -Wl,-mfoo simply passes -mfoo to the linker.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1651 -m*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1652 # Unknown arguments in both finalize_command and compile_command need
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1653 # to be aesthetically quoted because they are evaled later.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1654 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1655 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1656 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1657 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1658 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1659 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1660 compile_command="$compile_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1661 finalize_command="$finalize_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1662 if test "$with_gcc" = "yes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1663 compiler_flags="$compiler_flags $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1664 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1665 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1666 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1667
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1668 -shrext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1669 prev=shrext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1670 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1671 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1672
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1673 -no-fast-install)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1674 fast_install=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1675 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1676 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1677
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1678 -no-install)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1679 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1680 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1681 # The PATH hackery in wrapper scripts is required on Windows
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1682 # in order for the loader to find any dlls it needs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1683 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1684 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1685 fast_install=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1686 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1687 *) no_install=yes ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1688 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1689 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1690 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1691
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1692 -no-undefined)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1693 allow_undefined=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1694 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1695 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1696
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1697 -objectlist)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1698 prev=objectlist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1699 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1700 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1701
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1702 -o) prev=output ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1703
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1704 -release)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1705 prev=release
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1706 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1707 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1708
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1709 -rpath)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1710 prev=rpath
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1711 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1712 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1713
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1714 -R)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1715 prev=xrpath
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1716 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1717 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1718
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1719 -R*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1720 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1721 # We need an absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1722 case $dir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1723 [\\/]* | [A-Za-z]:[\\/]*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1724 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1725 $echo "$modename: only absolute run-paths are allowed" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1726 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1727 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1728 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1729 case "$xrpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1730 *" $dir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1731 *) xrpath="$xrpath $dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1732 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1733 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1734 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1735
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1736 -static)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1737 # The effects of -static are defined in a previous loop.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1738 # We used to do the same as -all-static on platforms that
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1739 # didn't have a PIC flag, but the assumption that the effects
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1740 # would be equivalent was wrong. It would break on at least
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1741 # Digital Unix and AIX.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1742 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1743 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1744
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1745 -thread-safe)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1746 thread_safe=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1747 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1748 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1749
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1750 -version-info)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1751 prev=vinfo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1752 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1753 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1754 -version-number)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1755 prev=vinfo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1756 vinfo_number=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1757 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1758 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1759
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1760 -Wc,*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1761 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1762 arg=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1763 save_ifs="$IFS"; IFS=','
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1764 for flag in $args; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1765 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1766 case $flag in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1767 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1768 flag="\"$flag\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1769 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1770 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1771 arg="$arg $wl$flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1772 compiler_flags="$compiler_flags $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1773 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1774 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1775 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1776 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1777
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1778 -Wl,*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1779 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1780 arg=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1781 save_ifs="$IFS"; IFS=','
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1782 for flag in $args; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1783 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1784 case $flag in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1785 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1786 flag="\"$flag\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1787 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1788 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1789 arg="$arg $wl$flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1790 compiler_flags="$compiler_flags $wl$flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1791 linker_flags="$linker_flags $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1792 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1793 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1794 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1795 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1796
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1797 -Xcompiler)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1798 prev=xcompiler
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1799 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1800 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1801
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1802 -Xlinker)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1803 prev=xlinker
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1804 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1805 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1806
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1807 -XCClinker)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1808 prev=xcclinker
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1809 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1810 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1811
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1812 # Some other compiler flag.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1813 -* | +*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1814 # Unknown arguments in both finalize_command and compile_command need
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1815 # to be aesthetically quoted because they are evaled later.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1816 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1817 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1818 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1819 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1820 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1821 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1822 add_flags="$add_flags $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1823 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1824
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1825 *.$objext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1826 # A standard object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1827 objs="$objs $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1828 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1829
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1830 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1831 # A libtool-controlled object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1832
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1833 # Check to see that this really is a libtool object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1834 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1835 pic_object=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1836 non_pic_object=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1837
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1838 # Read the .lo file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1839 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1840 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1841 */* | *\\*) . $arg ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1842 *) . ./$arg ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1843 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1844
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1845 if test -z "$pic_object" || \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1846 test -z "$non_pic_object" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1847 test "$pic_object" = none && \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1848 test "$non_pic_object" = none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1849 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1850 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1851 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1852
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1853 # Extract subdirectory from the argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1854 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1855 if test "X$xdir" = "X$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1856 xdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1857 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1858 xdir="$xdir/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1859 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1860
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1861 if test "$pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1862 # Prepend the subdirectory the object is found in.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1863 pic_object="$xdir$pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1864
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1865 if test "$prev" = dlfiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1866 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1867 dlfiles="$dlfiles $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1868 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1869 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1870 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1871 # If libtool objects are unsupported, then we need to preload.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1872 prev=dlprefiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1873 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1874 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1875
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1876 # CHECK ME: I think I busted this. -Ossama
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1877 if test "$prev" = dlprefiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1878 # Preload the old-style object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1879 dlprefiles="$dlprefiles $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1880 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1881 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1882
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1883 # A PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1884 libobjs="$libobjs $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1885 arg="$pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1886 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1887
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1888 # Non-PIC object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1889 if test "$non_pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1890 # Prepend the subdirectory the object is found in.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1891 non_pic_object="$xdir$non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1892
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1893 # A standard non-PIC object
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1894 non_pic_objects="$non_pic_objects $non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1895 if test -z "$pic_object" || test "$pic_object" = none ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1896 arg="$non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1897 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1898 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1899 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1900 # Only an error if not doing a dry-run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1901 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1902 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1903 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1904 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1905 # Dry-run case.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1906
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1907 # Extract subdirectory from the argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1908 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1909 if test "X$xdir" = "X$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1910 xdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1911 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1912 xdir="$xdir/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1913 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1914
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1915 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1916 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1917 libobjs="$libobjs $pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1918 non_pic_objects="$non_pic_objects $non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1919 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1920 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1921 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1922
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1923 *.$libext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1924 # An archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1925 deplibs="$deplibs $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1926 old_deplibs="$old_deplibs $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1927 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1928 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1929
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1930 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1931 # A libtool-controlled library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1932
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1933 if test "$prev" = dlfiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1934 # This library was specified with -dlopen.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1935 dlfiles="$dlfiles $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1936 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1937 elif test "$prev" = dlprefiles; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1938 # The library was specified with -dlpreopen.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1939 dlprefiles="$dlprefiles $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1940 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1941 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1942 deplibs="$deplibs $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1943 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1944 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1945 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1946
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1947 # Some other compiler argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1948 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1949 # Unknown arguments in both finalize_command and compile_command need
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1950 # to be aesthetically quoted because they are evaled later.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1951 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1952 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1953 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1954 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1955 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1956 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1957 add_flags="$add_flags $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1958 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1959 esac # arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1960
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1961 # Now actually substitute the argument into the commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1962 if test -n "$arg"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1963 compile_command="$compile_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1964 finalize_command="$finalize_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1965 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1966 done # argument parsing loop
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1967
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1968 if test -n "$prev"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1969 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1970 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1971 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1972 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1973
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1974 # Infer tagged configuration to use if any are available and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1975 # if one wasn't chosen via the "--tag" command line option.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1976 # Only attempt this if the compiler in the base link
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1977 # command doesn't match the default compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1978 if test -n "$available_tags" && test -z "$tagname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1979 case $base_compile in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1980 # Blanks in the command may have been stripped by the calling shell,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1981 # but not from the CC environment variable when configure was run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1982 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1983 # Blanks at the start of $base_compile will cause this to fail
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1984 # if we don't check for them as well.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1985 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1986 for z in $available_tags; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1987 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1988 # Evaluate the configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1989 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1990 case $base_compile in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1991 "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1992 # The compiler in $compile_command matches
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1993 # the one in the tagged configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1994 # Assume this is the tagged configuration we want.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1995 tagname=$z
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1996 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1997 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1998 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
1999 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2000 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2001 # If $tagname still isn't set, then no tagged configuration
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2002 # was found and let the user know that the "--tag" command
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2003 # line option must be used.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2004 if test -z "$tagname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2005 $echo "$modename: unable to infer tagged configuration"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2006 $echo "$modename: specify a tag with \`--tag'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2007 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2008 # else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2009 # $echo "$modename: using $tagname tagged configuration"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2010 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2011 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2012 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2013 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2014
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2015 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2016 eval arg=\"$export_dynamic_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2017 compile_command="$compile_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2018 finalize_command="$finalize_command $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2019 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2020
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2021 oldlibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2022 # calculate the name of the file, without its directory
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2023 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2024 libobjs_save="$libobjs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2025
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2026 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2027 # get the directories listed in $shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2028 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2029 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2030 shlib_search_path=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2031 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2032 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2033 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2034
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2035 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2036 if test "X$output_objdir" = "X$output"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2037 output_objdir="$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2038 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2039 output_objdir="$output_objdir/$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2040 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2041 # Create the object directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2042 if test ! -d "$output_objdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2043 $show "$mkdir $output_objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2044 $run $mkdir $output_objdir
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2045 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2046 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2047 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2048 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2049 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2050
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2051 # Determine the type of output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2052 case $output in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2053 "")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2054 $echo "$modename: you must specify an output file" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2055 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2056 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2057 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2058 *.$libext) linkmode=oldlib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2059 *.lo | *.$objext) linkmode=obj ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2060 *.la) linkmode=lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2061 *) linkmode=prog ;; # Anything else should be a program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2062 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2063
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2064 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2065 *cygwin* | *mingw* | *pw32*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2066 # don't eliminate duplcations in $postdeps and $predeps
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2067 duplicate_compiler_generated_deps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2068 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2069 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2070 duplicate_compiler_generated_deps=$duplicate_deps
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2071 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2072 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2073 specialdeplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2074
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2075 libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2076 # Find all interdependent deplibs by searching for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2077 # that are linked more than once (e.g. -la -lb -la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2078 for deplib in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2079 if test "X$duplicate_deps" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2080 case "$libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2081 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2082 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2083 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2084 libs="$libs $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2085 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2086
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2087 if test "$linkmode" = lib; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2088 libs="$predeps $libs $compiler_lib_search_path $postdeps"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2089
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2090 # Compute libraries that are listed more than once in $predeps
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2091 # $postdeps and mark them as special (i.e., whose duplicates are
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2092 # not to be eliminated).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2093 pre_post_deps=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2094 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2095 for pre_post_dep in $predeps $postdeps; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2096 case "$pre_post_deps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2097 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2098 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2099 pre_post_deps="$pre_post_deps $pre_post_dep"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2100 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2101 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2102 pre_post_deps=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2103 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2104
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2105 deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2106 newdependency_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2107 newlib_search_path=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2108 need_relink=no # whether we're linking any uninstalled libtool libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2109 notinst_deplibs= # not-installed libtool libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2110 notinst_path= # paths that contain not-installed libtool libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2111 case $linkmode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2112 lib)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2113 passes="conv link"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2114 for file in $dlfiles $dlprefiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2115 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2116 *.la) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2117 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2118 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2119 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2120 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2121 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2122 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2123 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2124 prog)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2125 compile_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2126 finalize_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2127 alldeplibs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2128 newdlfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2129 newdlprefiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2130 passes="conv scan dlopen dlpreopen link"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2131 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2132 *) passes="conv"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2133 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2134 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2135 for pass in $passes; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2136 if test "$linkmode,$pass" = "lib,link" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2137 test "$linkmode,$pass" = "prog,scan"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2138 libs="$deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2139 deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2140 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2141 if test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2142 case $pass in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2143 dlopen) libs="$dlfiles" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2144 dlpreopen) libs="$dlprefiles" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2145 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2146 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2147 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2148 if test "$pass" = dlopen; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2149 # Collect dlpreopened libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2150 save_deplibs="$deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2151 deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2152 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2153 for deplib in $libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2154 lib=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2155 found=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2156 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2157 -l*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2158 if test "$linkmode" != lib && test "$linkmode" != prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2159 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2160 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2161 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2162 if test "$pass" = conv && test "$allow_undefined" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2163 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2164 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2165 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2166 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2167 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2168 for search_ext in .la $shrext .so .a; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2169 # Search the libtool library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2170 lib="$searchdir/lib${name}${search_ext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2171 if test -f "$lib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2172 if test "$search_ext" = ".la"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2173 found=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2174 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2175 found=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2176 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2177 break 2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2178 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2179 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2180 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2181 if test "$found" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2182 # deplib doesn't seem to be a libtool library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2183 if test "$linkmode,$pass" = "prog,link"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2184 compile_deplibs="$deplib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2185 finalize_deplibs="$deplib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2186 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2187 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2188 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2189 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2190 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2191 else # deplib is a libtool library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2192 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2193 # We need to do some special things here, and not later.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2194 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2195 case " $predeps $postdeps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2196 *" $deplib "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2197 if (${SED} -e '2q' $lib |
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2198 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2199 library_names=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2200 old_library=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2201 case $lib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2202 */* | *\\*) . $lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2203 *) . ./$lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2204 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2205 for l in $old_library $library_names; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2206 ll="$l"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2207 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2208 if test "X$ll" = "X$old_library" ; then # only static version available
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2209 found=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2210 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2211 test "X$ladir" = "X$lib" && ladir="."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2212 lib=$ladir/$old_library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2213 if test "$linkmode,$pass" = "prog,link"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2214 compile_deplibs="$deplib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2215 finalize_deplibs="$deplib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2216 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2217 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2218 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2219 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2220 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2221 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2222 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2223 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2224 *) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2225 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2226 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2227 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2228 ;; # -l
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2229 -L*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2230 case $linkmode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2231 lib)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2232 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2233 test "$pass" = conv && continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2234 newdependency_libs="$deplib $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2235 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2236 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2237 prog)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2238 if test "$pass" = conv; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2239 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2240 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2241 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2242 if test "$pass" = scan; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2243 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2244 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2245 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2246 compile_deplibs="$deplib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2247 finalize_deplibs="$deplib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2248 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2249 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2250 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2251 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2252 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2253 esac # linkmode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2254 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2255 ;; # -L
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2256 -R*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2257 if test "$pass" = link; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2258 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2259 # Make sure the xrpath contains only unique directories.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2260 case "$xrpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2261 *" $dir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2262 *) xrpath="$xrpath $dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2263 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2264 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2265 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2266 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2267 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2268 *.la) lib="$deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2269 *.$libext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2270 if test "$pass" = conv; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2271 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2272 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2273 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2274 case $linkmode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2275 lib)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2276 if test "$deplibs_check_method" != pass_all; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2277 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2278 $echo "*** Warning: Trying to link with static lib archive $deplib."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2279 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2280 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2281 $echo "*** shared version of the library, which you do not appear to have"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2282 $echo "*** because the file extensions .$libext of this argument makes me believe"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2283 $echo "*** that it is just a static archive that I should not used here."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2284 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2285 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2286 $echo "*** Warning: Linking the shared library $output against the"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2287 $echo "*** static library $deplib is not portable!"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2288 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2289 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2290 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2291 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2292 prog)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2293 if test "$pass" != link; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2294 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2295 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2296 compile_deplibs="$deplib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2297 finalize_deplibs="$deplib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2298 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2299 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2300 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2301 esac # linkmode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2302 ;; # *.$libext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2303 *.lo | *.$objext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2304 if test "$pass" = conv; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2305 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2306 elif test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2307 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2308 # If there is no dlopen support or we're linking statically,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2309 # we need to preload.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2310 newdlprefiles="$newdlprefiles $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2311 compile_deplibs="$deplib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2312 finalize_deplibs="$deplib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2313 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2314 newdlfiles="$newdlfiles $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2315 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2316 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2317 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2318 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2319 %DEPLIBS%)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2320 alldeplibs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2321 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2322 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2323 esac # case $deplib
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2324 if test "$found" = yes || test -f "$lib"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2325 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2326 $echo "$modename: cannot find the library \`$lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2327 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2328 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2329
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2330 # Check to see that this really is a libtool archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2331 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2332 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2333 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2334 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2335 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2336
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2337 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2338 test "X$ladir" = "X$lib" && ladir="."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2339
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2340 dlname=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2341 dlopen=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2342 dlpreopen=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2343 libdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2344 library_names=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2345 old_library=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2346 # If the library was installed with an old release of libtool,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2347 # it will not redefine variables installed, or shouldnotlink
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2348 installed=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2349 shouldnotlink=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2350
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2351 # Read the .la file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2352 case $lib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2353 */* | *\\*) . $lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2354 *) . ./$lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2355 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2356
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2357 if test "$linkmode,$pass" = "lib,link" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2358 test "$linkmode,$pass" = "prog,scan" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2359 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2360 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2361 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2362 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2363
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2364 if test "$pass" = conv; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2365 # Only check for convenience libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2366 deplibs="$lib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2367 tmp_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2368 for deplib in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2369 #echo "Adding $deplib to \$deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2370 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2371 if test "X$duplicate_deps" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2372 case "$tmp_libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2373 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2374 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2375 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2376 tmp_libs="$tmp_libs $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2377 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2378 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2379 if test -z "$old_library"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2380 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2381 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2382 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2383 # It is a libtool convenience library, so add in its objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2384 convenience="$convenience $ladir/$objdir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2385 old_convenience="$old_convenience $ladir/$objdir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2386 elif test "$linkmode" != prog && test "$linkmode" != lib; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2387 $echo "$modename: \`$lib' is not a convenience library" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2388 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2389 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2390 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2391 fi # $pass = conv
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2392
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2393
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2394 # Get the name of the library we link against.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2395 linklib=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2396 for l in $old_library $library_names; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2397 linklib="$l"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2398 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2399 if test -z "$linklib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2400 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2401 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2402 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2403
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2404 # This library was specified with -dlopen.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2405 if test "$pass" = dlopen; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2406 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2407 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2408 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2409 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2410 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2411 # If there is no dlname, no dlopen support or we're linking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2412 # statically, we need to preload. We also need to preload any
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2413 # dependent libraries so libltdl's deplib preloader doesn't
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2414 # bomb out in the load deplibs phase.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2415 dlprefiles="$dlprefiles $lib $dependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2416 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2417 newdlfiles="$newdlfiles $lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2418 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2419 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2420 fi # $pass = dlopen
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2421
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2422 # We need an absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2423 case $ladir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2424 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2425 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2426 abs_ladir=`cd "$ladir" && pwd`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2427 if test -z "$abs_ladir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2428 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2429 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2430 abs_ladir="$ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2431 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2432 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2433 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2434 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2435
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2436 # Find the relevant object directory and library name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2437 if test "X$installed" = Xyes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2438 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2439 $echo "$modename: warning: library \`$lib' was moved." 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2440 dir="$ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2441 absdir="$abs_ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2442 libdir="$abs_ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2443 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2444 dir="$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2445 absdir="$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2446 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2447 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2448 dir="$ladir/$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2449 absdir="$abs_ladir/$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2450 # Remove this search path later
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2451 notinst_path="$notinst_path $abs_ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2452 fi # $installed = yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2453 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2454
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2455 # This library was specified with -dlpreopen.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2456 if test "$pass" = dlpreopen; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2457 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2458 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2459 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2460 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2461 # Prefer using a static library (so that no silly _DYNAMIC symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2462 # are required to link).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2463 if test -n "$old_library"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2464 newdlprefiles="$newdlprefiles $dir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2465 # Otherwise, use the dlname, so that lt_dlopen finds it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2466 elif test -n "$dlname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2467 newdlprefiles="$newdlprefiles $dir/$dlname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2468 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2469 newdlprefiles="$newdlprefiles $dir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2470 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2471 fi # $pass = dlpreopen
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2472
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2473 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2474 # Link the convenience library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2475 if test "$linkmode" = lib; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2476 deplibs="$dir/$old_library $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2477 elif test "$linkmode,$pass" = "prog,link"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2478 compile_deplibs="$dir/$old_library $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2479 finalize_deplibs="$dir/$old_library $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2480 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2481 deplibs="$lib $deplibs" # used for prog,scan pass
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2482 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2483 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2484 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2485
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2486
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2487 if test "$linkmode" = prog && test "$pass" != link; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2488 newlib_search_path="$newlib_search_path $ladir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2489 deplibs="$lib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2490
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2491 linkalldeplibs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2492 if test "$link_all_deplibs" != no || test -z "$library_names" ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2493 test "$build_libtool_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2494 linkalldeplibs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2495 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2496
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2497 tmp_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2498 for deplib in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2499 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2500 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2501 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2502 # Need to link against all dependency_libs?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2503 if test "$linkalldeplibs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2504 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2505 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2506 # Need to hardcode shared library paths
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2507 # or/and link against static libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2508 newdependency_libs="$deplib $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2509 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2510 if test "X$duplicate_deps" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2511 case "$tmp_libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2512 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2513 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2514 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2515 tmp_libs="$tmp_libs $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2516 done # for deplib
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2517 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2518 fi # $linkmode = prog...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2519
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2520 if test "$linkmode,$pass" = "prog,link"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2521 if test -n "$library_names" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2522 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2523 # We need to hardcode the library path
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2524 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2525 # Make sure the rpath contains only unique directories.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2526 case "$temp_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2527 *" $dir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2528 *" $absdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2529 *) temp_rpath="$temp_rpath $dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2530 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2531 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2532
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2533 # Hardcode the library path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2534 # Skip directories that are in the system default run-time
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2535 # search path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2536 case " $sys_lib_dlsearch_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2537 *" $absdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2538 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2539 case "$compile_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2540 *" $absdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2541 *) compile_rpath="$compile_rpath $absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2542 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2543 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2544 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2545 case " $sys_lib_dlsearch_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2546 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2547 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2548 case "$finalize_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2549 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2550 *) finalize_rpath="$finalize_rpath $libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2551 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2552 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2553 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2554 fi # $linkmode,$pass = prog,link...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2555
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2556 if test "$alldeplibs" = yes &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2557 { test "$deplibs_check_method" = pass_all ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2558 { test "$build_libtool_libs" = yes &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2559 test -n "$library_names"; }; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2560 # We only need to search for static libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2561 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2562 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2563 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2564
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2565 link_static=no # Whether the deplib will be linked statically
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2566 if test -n "$library_names" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2567 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2568 if test "$installed" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2569 notinst_deplibs="$notinst_deplibs $lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2570 need_relink=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2571 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2572 # This is a shared library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2573
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2574 # Warn about portability, can't link against -module's on some systems (darwin)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2575 if test "$shouldnotlink" = yes && test "$pass" = link ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2576 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2577 if test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2578 $echo "*** Warning: Linking the executable $output against the loadable module"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2579 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2580 $echo "*** Warning: Linking the shared library $output against the loadable module"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2581 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2582 $echo "*** $linklib is not portable!"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2583 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2584 if test "$linkmode" = lib &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2585 test "$hardcode_into_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2586 # Hardcode the library path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2587 # Skip directories that are in the system default run-time
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2588 # search path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2589 case " $sys_lib_dlsearch_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2590 *" $absdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2591 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2592 case "$compile_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2593 *" $absdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2594 *) compile_rpath="$compile_rpath $absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2595 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2596 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2597 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2598 case " $sys_lib_dlsearch_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2599 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2600 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2601 case "$finalize_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2602 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2603 *) finalize_rpath="$finalize_rpath $libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2604 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2605 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2606 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2607 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2608
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2609 if test -n "$old_archive_from_expsyms_cmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2610 # figure out the soname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2611 set dummy $library_names
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2612 realname="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2613 shift; shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2614 libname=`eval \\$echo \"$libname_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2615 # use dlname if we got it. it's perfectly good, no?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2616 if test -n "$dlname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2617 soname="$dlname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2618 elif test -n "$soname_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2619 # bleh windows
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2620 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2621 *cygwin* | mingw*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2622 major=`expr $current - $age`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2623 versuffix="-$major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2624 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2625 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2626 eval soname=\"$soname_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2627 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2628 soname="$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2629 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2630
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2631 # Make a new name for the extract_expsyms_cmds to use
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2632 soroot="$soname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2633 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2634 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2635
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2636 # If the library has no export list, then create one now
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2637 if test -f "$output_objdir/$soname-def"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2638 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2639 $show "extracting exported symbol list from \`$soname'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2640 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2641 eval cmds=\"$extract_expsyms_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2642 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2643 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2644 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2645 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2646 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2647 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2648 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2649
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2650 # Create $newlib
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2651 if test -f "$output_objdir/$newlib"; then :; else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2652 $show "generating import library for \`$soname'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2653 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2654 eval cmds=\"$old_archive_from_expsyms_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2655 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2656 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2657 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2658 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2659 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2660 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2661 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2662 # make sure the library variables are pointing to the new library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2663 dir=$output_objdir
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2664 linklib=$newlib
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2665 fi # test -n "$old_archive_from_expsyms_cmds"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2666
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2667 if test "$linkmode" = prog || test "$mode" != relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2668 add_shlibpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2669 add_dir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2670 add=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2671 lib_linked=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2672 case $hardcode_action in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2673 immediate | unsupported)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2674 if test "$hardcode_direct" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2675 add="$dir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2676 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2677 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2678 *-*-darwin* )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2679 # if the lib is a module then we can not link against it, someone
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2680 # is ignoring the new warnings I added
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2681 if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2682 $echo "** Warning, lib $linklib is a module, not a shared library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2683 if test -z "$old_library" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2684 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2685 $echo "** And there doesn't seem to be a static archive available"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2686 $echo "** The link will probably fail, sorry"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2687 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2688 add="$dir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2689 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2690 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2691 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2692 elif test "$hardcode_minus_L" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2693 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2694 *-*-sunos*) add_shlibpath="$dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2695 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2696 add_dir="-L$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2697 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2698 elif test "$hardcode_shlibpath_var" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2699 add_shlibpath="$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2700 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2701 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2702 lib_linked=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2703 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2704 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2705 relink)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2706 if test "$hardcode_direct" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2707 add="$dir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2708 elif test "$hardcode_minus_L" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2709 add_dir="-L$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2710 # Try looking first in the location we're being installed to.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2711 if test -n "$inst_prefix_dir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2712 case "$libdir" in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2713 [\\/]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2714 add_dir="-L$inst_prefix_dir$libdir $add_dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2715 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2716 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2717 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2718 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2719 elif test "$hardcode_shlibpath_var" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2720 add_shlibpath="$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2721 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2722 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2723 lib_linked=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2724 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2725 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2726 *) lib_linked=no ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2727 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2728
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2729 if test "$lib_linked" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2730 $echo "$modename: configuration error: unsupported hardcode properties"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2731 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2732 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2733
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2734 if test -n "$add_shlibpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2735 case :$compile_shlibpath: in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2736 *":$add_shlibpath:"*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2737 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2738 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2739 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2740 if test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2741 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2742 test -n "$add" && compile_deplibs="$add $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2743 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2744 test -n "$add_dir" && deplibs="$add_dir $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2745 test -n "$add" && deplibs="$add $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2746 if test "$hardcode_direct" != yes && \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2747 test "$hardcode_minus_L" != yes && \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2748 test "$hardcode_shlibpath_var" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2749 case :$finalize_shlibpath: in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2750 *":$libdir:"*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2751 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2752 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2753 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2754 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2755 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2756
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2757 if test "$linkmode" = prog || test "$mode" = relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2758 add_shlibpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2759 add_dir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2760 add=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2761 # Finalize command for both is simple: just hardcode it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2762 if test "$hardcode_direct" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2763 add="$libdir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2764 elif test "$hardcode_minus_L" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2765 add_dir="-L$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2766 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2767 elif test "$hardcode_shlibpath_var" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2768 case :$finalize_shlibpath: in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2769 *":$libdir:"*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2770 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2771 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2772 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2773 elif test "$hardcode_automatic" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2774 if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2775 add="$inst_prefix_dir$libdir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2776 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2777 add="$libdir/$linklib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2778 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2779 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2780 # We cannot seem to hardcode it, guess we'll fake it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2781 add_dir="-L$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2782 # Try looking first in the location we're being installed to.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2783 if test -n "$inst_prefix_dir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2784 case "$libdir" in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2785 [\\/]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2786 add_dir="-L$inst_prefix_dir$libdir $add_dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2787 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2788 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2789 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2790 add="-l$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2791 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2792
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2793 if test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2794 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2795 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2796 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2797 test -n "$add_dir" && deplibs="$add_dir $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2798 test -n "$add" && deplibs="$add $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2799 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2800 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2801 elif test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2802 # Here we assume that one of hardcode_direct or hardcode_minus_L
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2803 # is not unsupported. This is valid on all known static and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2804 # shared platforms.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2805 if test "$hardcode_direct" != unsupported; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2806 test -n "$old_library" && linklib="$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2807 compile_deplibs="$dir/$linklib $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2808 finalize_deplibs="$dir/$linklib $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2809 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2810 compile_deplibs="-l$name -L$dir $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2811 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2812 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2813 elif test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2814 # Not a shared library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2815 if test "$deplibs_check_method" != pass_all; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2816 # We're trying link a shared library against a static one
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2817 # but the system doesn't support it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2818
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2819 # Just print a warning and add the library to dependency_libs so
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2820 # that the program can be linked against the static library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2821 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2822 $echo "*** Warning: This system can not link to static lib archive $lib."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2823 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2824 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2825 $echo "*** shared version of the library, which you do not appear to have."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2826 if test "$module" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2827 $echo "*** But as you try to build a module library, libtool will still create "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2828 $echo "*** a static module, that should work as long as the dlopening application"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2829 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2830 if test -z "$global_symbol_pipe"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2831 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2832 $echo "*** However, this would only work if libtool was able to extract symbol"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2833 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2834 $echo "*** not find such a program. So, this module is probably useless."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2835 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2836 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2837 if test "$build_old_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2838 build_libtool_libs=module
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2839 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2840 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2841 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2842 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2843 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2844 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2845 convenience="$convenience $dir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2846 old_convenience="$old_convenience $dir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2847 deplibs="$dir/$old_library $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2848 link_static=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2849 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2850 fi # link shared/static library?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2851
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2852 if test "$linkmode" = lib; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2853 #if test -n "$dependency_libs" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2854 # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2855 # test "$link_static" = yes; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2856 # Extract -R from dependency_libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2857 temp_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2858 for libdir in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2859 case $libdir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2860 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2861 case " $xrpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2862 *" $temp_xrpath "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2863 *) xrpath="$xrpath $temp_xrpath";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2864 esac;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2865 *) temp_deplibs="$temp_deplibs $libdir";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2866 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2867 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2868 dependency_libs="$temp_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2869 #fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2870
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2871 newlib_search_path="$newlib_search_path $absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2872 # Link against this library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2873 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2874 # ... and its dependency_libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2875 tmp_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2876 for deplib in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2877 newdependency_libs="$deplib $newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2878 if test "X$duplicate_deps" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2879 case "$tmp_libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2880 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2881 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2882 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2883 tmp_libs="$tmp_libs $deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2884 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2885
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2886 if test "$link_all_deplibs" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2887 # Add the search paths of all dependency libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2888 for deplib in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2889 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2890 -L*) path="$deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2891 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2892 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2893 test "X$dir" = "X$deplib" && dir="."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2894 # We need an absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2895 case $dir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2896 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2897 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2898 absdir=`cd "$dir" && pwd`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2899 if test -z "$absdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2900 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2901 absdir="$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2902 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2903 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2904 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2905 if grep "^installed=no" $deplib > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2906 path="$absdir/$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2907 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2908 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2909 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2910 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2911 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2912 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2913 if test "$absdir" != "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2914 # Sure, some shells/systems don't implement the -ef.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2915 # Those will have to live with the warning.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2916 test "$absdir" -ef "$libdir" > /dev/null 2>&1 ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2917 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2918 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2919 path="$absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2920 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2921 depdepl=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2922 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2923 *-*-darwin*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2924 # we do not want to link against static libs, but need to link against shared
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2925 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2926 if test -n "$deplibrary_names" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2927 for tmp in $deplibrary_names ; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2928 depdepl=$tmp
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2929 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2930 if test -f "$path/$depdepl" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2931 depdepl="$path/$depdepl"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2932 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2933 # do not add paths which are already there
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2934 case " $newlib_search_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2935 *" $path "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2936 *) newlib_search_path="$newlib_search_path $path";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2937 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2938 path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2939 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2940 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2941 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2942 path="-L$path"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2943 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2944 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2945
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2946 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2947 -l*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2948 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2949 *-*-darwin*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2950 # Again, we only want to link against shared libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2951 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2952 for tmp in $newlib_search_path ; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2953 if test -f "$tmp/lib$tmp_libs.dylib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2954 eval depdepl="$tmp/lib$tmp_libs.dylib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2955 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2956 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2957 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2958 path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2959 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2960 *) continue ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2961 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2962 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2963 *) continue ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2964 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2965 case " $deplibs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2966 *" $depdepl "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2967 *) deplibs="$deplibs $depdepl" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2968 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2969 case " $deplibs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2970 *" $path "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2971 *) deplibs="$deplibs $path" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2972 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2973 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2974 fi # link_all_deplibs != no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2975 fi # linkmode = lib
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2976 done # for deplib in $libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2977 dependency_libs="$newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2978 if test "$pass" = dlpreopen; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2979 # Link the dlpreopened libraries before other libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2980 for deplib in $save_deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2981 deplibs="$deplib $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2982 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2983 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2984 if test "$pass" != dlopen; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2985 if test "$pass" != conv; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2986 # Make sure lib_search_path contains only unique directories.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2987 lib_search_path=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2988 for dir in $newlib_search_path; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2989 case "$lib_search_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2990 *" $dir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2991 *) lib_search_path="$lib_search_path $dir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2992 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2993 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2994 newlib_search_path=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2995 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2996
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2997 if test "$linkmode,$pass" != "prog,link"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2998 vars="deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
2999 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3000 vars="compile_deplibs finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3001 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3002 for var in $vars dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3003 # Add libraries to $var in reverse order
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3004 eval tmp_libs=\"\$$var\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3005 new_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3006 for deplib in $tmp_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3007 # FIXME: Pedantically, this is the right thing to do, so
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3008 # that some nasty dependency loop isn't accidentally
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3009 # broken:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3010 #new_libs="$deplib $new_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3011 # Pragmatically, this seems to cause very few problems in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3012 # practice:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3013 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3014 -L*) new_libs="$deplib $new_libs" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3015 -R*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3016 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3017 # And here is the reason: when a library appears more
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3018 # than once as an explicit dependence of a library, or
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3019 # is implicitly linked in more than once by the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3020 # compiler, it is considered special, and multiple
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3021 # occurrences thereof are not removed. Compare this
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3022 # with having the same library being listed as a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3023 # dependency of multiple other libraries: in this case,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3024 # we know (pedantically, we assume) the library does not
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3025 # need to be listed more than once, so we keep only the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3026 # last copy. This is not always right, but it is rare
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3027 # enough that we require users that really mean to play
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3028 # such unportable linking tricks to link the library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3029 # using -Wl,-lname, so that libtool does not consider it
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3030 # for duplicate removal.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3031 case " $specialdeplibs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3032 *" $deplib "*) new_libs="$deplib $new_libs" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3033 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3034 case " $new_libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3035 *" $deplib "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3036 *) new_libs="$deplib $new_libs" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3037 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3038 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3039 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3040 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3041 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3042 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3043 tmp_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3044 for deplib in $new_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3045 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3046 -L*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3047 case " $tmp_libs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3048 *" $deplib "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3049 *) tmp_libs="$tmp_libs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3050 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3051 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3052 *) tmp_libs="$tmp_libs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3053 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3054 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3055 eval $var=\"$tmp_libs\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3056 done # for var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3057 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3058 # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3059 tmp_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3060 for i in $dependency_libs ; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3061 case " $predeps $postdeps $compiler_lib_search_path " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3062 *" $i "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3063 i=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3064 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3065 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3066 if test -n "$i" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3067 tmp_libs="$tmp_libs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3068 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3069 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3070 dependency_libs=$tmp_libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3071 done # for pass
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3072 if test "$linkmode" = prog; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3073 dlfiles="$newdlfiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3074 dlprefiles="$newdlprefiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3075 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3076
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3077 case $linkmode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3078 oldlib)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3079 if test -n "$deplibs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3080 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3081 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3082
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3083 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3084 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3085 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3086
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3087 if test -n "$rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3088 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3089 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3090
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3091 if test -n "$xrpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3092 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3093 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3094
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3095 if test -n "$vinfo"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3096 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3097 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3098
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3099 if test -n "$release"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3100 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3101 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3102
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3103 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3104 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3105 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3106
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3107 # Now set the variables for building old libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3108 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3109 oldlibs="$output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3110 objs="$objs$old_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3111 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3112
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3113 lib)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3114 # Make sure we only generate libraries of the form `libNAME.la'.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3115 case $outputname in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3116 lib*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3117 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3118 eval shared_ext=\"$shrext\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3119 eval libname=\"$libname_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3120 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3121 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3122 if test "$module" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3123 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3124 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3125 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3126 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3127 if test "$need_lib_prefix" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3128 # Add the "lib" prefix for modules if required
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3129 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3130 eval shared_ext=\"$shrext\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3131 eval libname=\"$libname_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3132 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3133 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3134 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3135 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3136 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3137
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3138 if test -n "$objs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3139 if test "$deplibs_check_method" != pass_all; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3140 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3141 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3142 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3143 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3144 $echo "*** Warning: Linking the shared library $output against the non-libtool"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3145 $echo "*** objects $objs is not portable!"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3146 libobjs="$libobjs $objs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3147 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3148 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3149
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3150 if test "$dlself" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3151 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3152 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3153
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3154 set dummy $rpath
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3155 if test "$#" -gt 2; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3156 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3157 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3158 install_libdir="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3159
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3160 oldlibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3161 if test -z "$rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3162 if test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3163 # Building a libtool convenience library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3164 # Some compilers have problems with a `.al' extension so
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3165 # convenience libraries should have the same extension an
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3166 # archive normally would.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3167 oldlibs="$output_objdir/$libname.$libext $oldlibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3168 build_libtool_libs=convenience
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3169 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3170 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3171
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3172 if test -n "$vinfo"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3173 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3174 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3175
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3176 if test -n "$release"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3177 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3178 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3179 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3180
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3181 # Parse the version information argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3182 save_ifs="$IFS"; IFS=':'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3183 set dummy $vinfo 0 0 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3184 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3185
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3186 if test -n "$8"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3187 $echo "$modename: too many parameters to \`-version-info'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3188 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3189 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3190 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3191
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3192 # convert absolute version numbers to libtool ages
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3193 # this retains compatibility with .la files and attempts
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3194 # to make the code below a bit more comprehensible
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3195
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3196 case $vinfo_number in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3197 yes)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3198 number_major="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3199 number_minor="$3"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3200 number_revision="$4"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3201 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3202 # There are really only two kinds -- those that
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3203 # use the current revision as the major version
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3204 # and those that subtract age and use age as
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3205 # a minor version. But, then there is irix
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3206 # which has an extra 1 added just for fun
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3207 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3208 case $version_type in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3209 darwin|linux|osf|windows)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3210 current=`expr $number_major + $number_minor`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3211 age="$number_minor"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3212 revision="$number_revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3213 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3214 freebsd-aout|freebsd-elf|sunos)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3215 current="$number_major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3216 revision="$number_minor"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3217 age="0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3218 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3219 irix|nonstopux)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3220 current=`expr $number_major + $number_minor - 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3221 age="$number_minor"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3222 revision="$number_minor"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3223 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3224 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3225 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3226 no)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3227 current="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3228 revision="$3"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3229 age="$4"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3230 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3231 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3232
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3233 # Check that each of the things are valid numbers.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3234 case $current in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3235 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3236 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3237 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3238 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3239 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3240 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3241 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3242
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3243 case $revision in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3244 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3245 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3246 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3247 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3248 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3249 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3250 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3251
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3252 case $age in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3253 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3254 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3255 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3256 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3257 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3258 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3259 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3260
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3261 if test "$age" -gt "$current"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3262 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3263 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3264 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3265 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3266
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3267 # Calculate the version variables.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3268 major=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3269 versuffix=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3270 verstring=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3271 case $version_type in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3272 none) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3273
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3274 darwin)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3275 # Like Linux, but with the current version available in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3276 # verstring for coding it into the library header
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3277 major=.`expr $current - $age`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3278 versuffix="$major.$age.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3279 # Darwin ld doesn't like 0 for these options...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3280 minor_current=`expr $current + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3281 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3282 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3283
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3284 freebsd-aout)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3285 major=".$current"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3286 versuffix=".$current.$revision";
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3287 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3288
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3289 freebsd-elf)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3290 major=".$current"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3291 versuffix=".$current";
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3292 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3293
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3294 irix | nonstopux)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3295 major=`expr $current - $age + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3296
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3297 case $version_type in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3298 nonstopux) verstring_prefix=nonstopux ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3299 *) verstring_prefix=sgi ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3300 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3301 verstring="$verstring_prefix$major.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3302
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3303 # Add in all the interfaces that we are compatible with.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3304 loop=$revision
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3305 while test "$loop" -ne 0; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3306 iface=`expr $revision - $loop`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3307 loop=`expr $loop - 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3308 verstring="$verstring_prefix$major.$iface:$verstring"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3309 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3310
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3311 # Before this point, $major must not contain `.'.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3312 major=.$major
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3313 versuffix="$major.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3314 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3315
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3316 linux)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3317 major=.`expr $current - $age`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3318 versuffix="$major.$age.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3319 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3320
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3321 osf)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3322 major=.`expr $current - $age`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3323 versuffix=".$current.$age.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3324 verstring="$current.$age.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3325
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3326 # Add in all the interfaces that we are compatible with.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3327 loop=$age
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3328 while test "$loop" -ne 0; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3329 iface=`expr $current - $loop`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3330 loop=`expr $loop - 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3331 verstring="$verstring:${iface}.0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3332 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3333
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3334 # Make executables depend on our current version.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3335 verstring="$verstring:${current}.0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3336 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3337
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3338 sunos)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3339 major=".$current"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3340 versuffix=".$current.$revision"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3341 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3342
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3343 windows)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3344 # Use '-' rather than '.', since we only want one
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3345 # extension on DOS 8.3 filesystems.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3346 major=`expr $current - $age`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3347 versuffix="-$major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3348 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3349
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3350 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3351 $echo "$modename: unknown library version type \`$version_type'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3352 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3353 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3354 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3355 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3356
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3357 # Clear the version info if we defaulted, and they specified a release.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3358 if test -z "$vinfo" && test -n "$release"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3359 major=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3360 case $version_type in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3361 darwin)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3362 # we can't check for "0.0" in archive_cmds due to quoting
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3363 # problems, so we reset it completely
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3364 verstring=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3365 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3366 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3367 verstring="0.0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3368 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3369 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3370 if test "$need_version" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3371 versuffix=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3372 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3373 versuffix=".0.0"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3374 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3375 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3376
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3377 # Remove version info from name if versioning should be avoided
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3378 if test "$avoid_version" = yes && test "$need_version" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3379 major=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3380 versuffix=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3381 verstring=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3382 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3383
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3384 # Check to see if the archive will have undefined symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3385 if test "$allow_undefined" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3386 if test "$allow_undefined_flag" = unsupported; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3387 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3388 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3389 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3390 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3391 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3392 # Don't allow undefined symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3393 allow_undefined_flag="$no_undefined_flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3394 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3395 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3396
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3397 if test "$mode" != relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3398 # Remove our outputs, but don't remove object files since they
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3399 # may have been created when compiling PIC objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3400 removelist=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3401 tempremovelist=`$echo "$output_objdir/*"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3402 for p in $tempremovelist; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3403 case $p in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3404 *.$objext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3405 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3406 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3407 removelist="$removelist $p"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3408 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3409 *) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3410 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3411 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3412 if test -n "$removelist"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3413 $show "${rm}r $removelist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3414 $run ${rm}r $removelist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3415 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3416 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3417
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3418 # Now set the variables for building old libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3419 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3420 oldlibs="$oldlibs $output_objdir/$libname.$libext"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3421
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3422 # Transform .lo files to .o files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3423 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3424 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3425
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3426 # Eliminate all temporary directories.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3427 for path in $notinst_path; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3428 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3429 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3430 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3431 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3432
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3433 if test -n "$xrpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3434 # If the user specified any rpath flags, then add them.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3435 temp_xrpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3436 for libdir in $xrpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3437 temp_xrpath="$temp_xrpath -R$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3438 case "$finalize_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3439 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3440 *) finalize_rpath="$finalize_rpath $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3441 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3442 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3443 if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3444 dependency_libs="$temp_xrpath $dependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3445 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3446 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3447
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3448 # Make sure dlfiles contains only unique files that won't be dlpreopened
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3449 old_dlfiles="$dlfiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3450 dlfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3451 for lib in $old_dlfiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3452 case " $dlprefiles $dlfiles " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3453 *" $lib "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3454 *) dlfiles="$dlfiles $lib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3455 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3456 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3457
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3458 # Make sure dlprefiles contains only unique files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3459 old_dlprefiles="$dlprefiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3460 dlprefiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3461 for lib in $old_dlprefiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3462 case "$dlprefiles " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3463 *" $lib "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3464 *) dlprefiles="$dlprefiles $lib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3465 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3466 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3467
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3468 if test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3469 if test -n "$rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3470 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3471 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3472 # these systems don't actually have a c library (as such)!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3473 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3474 *-*-rhapsody* | *-*-darwin1.[012])
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3475 # Rhapsody C library is in the System framework
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3476 deplibs="$deplibs -framework System"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3477 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3478 *-*-netbsd*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3479 # Don't link with libc until the a.out ld.so is fixed.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3480 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3481 *-*-freebsd*-gnu*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3482 # Prevent $arg from being parsed by the freebsd regexp below.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3483 if test "$build_libtool_need_lc" = "yes"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3484 deplibs="$deplibs -lc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3485 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3486 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3487 *-*-openbsd* | *-*-freebsd*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3488 # Do not include libc due to us having libc/libc_r.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3489 test "X$arg" = "X-lc" && continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3490 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3491 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3492 # Add libc to deplibs on all other systems if necessary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3493 if test "$build_libtool_need_lc" = "yes"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3494 deplibs="$deplibs -lc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3495 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3496 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3497 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3498 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3499
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3500 # Transform deplibs into only deplibs that can be linked in shared.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3501 name_save=$name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3502 libname_save=$libname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3503 release_save=$release
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3504 versuffix_save=$versuffix
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3505 major_save=$major
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3506 # I'm not sure if I'm treating the release correctly. I think
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3507 # release should show up in the -l (ie -lgmp5) so we don't want to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3508 # add it in twice. Is that correct?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3509 release=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3510 versuffix=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3511 major=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3512 newdeplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3513 droppeddeps=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3514 case $deplibs_check_method in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3515 pass_all)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3516 # Don't check for shared/static. Everything works.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3517 # This might be a little naive. We might want to check
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3518 # whether the library exists or not. But this is on
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3519 # osf3 & osf4 and I'm not really sure... Just
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3520 # implementing what was already the behavior.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3521 newdeplibs=$deplibs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3522 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3523 test_compile)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3524 # This code stresses the "libraries are programs" paradigm to its
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3525 # limits. Maybe even breaks it. We compile a program, linking it
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3526 # against the deplibs as a proxy for the library. Then we can check
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3527 # whether they linked in statically or dynamically with ldd.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3528 $rm conftest.c
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3529 cat > conftest.c <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3530 int main() { return 0; }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3531 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3532 $rm conftest
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3533 $LTCC -o conftest conftest.c $deplibs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3534 if test "$?" -eq 0 ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3535 ldd_output=`ldd conftest`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3536 for i in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3537 name="`expr $i : '-l\(.*\)'`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3538 # If $name is empty we are operating on a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3539 if test "$name" != "" && test "$name" -ne "0"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3540 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3541 case " $predeps $postdeps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3542 *" $i "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3543 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3544 i=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3545 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3546 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3547 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3548 if test -n "$i" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3549 libname=`eval \\$echo \"$libname_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3550 deplib_matches=`eval \\$echo \"$library_names_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3551 set dummy $deplib_matches
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3552 deplib_match=$2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3553 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3554 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3555 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3556 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3557 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3558 $echo "*** Warning: dynamic linker does not accept needed library $i."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3559 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3560 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3561 $echo "*** shared version of the library, which I believe you do not have"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3562 $echo "*** because a test_compile did reveal that the linker did not use it for"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3563 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3564 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3565 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3566 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3567 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3568 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3569 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3570 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3571 # Error occurred in the first compile. Let's try to salvage
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3572 # the situation: Compile a separate program for each library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3573 for i in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3574 name="`expr $i : '-l\(.*\)'`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3575 # If $name is empty we are operating on a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3576 if test "$name" != "" && test "$name" != "0"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3577 $rm conftest
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3578 $LTCC -o conftest conftest.c $i
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3579 # Did it work?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3580 if test "$?" -eq 0 ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3581 ldd_output=`ldd conftest`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3582 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3583 case " $predeps $postdeps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3584 *" $i "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3585 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3586 i=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3587 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3588 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3589 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3590 if test -n "$i" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3591 libname=`eval \\$echo \"$libname_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3592 deplib_matches=`eval \\$echo \"$library_names_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3593 set dummy $deplib_matches
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3594 deplib_match=$2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3595 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3596 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3597 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3598 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3599 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3600 $echo "*** Warning: dynamic linker does not accept needed library $i."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3601 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3602 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3603 $echo "*** shared version of the library, which you do not appear to have"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3604 $echo "*** because a test_compile did reveal that the linker did not use this one"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3605 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3606 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3607 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3608 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3609 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3610 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3611 $echo "*** Warning! Library $i is needed by this library but I was not able to"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3612 $echo "*** make it link in! You will probably need to install it or some"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3613 $echo "*** library that it depends on before this library will be fully"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3614 $echo "*** functional. Installing it before continuing would be even better."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3615 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3616 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3617 newdeplibs="$newdeplibs $i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3618 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3619 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3620 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3621 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3622 file_magic*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3623 set dummy $deplibs_check_method
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3624 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3625 for a_deplib in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3626 name="`expr $a_deplib : '-l\(.*\)'`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3627 # If $name is empty we are operating on a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3628 if test "$name" != "" && test "$name" != "0"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3629 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3630 case " $predeps $postdeps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3631 *" $a_deplib "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3632 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3633 a_deplib=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3634 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3635 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3636 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3637 if test -n "$a_deplib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3638 libname=`eval \\$echo \"$libname_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3639 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3640 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3641 for potent_lib in $potential_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3642 # Follow soft links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3643 if ls -lLd "$potent_lib" 2>/dev/null \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3644 | grep " -> " >/dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3645 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3646 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3647 # The statement above tries to avoid entering an
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3648 # endless loop below, in case of cyclic links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3649 # We might still enter an endless loop, since a link
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3650 # loop can be closed while we follow links,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3651 # but so what?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3652 potlib="$potent_lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3653 while test -h "$potlib" 2>/dev/null; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3654 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3655 case $potliblink in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3656 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3657 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3658 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3659 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3660 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3661 | ${SED} 10q \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3662 | $EGREP "$file_magic_regex" > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3663 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3664 a_deplib=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3665 break 2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3666 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3667 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3668 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3669 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3670 if test -n "$a_deplib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3671 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3672 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3673 $echo "*** Warning: linker path does not have real file for library $a_deplib."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3674 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3675 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3676 $echo "*** shared version of the library, which you do not appear to have"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3677 $echo "*** because I did check the linker path looking for a file starting"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3678 if test -z "$potlib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3679 $echo "*** with $libname but no candidates were found. (...for file magic test)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3680 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3681 $echo "*** with $libname and none of the candidates passed a file format test"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3682 $echo "*** using a file magic. Last file checked: $potlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3683 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3684 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3685 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3686 # Add a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3687 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3688 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3689 done # Gone through all deplibs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3690 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3691 match_pattern*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3692 set dummy $deplibs_check_method
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3693 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3694 for a_deplib in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3695 name="`expr $a_deplib : '-l\(.*\)'`"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3696 # If $name is empty we are operating on a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3697 if test -n "$name" && test "$name" != "0"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3698 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3699 case " $predeps $postdeps " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3700 *" $a_deplib "*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3701 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3702 a_deplib=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3703 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3704 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3705 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3706 if test -n "$a_deplib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3707 libname=`eval \\$echo \"$libname_spec\"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3708 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3709 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3710 for potent_lib in $potential_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3711 potlib="$potent_lib" # see symlink-check above in file_magic test
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3712 if eval $echo \"$potent_lib\" 2>/dev/null \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3713 | ${SED} 10q \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3714 | $EGREP "$match_pattern_regex" > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3715 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3716 a_deplib=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3717 break 2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3718 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3719 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3720 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3721 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3722 if test -n "$a_deplib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3723 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3724 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3725 $echo "*** Warning: linker path does not have real file for library $a_deplib."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3726 $echo "*** I have the capability to make that library automatically link in when"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3727 $echo "*** you link to this library. But I can only do this if you have a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3728 $echo "*** shared version of the library, which you do not appear to have"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3729 $echo "*** because I did check the linker path looking for a file starting"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3730 if test -z "$potlib" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3731 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3732 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3733 $echo "*** with $libname and none of the candidates passed a file format test"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3734 $echo "*** using a regex pattern. Last file checked: $potlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3735 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3736 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3737 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3738 # Add a -L argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3739 newdeplibs="$newdeplibs $a_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3740 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3741 done # Gone through all deplibs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3742 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3743 none | unknown | *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3744 newdeplibs=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3745 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3746 -e 's/ -[LR][^ ]*//g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3747 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3748 for i in $predeps $postdeps ; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3749 # can't use Xsed below, because $i might contain '/'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3750 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3751 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3752 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3753 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3754 | grep . >/dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3755 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3756 if test "X$deplibs_check_method" = "Xnone"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3757 $echo "*** Warning: inter-library dependencies are not supported in this platform."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3758 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3759 $echo "*** Warning: inter-library dependencies are not known to be supported."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3760 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3761 $echo "*** All declared inter-library dependencies are being dropped."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3762 droppeddeps=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3763 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3764 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3765 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3766 versuffix=$versuffix_save
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3767 major=$major_save
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3768 release=$release_save
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3769 libname=$libname_save
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3770 name=$name_save
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3771
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3772 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3773 *-*-rhapsody* | *-*-darwin1.[012])
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3774 # On Rhapsody replace the C library is the System framework
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3775 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3776 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3777 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3778
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3779 if test "$droppeddeps" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3780 if test "$module" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3781 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3782 $echo "*** Warning: libtool could not satisfy all declared inter-library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3783 $echo "*** dependencies of module $libname. Therefore, libtool will create"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3784 $echo "*** a static module, that should work as long as the dlopening"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3785 $echo "*** application is linked with the -dlopen flag."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3786 if test -z "$global_symbol_pipe"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3787 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3788 $echo "*** However, this would only work if libtool was able to extract symbol"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3789 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3790 $echo "*** not find such a program. So, this module is probably useless."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3791 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3792 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3793 if test "$build_old_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3794 oldlibs="$output_objdir/$libname.$libext"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3795 build_libtool_libs=module
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3796 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3797 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3798 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3799 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3800 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3801 $echo "*** The inter-library dependencies that have been dropped here will be"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3802 $echo "*** automatically added whenever a program is linked with this library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3803 $echo "*** or is declared to -dlopen it."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3804
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3805 if test "$allow_undefined" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3806 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3807 $echo "*** Since this library must not contain undefined symbols,"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3808 $echo "*** because either the platform does not support them or"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3809 $echo "*** it was explicitly requested with -no-undefined,"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3810 $echo "*** libtool will only create a static version of it."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3811 if test "$build_old_libs" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3812 oldlibs="$output_objdir/$libname.$libext"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3813 build_libtool_libs=module
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3814 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3815 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3816 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3817 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3818 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3819 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3820 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3821 # Done checking deplibs!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3822 deplibs=$newdeplibs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3823 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3824
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3825 # All the library-specific variables (install_libdir is set above).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3826 library_names=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3827 old_library=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3828 dlname=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3829
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3830 # Test again, we may have decided not to build it any more
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3831 if test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3832 if test "$hardcode_into_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3833 # Hardcode the library paths
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3834 hardcode_libdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3835 dep_rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3836 rpath="$finalize_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3837 test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3838 for libdir in $rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3839 if test -n "$hardcode_libdir_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3840 if test -n "$hardcode_libdir_separator"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3841 if test -z "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3842 hardcode_libdirs="$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3843 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3844 # Just accumulate the unique libdirs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3845 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3846 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3847 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3848 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3849 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3850 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3851 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3852 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3853 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3854 eval flag=\"$hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3855 dep_rpath="$dep_rpath $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3856 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3857 elif test -n "$runpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3858 case "$perm_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3859 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3860 *) perm_rpath="$perm_rpath $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3861 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3862 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3863 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3864 # Substitute the hardcoded libdirs into the rpath.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3865 if test -n "$hardcode_libdir_separator" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3866 test -n "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3867 libdir="$hardcode_libdirs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3868 if test -n "$hardcode_libdir_flag_spec_ld"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3869 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3870 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3871 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3872 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3873 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3874 if test -n "$runpath_var" && test -n "$perm_rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3875 # We should set the runpath_var.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3876 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3877 for dir in $perm_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3878 rpath="$rpath$dir:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3879 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3880 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3881 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3882 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3883 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3884
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3885 shlibpath="$finalize_shlibpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3886 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3887 if test -n "$shlibpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3888 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3889 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3890
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3891 # Get the real and link names of the library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3892 eval shared_ext=\"$shrext\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3893 eval library_names=\"$library_names_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3894 set dummy $library_names
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3895 realname="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3896 shift; shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3897
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3898 if test -n "$soname_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3899 eval soname=\"$soname_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3900 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3901 soname="$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3902 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3903 if test -z "$dlname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3904 dlname=$soname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3905 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3906
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3907 lib="$output_objdir/$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3908 for link
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3909 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3910 linknames="$linknames $link"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3911 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3912
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3913 # Use standard objects if they are pic
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3914 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3915
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3916 # Prepare the list of exported symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3917 if test -z "$export_symbols"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3918 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3919 $show "generating symbol list for \`$libname.la'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3920 export_symbols="$output_objdir/$libname.exp"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3921 $run $rm $export_symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3922 eval cmds=\"$export_symbols_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3923 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3924 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3925 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3926 if len=`expr "X$cmd" : ".*"` &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3927 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3928 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3929 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3930 skipped_export=false
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3931 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3932 # The command line is too long to execute in one step.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3933 $show "using reloadable object file for export list..."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3934 skipped_export=:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3935 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3936 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3937 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3938 if test -n "$export_symbols_regex"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3939 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3940 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3941 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3942 $run eval '$mv "${export_symbols}T" "$export_symbols"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3943 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3944 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3945 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3946
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3947 if test -n "$export_symbols" && test -n "$include_expsyms"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3948 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3949 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3950
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3951 tmp_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3952 for test_deplib in $deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3953 case " $convenience " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3954 *" $test_deplib "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3955 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3956 tmp_deplibs="$tmp_deplibs $test_deplib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3957 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3958 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3959 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3960 deplibs="$tmp_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3961
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3962 if test -n "$convenience"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3963 if test -n "$whole_archive_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3964 save_libobjs=$libobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3965 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3966 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3967 gentop="$output_objdir/${outputname}x"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3968 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3969 $run ${rm}r "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3970 $show "$mkdir $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3971 $run $mkdir "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3972 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3973 if test "$status" -ne 0 && test ! -d "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3974 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3975 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3976 generated="$generated $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3977
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3978 for xlib in $convenience; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3979 # Extract the objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3980 case $xlib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3981 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3982 *) xabs=`pwd`"/$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3983 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3984 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3985 xdir="$gentop/$xlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3986
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3987 $show "${rm}r $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3988 $run ${rm}r "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3989 $show "$mkdir $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3990 $run $mkdir "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3991 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3992 if test "$status" -ne 0 && test ! -d "$xdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3993 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3994 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3995 # We will extract separately just the conflicting names and we will no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3996 # longer touch any unique names. It is faster to leave these extract
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3997 # automatically by $AR in one run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3998 $show "(cd $xdir && $AR x $xabs)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
3999 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4000 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4001 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4002 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4003 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4004 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4005 $AR t "$xabs" | sort | uniq -cd | while read -r count name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4006 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4007 i=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4008 while test "$i" -le "$count"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4009 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4010 # Put our $i before any first dot (extension)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4011 # Never overwrite any file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4012 name_to="$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4013 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4014 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4015 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4016 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4017 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4018 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4019 i=`expr $i + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4020 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4021 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4022 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4023
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4024 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4025 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4026 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4027 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4028
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4029 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4030 eval flag=\"$thread_safe_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4031 linker_flags="$linker_flags $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4032 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4033
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4034 # Make a backup of the uninstalled library when relinking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4035 if test "$mode" = relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4036 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4037 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4038
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4039 # Add all flags from the command line. We here create a library,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4040 # but those flags were only added to compile_command and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4041 # finalize_command, which are only used when creating executables.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4042 # So do it by hand here.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4043 compiler_flags="$compiler_flags $add_flags"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4044 # Only add it to commands which use CC, instead of LD, i.e.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4045 # only to $compiler_flags
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4046 #linker_flags="$linker_flags $add_flags"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4047
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4048 # Do each of the archive commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4049 if test "$module" = yes && test -n "$module_cmds" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4050 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4051 eval cmds=\"$module_expsym_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4052 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4053 eval cmds=\"$module_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4054 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4055 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4056 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4057 eval cmds=\"$archive_expsym_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4058 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4059 eval cmds=\"$archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4060 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4061 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4062
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4063 if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4064 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4065 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4066 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4067 # The command line is too long to link in one step, link piecewise.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4068 $echo "creating reloadable object files..."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4069
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4070 # Save the value of $output and $libobjs because we want to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4071 # use them later. If we have whole_archive_flag_spec, we
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4072 # want to use save_libobjs as it was before
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4073 # whole_archive_flag_spec was expanded, because we can't
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4074 # assume the linker understands whole_archive_flag_spec.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4075 # This may have to be revisited, in case too many
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4076 # convenience libraries get linked in and end up exceeding
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4077 # the spec.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4078 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4079 save_libobjs=$libobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4080 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4081 save_output=$output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4082
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4083 # Clear the reloadable object creation command queue and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4084 # initialize k to one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4085 test_cmds=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4086 concat_cmds=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4087 objlist=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4088 delfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4089 last_robj=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4090 k=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4091 output=$output_objdir/$save_output-${k}.$objext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4092 # Loop over the list of objects to be linked.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4093 for obj in $save_libobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4094 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4095 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4096 if test "X$objlist" = X ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4097 { len=`expr "X$test_cmds" : ".*"` &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4098 test "$len" -le "$max_cmd_len"; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4099 objlist="$objlist $obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4100 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4101 # The command $test_cmds is almost too long, add a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4102 # command to the queue.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4103 if test "$k" -eq 1 ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4104 # The first file doesn't have a previous command to add.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4105 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4106 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4107 # All subsequent reloadable object files will link in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4108 # the last one created.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4109 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4110 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4111 last_robj=$output_objdir/$save_output-${k}.$objext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4112 k=`expr $k + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4113 output=$output_objdir/$save_output-${k}.$objext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4114 objlist=$obj
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4115 len=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4116 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4117 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4118 # Handle the remaining objects by creating one last
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4119 # reloadable object file. All subsequent reloadable object
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4120 # files will link in the last one created.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4121 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4122 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4123
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4124 if ${skipped_export-false}; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4125 $show "generating symbol list for \`$libname.la'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4126 export_symbols="$output_objdir/$libname.exp"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4127 $run $rm $export_symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4128 libobjs=$output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4129 # Append the command to create the export file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4130 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4131 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4132
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4133 # Set up a command to remove the reloadale object files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4134 # after they are used.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4135 i=0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4136 while test "$i" -lt "$k"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4137 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4138 i=`expr $i + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4139 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4140 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4141
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4142 $echo "creating a temporary reloadable object file: $output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4143
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4144 # Loop through the commands generated above and execute them.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4145 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4146 for cmd in $concat_cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4147 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4148 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4149 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4150 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4151 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4152
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4153 libobjs=$output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4154 # Restore the value of output.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4155 output=$save_output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4156
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4157 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4158 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4159 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4160 # Expand the library linking commands again to reset the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4161 # value of $libobjs for piecewise linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4162
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4163 # Do each of the archive commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4164 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4165 eval cmds=\"$archive_expsym_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4166 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4167 eval cmds=\"$archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4168 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4169
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4170 # Append the command to remove the reloadable object files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4171 # to the just-reset $cmds.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4172 eval cmds=\"\$cmds~$rm $delfiles\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4173 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4174 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4175 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4176 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4177 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4178 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4179 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4180 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4181
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4182 # Restore the uninstalled library and exit
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4183 if test "$mode" = relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4184 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4185 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4186 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4187
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4188 # Create links to the real library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4189 for linkname in $linknames; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4190 if test "$realname" != "$linkname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4191 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4192 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4193 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4194 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4195
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4196 # If -module or -export-dynamic was specified, set the dlname.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4197 if test "$module" = yes || test "$export_dynamic" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4198 # On all known operating systems, these are identical.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4199 dlname="$soname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4200 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4201 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4202 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4203
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4204 obj)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4205 if test -n "$deplibs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4206 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4207 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4208
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4209 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4210 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4211 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4212
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4213 if test -n "$rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4214 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4215 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4216
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4217 if test -n "$xrpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4218 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4219 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4220
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4221 if test -n "$vinfo"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4222 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4223 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4224
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4225 if test -n "$release"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4226 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4227 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4228
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4229 case $output in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4230 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4231 if test -n "$objs$old_deplibs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4232 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4233 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4234 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4235 libobj="$output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4236 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4237 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4238 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4239 libobj=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4240 obj="$output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4241 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4242 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4243
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4244 # Delete the old objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4245 $run $rm $obj $libobj
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4246
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4247 # Objects from convenience libraries. This assumes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4248 # single-version convenience libraries. Whenever we create
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4249 # different ones for PIC/non-PIC, this we'll have to duplicate
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4250 # the extraction.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4251 reload_conv_objs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4252 gentop=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4253 # reload_cmds runs $LD directly, so let us get rid of
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4254 # -Wl from whole_archive_flag_spec
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4255 wl=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4256
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4257 if test -n "$convenience"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4258 if test -n "$whole_archive_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4259 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4260 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4261 gentop="$output_objdir/${obj}x"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4262 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4263 $run ${rm}r "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4264 $show "$mkdir $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4265 $run $mkdir "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4266 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4267 if test "$status" -ne 0 && test ! -d "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4268 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4269 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4270 generated="$generated $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4271
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4272 for xlib in $convenience; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4273 # Extract the objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4274 case $xlib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4275 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4276 *) xabs=`pwd`"/$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4277 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4278 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4279 xdir="$gentop/$xlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4280
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4281 $show "${rm}r $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4282 $run ${rm}r "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4283 $show "$mkdir $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4284 $run $mkdir "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4285 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4286 if test "$status" -ne 0 && test ! -d "$xdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4287 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4288 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4289 # We will extract separately just the conflicting names and we will no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4290 # longer touch any unique names. It is faster to leave these extract
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4291 # automatically by $AR in one run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4292 $show "(cd $xdir && $AR x $xabs)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4293 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4294 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4295 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4296 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4297 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4298 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4299 $AR t "$xabs" | sort | uniq -cd | while read -r count name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4300 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4301 i=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4302 while test "$i" -le "$count"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4303 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4304 # Put our $i before any first dot (extension)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4305 # Never overwrite any file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4306 name_to="$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4307 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4308 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4309 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4310 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4311 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4312 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4313 i=`expr $i + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4314 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4315 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4316 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4317
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4318 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4319 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4320 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4321 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4322
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4323 # Create the old-style object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4324 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
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4325
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4326 output="$obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4327 eval cmds=\"$reload_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4328 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4329 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4330 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4331 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4332 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4333 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4334 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4335
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4336 # Exit if we aren't doing a library object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4337 if test -z "$libobj"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4338 if test -n "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4339 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4340 $run ${rm}r $gentop
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4341 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4342
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4343 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4344 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4345
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4346 if test "$build_libtool_libs" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4347 if test -n "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4348 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4349 $run ${rm}r $gentop
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4350 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4351
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4352 # Create an invalid libtool object if no PIC, so that we don't
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4353 # accidentally link it into a program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4354 # $show "echo timestamp > $libobj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4355 # $run eval "echo timestamp > $libobj" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4356 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4357 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4358
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4359 if test -n "$pic_flag" || test "$pic_mode" != default; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4360 # Only do commands if we really have different PIC objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4361 reload_objs="$libobjs $reload_conv_objs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4362 output="$libobj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4363 eval cmds=\"$reload_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4364 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4365 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4366 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4367 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4368 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4369 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4370 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4371 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4372
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4373 if test -n "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4374 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4375 $run ${rm}r $gentop
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4376 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4377
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4378 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4379 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4380
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4381 prog)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4382 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4383 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4384 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4385 if test -n "$vinfo"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4386 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4387 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4388
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4389 if test -n "$release"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4390 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4391 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4392
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4393 if test "$preload" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4394 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4395 test "$dlopen_self_static" = unknown; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4396 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4397 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4398 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4399
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4400 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4401 *-*-rhapsody* | *-*-darwin1.[012])
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4402 # On Rhapsody replace the C library is the System framework
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4403 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4404 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4405 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4406 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4407
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4408 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4409 *darwin*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4410 # Don't allow lazy linking, it breaks C++ global constructors
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4411 if test "$tagname" = CXX ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4412 compile_command="$compile_command ${wl}-bind_at_load"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4413 finalize_command="$finalize_command ${wl}-bind_at_load"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4414 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4415 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4416 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4417
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4418 compile_command="$compile_command $compile_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4419 finalize_command="$finalize_command $finalize_deplibs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4420
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4421 if test -n "$rpath$xrpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4422 # If the user specified any rpath flags, then add them.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4423 for libdir in $rpath $xrpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4424 # This is the magic to use -rpath.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4425 case "$finalize_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4426 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4427 *) finalize_rpath="$finalize_rpath $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4428 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4429 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4430 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4431
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4432 # Now hardcode the library paths
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4433 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4434 hardcode_libdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4435 for libdir in $compile_rpath $finalize_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4436 if test -n "$hardcode_libdir_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4437 if test -n "$hardcode_libdir_separator"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4438 if test -z "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4439 hardcode_libdirs="$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4440 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4441 # Just accumulate the unique libdirs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4442 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4443 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4444 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4445 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4446 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4447 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4448 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4449 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4450 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4451 eval flag=\"$hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4452 rpath="$rpath $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4453 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4454 elif test -n "$runpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4455 case "$perm_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4456 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4457 *) perm_rpath="$perm_rpath $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4458 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4459 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4460 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4461 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4462 case :$dllsearchpath: in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4463 *":$libdir:"*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4464 *) dllsearchpath="$dllsearchpath:$libdir";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4465 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4466 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4467 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4468 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4469 # Substitute the hardcoded libdirs into the rpath.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4470 if test -n "$hardcode_libdir_separator" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4471 test -n "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4472 libdir="$hardcode_libdirs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4473 eval rpath=\" $hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4474 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4475 compile_rpath="$rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4476
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4477 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4478 hardcode_libdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4479 for libdir in $finalize_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4480 if test -n "$hardcode_libdir_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4481 if test -n "$hardcode_libdir_separator"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4482 if test -z "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4483 hardcode_libdirs="$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4484 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4485 # Just accumulate the unique libdirs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4486 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4487 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4488 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4489 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4490 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4491 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4492 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4493 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4494 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4495 eval flag=\"$hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4496 rpath="$rpath $flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4497 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4498 elif test -n "$runpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4499 case "$finalize_perm_rpath " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4500 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4501 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4502 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4503 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4504 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4505 # Substitute the hardcoded libdirs into the rpath.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4506 if test -n "$hardcode_libdir_separator" &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4507 test -n "$hardcode_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4508 libdir="$hardcode_libdirs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4509 eval rpath=\" $hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4510 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4511 finalize_rpath="$rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4512
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4513 if test -n "$libobjs" && test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4514 # Transform all the library objects into standard objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4515 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4516 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4517 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4518
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4519 dlsyms=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4520 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4521 if test -n "$NM" && test -n "$global_symbol_pipe"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4522 dlsyms="${outputname}S.c"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4523 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4524 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4525 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4526 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4527
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4528 if test -n "$dlsyms"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4529 case $dlsyms in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4530 "") ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4531 *.c)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4532 # Discover the nlist of each of the dlfiles.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4533 nlist="$output_objdir/${outputname}.nm"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4534
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4535 $show "$rm $nlist ${nlist}S ${nlist}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4536 $run $rm "$nlist" "${nlist}S" "${nlist}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4537
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4538 # Parse the name list into a source file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4539 $show "creating $output_objdir/$dlsyms"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4540
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4541 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4542 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4543 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4544
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4545 #ifdef __cplusplus
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4546 extern \"C\" {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4547 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4548
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4549 /* Prevent the only kind of declaration conflicts we can make. */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4550 #define lt_preloaded_symbols some_other_symbol
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4551
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4552 /* External symbol declarations for the compiler. */\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4553 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4554
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4555 if test "$dlself" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4556 $show "generating symbol list for \`$output'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4557
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4558 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4559
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4560 # Add our own program objects to the symbol list.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4561 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4562 for arg in $progfiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4563 $show "extracting global C symbols from \`$arg'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4564 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4565 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4566
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4567 if test -n "$exclude_expsyms"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4568 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4569 $run eval '$mv "$nlist"T "$nlist"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4570 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4571
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4572 if test -n "$export_symbols_regex"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4573 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4574 $run eval '$mv "$nlist"T "$nlist"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4575 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4576
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4577 # Prepare the list of exported symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4578 if test -z "$export_symbols"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4579 export_symbols="$output_objdir/$output.exp"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4580 $run $rm $export_symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4581 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4582 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4583 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4584 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4585 $run eval 'mv "$nlist"T "$nlist"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4586 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4587 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4588
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4589 for arg in $dlprefiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4590 $show "extracting global C symbols from \`$arg'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4591 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4592 $run eval '$echo ": $name " >> "$nlist"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4593 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4594 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4595
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4596 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4597 # Make sure we have at least an empty file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4598 test -f "$nlist" || : > "$nlist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4599
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4600 if test -n "$exclude_expsyms"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4601 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4602 $mv "$nlist"T "$nlist"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4603 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4604
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4605 # Try sorting and uniquifying the output.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4606 if grep -v "^: " < "$nlist" |
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4607 if sort -k 3 </dev/null >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4608 sort -k 3
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4609 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4610 sort +2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4611 fi |
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4612 uniq > "$nlist"S; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4613 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4614 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4615 grep -v "^: " < "$nlist" > "$nlist"S
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4616 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4617
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4618 if test -f "$nlist"S; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4619 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4620 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4621 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4622 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4623
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4624 $echo >> "$output_objdir/$dlsyms" "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4625
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4626 #undef lt_preloaded_symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4627
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4628 #if defined (__STDC__) && __STDC__
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4629 # define lt_ptr void *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4630 #else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4631 # define lt_ptr char *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4632 # define const
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4633 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4634
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4635 /* The mapping between symbol names and symbols. */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4636 const struct {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4637 const char *name;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4638 lt_ptr address;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4639 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4640 lt_preloaded_symbols[] =
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4641 {\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4642 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4643
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4644 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4645
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4646 $echo >> "$output_objdir/$dlsyms" "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4647 {0, (lt_ptr) 0}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4648 };
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4649
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4650 /* This works around a problem in FreeBSD linker */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4651 #ifdef FREEBSD_WORKAROUND
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4652 static const void *lt_preloaded_setup() {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4653 return lt_preloaded_symbols;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4654 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4655 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4656
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4657 #ifdef __cplusplus
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4658 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4659 #endif\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4660 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4661 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4662
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4663 pic_flag_for_symtable=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4664 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4665 # compiling the symbol table file with pic_flag works around
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4666 # a FreeBSD bug that causes programs to crash when -lm is
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4667 # linked before any other PIC object. But we must not use
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4668 # pic_flag when linking with -static. The problem exists in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4669 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4670 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4671 case "$compile_command " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4672 *" -static "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4673 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4674 esac;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4675 *-*-hpux*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4676 case "$compile_command " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4677 *" -static "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4678 *) pic_flag_for_symtable=" $pic_flag";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4679 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4680 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4681
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4682 # Now compile the dynamic symbol file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4683 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4684 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4685
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4686 # Clean up the generated files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4687 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4688 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4689
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4690 # Transform the symbol file into the correct name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4691 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4692 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4693 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4694 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4695 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4696 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4697 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4698 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4699 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4700 # We keep going just in case the user didn't refer to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4701 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4702 # really was required.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4703
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4704 # Nullify the symbol file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4705 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4706 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4707 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4708
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4709 # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4710 # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4711 # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4712 # This does not apply on AIX for ia64, which uses a SysV linker.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4713 case "$host" in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4714 ia64-*-aix5*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4715 *-*-aix4* | *-*-aix5*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4716 compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4717 finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4718 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4719
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4720 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4721 # Replace the output file specification.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4722 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4723 link_command="$compile_command$compile_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4724
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4725 # We have no uninstalled library dependencies, so finalize right now.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4726 $show "$link_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4727 $run eval "$link_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4728 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4729
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4730 # Delete the generated files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4731 if test -n "$dlsyms"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4732 $show "$rm $output_objdir/${outputname}S.${objext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4733 $run $rm "$output_objdir/${outputname}S.${objext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4734 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4735
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4736 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4737 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4738
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4739 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4740 # We should set the shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4741 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4742 for dir in $temp_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4743 case $dir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4744 [\\/]* | [A-Za-z]:[\\/]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4745 # Absolute path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4746 rpath="$rpath$dir:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4747 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4748 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4749 # Relative path: add a thisdir entry.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4750 rpath="$rpath\$thisdir/$dir:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4751 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4752 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4753 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4754 temp_rpath="$rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4755 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4756
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4757 if test -n "$compile_shlibpath$finalize_shlibpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4758 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4759 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4760 if test -n "$finalize_shlibpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4761 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4762 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4763
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4764 compile_var=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4765 finalize_var=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4766 if test -n "$runpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4767 if test -n "$perm_rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4768 # We should set the runpath_var.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4769 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4770 for dir in $perm_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4771 rpath="$rpath$dir:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4772 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4773 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4774 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4775 if test -n "$finalize_perm_rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4776 # We should set the runpath_var.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4777 rpath=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4778 for dir in $finalize_perm_rpath; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4779 rpath="$rpath$dir:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4780 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4781 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4782 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4783 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4784
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4785 if test "$no_install" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4786 # We don't need to create a wrapper script.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4787 link_command="$compile_var$compile_command$compile_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4788 # Replace the output file specification.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4789 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4790 # Delete the old output file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4791 $run $rm $output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4792 # Link the executable and exit
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4793 $show "$link_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4794 $run eval "$link_command" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4795 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4796 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4797
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4798 if test "$hardcode_action" = relink; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4799 # Fast installation is not supported
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4800 link_command="$compile_var$compile_command$compile_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4801 relink_command="$finalize_var$finalize_command$finalize_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4802
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4803 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4804 $echo "$modename: \`$output' will be relinked during installation" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4805 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4806 if test "$fast_install" != no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4807 link_command="$finalize_var$compile_command$finalize_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4808 if test "$fast_install" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4809 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4810 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4811 # fast_install is set to needless
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4812 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4813 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4814 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4815 link_command="$compile_var$compile_command$compile_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4816 relink_command="$finalize_var$finalize_command$finalize_rpath"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4817 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4818 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4819
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4820 # Replace the output file specification.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4821 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4822
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4823 # Delete the old output files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4824 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4825
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4826 $show "$link_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4827 $run eval "$link_command" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4828
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4829 # Now create the wrapper script.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4830 $show "creating $output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4831
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4832 # Quote the relink command for shipping.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4833 if test -n "$relink_command"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4834 # Preserve any variables that may affect compiler behavior
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4835 for var in $variables_saved_for_relink; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4836 if eval test -z \"\${$var+set}\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4837 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4838 elif eval var_value=\$$var; test -z "$var_value"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4839 relink_command="$var=; export $var; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4840 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4841 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4842 relink_command="$var=\"$var_value\"; export $var; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4843 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4844 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4845 relink_command="(cd `pwd`; $relink_command)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4846 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4847 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4848
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4849 # Quote $echo for shipping.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4850 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4851 case $0 in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4852 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4853 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4854 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4855 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4856 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4857 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4858 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4859
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4860 # Only actually do things if our run command is non-null.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4861 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4862 # win32 will think the script is a binary if it has
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4863 # a .exe suffix, so we strip it off here.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4864 case $output in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4865 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4866 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4867 # test for cygwin because mv fails w/o .exe extensions
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4868 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4869 *cygwin*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4870 exeext=.exe
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4871 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4872 *) exeext= ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4873 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4874 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4875 *cygwin* | *mingw* )
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4876 cwrappersource=`$echo ${objdir}/lt-${output}.c`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4877 cwrapper=`$echo ${output}.exe`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4878 $rm $cwrappersource $cwrapper
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4879 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4880
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4881 cat > $cwrappersource <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4882
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4883 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4884 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4885
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4886 The $output program cannot be directly executed until all the libtool
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4887 libraries that it depends on are installed.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4888
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4889 This wrapper executable should never be moved out of the build directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4890 If it is, it will not operate correctly.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4891
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4892 Currently, it simply execs the wrapper *script* "/bin/sh $output",
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4893 but could eventually absorb all of the scripts functionality and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4894 exec $objdir/$outputname directly.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4895 */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4896 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4897 cat >> $cwrappersource<<"EOF"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4898 #include <stdio.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4899 #include <stdlib.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4900 #include <unistd.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4901 #include <malloc.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4902 #include <stdarg.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4903 #include <assert.h>
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4904
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4905 #if defined(PATH_MAX)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4906 # define LT_PATHMAX PATH_MAX
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4907 #elif defined(MAXPATHLEN)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4908 # define LT_PATHMAX MAXPATHLEN
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4909 #else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4910 # define LT_PATHMAX 1024
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4911 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4912
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4913 #ifndef DIR_SEPARATOR
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4914 #define DIR_SEPARATOR '/'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4915 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4916
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4917 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4918 defined (__OS2__)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4919 #define HAVE_DOS_BASED_FILE_SYSTEM
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4920 #ifndef DIR_SEPARATOR_2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4921 #define DIR_SEPARATOR_2 '\\'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4922 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4923 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4924
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4925 #ifndef DIR_SEPARATOR_2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4926 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4927 #else /* DIR_SEPARATOR_2 */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4928 # define IS_DIR_SEPARATOR(ch) \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4929 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4930 #endif /* DIR_SEPARATOR_2 */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4931
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4932 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4933 #define XFREE(stale) do { \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4934 if (stale) { free ((void *) stale); stale = 0; } \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4935 } while (0)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4936
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4937 const char *program_name = NULL;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4938
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4939 void * xmalloc (size_t num);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4940 char * xstrdup (const char *string);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4941 char * basename (const char *name);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4942 char * fnqualify(const char *path);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4943 char * strendzap(char *str, const char *pat);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4944 void lt_fatal (const char *message, ...);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4945
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4946 int
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4947 main (int argc, char *argv[])
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4948 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4949 char **newargz;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4950 int i;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4951
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4952 program_name = (char *) xstrdup ((char *) basename (argv[0]));
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4953 newargz = XMALLOC(char *, argc+2);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4954 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4955
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4956 cat >> $cwrappersource <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4957 newargz[0] = "$SHELL";
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4958 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4959
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4960 cat >> $cwrappersource <<"EOF"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4961 newargz[1] = fnqualify(argv[0]);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4962 /* we know the script has the same name, without the .exe */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4963 /* so make sure newargz[1] doesn't end in .exe */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4964 strendzap(newargz[1],".exe");
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4965 for (i = 1; i < argc; i++)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4966 newargz[i+1] = xstrdup(argv[i]);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4967 newargz[argc+1] = NULL;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4968 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4969
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4970 cat >> $cwrappersource <<EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4971 execv("$SHELL",newargz);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4972 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4973
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4974 cat >> $cwrappersource <<"EOF"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4975 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4976
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4977 void *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4978 xmalloc (size_t num)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4979 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4980 void * p = (void *) malloc (num);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4981 if (!p)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4982 lt_fatal ("Memory exhausted");
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4983
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4984 return p;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4985 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4986
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4987 char *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4988 xstrdup (const char *string)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4989 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4990 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4991 ;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4992 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4993
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4994 char *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4995 basename (const char *name)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4996 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4997 const char *base;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4998
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
4999 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5000 /* Skip over the disk name in MSDOS pathnames. */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5001 if (isalpha (name[0]) && name[1] == ':')
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5002 name += 2;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5003 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5004
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5005 for (base = name; *name; name++)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5006 if (IS_DIR_SEPARATOR (*name))
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5007 base = name + 1;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5008 return (char *) base;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5009 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5010
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5011 char *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5012 fnqualify(const char *path)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5013 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5014 size_t size;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5015 char *p;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5016 char tmp[LT_PATHMAX + 1];
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5017
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5018 assert(path != NULL);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5019
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5020 /* Is it qualified already? */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5021 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5022 if (isalpha (path[0]) && path[1] == ':')
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5023 return xstrdup (path);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5024 #endif
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5025 if (IS_DIR_SEPARATOR (path[0]))
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5026 return xstrdup (path);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5027
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5028 /* prepend the current directory */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5029 /* doesn't handle '~' */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5030 if (getcwd (tmp, LT_PATHMAX) == NULL)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5031 lt_fatal ("getcwd failed");
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5032 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5033 p = XMALLOC(char, size);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5034 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5035 return p;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5036 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5037
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5038 char *
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5039 strendzap(char *str, const char *pat)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5040 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5041 size_t len, patlen;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5042
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5043 assert(str != NULL);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5044 assert(pat != NULL);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5045
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5046 len = strlen(str);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5047 patlen = strlen(pat);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5048
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5049 if (patlen <= len)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5050 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5051 str += len - patlen;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5052 if (strcmp(str, pat) == 0)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5053 *str = '\0';
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5054 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5055 return str;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5056 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5057
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5058 static void
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5059 lt_error_core (int exit_status, const char * mode,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5060 const char * message, va_list ap)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5061 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5062 fprintf (stderr, "%s: %s: ", program_name, mode);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5063 vfprintf (stderr, message, ap);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5064 fprintf (stderr, ".\n");
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5065
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5066 if (exit_status >= 0)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5067 exit (exit_status);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5068 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5069
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5070 void
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5071 lt_fatal (const char *message, ...)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5072 {
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5073 va_list ap;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5074 va_start (ap, message);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5075 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5076 va_end (ap);
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5077 }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5078 EOF
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5079 # we should really use a build-platform specific compiler
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5080 # here, but OTOH, the wrappers (shell script and this C one)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5081 # are only useful if you want to execute the "real" binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5082 # Since the "real" binary is built for $host, then this
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5083 # wrapper might as well be built for $host, too.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5084 $run $LTCC -s -o $cwrapper $cwrappersource
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5085 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5086 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5087 $rm $output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5088 trap "$rm $output; exit 1" 1 2 15
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5089
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5090 $echo > $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5091 #! $SHELL
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5092
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5093 # $output - temporary wrapper script for $objdir/$outputname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5094 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5095 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5096 # The $output program cannot be directly executed until all the libtool
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5097 # libraries that it depends on are installed.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5098 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5099 # This wrapper script should never be moved out of the build directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5100 # If it is, it will not operate correctly.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5101
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5102 # Sed substitution that helps us do robust quoting. It backslashifies
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5103 # metacharacters that are still active within double-quoted strings.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5104 Xsed='${SED} -e 1s/^X//'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5105 sed_quote_subst='$sed_quote_subst'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5106
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5107 # The HP-UX ksh and POSIX shell print the target directory to stdout
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5108 # if CDPATH is set.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5109 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5110
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5111 relink_command=\"$relink_command\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5112
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5113 # This environment variable determines our operation mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5114 if test \"\$libtool_install_magic\" = \"$magic\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5115 # install mode needs the following variable:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5116 notinst_deplibs='$notinst_deplibs'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5117 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5118 # When we are sourced in execute mode, \$file and \$echo are already set.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5119 if test \"\$libtool_execute_magic\" != \"$magic\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5120 echo=\"$qecho\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5121 file=\"\$0\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5122 # Make sure echo works.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5123 if test \"X\$1\" = X--no-reexec; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5124 # Discard the --no-reexec flag, and continue.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5125 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5126 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5127 # Yippee, \$echo works!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5128 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5129 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5130 # Restart under the correct shell, and then maybe \$echo will work.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5131 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5132 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5133 fi\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5134 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5135 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5136
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5137 # Find the directory that this script lives in.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5138 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5139 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5140
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5141 # Follow symbolic links until we get to the real thisdir.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5142 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5143 while test -n \"\$file\"; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5144 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5145
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5146 # If there was a directory component, then change thisdir.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5147 if test \"x\$destdir\" != \"x\$file\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5148 case \"\$destdir\" in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5149 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5150 *) thisdir=\"\$thisdir/\$destdir\" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5151 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5152 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5153
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5154 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5155 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5156 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5157
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5158 # Try to get the absolute directory name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5159 absdir=\`cd \"\$thisdir\" && pwd\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5160 test -n \"\$absdir\" && thisdir=\"\$absdir\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5161 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5162
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5163 if test "$fast_install" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5164 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5165 program=lt-'$outputname'$exeext
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5166 progdir=\"\$thisdir/$objdir\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5167
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5168 if test ! -f \"\$progdir/\$program\" || \\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5169 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5170 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5171
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5172 file=\"\$\$-\$program\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5173
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5174 if test ! -d \"\$progdir\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5175 $mkdir \"\$progdir\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5176 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5177 $rm \"\$progdir/\$file\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5178 fi"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5179
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5180 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5181
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5182 # relink executable if necessary
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5183 if test -n \"\$relink_command\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5184 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5185 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5186 $echo \"\$relink_command_output\" >&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5187 $rm \"\$progdir/\$file\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5188 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5189 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5190 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5191
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5192 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5193 { $rm \"\$progdir/\$program\";
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5194 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5195 $rm \"\$progdir/\$file\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5196 fi"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5197 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5198 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5199 program='$outputname'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5200 progdir=\"\$thisdir/$objdir\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5201 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5202 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5203
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5204 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5205
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5206 if test -f \"\$progdir/\$program\"; then"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5207
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5208 # Export our shlibpath_var if we have one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5209 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5210 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5211 # Add our own library path to $shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5212 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5213
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5214 # Some systems cannot cope with colon-terminated $shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5215 # The second colon is a workaround for a bug in BeOS R4 sed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5216 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5217
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5218 export $shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5219 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5220 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5221
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5222 # fixup the dll searchpath if we need to.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5223 if test -n "$dllsearchpath"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5224 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5225 # Add the dll search path components to the executable PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5226 PATH=$dllsearchpath:\$PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5227 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5228 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5229
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5230 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5231 if test \"\$libtool_execute_magic\" != \"$magic\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5232 # Run the actual program with our arguments.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5233 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5234 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5235 # Backslashes separate directories on plain windows
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5236 *-*-mingw | *-*-os2*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5237 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5238 exec \$progdir\\\\\$program \${1+\"\$@\"}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5239 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5240 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5241
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5242 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5243 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5244 exec \$progdir/\$program \${1+\"\$@\"}
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5245 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5246 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5247 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5248 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5249 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5250 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5251 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5252 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5253 # The program doesn't exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5254 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5255 \$echo \"This script is just a wrapper for \$program.\" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5256 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5257 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5258 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5259 fi\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5260 "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5261 chmod +x $output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5262 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5263 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5264 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5265 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5266
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5267 # See if we need to build an old-fashioned archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5268 for oldlib in $oldlibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5269
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5270 if test "$build_libtool_libs" = convenience; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5271 oldobjs="$libobjs_save"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5272 addlibs="$convenience"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5273 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5274 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5275 if test "$build_libtool_libs" = module; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5276 oldobjs="$libobjs_save"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5277 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5278 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5279 oldobjs="$old_deplibs $non_pic_objects"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5280 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5281 addlibs="$old_convenience"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5282 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5283
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5284 if test -n "$addlibs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5285 gentop="$output_objdir/${outputname}x"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5286 $show "${rm}r $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5287 $run ${rm}r "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5288 $show "$mkdir $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5289 $run $mkdir "$gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5290 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5291 if test "$status" -ne 0 && test ! -d "$gentop"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5292 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5293 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5294 generated="$generated $gentop"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5295
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5296 # Add in members from convenience archives.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5297 for xlib in $addlibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5298 # Extract the objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5299 case $xlib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5300 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5301 *) xabs=`pwd`"/$xlib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5302 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5303 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5304 xdir="$gentop/$xlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5305
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5306 $show "${rm}r $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5307 $run ${rm}r "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5308 $show "$mkdir $xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5309 $run $mkdir "$xdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5310 status=$?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5311 if test "$status" -ne 0 && test ! -d "$xdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5312 exit $status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5313 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5314 # We will extract separately just the conflicting names and we will no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5315 # longer touch any unique names. It is faster to leave these extract
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5316 # automatically by $AR in one run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5317 $show "(cd $xdir && $AR x $xabs)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5318 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5319 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5320 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5321 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5322 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5323 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5324 $AR t "$xabs" | sort | uniq -cd | while read -r count name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5325 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5326 i=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5327 while test "$i" -le "$count"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5328 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5329 # Put our $i before any first dot (extension)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5330 # Never overwrite any file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5331 name_to="$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5332 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5333 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5334 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5335 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5336 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5337 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5338 i=`expr $i + 1`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5339 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5340 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5341 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5342
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5343 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5344 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5345 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5346
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5347 compiler_flags="$compiler_flags $add_flags"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5348
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5349 # Do each command in the archive commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5350 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5351 eval cmds=\"$old_archive_from_new_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5352 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5353 eval cmds=\"$old_archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5354
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5355 if len=`expr "X$cmds" : ".*"` &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5356 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5357 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5358 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5359 # the command line is too long to link in one step, link in parts
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5360 $echo "using piecewise archive linking..."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5361 save_RANLIB=$RANLIB
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5362 RANLIB=:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5363 objlist=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5364 concat_cmds=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5365 save_oldobjs=$oldobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5366 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5367 # encoded into archives. This makes 'ar r' malfunction in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5368 # this piecewise linking case whenever conflicting object
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5369 # names appear in distinct ar calls; check, warn and compensate.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5370 if (for obj in $save_oldobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5371 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5372 $echo "X$obj" | $Xsed -e 's%^.*/%%'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5373 done | sort | sort -uc >/dev/null 2>&1); then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5374 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5375 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5376 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5377 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5378 AR_FLAGS=cq
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5379 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5380 # Is there a better way of finding the last object in the list?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5381 for obj in $save_oldobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5382 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5383 last_oldobj=$obj
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5384 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5385 for obj in $save_oldobjs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5386 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5387 oldobjs="$objlist $obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5388 objlist="$objlist $obj"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5389 eval test_cmds=\"$old_archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5390 if len=`expr "X$test_cmds" : ".*"` &&
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5391 test "$len" -le "$max_cmd_len"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5392 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5393 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5394 # the above command should be used before it gets too long
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5395 oldobjs=$objlist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5396 if test "$obj" = "$last_oldobj" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5397 RANLIB=$save_RANLIB
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5398 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5399 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5400 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5401 objlist=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5402 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5403 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5404 RANLIB=$save_RANLIB
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5405 oldobjs=$objlist
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5406 if test "X$oldobjs" = "X" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5407 eval cmds=\"\$concat_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5408 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5409 eval cmds=\"\$concat_cmds~$old_archive_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5410 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5411 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5412 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5413 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5414 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5415 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5416 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5417 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5418 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5419 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5420 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5421
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5422 if test -n "$generated"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5423 $show "${rm}r$generated"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5424 $run ${rm}r$generated
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5425 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5426
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5427 # Now create the libtool archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5428 case $output in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5429 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5430 old_library=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5431 test "$build_old_libs" = yes && old_library="$libname.$libext"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5432 $show "creating $output"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5433
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5434 # Preserve any variables that may affect compiler behavior
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5435 for var in $variables_saved_for_relink; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5436 if eval test -z \"\${$var+set}\"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5437 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5438 elif eval var_value=\$$var; test -z "$var_value"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5439 relink_command="$var=; export $var; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5440 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5441 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5442 relink_command="$var=\"$var_value\"; export $var; $relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5443 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5444 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5445 # Quote the link command for shipping.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5446 relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5447 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5448 if test "$hardcode_automatic" = yes ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5449 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5450 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5451 # Only create the output if not a dry run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5452 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5453 for installed in no yes; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5454 if test "$installed" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5455 if test -z "$install_libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5456 break
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5457 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5458 output="$output_objdir/$outputname"i
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5459 # Replace all uninstalled libtool libraries with the installed ones
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5460 newdependency_libs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5461 for deplib in $dependency_libs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5462 case $deplib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5463 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5464 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5465 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5466 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5467 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5468 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5469 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5470 newdependency_libs="$newdependency_libs $libdir/$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5471 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5472 *) newdependency_libs="$newdependency_libs $deplib" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5473 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5474 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5475 dependency_libs="$newdependency_libs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5476 newdlfiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5477 for lib in $dlfiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5478 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5479 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5480 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5481 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5482 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5483 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5484 newdlfiles="$newdlfiles $libdir/$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5485 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5486 dlfiles="$newdlfiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5487 newdlprefiles=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5488 for lib in $dlprefiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5489 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5490 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5491 if test -z "$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5492 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5493 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5494 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5495 newdlprefiles="$newdlprefiles $libdir/$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5496 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5497 dlprefiles="$newdlprefiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5498 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5499 $rm $output
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5500 # place dlname in correct position for cygwin
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5501 tdlname=$dlname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5502 case $host,$output,$installed,$module,$dlname in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5503 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5504 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5505 $echo > $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5506 # $outputname - a libtool library file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5507 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5508 #
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5509 # Please DO NOT delete this file!
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5510 # It is necessary for linking the library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5511
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5512 # The name that we can dlopen(3).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5513 dlname='$tdlname'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5514
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5515 # Names of this library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5516 library_names='$library_names'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5517
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5518 # The name of the static archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5519 old_library='$old_library'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5520
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5521 # Libraries that this one depends upon.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5522 dependency_libs='$dependency_libs'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5523
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5524 # Version information for $libname.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5525 current=$current
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5526 age=$age
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5527 revision=$revision
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5528
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5529 # Is this an already installed library?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5530 installed=$installed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5531
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5532 # Should we warn about portability when linking against -modules?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5533 shouldnotlink=$module
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5534
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5535 # Files to dlopen/dlpreopen
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5536 dlopen='$dlfiles'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5537 dlpreopen='$dlprefiles'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5538
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5539 # Directory that this library needs to be installed in:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5540 libdir='$install_libdir'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5541 if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5542 $echo >> $output "\
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5543 relink_command=\"$relink_command\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5544 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5545 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5546 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5547
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5548 # Do a symbolic link so that the libtool archive can be found in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5549 # LD_LIBRARY_PATH before the program is installed.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5550 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5551 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5552 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5553 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5554 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5555 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5556
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5557 # libtool install mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5558 install)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5559 modename="$modename: install"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5560
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5561 # There may be an optional sh(1) argument at the beginning of
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5562 # install_prog (especially on Windows NT).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5563 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5564 # Allow the use of GNU shtool's install command.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5565 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5566 # Aesthetically quote it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5567 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5568 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5569 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5570 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5571 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5572 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5573 install_prog="$arg "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5574 arg="$1"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5575 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5576 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5577 install_prog=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5578 arg="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5579 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5580
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5581 # The real first argument should be the name of the installation program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5582 # Aesthetically quote it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5583 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5584 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5585 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5586 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5587 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5588 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5589 install_prog="$install_prog$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5590
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5591 # We need to accept at least all the BSD install flags.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5592 dest=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5593 files=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5594 opts=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5595 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5596 install_type=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5597 isdir=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5598 stripme=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5599 for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5600 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5601 if test -n "$dest"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5602 files="$files $dest"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5603 dest="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5604 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5605 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5606
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5607 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5608 -d) isdir=yes ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5609 -f) prev="-f" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5610 -g) prev="-g" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5611 -m) prev="-m" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5612 -o) prev="-o" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5613 -s)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5614 stripme=" -s"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5615 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5616 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5617 -*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5618
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5619 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5620 # If the previous option needed an argument, then skip it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5621 if test -n "$prev"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5622 prev=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5623 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5624 dest="$arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5625 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5626 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5627 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5628 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5629
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5630 # Aesthetically quote the argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5631 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5632 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5633 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5634 arg="\"$arg\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5635 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5636 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5637 install_prog="$install_prog $arg"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5638 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5639
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5640 if test -z "$install_prog"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5641 $echo "$modename: you must specify an install program" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5642 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5643 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5644 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5645
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5646 if test -n "$prev"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5647 $echo "$modename: the \`$prev' option requires an argument" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5648 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5649 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5650 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5651
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5652 if test -z "$files"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5653 if test -z "$dest"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5654 $echo "$modename: no file or destination specified" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5655 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5656 $echo "$modename: you must specify a destination" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5657 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5658 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5659 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5660 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5661
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5662 # Strip any trailing slash from the destination.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5663 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5664
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5665 # Check to see that the destination is a directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5666 test -d "$dest" && isdir=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5667 if test "$isdir" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5668 destdir="$dest"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5669 destname=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5670 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5671 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5672 test "X$destdir" = "X$dest" && destdir=.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5673 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5674
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5675 # Not a directory, so check to see that there is only one file specified.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5676 set dummy $files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5677 if test "$#" -gt 2; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5678 $echo "$modename: \`$dest' is not a directory" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5679 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5680 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5681 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5682 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5683 case $destdir in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5684 [\\/]* | [A-Za-z]:[\\/]*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5685 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5686 for file in $files; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5687 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5688 *.lo) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5689 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5690 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5691 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5692 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5693 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5694 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5695 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5696 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5697 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5698
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5699 # This variable tells wrapper scripts just to set variables rather
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5700 # than running their programs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5701 libtool_install_magic="$magic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5702
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5703 staticlibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5704 future_libdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5705 current_libdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5706 for file in $files; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5707
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5708 # Do each installation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5709 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5710 *.$libext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5711 # Do the static libraries later.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5712 staticlibs="$staticlibs $file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5713 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5714
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5715 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5716 # Check to see that this really is a libtool archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5717 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5718 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5719 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5720 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5721 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5722 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5723
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5724 library_names=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5725 old_library=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5726 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5727 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5728 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5729 */* | *\\*) . $file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5730 *) . ./$file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5731 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5732
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5733 # Add the libdir to current_libdirs if it is the destination.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5734 if test "X$destdir" = "X$libdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5735 case "$current_libdirs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5736 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5737 *) current_libdirs="$current_libdirs $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5738 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5739 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5740 # Note the libdir as a future libdir.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5741 case "$future_libdirs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5742 *" $libdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5743 *) future_libdirs="$future_libdirs $libdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5744 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5745 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5746
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5747 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5748 test "X$dir" = "X$file/" && dir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5749 dir="$dir$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5750
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5751 if test -n "$relink_command"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5752 # Determine the prefix the user has applied to our future dir.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5753 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5754
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5755 # Don't allow the user to place us outside of our expected
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5756 # location b/c this prevents finding dependent libraries that
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5757 # are installed to the same prefix.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5758 # At present, this check doesn't affect windows .dll's that
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5759 # are installed into $libdir/../bin (currently, that works fine)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5760 # but it's something to keep an eye on.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5761 if test "$inst_prefix_dir" = "$destdir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5762 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5763 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5764 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5765
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5766 if test -n "$inst_prefix_dir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5767 # Stick the inst_prefix_dir data into the link command.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5768 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5769 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5770 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5771 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5772
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5773 $echo "$modename: warning: relinking \`$file'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5774 $show "$relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5775 if $run eval "$relink_command"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5776 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5777 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5778 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5779 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5780 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5781
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5782 # See the names of the shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5783 set dummy $library_names
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5784 if test -n "$2"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5785 realname="$2"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5786 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5787 shift
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5788
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5789 srcname="$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5790 test -n "$relink_command" && srcname="$realname"T
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5791
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5792 # Install the shared library and build the symlinks.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5793 $show "$install_prog $dir/$srcname $destdir/$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5794 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5795 if test -n "$stripme" && test -n "$striplib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5796 $show "$striplib $destdir/$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5797 $run eval "$striplib $destdir/$realname" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5798 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5799
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5800 if test "$#" -gt 0; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5801 # Delete the old symlinks, and create new ones.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5802 for linkname
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5803 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5804 if test "$linkname" != "$realname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5805 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5806 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5807 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5808 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5809 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5810
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5811 # Do each command in the postinstall commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5812 lib="$destdir/$realname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5813 eval cmds=\"$postinstall_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5814 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5815 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5816 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5817 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5818 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5819 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5820 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5821 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5822
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5823 # Install the pseudo-library for information purposes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5824 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5825 instname="$dir/$name"i
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5826 $show "$install_prog $instname $destdir/$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5827 $run eval "$install_prog $instname $destdir/$name" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5828
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5829 # Maybe install the static library, too.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5830 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5831 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5832
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5833 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5834 # Install (i.e. copy) a libtool object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5835
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5836 # Figure out destination file name, if it wasn't already specified.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5837 if test -n "$destname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5838 destfile="$destdir/$destname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5839 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5840 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5841 destfile="$destdir/$destfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5842 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5843
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5844 # Deduce the name of the destination old-style object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5845 case $destfile in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5846 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5847 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5848 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5849 *.$objext)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5850 staticdest="$destfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5851 destfile=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5852 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5853 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5854 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5855 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5856 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5857 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5858 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5859
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5860 # Install the libtool object if requested.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5861 if test -n "$destfile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5862 $show "$install_prog $file $destfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5863 $run eval "$install_prog $file $destfile" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5864 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5865
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5866 # Install the old object if enabled.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5867 if test "$build_old_libs" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5868 # Deduce the name of the old-style object file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5869 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5870
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5871 $show "$install_prog $staticobj $staticdest"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5872 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5873 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5874 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5875 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5876
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5877 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5878 # Figure out destination file name, if it wasn't already specified.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5879 if test -n "$destname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5880 destfile="$destdir/$destname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5881 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5882 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5883 destfile="$destdir/$destfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5884 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5885
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5886 # If the file is missing, and there is a .exe on the end, strip it
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5887 # because it is most likely a libtool script we actually want to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5888 # install
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5889 stripped_ext=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5890 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5891 *.exe)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5892 if test ! -f "$file"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5893 file=`$echo $file|${SED} 's,.exe$,,'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5894 stripped_ext=".exe"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5895 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5896 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5897 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5898
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5899 # Do a test to see if this is really a libtool program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5900 case $host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5901 *cygwin*|*mingw*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5902 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5903 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5904 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5905 wrapper=$file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5906 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5907 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5908 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5909 notinst_deplibs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5910 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5911
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5912 # To insure that "foo" is sourced, and not "foo.exe",
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5913 # finese the cygwin/MSYS system by explicitly sourcing "foo."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5914 # which disallows the automatic-append-.exe behavior.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5915 case $build in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5916 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5917 *) wrapperdot=${wrapper} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5918 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5919 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5920 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5921 */* | *\\*) . ${wrapperdot} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5922 *) . ./${wrapperdot} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5923 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5924
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5925 # Check the variables that should have been set.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5926 if test -z "$notinst_deplibs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5927 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5928 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5929 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5930
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5931 finalize=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5932 for lib in $notinst_deplibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5933 # Check to see that each library is installed.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5934 libdir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5935 if test -f "$lib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5936 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5937 case $lib in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5938 */* | *\\*) . $lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5939 *) . ./$lib ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5940 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5941 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5942 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5943 if test -n "$libdir" && test ! -f "$libfile"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5944 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5945 finalize=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5946 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5947 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5948
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5949 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5950 # To insure that "foo" is sourced, and not "foo.exe",
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5951 # finese the cygwin/MSYS system by explicitly sourcing "foo."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5952 # which disallows the automatic-append-.exe behavior.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5953 case $build in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5954 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5955 *) wrapperdot=${wrapper} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5956 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5957 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5958 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5959 */* | *\\*) . ${wrapperdot} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5960 *) . ./${wrapperdot} ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5961 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5962
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5963 outputname=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5964 if test "$fast_install" = no && test -n "$relink_command"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5965 if test "$finalize" = yes && test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5966 tmpdir="/tmp"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5967 test -n "$TMPDIR" && tmpdir="$TMPDIR"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5968 tmpdir="$tmpdir/libtool-$$"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5969 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5970 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5971 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5972 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5973 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5974 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5975 outputname="$tmpdir/$file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5976 # Replace the output file specification.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5977 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5978
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5979 $show "$relink_command"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5980 if $run eval "$relink_command"; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5981 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5982 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5983 ${rm}r "$tmpdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5984 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5985 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5986 file="$outputname"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5987 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5988 $echo "$modename: warning: cannot relink \`$file'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5989 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5990 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5991 # Install the binary that we compiled earlier.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5992 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5993 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5994 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5995
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5996 # remove .exe since cygwin /usr/bin/install will append another
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5997 # one anyways
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5998 case $install_prog,$host in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
5999 */usr/bin/install*,*cygwin*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6000 case $file:$destfile in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6001 *.exe:*.exe)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6002 # this is ok
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6003 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6004 *.exe:*)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6005 destfile=$destfile.exe
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6006 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6007 *:*.exe)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6008 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6009 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6010 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6011 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6012 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6013 $show "$install_prog$stripme $file $destfile"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6014 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6015 test -n "$outputname" && ${rm}r "$tmpdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6016 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6017 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6018 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6019
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6020 for file in $staticlibs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6021 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6022
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6023 # Set up the ranlib parameters.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6024 oldlib="$destdir/$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6025
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6026 $show "$install_prog $file $oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6027 $run eval "$install_prog \$file \$oldlib" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6028
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6029 if test -n "$stripme" && test -n "$striplib"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6030 $show "$old_striplib $oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6031 $run eval "$old_striplib $oldlib" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6032 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6033
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6034 # Do each command in the postinstall commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6035 eval cmds=\"$old_postinstall_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6036 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6037 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6038 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6039 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6040 $run eval "$cmd" || exit $?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6041 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6042 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6043 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6044
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6045 if test -n "$future_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6046 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6047 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6048
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6049 if test -n "$current_libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6050 # Maybe just do a dry run.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6051 test -n "$run" && current_libdirs=" -n$current_libdirs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6052 exec_cmd='$SHELL $0 --finish$current_libdirs'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6053 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6054 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6055 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6056 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6057
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6058 # libtool finish mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6059 finish)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6060 modename="$modename: finish"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6061 libdirs="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6062 admincmds=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6063
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6064 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6065 for dir
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6066 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6067 libdirs="$libdirs $dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6068 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6069
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6070 for libdir in $libdirs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6071 if test -n "$finish_cmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6072 # Do each command in the finish commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6073 eval cmds=\"$finish_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6074 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6075 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6076 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6077 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6078 $run eval "$cmd" || admincmds="$admincmds
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6079 $cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6080 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6081 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6082 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6083 if test -n "$finish_eval"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6084 # Do the single finish_eval.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6085 eval cmds=\"$finish_eval\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6086 $run eval "$cmds" || admincmds="$admincmds
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6087 $cmds"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6088 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6089 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6090 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6091
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6092 # Exit here if they wanted silent mode.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6093 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6094
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6095 $echo "----------------------------------------------------------------------"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6096 $echo "Libraries have been installed in:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6097 for libdir in $libdirs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6098 $echo " $libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6099 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6100 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6101 $echo "If you ever happen to want to link against installed libraries"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6102 $echo "in a given directory, LIBDIR, you must either use libtool, and"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6103 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6104 $echo "flag during linking and do at least one of the following:"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6105 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6106 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6107 $echo " during execution"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6108 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6109 if test -n "$runpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6110 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6111 $echo " during linking"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6112 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6113 if test -n "$hardcode_libdir_flag_spec"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6114 libdir=LIBDIR
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6115 eval flag=\"$hardcode_libdir_flag_spec\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6116
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6117 $echo " - use the \`$flag' linker flag"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6118 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6119 if test -n "$admincmds"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6120 $echo " - have your system administrator run these commands:$admincmds"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6121 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6122 if test -f /etc/ld.so.conf; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6123 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6124 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6125 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6126 $echo "See any operating system documentation about shared libraries for"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6127 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6128 $echo "----------------------------------------------------------------------"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6129 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6130 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6131
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6132 # libtool execute mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6133 execute)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6134 modename="$modename: execute"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6135
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6136 # The first argument is the command name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6137 cmd="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6138 if test -z "$cmd"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6139 $echo "$modename: you must specify a COMMAND" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6140 $echo "$help"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6141 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6142 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6143
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6144 # Handle -dlopen flags immediately.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6145 for file in $execute_dlfiles; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6146 if test ! -f "$file"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6147 $echo "$modename: \`$file' is not a file" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6148 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6149 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6150 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6151
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6152 dir=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6153 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6154 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6155 # Check to see that this really is a libtool archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6156 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6157 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6158 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6159 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6160 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6161 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6162
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6163 # Read the libtool library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6164 dlname=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6165 library_names=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6166
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6167 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6168 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6169 */* | *\\*) . $file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6170 *) . ./$file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6171 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6172
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6173 # Skip this library if it cannot be dlopened.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6174 if test -z "$dlname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6175 # Warn if it was a shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6176 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6177 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6178 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6179
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6180 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6181 test "X$dir" = "X$file" && dir=.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6182
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6183 if test -f "$dir/$objdir/$dlname"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6184 dir="$dir/$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6185 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6186 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6187 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6188 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6189 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6190
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6191 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6192 # Just add the directory containing the .lo file.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6193 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6194 test "X$dir" = "X$file" && dir=.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6195 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6196
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6197 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6198 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6199 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6200 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6201 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6202
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6203 # Get the absolute pathname.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6204 absdir=`cd "$dir" && pwd`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6205 test -n "$absdir" && dir="$absdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6206
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6207 # Now add the directory to shlibpath_var.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6208 if eval "test -z \"\$$shlibpath_var\""; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6209 eval "$shlibpath_var=\"\$dir\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6210 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6211 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6212 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6213 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6214
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6215 # This variable tells wrapper scripts just to set shlibpath_var
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6216 # rather than running their programs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6217 libtool_execute_magic="$magic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6218
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6219 # Check if any of the arguments is a wrapper script.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6220 args=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6221 for file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6222 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6223 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6224 -*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6225 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6226 # Do a test to see if this is really a libtool program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6227 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6228 # If there is no directory component, then add one.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6229 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6230 */* | *\\*) . $file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6231 *) . ./$file ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6232 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6233
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6234 # Transform arg to wrapped name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6235 file="$progdir/$program"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6236 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6237 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6238 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6239 # Quote arguments (to preserve shell metacharacters).
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6240 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6241 args="$args \"$file\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6242 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6243
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6244 if test -z "$run"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6245 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6246 # Export the shlibpath_var.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6247 eval "export $shlibpath_var"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6248 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6249
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6250 # Restore saved environment variables
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6251 if test "${save_LC_ALL+set}" = set; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6252 LC_ALL="$save_LC_ALL"; export LC_ALL
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6253 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6254 if test "${save_LANG+set}" = set; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6255 LANG="$save_LANG"; export LANG
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6256 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6257
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6258 # Now prepare to actually exec the command.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6259 exec_cmd="\$cmd$args"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6260 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6261 # Display what would be done.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6262 if test -n "$shlibpath_var"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6263 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6264 $echo "export $shlibpath_var"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6265 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6266 $echo "$cmd$args"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6267 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6268 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6269 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6270
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6271 # libtool clean and uninstall mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6272 clean | uninstall)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6273 modename="$modename: $mode"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6274 rm="$nonopt"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6275 files=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6276 rmforce=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6277 exit_status=0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6278
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6279 # This variable tells wrapper scripts just to set variables rather
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6280 # than running their programs.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6281 libtool_install_magic="$magic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6282
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6283 for arg
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6284 do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6285 case $arg in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6286 -f) rm="$rm $arg"; rmforce=yes ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6287 -*) rm="$rm $arg" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6288 *) files="$files $arg" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6289 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6290 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6291
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6292 if test -z "$rm"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6293 $echo "$modename: you must specify an RM program" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6294 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6295 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6296 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6297
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6298 rmdirs=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6299
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6300 origobjdir="$objdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6301 for file in $files; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6302 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6303 if test "X$dir" = "X$file"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6304 dir=.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6305 objdir="$origobjdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6306 else
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6307 objdir="$dir/$origobjdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6308 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6309 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6310 test "$mode" = uninstall && objdir="$dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6311
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6312 # Remember objdir for removal later, being careful to avoid duplicates
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6313 if test "$mode" = clean; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6314 case " $rmdirs " in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6315 *" $objdir "*) ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6316 *) rmdirs="$rmdirs $objdir" ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6317 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6318 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6319
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6320 # Don't error if the file doesn't exist and rm -f was used.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6321 if (test -L "$file") >/dev/null 2>&1 \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6322 || (test -h "$file") >/dev/null 2>&1 \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6323 || test -f "$file"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6324 :
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6325 elif test -d "$file"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6326 exit_status=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6327 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6328 elif test "$rmforce" = yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6329 continue
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6330 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6331
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6332 rmfiles="$file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6333
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6334 case $name in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6335 *.la)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6336 # Possibly a libtool archive, so verify it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6337 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6338 . $dir/$name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6339
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6340 # Delete the libtool libraries and symlinks.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6341 for n in $library_names; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6342 rmfiles="$rmfiles $objdir/$n"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6343 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6344 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6345 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6346
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6347 if test "$mode" = uninstall; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6348 if test -n "$library_names"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6349 # Do each command in the postuninstall commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6350 eval cmds=\"$postuninstall_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6351 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6352 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6353 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6354 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6355 $run eval "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6356 if test "$?" -ne 0 && test "$rmforce" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6357 exit_status=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6358 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6359 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6360 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6361 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6362
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6363 if test -n "$old_library"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6364 # Do each command in the old_postuninstall commands.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6365 eval cmds=\"$old_postuninstall_cmds\"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6366 save_ifs="$IFS"; IFS='~'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6367 for cmd in $cmds; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6368 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6369 $show "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6370 $run eval "$cmd"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6371 if test "$?" -ne 0 && test "$rmforce" != yes; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6372 exit_status=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6373 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6374 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6375 IFS="$save_ifs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6376 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6377 # FIXME: should reinstall the best remaining shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6378 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6379 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6380 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6381
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6382 *.lo)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6383 # Possibly a libtool object, so verify it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6384 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6385
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6386 # Read the .lo file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6387 . $dir/$name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6388
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6389 # Add PIC object to the list of files to remove.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6390 if test -n "$pic_object" \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6391 && test "$pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6392 rmfiles="$rmfiles $dir/$pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6393 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6394
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6395 # Add non-PIC object to the list of files to remove.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6396 if test -n "$non_pic_object" \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6397 && test "$non_pic_object" != none; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6398 rmfiles="$rmfiles $dir/$non_pic_object"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6399 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6400 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6401 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6402
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6403 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6404 if test "$mode" = clean ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6405 noexename=$name
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6406 case $file in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6407 *.exe)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6408 file=`$echo $file|${SED} 's,.exe$,,'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6409 noexename=`$echo $name|${SED} 's,.exe$,,'`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6410 # $file with .exe has already been added to rmfiles,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6411 # add $file without .exe
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6412 rmfiles="$rmfiles $file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6413 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6414 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6415 # Do a test to see if this is a libtool program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6416 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6417 relink_command=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6418 . $dir/$noexename
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6419
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6420 # note $name still contains .exe if it was in $file originally
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6421 # as does the version of $file that was added into $rmfiles
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6422 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6423 if test "$fast_install" = yes && test -n "$relink_command"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6424 rmfiles="$rmfiles $objdir/lt-$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6425 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6426 if test "X$noexename" != "X$name" ; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6427 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6428 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6429 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6430 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6431 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6432 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6433 $show "$rm $rmfiles"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6434 $run $rm $rmfiles || exit_status=1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6435 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6436 objdir="$origobjdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6437
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6438 # Try to remove the ${objdir}s in the directories where we deleted files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6439 for dir in $rmdirs; do
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6440 if test -d "$dir"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6441 $show "rmdir $dir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6442 $run rmdir $dir >/dev/null 2>&1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6443 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6444 done
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6445
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6446 exit $exit_status
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6447 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6448
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6449 "")
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6450 $echo "$modename: you must specify a MODE" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6451 $echo "$generic_help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6452 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6453 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6454 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6455
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6456 if test -z "$exec_cmd"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6457 $echo "$modename: invalid operation mode \`$mode'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6458 $echo "$generic_help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6459 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6460 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6461 fi # test -z "$show_help"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6462
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6463 if test -n "$exec_cmd"; then
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6464 eval exec $exec_cmd
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6465 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6466 fi
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6467
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6468 # We need to display help for each of the modes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6469 case $mode in
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6470 "") $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6471 "Usage: $modename [OPTION]... [MODE-ARG]...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6472
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6473 Provide generalized library-building support services.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6474
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6475 --config show all configuration variables
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6476 --debug enable verbose shell tracing
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6477 -n, --dry-run display commands without modifying any files
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6478 --features display basic configuration information and exit
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6479 --finish same as \`--mode=finish'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6480 --help display this help message and exit
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6481 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6482 --quiet same as \`--silent'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6483 --silent don't print informational messages
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6484 --tag=TAG use configuration variables from tag TAG
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6485 --version print version information
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6486
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6487 MODE must be one of the following:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6488
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6489 clean remove files from the build directory
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6490 compile compile a source file into a libtool object
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6491 execute automatically set library path, then run a program
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6492 finish complete the installation of libtool libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6493 install install libraries or executables
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6494 link create a library or an executable
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6495 uninstall remove libraries from an installed directory
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6496
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6497 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6498 a more detailed description of MODE.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6499
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6500 Report bugs to <bug-libtool@gnu.org>."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6501 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6502 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6503
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6504 clean)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6505 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6506 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6507
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6508 Remove files from the build directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6509
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6510 RM is the name of the program to use to delete files associated with each FILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6511 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6512 to RM.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6513
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6514 If FILE is a libtool library, object or program, all the files associated
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6515 with it are deleted. Otherwise, only FILE itself is deleted using RM."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6516 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6517
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6518 compile)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6519 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6520 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6521
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6522 Compile a source file into a libtool library object.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6523
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6524 This mode accepts the following additional options:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6525
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6526 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6527 -prefer-pic try to building PIC objects only
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6528 -prefer-non-pic try to building non-PIC objects only
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6529 -static always build a \`.o' file suitable for static linking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6530
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6531 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6532 from the given SOURCEFILE.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6533
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6534 The output file name is determined by removing the directory component from
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6535 SOURCEFILE, then substituting the C source code suffix \`.c' with the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6536 library object suffix, \`.lo'."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6537 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6538
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6539 execute)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6540 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6541 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6542
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6543 Automatically set library path, then run a program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6544
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6545 This mode accepts the following additional options:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6546
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6547 -dlopen FILE add the directory containing FILE to the library path
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6548
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6549 This mode sets the library path environment variable according to \`-dlopen'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6550 flags.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6551
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6552 If any of the ARGS are libtool executable wrappers, then they are translated
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6553 into their corresponding uninstalled binary, and any of their required library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6554 directories are added to the library path.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6555
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6556 Then, COMMAND is executed, with ARGS as arguments."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6557 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6558
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6559 finish)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6560 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6561 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6562
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6563 Complete the installation of libtool libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6564
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6565 Each LIBDIR is a directory that contains libtool libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6566
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6567 The commands that this mode executes may require superuser privileges. Use
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6568 the \`--dry-run' option if you just want to see what would be executed."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6569 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6570
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6571 install)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6572 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6573 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6574
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6575 Install executables or libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6576
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6577 INSTALL-COMMAND is the installation command. The first component should be
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6578 either the \`install' or \`cp' program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6579
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6580 The rest of the components are interpreted as arguments to that command (only
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6581 BSD-compatible install options are recognized)."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6582 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6583
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6584 link)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6585 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6586 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6587
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6588 Link object files or libraries together to form another library, or to
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6589 create an executable program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6590
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6591 LINK-COMMAND is a command using the C compiler that you would use to create
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6592 a program from several object files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6593
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6594 The following components of LINK-COMMAND are treated specially:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6595
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6596 -all-static do not do any dynamic linking at all
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6597 -avoid-version do not add a version suffix if possible
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6598 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6599 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6600 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6601 -export-symbols SYMFILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6602 try to export only the symbols listed in SYMFILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6603 -export-symbols-regex REGEX
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6604 try to export only the symbols matching REGEX
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6605 -LLIBDIR search LIBDIR for required installed libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6606 -lNAME OUTPUT-FILE requires the installed library libNAME
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6607 -module build a library that can dlopened
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6608 -no-fast-install disable the fast-install mode
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6609 -no-install link a not-installable executable
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6610 -no-undefined declare that a library does not refer to external symbols
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6611 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6612 -objectlist FILE Use a list of object files found in FILE to specify objects
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6613 -release RELEASE specify package release information
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6614 -rpath LIBDIR the created library will eventually be installed in LIBDIR
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6615 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6616 -static do not do any dynamic linking of libtool libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6617 -version-info CURRENT[:REVISION[:AGE]]
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6618 specify library version info [each variable defaults to 0]
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6619
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6620 All other options (arguments beginning with \`-') are ignored.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6621
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6622 Every other argument is treated as a filename. Files ending in \`.la' are
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6623 treated as uninstalled libtool libraries, other files are standard or library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6624 object files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6625
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6626 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6627 only library objects (\`.lo' files) may be specified, and \`-rpath' is
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6628 required, except when creating a convenience library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6629
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6630 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6631 using \`ar' and \`ranlib', or on Windows using \`lib'.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6632
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6633 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6634 is created, otherwise an executable program is created."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6635 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6636
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6637 uninstall)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6638 $echo \
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6639 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6640
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6641 Remove libraries from an installation directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6642
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6643 RM is the name of the program to use to delete files associated with each FILE
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6644 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6645 to RM.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6646
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6647 If FILE is a libtool library, all the files associated with it are deleted.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6648 Otherwise, only FILE itself is deleted using RM."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6649 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6650
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6651 *)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6652 $echo "$modename: invalid operation mode \`$mode'" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6653 $echo "$help" 1>&2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6654 exit 1
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6655 ;;
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6656 esac
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6657
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6658 $echo
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6659 $echo "Try \`$modename --help' for more information about other modes."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6660
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6661 exit 0
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6662
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6663 # The TAGs below are defined such that we never get into a situation
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6664 # in which we disable both kinds of libraries. Given conflicting
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6665 # choices, we go for a static library, that is the most portable,
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6666 # since we can't tell whether shared libraries were disabled because
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6667 # the user asked for that or because the platform doesn't support
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6668 # them. This is particularly important on AIX, because we don't
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6669 # support having both static and shared libraries enabled at the same
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6670 # time on that platform, so we default to a shared-only configuration.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6671 # If a disable-shared tag is given, we'll fallback to a static-only
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6672 # configuration. But we'll never go from static-only to shared-only.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6673
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6674 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6675 build_libtool_libs=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6676 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6677 # ### END LIBTOOL TAG CONFIG: disable-shared
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6678
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6679 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6680 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6681 # ### END LIBTOOL TAG CONFIG: disable-static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6682
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6683 # Local Variables:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6684 # mode:shell-script
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6685 # sh-indentation:2
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6686 # End:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6687 # ### BEGIN LIBTOOL TAG CONFIG: CXX
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6688
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6689 # Libtool was configured on host ns.five-ten-sg.com:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6690
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6691 # Shell to use when invoking shell scripts.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6692 SHELL="/bin/sh"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6693
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6694 # Whether or not to build shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6695 build_libtool_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6696
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6697 # Whether or not to build static libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6698 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6699
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6700 # Whether or not to add -lc for building shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6701 build_libtool_need_lc=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6702
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6703 # Whether or not to disallow shared libs when runtime libs are static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6704 allow_libtool_libs_with_static_runtimes=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6705
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6706 # Whether or not to optimize for fast installation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6707 fast_install=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6708
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6709 # The host system.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6710 host_alias=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6711 host=i686-redhat-linux-gnu
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6712
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6713 # An echo program that does not interpret backslashes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6714 echo="echo"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6715
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6716 # The archiver.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6717 AR="ar"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6718 AR_FLAGS="cru"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6719
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6720 # A C compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6721 LTCC="gcc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6722
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6723 # A language-specific compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6724 CC="g++"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6725
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6726 # Is the compiler the GNU C compiler?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6727 with_gcc=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6728
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6729 # An ERE matcher.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6730 EGREP="grep -E"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6731
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6732 # The linker used to build libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6733 LD="/usr/bin/ld"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6734
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6735 # Whether we need hard or soft links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6736 LN_S="ln -s"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6737
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6738 # A BSD-compatible nm program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6739 NM="/usr/bin/nm -B"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6740
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6741 # A symbol stripping program
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6742 STRIP="strip"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6743
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6744 # Used to examine libraries when file_magic_cmd begins "file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6745 MAGIC_CMD=file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6746
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6747 # Used on cygwin: DLL creation program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6748 DLLTOOL="dlltool"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6749
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6750 # Used on cygwin: object dumper.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6751 OBJDUMP="objdump"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6752
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6753 # Used on cygwin: assembler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6754 AS="as"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6755
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6756 # The name of the directory that contains temporary libtool files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6757 objdir=.libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6758
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6759 # How to create reloadable object files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6760 reload_flag=" -r"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6761 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6762
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6763 # How to pass a linker flag through the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6764 wl="-Wl,"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6765
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6766 # Object file suffix (normally "o").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6767 objext="o"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6768
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6769 # Old archive suffix (normally "a").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6770 libext="a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6771
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6772 # Shared library suffix (normally ".so").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6773 shrext_cmds='.so'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6774
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6775 # Executable file suffix (normally "").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6776 exeext=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6777
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6778 # Additional compiler flags for building library objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6779 pic_flag=" -fPIC -DPIC"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6780 pic_mode=default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6781
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6782 # What is the maximum length of a command?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6783 max_cmd_len=32768
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6784
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6785 # Does compiler simultaneously support -c and -o options?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6786 compiler_c_o="yes"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6787
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6788 # Must we lock files when doing compilation ?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6789 need_locks="no"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6790
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6791 # Do we need the lib prefix for modules?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6792 need_lib_prefix=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6793
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6794 # Do we need a version for libraries?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6795 need_version=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6796
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6797 # Whether dlopen is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6798 dlopen_support=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6799
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6800 # Whether dlopen of programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6801 dlopen_self=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6802
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6803 # Whether dlopen of statically linked programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6804 dlopen_self_static=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6805
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6806 # Compiler flag to prevent dynamic linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6807 link_static_flag="-static"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6808
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6809 # Compiler flag to turn off builtin functions.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6810 no_builtin_flag=" -fno-builtin"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6811
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6812 # Compiler flag to allow reflexive dlopens.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6813 export_dynamic_flag_spec="\${wl}--export-dynamic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6814
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6815 # Compiler flag to generate shared objects directly from archives.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6816 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6817
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6818 # Compiler flag to generate thread-safe objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6819 thread_safe_flag_spec=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6820
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6821 # Library versioning type.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6822 version_type=linux
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6823
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6824 # Format of library name prefix.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6825 libname_spec="lib\$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6826
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6827 # List of archive names. First name is the real one, the rest are links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6828 # The last name is the one that the linker finds with -lNAME.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6829 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6830
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6831 # The coded name of the library, if different from the real name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6832 soname_spec="\${libname}\${release}\${shared_ext}\$major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6833
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6834 # Commands used to build and install an old-style archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6835 RANLIB="ranlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6836 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6837 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6838 old_postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6839
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6840 # Create an old-style archive from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6841 old_archive_from_new_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6842
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6843 # Create a temporary old-style archive to link instead of a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6844 old_archive_from_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6845
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6846 # Commands used to build and install a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6847 archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6848 archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6849 postinstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6850 postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6851
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6852 # Commands used to build a loadable module (assumed same as above if empty)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6853 module_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6854 module_expsym_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6855
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6856 # Commands to strip libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6857 old_striplib="strip --strip-debug"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6858 striplib="strip --strip-unneeded"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6859
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6860 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6861 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6862 predep_objects="/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../crti.o /usr/lib/gcc/i386-redhat-linux/3.4.4/crtbeginS.o"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6863
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6864 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6865 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6866 postdep_objects="/usr/lib/gcc/i386-redhat-linux/3.4.4/crtendS.o /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../crtn.o"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6867
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6868 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6869 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6870 predeps=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6871
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6872 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6873 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6874 postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6875
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6876 # The library search path used internally by the compiler when linking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6877 # a shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6878 compiler_lib_search_path="-L/usr/lib/gcc/i386-redhat-linux/3.4.4 -L/usr/lib/gcc/i386-redhat-linux/3.4.4 -L/usr/lib/gcc/i386-redhat-linux/3.4.4/../../.."
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6879
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6880 # Method to check whether dependent libraries are shared objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6881 deplibs_check_method="pass_all"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6882
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6883 # Command to use when deplibs_check_method == file_magic.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6884 file_magic_cmd="\$MAGIC_CMD"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6885
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6886 # Flag that allows shared libraries with undefined symbols to be built.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6887 allow_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6888
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6889 # Flag that forces no undefined symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6890 no_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6891
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6892 # Commands used to finish a libtool library installation in a directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6893 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6894
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6895 # Same as above, but a single script fragment to be evaled but not shown.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6896 finish_eval=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6897
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6898 # Take the output of nm and produce a listing of raw symbols and C names.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6899 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6900
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6901 # Transform the output of nm in a proper C declaration
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6902 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6903
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6904 # Transform the output of nm in a C name address pair
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6905 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6906
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6907 # This is the shared library runtime path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6908 runpath_var=LD_RUN_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6909
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6910 # This is the shared library path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6911 shlibpath_var=LD_LIBRARY_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6912
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6913 # Is shlibpath searched before the hard-coded library search path?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6914 shlibpath_overrides_runpath=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6915
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6916 # How to hardcode a shared library path into an executable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6917 hardcode_action=immediate
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6918
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6919 # Whether we should hardcode library paths into libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6920 hardcode_into_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6921
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6922 # Flag to hardcode $libdir into a binary during linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6923 # This must work even if $libdir does not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6924 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6925
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6926 # If ld is used when linking, flag to hardcode $libdir into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6927 # a binary during linking. This must work even if $libdir does
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6928 # not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6929 hardcode_libdir_flag_spec_ld=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6930
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6931 # Whether we need a single -rpath flag with a separated argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6932 hardcode_libdir_separator=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6933
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6934 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6935 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6936 hardcode_direct=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6937
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6938 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6939 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6940 hardcode_minus_L=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6941
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6942 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6943 # the resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6944 hardcode_shlibpath_var=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6945
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6946 # Set to yes if building a shared library automatically hardcodes DIR into the library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6947 # and all subsequent libraries and executables linked against it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6948 hardcode_automatic=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6949
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6950 # Variables whose values should be saved in libtool wrapper scripts and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6951 # restored at relink time.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6952 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6953
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6954 # Whether libtool must link a program against all its dependency libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6955 link_all_deplibs=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6956
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6957 # Compile-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6958 sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../ /lib/i386-redhat-linux/3.4.4/ /lib/ /usr/lib/i386-redhat-linux/3.4.4/ /usr/lib/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6959
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6960 # Run-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6961 sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf /usr/lib/wine "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6962
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6963 # Fix the shell variable $srcfile for the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6964 fix_srcfile_path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6965
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6966 # Set to yes if exported symbols are required.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6967 always_export_symbols=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6968
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6969 # The commands to list exported symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6970 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6971
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6972 # The commands to extract the exported symbol list from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6973 extract_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6974
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6975 # Symbols that should not be listed in the preloaded symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6976 exclude_expsyms=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6977
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6978 # Symbols that must always be exported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6979 include_expsyms=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6980
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6981 # ### END LIBTOOL TAG CONFIG: CXX
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6982
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6983 # ### BEGIN LIBTOOL TAG CONFIG: F77
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6984
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6985 # Libtool was configured on host ns.five-ten-sg.com:
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6986
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6987 # Shell to use when invoking shell scripts.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6988 SHELL="/bin/sh"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6989
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6990 # Whether or not to build shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6991 build_libtool_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6992
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6993 # Whether or not to build static libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6994 build_old_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6995
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6996 # Whether or not to add -lc for building shared libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6997 build_libtool_need_lc=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6998
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
6999 # Whether or not to disallow shared libs when runtime libs are static
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7000 allow_libtool_libs_with_static_runtimes=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7001
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7002 # Whether or not to optimize for fast installation.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7003 fast_install=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7004
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7005 # The host system.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7006 host_alias=
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7007 host=i686-redhat-linux-gnu
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7008
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7009 # An echo program that does not interpret backslashes.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7010 echo="echo"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7011
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7012 # The archiver.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7013 AR="ar"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7014 AR_FLAGS="cru"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7015
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7016 # A C compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7017 LTCC="gcc"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7018
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7019 # A language-specific compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7020 CC="g77"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7021
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7022 # Is the compiler the GNU C compiler?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7023 with_gcc=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7024
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7025 # An ERE matcher.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7026 EGREP="grep -E"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7027
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7028 # The linker used to build libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7029 LD="/usr/bin/ld"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7030
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7031 # Whether we need hard or soft links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7032 LN_S="ln -s"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7033
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7034 # A BSD-compatible nm program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7035 NM="/usr/bin/nm -B"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7036
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7037 # A symbol stripping program
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7038 STRIP="strip"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7039
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7040 # Used to examine libraries when file_magic_cmd begins "file"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7041 MAGIC_CMD=file
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7042
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7043 # Used on cygwin: DLL creation program.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7044 DLLTOOL="dlltool"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7045
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7046 # Used on cygwin: object dumper.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7047 OBJDUMP="objdump"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7048
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7049 # Used on cygwin: assembler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7050 AS="as"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7051
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7052 # The name of the directory that contains temporary libtool files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7053 objdir=.libs
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7054
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7055 # How to create reloadable object files.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7056 reload_flag=" -r"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7057 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7058
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7059 # How to pass a linker flag through the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7060 wl="-Wl,"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7061
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7062 # Object file suffix (normally "o").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7063 objext="o"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7064
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7065 # Old archive suffix (normally "a").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7066 libext="a"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7067
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7068 # Shared library suffix (normally ".so").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7069 shrext_cmds='.so'
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7070
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7071 # Executable file suffix (normally "").
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7072 exeext=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7073
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7074 # Additional compiler flags for building library objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7075 pic_flag=" -fPIC"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7076 pic_mode=default
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7077
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7078 # What is the maximum length of a command?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7079 max_cmd_len=32768
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7080
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7081 # Does compiler simultaneously support -c and -o options?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7082 compiler_c_o="yes"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7083
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7084 # Must we lock files when doing compilation ?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7085 need_locks="no"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7086
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7087 # Do we need the lib prefix for modules?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7088 need_lib_prefix=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7089
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7090 # Do we need a version for libraries?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7091 need_version=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7092
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7093 # Whether dlopen is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7094 dlopen_support=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7095
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7096 # Whether dlopen of programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7097 dlopen_self=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7098
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7099 # Whether dlopen of statically linked programs is supported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7100 dlopen_self_static=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7101
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7102 # Compiler flag to prevent dynamic linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7103 link_static_flag="-static"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7104
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7105 # Compiler flag to turn off builtin functions.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7106 no_builtin_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7107
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7108 # Compiler flag to allow reflexive dlopens.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7109 export_dynamic_flag_spec="\${wl}--export-dynamic"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7110
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7111 # Compiler flag to generate shared objects directly from archives.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7112 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7113
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7114 # Compiler flag to generate thread-safe objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7115 thread_safe_flag_spec=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7116
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7117 # Library versioning type.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7118 version_type=linux
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7119
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7120 # Format of library name prefix.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7121 libname_spec="lib\$name"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7122
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7123 # List of archive names. First name is the real one, the rest are links.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7124 # The last name is the one that the linker finds with -lNAME.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7125 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7126
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7127 # The coded name of the library, if different from the real name.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7128 soname_spec="\${libname}\${release}\${shared_ext}\$major"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7129
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7130 # Commands used to build and install an old-style archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7131 RANLIB="ranlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7132 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7133 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7134 old_postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7135
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7136 # Create an old-style archive from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7137 old_archive_from_new_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7138
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7139 # Create a temporary old-style archive to link instead of a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7140 old_archive_from_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7141
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7142 # Commands used to build and install a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7143 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7144 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7145 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7146 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7147 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7148 postinstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7149 postuninstall_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7150
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7151 # Commands used to build a loadable module (assumed same as above if empty)
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7152 module_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7153 module_expsym_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7154
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7155 # Commands to strip libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7156 old_striplib="strip --strip-debug"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7157 striplib="strip --strip-unneeded"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7158
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7159 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7160 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7161 predep_objects=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7162
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7163 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7164 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7165 postdep_objects=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7166
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7167 # Dependencies to place before the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7168 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7169 predeps=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7170
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7171 # Dependencies to place after the objects being linked to create a
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7172 # shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7173 postdeps=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7174
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7175 # The library search path used internally by the compiler when linking
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7176 # a shared library.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7177 compiler_lib_search_path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7178
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7179 # Method to check whether dependent libraries are shared objects.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7180 deplibs_check_method="pass_all"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7181
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7182 # Command to use when deplibs_check_method == file_magic.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7183 file_magic_cmd="\$MAGIC_CMD"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7184
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7185 # Flag that allows shared libraries with undefined symbols to be built.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7186 allow_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7187
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7188 # Flag that forces no undefined symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7189 no_undefined_flag=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7190
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7191 # Commands used to finish a libtool library installation in a directory.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7192 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7193
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7194 # Same as above, but a single script fragment to be evaled but not shown.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7195 finish_eval=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7196
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7197 # Take the output of nm and produce a listing of raw symbols and C names.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7198 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7199
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7200 # Transform the output of nm in a proper C declaration
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7201 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7202
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7203 # Transform the output of nm in a C name address pair
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7204 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7205
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7206 # This is the shared library runtime path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7207 runpath_var=LD_RUN_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7208
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7209 # This is the shared library path variable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7210 shlibpath_var=LD_LIBRARY_PATH
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7211
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7212 # Is shlibpath searched before the hard-coded library search path?
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7213 shlibpath_overrides_runpath=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7214
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7215 # How to hardcode a shared library path into an executable.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7216 hardcode_action=immediate
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7217
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7218 # Whether we should hardcode library paths into libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7219 hardcode_into_libs=yes
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7220
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7221 # Flag to hardcode $libdir into a binary during linking.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7222 # This must work even if $libdir does not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7223 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7224
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7225 # If ld is used when linking, flag to hardcode $libdir into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7226 # a binary during linking. This must work even if $libdir does
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7227 # not exist.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7228 hardcode_libdir_flag_spec_ld=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7229
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7230 # Whether we need a single -rpath flag with a separated argument.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7231 hardcode_libdir_separator=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7232
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7233 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7234 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7235 hardcode_direct=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7236
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7237 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7238 # resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7239 hardcode_minus_L=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7240
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7241 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7242 # the resulting binary.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7243 hardcode_shlibpath_var=unsupported
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7244
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7245 # Set to yes if building a shared library automatically hardcodes DIR into the library
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7246 # and all subsequent libraries and executables linked against it.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7247 hardcode_automatic=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7248
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7249 # Variables whose values should be saved in libtool wrapper scripts and
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7250 # restored at relink time.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7251 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7252
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7253 # Whether libtool must link a program against all its dependency libraries.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7254 link_all_deplibs=unknown
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7255
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7256 # Compile-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7257 sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../i386-redhat-linux/3.4.4/ /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../ /lib/i386-redhat-linux/3.4.4/ /lib/ /usr/lib/i386-redhat-linux/3.4.4/ /usr/lib/"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7258
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7259 # Run-time system search path for libraries
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7260 sys_lib_dlsearch_path_spec="/lib /usr/lib include ld.so.conf.d/*.conf /usr/lib/wine "
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7261
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7262 # Fix the shell variable $srcfile for the compiler.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7263 fix_srcfile_path=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7264
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7265 # Set to yes if exported symbols are required.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7266 always_export_symbols=no
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7267
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7268 # The commands to list exported symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7269 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7270
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7271 # The commands to extract the exported symbol list from a shared archive.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7272 extract_expsyms_cmds=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7273
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7274 # Symbols that should not be listed in the preloaded symbols.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7275 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7276
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7277 # Symbols that must always be exported.
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7278 include_expsyms=""
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7279
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7280 # ### END LIBTOOL TAG CONFIG: F77
91b26521effc re-add missing autoconf files
carl
parents:
diff changeset
7281