]>
Commit | Line | Data |
---|---|---|
aa1e3b4d | 1 | # aclocal.m4 generated automatically by aclocal 1.6.1 -*- Autoconf -*- |
f6100b6f RC |
2 | |
3 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 | |
4 | # Free Software Foundation, Inc. | |
5 | # This file is free software; the Free Software Foundation | |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
14 | # Do all the work for Automake. -*- Autoconf -*- | |
15 | ||
16 | # This macro actually does too much some checks are only needed if | |
17 | # your package does certain things. But this isn't really a big deal. | |
18 | ||
19 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 | |
20 | # Free Software Foundation, Inc. | |
21 | ||
22 | # This program is free software; you can redistribute it and/or modify | |
23 | # it under the terms of the GNU General Public License as published by | |
24 | # the Free Software Foundation; either version 2, or (at your option) | |
25 | # any later version. | |
26 | ||
27 | # This program is distributed in the hope that it will be useful, | |
28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
30 | # GNU General Public License for more details. | |
31 | ||
32 | # You should have received a copy of the GNU General Public License | |
33 | # along with this program; if not, write to the Free Software | |
34 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
35 | # 02111-1307, USA. | |
36 | ||
37 | # serial 8 | |
38 | ||
39 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | |
40 | # written in clear, in which case automake, when reading aclocal.m4, | |
41 | # will think it sees a *use*, and therefore will trigger all it's | |
42 | # C support machinery. Also note that it means that autoscan, seeing | |
43 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
44 | ||
45 | ||
46 | AC_PREREQ([2.52]) | |
47 | ||
48 | # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow | |
49 | # the ones we care about. | |
50 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
51 | ||
52 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
53 | # AM_INIT_AUTOMAKE([OPTIONS]) | |
54 | # ----------------------------------------------- | |
55 | # The call with PACKAGE and VERSION arguments is the old style | |
56 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | |
57 | # and VERSION should now be passed to AC_INIT and removed from | |
58 | # the call to AM_INIT_AUTOMAKE. | |
59 | # We support both call styles for the transition. After | |
60 | # the next Automake release, Autoconf can make the AC_INIT | |
61 | # arguments mandatory, and then we can depend on a new Autoconf | |
62 | # release and drop the old call support. | |
63 | AC_DEFUN([AM_INIT_AUTOMAKE], | |
64 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
65 | AC_REQUIRE([AC_PROG_INSTALL])dnl | |
66 | # test to see if srcdir already configured | |
67 | if test "`cd $srcdir && pwd`" != "`pwd`" && | |
68 | test -f $srcdir/config.status; then | |
69 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
70 | fi | |
71 | ||
72 | # Define the identity of the package. | |
73 | dnl Distinguish between old-style and new-style calls. | |
74 | m4_ifval([$2], | |
75 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
76 | AC_SUBST([PACKAGE], [$1])dnl | |
77 | AC_SUBST([VERSION], [$2])], | |
78 | [_AM_SET_OPTIONS([$1])dnl | |
79 | AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl | |
80 | AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl | |
81 | ||
82 | _AM_IF_OPTION([no-define],, | |
83 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
84 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl | |
85 | ||
86 | # Some tools Automake needs. | |
87 | AC_REQUIRE([AM_SANITY_CHECK])dnl | |
88 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
aa1e3b4d | 89 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
f6100b6f | 90 | AM_MISSING_PROG(AUTOCONF, autoconf) |
aa1e3b4d | 91 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
f6100b6f RC |
92 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
93 | AM_MISSING_PROG(MAKEINFO, makeinfo) | |
94 | AM_MISSING_PROG(AMTAR, tar) | |
95 | AM_PROG_INSTALL_SH | |
96 | AM_PROG_INSTALL_STRIP | |
97 | # We need awk for the "check" target. The system "awk" is bad on | |
98 | # some platforms. | |
99 | AC_REQUIRE([AC_PROG_AWK])dnl | |
100 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
101 | ||
102 | _AM_IF_OPTION([no-dependencies],, | |
103 | [AC_PROVIDE_IFELSE([AC_PROG_][CC], | |
104 | [_AM_DEPENDENCIES(CC)], | |
105 | [define([AC_PROG_][CC], | |
106 | defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl | |
107 | AC_PROVIDE_IFELSE([AC_PROG_][CXX], | |
108 | [_AM_DEPENDENCIES(CXX)], | |
109 | [define([AC_PROG_][CXX], | |
110 | defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl | |
111 | ]) | |
112 | ]) | |
113 | ||
114 | # Copyright 2002 Free Software Foundation, Inc. | |
115 | ||
116 | # This program is free software; you can redistribute it and/or modify | |
117 | # it under the terms of the GNU General Public License as published by | |
118 | # the Free Software Foundation; either version 2, or (at your option) | |
119 | # any later version. | |
120 | ||
121 | # This program is distributed in the hope that it will be useful, | |
122 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
123 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
124 | # GNU General Public License for more details. | |
125 | ||
126 | # You should have received a copy of the GNU General Public License | |
127 | # along with this program; if not, write to the Free Software | |
128 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
129 | ||
130 | # AM_AUTOMAKE_VERSION(VERSION) | |
131 | # ---------------------------- | |
132 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | |
133 | # generated from the m4 files accompanying Automake X.Y. | |
134 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) | |
135 | ||
136 | # AM_SET_CURRENT_AUTOMAKE_VERSION | |
137 | # ------------------------------- | |
138 | # Call AM_AUTOMAKE_VERSION so it can be traced. | |
139 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. | |
140 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
aa1e3b4d | 141 | [AM_AUTOMAKE_VERSION([1.6.1])]) |
f6100b6f RC |
142 | |
143 | # Helper functions for option handling. -*- Autoconf -*- | |
144 | ||
145 | # Copyright 2001, 2002 Free Software Foundation, Inc. | |
146 | ||
147 | # This program is free software; you can redistribute it and/or modify | |
148 | # it under the terms of the GNU General Public License as published by | |
149 | # the Free Software Foundation; either version 2, or (at your option) | |
150 | # any later version. | |
151 | ||
152 | # This program is distributed in the hope that it will be useful, | |
153 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
154 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
155 | # GNU General Public License for more details. | |
156 | ||
157 | # You should have received a copy of the GNU General Public License | |
158 | # along with this program; if not, write to the Free Software | |
159 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
160 | # 02111-1307, USA. | |
161 | ||
162 | # serial 2 | |
163 | ||
164 | # _AM_MANGLE_OPTION(NAME) | |
165 | # ----------------------- | |
166 | AC_DEFUN([_AM_MANGLE_OPTION], | |
167 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
168 | ||
169 | # _AM_SET_OPTION(NAME) | |
170 | # ------------------------------ | |
171 | # Set option NAME. Presently that only means defining a flag for this option. | |
172 | AC_DEFUN([_AM_SET_OPTION], | |
173 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) | |
174 | ||
175 | # _AM_SET_OPTIONS(OPTIONS) | |
176 | # ---------------------------------- | |
177 | # OPTIONS is a space-separated list of Automake options. | |
178 | AC_DEFUN([_AM_SET_OPTIONS], | |
179 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | |
180 | ||
181 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
182 | # ------------------------------------------- | |
183 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
184 | AC_DEFUN([_AM_IF_OPTION], | |
185 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
186 | ||
187 | # | |
188 | # Check to make sure that the build environment is sane. | |
189 | # | |
190 | ||
191 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. | |
192 | ||
193 | # This program is free software; you can redistribute it and/or modify | |
194 | # it under the terms of the GNU General Public License as published by | |
195 | # the Free Software Foundation; either version 2, or (at your option) | |
196 | # any later version. | |
197 | ||
198 | # This program is distributed in the hope that it will be useful, | |
199 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
200 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
201 | # GNU General Public License for more details. | |
202 | ||
203 | # You should have received a copy of the GNU General Public License | |
204 | # along with this program; if not, write to the Free Software | |
205 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
206 | # 02111-1307, USA. | |
207 | ||
208 | # serial 3 | |
209 | ||
210 | # AM_SANITY_CHECK | |
211 | # --------------- | |
212 | AC_DEFUN([AM_SANITY_CHECK], | |
213 | [AC_MSG_CHECKING([whether build environment is sane]) | |
214 | # Just in case | |
215 | sleep 1 | |
216 | echo timestamp > conftest.file | |
217 | # Do `set' in a subshell so we don't clobber the current shell's | |
218 | # arguments. Must try -L first in case configure is actually a | |
219 | # symlink; some systems play weird games with the mod time of symlinks | |
220 | # (eg FreeBSD returns the mod time of the symlink's containing | |
221 | # directory). | |
222 | if ( | |
223 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` | |
224 | if test "$[*]" = "X"; then | |
225 | # -L didn't work. | |
226 | set X `ls -t $srcdir/configure conftest.file` | |
227 | fi | |
228 | rm -f conftest.file | |
229 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
230 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
231 | ||
232 | # If neither matched, then we have a broken ls. This can happen | |
233 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
234 | # broken ls alias from the environment. This has actually | |
235 | # happened. Such a system could not be considered "sane". | |
236 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
237 | alias in your environment]) | |
238 | fi | |
239 | ||
240 | test "$[2]" = conftest.file | |
241 | ) | |
242 | then | |
243 | # Ok. | |
244 | : | |
245 | else | |
246 | AC_MSG_ERROR([newly created file is older than distributed files! | |
247 | Check your system clock]) | |
248 | fi | |
249 | AC_MSG_RESULT(yes)]) | |
250 | ||
251 | # -*- Autoconf -*- | |
252 | ||
253 | ||
254 | # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. | |
255 | ||
256 | # This program is free software; you can redistribute it and/or modify | |
257 | # it under the terms of the GNU General Public License as published by | |
258 | # the Free Software Foundation; either version 2, or (at your option) | |
259 | # any later version. | |
260 | ||
261 | # This program is distributed in the hope that it will be useful, | |
262 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
263 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
264 | # GNU General Public License for more details. | |
265 | ||
266 | # You should have received a copy of the GNU General Public License | |
267 | # along with this program; if not, write to the Free Software | |
268 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
269 | # 02111-1307, USA. | |
270 | ||
271 | # serial 3 | |
272 | ||
273 | # AM_MISSING_PROG(NAME, PROGRAM) | |
274 | # ------------------------------ | |
275 | AC_DEFUN([AM_MISSING_PROG], | |
276 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
277 | $1=${$1-"${am_missing_run}$2"} | |
278 | AC_SUBST($1)]) | |
279 | ||
280 | ||
281 | # AM_MISSING_HAS_RUN | |
282 | # ------------------ | |
283 | # Define MISSING if not defined so far and test if it supports --run. | |
284 | # If it does, set am_missing_run to use it, otherwise, to nothing. | |
285 | AC_DEFUN([AM_MISSING_HAS_RUN], | |
286 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
287 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" | |
288 | # Use eval to expand $SHELL | |
289 | if eval "$MISSING --run true"; then | |
290 | am_missing_run="$MISSING --run " | |
291 | else | |
292 | am_missing_run= | |
293 | AC_MSG_WARN([`missing' script is too old or missing]) | |
294 | fi | |
295 | ]) | |
296 | ||
297 | # AM_AUX_DIR_EXPAND | |
298 | ||
299 | # Copyright 2001 Free Software Foundation, Inc. | |
300 | ||
301 | # This program is free software; you can redistribute it and/or modify | |
302 | # it under the terms of the GNU General Public License as published by | |
303 | # the Free Software Foundation; either version 2, or (at your option) | |
304 | # any later version. | |
305 | ||
306 | # This program is distributed in the hope that it will be useful, | |
307 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
308 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
309 | # GNU General Public License for more details. | |
310 | ||
311 | # You should have received a copy of the GNU General Public License | |
312 | # along with this program; if not, write to the Free Software | |
313 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
314 | # 02111-1307, USA. | |
315 | ||
316 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
317 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to | |
318 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. | |
319 | # | |
320 | # Of course, Automake must honor this variable whenever it calls a | |
321 | # tool from the auxiliary directory. The problem is that $srcdir (and | |
322 | # therefore $ac_aux_dir as well) can be either absolute or relative, | |
323 | # depending on how configure is run. This is pretty annoying, since | |
324 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
325 | # source directory, any form will work fine, but in subdirectories a | |
326 | # relative path needs to be adjusted first. | |
327 | # | |
328 | # $ac_aux_dir/missing | |
329 | # fails when called from a subdirectory if $ac_aux_dir is relative | |
330 | # $top_srcdir/$ac_aux_dir/missing | |
331 | # fails if $ac_aux_dir is absolute, | |
332 | # fails when called from a subdirectory in a VPATH build with | |
333 | # a relative $ac_aux_dir | |
334 | # | |
335 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
336 | # are both prefixed by $srcdir. In an in-source build this is usually | |
337 | # harmless because $srcdir is `.', but things will broke when you | |
338 | # start a VPATH build or use an absolute $srcdir. | |
339 | # | |
340 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
341 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
342 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
343 | # and then we would define $MISSING as | |
344 | # MISSING="\${SHELL} $am_aux_dir/missing" | |
345 | # This will work as long as MISSING is not called from configure, because | |
346 | # unfortunately $(top_srcdir) has no meaning in configure. | |
347 | # However there are other variables, like CC, which are often used in | |
348 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | |
349 | # | |
350 | # Another solution, used here, is to always expand $ac_aux_dir to an | |
351 | # absolute PATH. The drawback is that using absolute paths prevent a | |
352 | # configured tree to be moved without reconfiguration. | |
353 | ||
354 | # Rely on autoconf to set up CDPATH properly. | |
355 | AC_PREREQ([2.50]) | |
356 | ||
357 | AC_DEFUN([AM_AUX_DIR_EXPAND], [ | |
358 | # expand $ac_aux_dir to an absolute path | |
359 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
360 | ]) | |
361 | ||
362 | # AM_PROG_INSTALL_SH | |
363 | # ------------------ | |
364 | # Define $install_sh. | |
365 | ||
366 | # Copyright 2001 Free Software Foundation, Inc. | |
367 | ||
368 | # This program is free software; you can redistribute it and/or modify | |
369 | # it under the terms of the GNU General Public License as published by | |
370 | # the Free Software Foundation; either version 2, or (at your option) | |
371 | # any later version. | |
372 | ||
373 | # This program is distributed in the hope that it will be useful, | |
374 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
375 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
376 | # GNU General Public License for more details. | |
377 | ||
378 | # You should have received a copy of the GNU General Public License | |
379 | # along with this program; if not, write to the Free Software | |
380 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
381 | # 02111-1307, USA. | |
382 | ||
383 | AC_DEFUN([AM_PROG_INSTALL_SH], | |
384 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
385 | install_sh=${install_sh-"$am_aux_dir/install-sh"} | |
386 | AC_SUBST(install_sh)]) | |
387 | ||
388 | # AM_PROG_INSTALL_STRIP | |
389 | ||
390 | # Copyright 2001 Free Software Foundation, Inc. | |
391 | ||
392 | # This program is free software; you can redistribute it and/or modify | |
393 | # it under the terms of the GNU General Public License as published by | |
394 | # the Free Software Foundation; either version 2, or (at your option) | |
395 | # any later version. | |
396 | ||
397 | # This program is distributed in the hope that it will be useful, | |
398 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
399 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
400 | # GNU General Public License for more details. | |
401 | ||
402 | # You should have received a copy of the GNU General Public License | |
403 | # along with this program; if not, write to the Free Software | |
404 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
405 | # 02111-1307, USA. | |
406 | ||
407 | # One issue with vendor `install' (even GNU) is that you can't | |
408 | # specify the program used to strip binaries. This is especially | |
409 | # annoying in cross-compiling environments, where the build's strip | |
410 | # is unlikely to handle the host's binaries. | |
411 | # Fortunately install-sh will honor a STRIPPROG variable, so we | |
412 | # always use install-sh in `make install-strip', and initialize | |
413 | # STRIPPROG with the value of the STRIP variable (set by the user). | |
414 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
415 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
416 | # Installed binaries are usually stripped using `strip' when the user | |
417 | # run `make install-strip'. However `strip' might not be the right | |
418 | # tool to use in cross-compilation environments, therefore Automake | |
419 | # will honor the `STRIP' environment variable to overrule this program. | |
420 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. | |
421 | if test "$cross_compiling" != no; then | |
422 | AC_CHECK_TOOL([STRIP], [strip], :) | |
423 | fi | |
424 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | |
425 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | |
426 | ||
427 | # serial 4 -*- Autoconf -*- | |
428 | ||
429 | # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. | |
430 | ||
431 | # This program is free software; you can redistribute it and/or modify | |
432 | # it under the terms of the GNU General Public License as published by | |
433 | # the Free Software Foundation; either version 2, or (at your option) | |
434 | # any later version. | |
435 | ||
436 | # This program is distributed in the hope that it will be useful, | |
437 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
438 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
439 | # GNU General Public License for more details. | |
440 | ||
441 | # You should have received a copy of the GNU General Public License | |
442 | # along with this program; if not, write to the Free Software | |
443 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
444 | # 02111-1307, USA. | |
445 | ||
446 | ||
447 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | |
448 | # written in clear, in which case automake, when reading aclocal.m4, | |
449 | # will think it sees a *use*, and therefore will trigger all it's | |
450 | # C support machinery. Also note that it means that autoscan, seeing | |
451 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
452 | ||
453 | ||
454 | ||
455 | # _AM_DEPENDENCIES(NAME) | |
456 | # ---------------------- | |
457 | # See how the compiler implements dependency checking. | |
458 | # NAME is "CC", "CXX", "GCJ", or "OBJC". | |
459 | # We try a few techniques and use that to set a single cache variable. | |
460 | # | |
461 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
462 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
463 | # dependency, and given that the user is not expected to run this macro, | |
464 | # just rely on AC_PROG_CC. | |
465 | AC_DEFUN([_AM_DEPENDENCIES], | |
466 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | |
467 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
468 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
469 | AC_REQUIRE([AM_DEP_TRACK])dnl | |
470 | ||
471 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], | |
472 | [$1], CXX, [depcc="$CXX" am_compiler_list=], | |
473 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] | |
474 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | |
475 | [depcc="$$1" am_compiler_list=]) | |
476 | ||
477 | AC_CACHE_CHECK([dependency style of $depcc], | |
478 | [am_cv_$1_dependencies_compiler_type], | |
479 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
480 | # We make a subdir and do the tests there. Otherwise we can end up | |
481 | # making bogus files that we don't know about and never remove. For | |
482 | # instance it was reported that on HP-UX the gcc test will end up | |
483 | # making a dummy file named `D' -- because `-MD' means `put the output | |
484 | # in D'. | |
485 | mkdir conftest.dir | |
486 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
487 | # using a relative directory. | |
488 | cp "$am_depcomp" conftest.dir | |
489 | cd conftest.dir | |
490 | ||
491 | am_cv_$1_dependencies_compiler_type=none | |
492 | if test "$am_compiler_list" = ""; then | |
493 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
494 | fi | |
495 | for depmode in $am_compiler_list; do | |
496 | # We need to recreate these files for each test, as the compiler may | |
497 | # overwrite some of them when testing with obscure command lines. | |
498 | # This happens at least with the AIX C compiler. | |
499 | echo '#include "conftest.h"' > conftest.c | |
500 | echo 'int i;' > conftest.h | |
501 | echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf | |
502 | ||
503 | case $depmode in | |
504 | nosideeffect) | |
505 | # after this tag, mechanisms are not by side-effect, so they'll | |
506 | # only be used when explicitly requested | |
507 | if test "x$enable_dependency_tracking" = xyes; then | |
508 | continue | |
509 | else | |
510 | break | |
511 | fi | |
512 | ;; | |
513 | none) break ;; | |
514 | esac | |
515 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
516 | # mode. It turns out that the SunPro C++ compiler does not properly | |
517 | # handle `-M -o', and we need to detect this. | |
518 | if depmode=$depmode \ | |
519 | source=conftest.c object=conftest.o \ | |
520 | depfile=conftest.Po tmpdepfile=conftest.TPo \ | |
521 | $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && | |
522 | grep conftest.h conftest.Po > /dev/null 2>&1 && | |
523 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
524 | am_cv_$1_dependencies_compiler_type=$depmode | |
525 | break | |
526 | fi | |
527 | done | |
528 | ||
529 | cd .. | |
530 | rm -rf conftest.dir | |
531 | else | |
532 | am_cv_$1_dependencies_compiler_type=none | |
533 | fi | |
534 | ]) | |
535 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
536 | ]) | |
537 | ||
538 | ||
539 | # AM_SET_DEPDIR | |
540 | # ------------- | |
541 | # Choose a directory name for dependency files. | |
542 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | |
543 | AC_DEFUN([AM_SET_DEPDIR], | |
544 | [rm -f .deps 2>/dev/null | |
545 | mkdir .deps 2>/dev/null | |
546 | if test -d .deps; then | |
547 | DEPDIR=.deps | |
548 | else | |
549 | # MS-DOS does not allow filenames that begin with a dot. | |
550 | DEPDIR=_deps | |
551 | fi | |
552 | rmdir .deps 2>/dev/null | |
553 | AC_SUBST([DEPDIR]) | |
554 | ]) | |
555 | ||
556 | ||
557 | # AM_DEP_TRACK | |
558 | # ------------ | |
559 | AC_DEFUN([AM_DEP_TRACK], | |
560 | [AC_ARG_ENABLE(dependency-tracking, | |
561 | [ --disable-dependency-tracking Speeds up one-time builds | |
562 | --enable-dependency-tracking Do not reject slow dependency extractors]) | |
563 | if test "x$enable_dependency_tracking" != xno; then | |
564 | am_depcomp="$ac_aux_dir/depcomp" | |
565 | AMDEPBACKSLASH='\' | |
566 | fi | |
567 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
568 | AC_SUBST([AMDEPBACKSLASH]) | |
569 | ]) | |
570 | ||
571 | # Generate code to set up dependency tracking. -*- Autoconf -*- | |
572 | ||
573 | # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | |
574 | ||
575 | # This program is free software; you can redistribute it and/or modify | |
576 | # it under the terms of the GNU General Public License as published by | |
577 | # the Free Software Foundation; either version 2, or (at your option) | |
578 | # any later version. | |
579 | ||
580 | # This program is distributed in the hope that it will be useful, | |
581 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
582 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
583 | # GNU General Public License for more details. | |
584 | ||
585 | # You should have received a copy of the GNU General Public License | |
586 | # along with this program; if not, write to the Free Software | |
587 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
588 | # 02111-1307, USA. | |
589 | ||
590 | #serial 2 | |
591 | ||
592 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | |
593 | # ------------------------------ | |
594 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
595 | [for mf in $CONFIG_FILES; do | |
596 | # Strip MF so we end up with the name of the file. | |
597 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
598 | if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then | |
599 | dirpart=`AS_DIRNAME("$mf")` | |
600 | else | |
601 | continue | |
602 | fi | |
603 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue | |
604 | # Extract the definition of DEP_FILES from the Makefile without | |
605 | # running `make'. | |
606 | DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` | |
607 | test -z "$DEPDIR" && continue | |
608 | # When using ansi2knr, U may be empty or an underscore; expand it | |
609 | U=`sed -n -e '/^U = / s///p' < "$mf"` | |
610 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" | |
611 | # We invoke sed twice because it is the simplest approach to | |
612 | # changing $(DEPDIR) to its actual value in the expansion. | |
613 | for file in `sed -n -e ' | |
614 | /^DEP_FILES = .*\\\\$/ { | |
615 | s/^DEP_FILES = // | |
616 | :loop | |
617 | s/\\\\$// | |
618 | p | |
619 | n | |
620 | /\\\\$/ b loop | |
621 | p | |
622 | } | |
623 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ | |
624 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
625 | # Make sure the directory exists. | |
626 | test -f "$dirpart/$file" && continue | |
627 | fdir=`AS_DIRNAME(["$file"])` | |
628 | AS_MKDIR_P([$dirpart/$fdir]) | |
629 | # echo "creating $dirpart/$file" | |
630 | echo '# dummy' > "$dirpart/$file" | |
631 | done | |
632 | done | |
633 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
634 | ||
635 | ||
636 | # AM_OUTPUT_DEPENDENCY_COMMANDS | |
637 | # ----------------------------- | |
638 | # This macro should only be invoked once -- use via AC_REQUIRE. | |
639 | # | |
640 | # This code is only required when automatic dependency tracking | |
641 | # is enabled. FIXME. This creates each `.P' file that we will | |
642 | # need in order to bootstrap the dependency handling code. | |
643 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
644 | [AC_CONFIG_COMMANDS([depfiles], | |
645 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
646 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
647 | ]) | |
648 | ||
649 | # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- | |
650 | ||
651 | # This program is free software; you can redistribute it and/or modify | |
652 | # it under the terms of the GNU General Public License as published by | |
653 | # the Free Software Foundation; either version 2, or (at your option) | |
654 | # any later version. | |
655 | ||
656 | # This program is distributed in the hope that it will be useful, | |
657 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
658 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
659 | # GNU General Public License for more details. | |
660 | ||
661 | # You should have received a copy of the GNU General Public License | |
662 | # along with this program; if not, write to the Free Software | |
663 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
664 | # 02111-1307, USA. | |
665 | ||
666 | # serial 2 | |
667 | ||
668 | # AM_MAKE_INCLUDE() | |
669 | # ----------------- | |
670 | # Check to see how make treats includes. | |
671 | AC_DEFUN([AM_MAKE_INCLUDE], | |
672 | [am_make=${MAKE-make} | |
673 | cat > confinc << 'END' | |
674 | doit: | |
675 | @echo done | |
676 | END | |
677 | # If we don't find an include directive, just comment out the code. | |
678 | AC_MSG_CHECKING([for style of include used by $am_make]) | |
679 | am__include="#" | |
680 | am__quote= | |
681 | _am_result=none | |
682 | # First try GNU make style include. | |
683 | echo "include confinc" > confmf | |
684 | # We grep out `Entering directory' and `Leaving directory' | |
685 | # messages which can occur if `w' ends up in MAKEFLAGS. | |
686 | # In particular we don't look at `^make:' because GNU make might | |
687 | # be invoked under some other name (usually "gmake"), in which | |
688 | # case it prints its new name instead of `make'. | |
689 | if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then | |
690 | am__include=include | |
691 | am__quote= | |
692 | _am_result=GNU | |
693 | fi | |
694 | # Now try BSD make style include. | |
695 | if test "$am__include" = "#"; then | |
696 | echo '.include "confinc"' > confmf | |
697 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then | |
698 | am__include=.include | |
699 | am__quote="\"" | |
700 | _am_result=BSD | |
701 | fi | |
702 | fi | |
703 | AC_SUBST(am__include) | |
704 | AC_SUBST(am__quote) | |
705 | AC_MSG_RESULT($_am_result) | |
706 | rm -f confinc confmf | |
707 | ]) | |
708 | ||
709 | # AM_CONDITIONAL -*- Autoconf -*- | |
710 | ||
711 | # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. | |
712 | ||
713 | # This program is free software; you can redistribute it and/or modify | |
714 | # it under the terms of the GNU General Public License as published by | |
715 | # the Free Software Foundation; either version 2, or (at your option) | |
716 | # any later version. | |
717 | ||
718 | # This program is distributed in the hope that it will be useful, | |
719 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
720 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
721 | # GNU General Public License for more details. | |
722 | ||
723 | # You should have received a copy of the GNU General Public License | |
724 | # along with this program; if not, write to the Free Software | |
725 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
726 | # 02111-1307, USA. | |
727 | ||
728 | # serial 5 | |
729 | ||
730 | AC_PREREQ(2.52) | |
731 | ||
732 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
733 | # ------------------------------------- | |
734 | # Define a conditional. | |
735 | AC_DEFUN([AM_CONDITIONAL], | |
736 | [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
737 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
738 | AC_SUBST([$1_TRUE]) | |
739 | AC_SUBST([$1_FALSE]) | |
740 | if $2; then | |
741 | $1_TRUE= | |
742 | $1_FALSE='#' | |
743 | else | |
744 | $1_TRUE='#' | |
745 | $1_FALSE= | |
746 | fi | |
747 | AC_CONFIG_COMMANDS_PRE( | |
748 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
749 | AC_MSG_ERROR([conditional \"$1\" was never defined. | |
750 | Usually this means the macro was only invoked conditionally.]) | |
751 | fi])]) | |
752 | ||
753 | # Add --enable-maintainer-mode option to configure. | |
754 | # From Jim Meyering | |
755 | ||
756 | # Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc. | |
757 | ||
758 | # This program is free software; you can redistribute it and/or modify | |
759 | # it under the terms of the GNU General Public License as published by | |
760 | # the Free Software Foundation; either version 2, or (at your option) | |
761 | # any later version. | |
762 | ||
763 | # This program is distributed in the hope that it will be useful, | |
764 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
765 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
766 | # GNU General Public License for more details. | |
767 | ||
768 | # You should have received a copy of the GNU General Public License | |
769 | # along with this program; if not, write to the Free Software | |
770 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
771 | # 02111-1307, USA. | |
772 | ||
773 | # serial 1 | |
774 | ||
775 | AC_DEFUN([AM_MAINTAINER_MODE], | |
776 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
777 | dnl maintainer-mode is disabled by default | |
778 | AC_ARG_ENABLE(maintainer-mode, | |
779 | [ --enable-maintainer-mode enable make rules and dependencies not useful | |
780 | (and sometimes confusing) to the casual installer], | |
781 | USE_MAINTAINER_MODE=$enableval, | |
782 | USE_MAINTAINER_MODE=no) | |
783 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | |
784 | AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) | |
785 | MAINT=$MAINTAINER_MODE_TRUE | |
786 | AC_SUBST(MAINT)dnl | |
787 | ] | |
788 | ) | |
789 | ||
790 | # serial 2 | |
791 | ||
792 | # AM_PROG_CC_C_O | |
793 | # -------------- | |
794 | # Like AC_PROG_CC_C_O, but changed for automake. | |
795 | ||
796 | # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. | |
797 | ||
798 | # This program is free software; you can redistribute it and/or modify | |
799 | # it under the terms of the GNU General Public License as published by | |
800 | # the Free Software Foundation; either version 2, or (at your option) | |
801 | # any later version. | |
802 | ||
803 | # This program is distributed in the hope that it will be useful, | |
804 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
805 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
806 | # GNU General Public License for more details. | |
807 | ||
808 | # You should have received a copy of the GNU General Public License | |
809 | # along with this program; if not, write to the Free Software | |
810 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
811 | # 02111-1307, USA. | |
812 | ||
813 | AC_DEFUN([AM_PROG_CC_C_O], | |
814 | [AC_REQUIRE([AC_PROG_CC_C_O])dnl | |
815 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
816 | # FIXME: we rely on the cache variable name because | |
817 | # there is no other way. | |
818 | set dummy $CC | |
819 | ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` | |
820 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
821 | # Losing compiler, so override with the script. | |
822 | # FIXME: It is wrong to rewrite CC. | |
823 | # But if we don't then we get into trouble of one sort or another. | |
824 | # A longer-term fix would be to have automake use am__CC in this case, | |
825 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
826 | CC="$am_aux_dir/compile $CC" | |
827 | fi | |
828 | ]) | |
829 | ||
830 | ||
831 | # Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | |
832 | ||
833 | # This program is free software; you can redistribute it and/or modify | |
834 | # it under the terms of the GNU General Public License as published by | |
835 | # the Free Software Foundation; either version 2, or (at your option) | |
836 | # any later version. | |
837 | ||
838 | # This program is distributed in the hope that it will be useful, | |
839 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
840 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
841 | # GNU General Public License for more details. | |
842 | ||
843 | # You should have received a copy of the GNU General Public License | |
844 | # along with this program; if not, write to the Free Software | |
845 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
846 | # 02111-1307, USA. | |
847 | ||
848 | # serial 3 | |
849 | ||
850 | AC_PREREQ(2.50) | |
851 | ||
852 | # AM_PROG_LEX | |
853 | # ----------- | |
854 | # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a | |
855 | # "missing" invocation, for better error output. | |
856 | AC_DEFUN([AM_PROG_LEX], | |
857 | [AC_REQUIRE([AM_MISSING_HAS_RUN])dnl | |
858 | AC_REQUIRE([AC_PROG_LEX])dnl | |
859 | if test "$LEX" = :; then | |
860 | LEX=${am_missing_run}flex | |
861 | fi]) | |
862 | ||
6908b7d7 RC |
863 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
864 | ||
865 | # serial 47 AC_PROG_LIBTOOL | |
866 | ||
867 | # AC_PROG_LIBTOOL | |
868 | # --------------- | |
869 | AC_DEFUN([AC_PROG_LIBTOOL], | |
870 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl | |
871 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX | |
872 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. | |
873 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
874 | [AC_LIBTOOL_CXX], | |
875 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX | |
876 | ])]) | |
877 | ||
878 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. | |
879 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run | |
880 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. | |
881 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], | |
882 | [AC_LIBTOOL_GCJ], | |
883 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | |
884 | [AC_LIBTOOL_GCJ], | |
885 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], | |
886 | [AC_LIBTOOL_GCJ], | |
887 | [ifdef([AC_PROG_GCJ], | |
888 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | |
889 | ifdef([A][M_PROG_GCJ], | |
890 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | |
891 | ifdef([LT_AC_PROG_GCJ], | |
892 | [define([LT_AC_PROG_GCJ], | |
893 | defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) | |
894 | ])])# AC_PROG_LIBTOOL | |
895 | ||
896 | ||
897 | # _AC_PROG_LIBTOOL | |
898 | # ---------------- | |
899 | AC_DEFUN([_AC_PROG_LIBTOOL], | |
900 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
901 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl | |
902 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl | |
903 | ||
904 | # This can be used to rebuild libtool when needed | |
905 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" | |
906 | ||
907 | # Always use our own libtool. | |
908 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
909 | AC_SUBST(LIBTOOL)dnl | |
910 | ||
911 | # Prevent multiple expansion | |
912 | define([AC_PROG_LIBTOOL], []) | |
913 | ])# _AC_PROG_LIBTOOL | |
914 | ||
915 | ||
916 | # AC_LIBTOOL_SETUP | |
917 | # ---------------- | |
918 | AC_DEFUN([AC_LIBTOOL_SETUP], | |
919 | [AC_PREREQ(2.50)dnl | |
920 | AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
921 | AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
922 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
923 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
924 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
925 | AC_REQUIRE([AC_PROG_CC])dnl | |
926 | AC_REQUIRE([AC_PROG_LD])dnl | |
927 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | |
928 | AC_REQUIRE([AC_PROG_NM])dnl | |
929 | AC_REQUIRE([LT_AC_PROG_SED])dnl | |
930 | ||
931 | AC_REQUIRE([AC_PROG_LN_S])dnl | |
932 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | |
933 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | |
934 | AC_REQUIRE([AC_OBJEXT])dnl | |
935 | AC_REQUIRE([AC_EXEEXT])dnl | |
936 | dnl | |
937 | ||
938 | AC_LIBTOOL_SYS_MAX_CMD_LEN | |
939 | AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
940 | AC_LIBTOOL_OBJDIR | |
941 | ||
942 | AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
943 | _LT_AC_PROG_ECHO_BACKSLASH | |
944 | ||
945 | case $host_os in | |
946 | aix3*) | |
947 | # AIX sometimes has problems with the GCC collect2 program. For some | |
948 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
949 | # vanish in a puff of smoke. | |
950 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
951 | COLLECT_NAMES= | |
952 | export COLLECT_NAMES | |
953 | fi | |
954 | ;; | |
955 | esac | |
956 | ||
957 | # Sed substitution that helps us do robust quoting. It backslashifies | |
958 | # metacharacters that are still active within double-quoted strings. | |
959 | Xsed='sed -e s/^X//' | |
960 | [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] | |
961 | ||
962 | # Same as above, but do not quote variable references. | |
963 | [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] | |
964 | ||
965 | # Sed substitution to delay expansion of an escaped shell variable in a | |
966 | # double_quote_subst'ed string. | |
967 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
968 | ||
969 | # Sed substitution to avoid accidental globbing in evaled expressions | |
970 | no_glob_subst='s/\*/\\\*/g' | |
971 | ||
972 | # Constants: | |
973 | rm="rm -f" | |
974 | ||
975 | # Global variables: | |
976 | default_ofile=libtool | |
977 | can_build_shared=yes | |
978 | ||
979 | # All known linkers require a `.a' archive for static linking (except M$VC, | |
980 | # which needs '.lib'). | |
981 | libext=a | |
982 | ltmain="$ac_aux_dir/ltmain.sh" | |
983 | ofile="$default_ofile" | |
984 | with_gnu_ld="$lt_cv_prog_gnu_ld" | |
985 | ||
986 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
987 | AC_CHECK_TOOL(STRIP, strip, :) | |
988 | ||
989 | old_CC="$CC" | |
990 | old_CFLAGS="$CFLAGS" | |
991 | ||
992 | # Set sane defaults for various variables | |
993 | test -z "$AR" && AR=ar | |
994 | test -z "$AR_FLAGS" && AR_FLAGS=cru | |
995 | test -z "$AS" && AS=as | |
996 | test -z "$CC" && CC=cc | |
997 | test -z "$LTCC" && LTCC=$CC | |
998 | test -z "$DLLTOOL" && DLLTOOL=dlltool | |
999 | test -z "$LD" && LD=ld | |
1000 | test -z "$LN_S" && LN_S="ln -s" | |
1001 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
1002 | test -z "$NM" && NM=nm | |
1003 | test -z "$SED" && SED=sed | |
1004 | test -z "$OBJDUMP" && OBJDUMP=objdump | |
1005 | test -z "$RANLIB" && RANLIB=: | |
1006 | test -z "$STRIP" && STRIP=: | |
1007 | test -z "$ac_objext" && ac_objext=o | |
1008 | ||
1009 | # Determine commands to create old-style static archives. | |
1010 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' | |
1011 | old_postinstall_cmds='chmod 644 $oldlib' | |
1012 | old_postuninstall_cmds= | |
1013 | ||
1014 | if test -n "$RANLIB"; then | |
1015 | case $host_os in | |
1016 | openbsd*) | |
1017 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" | |
1018 | ;; | |
1019 | *) | |
1020 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" | |
1021 | ;; | |
1022 | esac | |
1023 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
1024 | fi | |
1025 | ||
1026 | # Only perform the check for file, if the check method requires it | |
1027 | case $deplibs_check_method in | |
1028 | file_magic*) | |
1029 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
1030 | AC_PATH_MAGIC | |
1031 | fi | |
1032 | ;; | |
1033 | esac | |
1034 | ||
1035 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) | |
1036 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
1037 | enable_win32_dll=yes, enable_win32_dll=no) | |
1038 | ||
1039 | AC_ARG_ENABLE([libtool-lock], | |
1040 | [AC_HELP_STRING([--disable-libtool-lock], | |
1041 | [avoid locking (might break parallel builds)])]) | |
1042 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
1043 | ||
1044 | AC_ARG_WITH([pic], | |
1045 | [AC_HELP_STRING([--with-pic], | |
1046 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | |
1047 | [pic_mode="$withval"], | |
1048 | [pic_mode=default]) | |
1049 | test -z "$pic_mode" && pic_mode=default | |
1050 | ||
1051 | # Use C for the default configuration in the libtool script | |
1052 | tagname= | |
1053 | AC_LIBTOOL_LANG_C_CONFIG | |
1054 | _LT_AC_TAGCONFIG | |
1055 | ])# AC_LIBTOOL_SETUP | |
1056 | ||
1057 | ||
1058 | # _LT_AC_SYS_COMPILER | |
1059 | # ------------------- | |
1060 | AC_DEFUN([_LT_AC_SYS_COMPILER], | |
1061 | [AC_REQUIRE([AC_PROG_CC])dnl | |
1062 | ||
1063 | # If no C compiler was specified, use CC. | |
1064 | LTCC=${LTCC-"$CC"} | |
1065 | ||
1066 | # Allow CC to be a program name with arguments. | |
1067 | set dummy $CC | |
1068 | compiler="[$]2" | |
1069 | ])# _LT_AC_SYS_COMPILER | |
1070 | ||
1071 | ||
1072 | # _LT_AC_SYS_LIBPATH_AIX | |
1073 | # ---------------------- | |
1074 | # Links a minimal program and checks the executable | |
1075 | # for the system default hardcoded library path. In most cases, | |
1076 | # this is /usr/lib:/lib, but when the MPI compilers are used | |
1077 | # the location of the communication and MPI libs are included too. | |
1078 | # If we don't find anything, use the default library path according | |
1079 | # to the aix ld manual. | |
1080 | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], | |
1081 | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ | |
1082 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | |
1083 | }'` | |
1084 | # Check for a 64-bit object if we didn't find anything. | |
1085 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | |
1086 | }'`; fi],[]) | |
1087 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | |
1088 | ])# _LT_AC_SYS_LIBPATH_AIX | |
1089 | ||
1090 | ||
1091 | # _LT_AC_PROG_ECHO_BACKSLASH | |
1092 | # -------------------------- | |
1093 | # Add some code to the start of the generated configure script which | |
1094 | # will find an echo command which doesn't interpret backslashes. | |
1095 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], | |
1096 | [ifdef([AC_DIVERSION_NOTICE], | |
1097 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | |
1098 | [AC_DIVERT_PUSH(NOTICE)]) | |
1099 | ||
1100 | # Check that we are running under the correct shell. | |
1101 | SHELL=${CONFIG_SHELL-/bin/sh} | |
1102 | ||
1103 | case X$ECHO in | |
1104 | X*--fallback-echo) | |
1105 | # Remove one level of quotation (which was required for Make). | |
1106 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | |
1107 | ;; | |
1108 | esac | |
1109 | ||
1110 | echo=${ECHO-echo} | |
1111 | if test "X[$]1" = X--no-reexec; then | |
1112 | # Discard the --no-reexec flag, and continue. | |
1113 | shift | |
1114 | elif test "X[$]1" = X--fallback-echo; then | |
1115 | # Avoid inline document here, it may be left over | |
1116 | : | |
1117 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
1118 | # Yippee, $echo works! | |
1119 | : | |
1120 | else | |
1121 | # Restart under the correct shell. | |
1122 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1123 | fi | |
1124 | ||
1125 | if test "X[$]1" = X--fallback-echo; then | |
1126 | # used as fallback echo | |
1127 | shift | |
1128 | cat <<EOF | |
1129 | [$]* | |
1130 | EOF | |
1131 | exit 0 | |
1132 | fi | |
1133 | ||
1134 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
1135 | # if CDPATH is set. | |
1136 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
1137 | ||
1138 | if test -z "$ECHO"; then | |
1139 | if test "X${echo_test_string+set}" != Xset; then | |
1140 | # find a string as large as possible, as long as the shell can cope with it | |
1141 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | |
1142 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
1143 | if (echo_test_string="`eval $cmd`") 2>/dev/null && | |
1144 | echo_test_string="`eval $cmd`" && | |
1145 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | |
1146 | then | |
1147 | break | |
1148 | fi | |
1149 | done | |
1150 | fi | |
1151 | ||
1152 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1153 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1154 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1155 | : | |
1156 | else | |
1157 | # The Solaris, AIX, and Digital Unix default echo programs unquote | |
1158 | # backslashes. This makes it impossible to quote backslashes using | |
1159 | # echo "$something" | sed 's/\\/\\\\/g' | |
1160 | # | |
1161 | # So, first we look for a working echo in the user's PATH. | |
1162 | ||
1163 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1164 | for dir in $PATH /usr/ucb; do | |
1165 | IFS="$lt_save_ifs" | |
1166 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
1167 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
1168 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
1169 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1170 | echo="$dir/echo" | |
1171 | break | |
1172 | fi | |
1173 | done | |
1174 | IFS="$lt_save_ifs" | |
1175 | ||
1176 | if test "X$echo" = Xecho; then | |
1177 | # We didn't find a better echo, so look for alternatives. | |
1178 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | |
1179 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | |
1180 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1181 | # This shell has a builtin print -r that does the trick. | |
1182 | echo='print -r' | |
1183 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | |
1184 | test "X$CONFIG_SHELL" != X/bin/ksh; then | |
1185 | # If we have ksh, try running configure again with it. | |
1186 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
1187 | export ORIGINAL_CONFIG_SHELL | |
1188 | CONFIG_SHELL=/bin/ksh | |
1189 | export CONFIG_SHELL | |
1190 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1191 | else | |
1192 | # Try using printf. | |
1193 | echo='printf %s\n' | |
1194 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1195 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1196 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1197 | # Cool, printf works | |
1198 | : | |
1199 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1200 | test "X$echo_testing_string" = 'X\t' && | |
1201 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1202 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1203 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | |
1204 | export CONFIG_SHELL | |
1205 | SHELL="$CONFIG_SHELL" | |
1206 | export SHELL | |
1207 | echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1208 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1209 | test "X$echo_testing_string" = 'X\t' && | |
1210 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1211 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1212 | echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1213 | else | |
1214 | # maybe with a smaller string... | |
1215 | prev=: | |
1216 | ||
1217 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | |
1218 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | |
1219 | then | |
1220 | break | |
1221 | fi | |
1222 | prev="$cmd" | |
1223 | done | |
1224 | ||
1225 | if test "$prev" != 'sed 50q "[$]0"'; then | |
1226 | echo_test_string=`eval $prev` | |
1227 | export echo_test_string | |
1228 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | |
1229 | else | |
1230 | # Oops. We lost completely, so just stick with echo. | |
1231 | echo=echo | |
1232 | fi | |
1233 | fi | |
1234 | fi | |
1235 | fi | |
1236 | fi | |
1237 | fi | |
1238 | ||
1239 | # Copy echo and quote the copy suitably for passing to libtool from | |
1240 | # the Makefile, instead of quoting the original, which is used later. | |
1241 | ECHO=$echo | |
1242 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | |
1243 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | |
1244 | fi | |
1245 | ||
1246 | AC_SUBST(ECHO) | |
1247 | AC_DIVERT_POP | |
1248 | ])# _LT_AC_PROG_ECHO_BACKSLASH | |
1249 | ||
1250 | ||
1251 | # _LT_AC_LOCK | |
1252 | # ----------- | |
1253 | AC_DEFUN([_LT_AC_LOCK], | |
1254 | [AC_ARG_ENABLE([libtool-lock], | |
1255 | [AC_HELP_STRING([--disable-libtool-lock], | |
1256 | [avoid locking (might break parallel builds)])]) | |
1257 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
1258 | ||
1259 | # Some flags need to be propagated to the compiler or linker for good | |
1260 | # libtool support. | |
1261 | case $host in | |
1262 | ia64-*-hpux*) | |
1263 | # Find out which ABI we are using. | |
1264 | echo 'int i;' > conftest.$ac_ext | |
1265 | if AC_TRY_EVAL(ac_compile); then | |
1266 | case `/usr/bin/file conftest.$ac_objext` in | |
1267 | *ELF-32*) | |
1268 | HPUX_IA64_MODE="32" | |
1269 | ;; | |
1270 | *ELF-64*) | |
1271 | HPUX_IA64_MODE="64" | |
1272 | ;; | |
1273 | esac | |
1274 | fi | |
1275 | rm -rf conftest* | |
1276 | ;; | |
1277 | *-*-irix6*) | |
1278 | # Find out which ABI we are using. | |
1279 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
1280 | if AC_TRY_EVAL(ac_compile); then | |
1281 | case `/usr/bin/file conftest.$ac_objext` in | |
1282 | *32-bit*) | |
1283 | LD="${LD-ld} -32" | |
1284 | ;; | |
1285 | *N32*) | |
1286 | LD="${LD-ld} -n32" | |
1287 | ;; | |
1288 | *64-bit*) | |
1289 | LD="${LD-ld} -64" | |
1290 | ;; | |
1291 | esac | |
1292 | fi | |
1293 | rm -rf conftest* | |
1294 | ;; | |
1295 | ||
1296 | *-*-sco3.2v5*) | |
1297 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1298 | SAVE_CFLAGS="$CFLAGS" | |
1299 | CFLAGS="$CFLAGS -belf" | |
1300 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
1301 | [AC_LANG_PUSH(C) | |
1302 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
1303 | AC_LANG_POP]) | |
1304 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1305 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1306 | CFLAGS="$SAVE_CFLAGS" | |
1307 | fi | |
1308 | ;; | |
1309 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
1310 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) | |
1311 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
1312 | AC_CHECK_TOOL(AS, as, false) | |
1313 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
1314 | ||
1315 | # recent cygwin and mingw systems supply a stub DllMain which the user | |
1316 | # can override, but on older systems we have to supply one | |
1317 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, | |
1318 | [AC_TRY_LINK([], | |
1319 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); | |
1320 | DllMain (0, 0, 0);], | |
1321 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) | |
1322 | ||
1323 | case $host/$CC in | |
1324 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) | |
1325 | # old mingw systems require "-dll" to link a DLL, while more recent ones | |
1326 | # require "-mdll" | |
1327 | SAVE_CFLAGS="$CFLAGS" | |
1328 | CFLAGS="$CFLAGS -mdll" | |
1329 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, | |
1330 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) | |
1331 | CFLAGS="$SAVE_CFLAGS" ;; | |
1332 | *-*-cygwin* | *-*-pw32*) | |
1333 | # cygwin systems need to pass --dll to the linker, and not link | |
1334 | # crt.o which will require a WinMain@16 definition. | |
1335 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; | |
1336 | esac | |
1337 | ;; | |
1338 | ]) | |
1339 | esac | |
1340 | ||
1341 | need_locks="$enable_libtool_lock" | |
1342 | ||
1343 | ])# _LT_AC_LOCK | |
1344 | ||
1345 | ||
1346 | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
1347 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1348 | # ---------------------------------------------------------------- | |
1349 | # Check whether the given compiler option works | |
1350 | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], | |
1351 | [AC_CACHE_CHECK([$1], [$2], | |
1352 | [$2=no | |
1353 | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | |
1354 | save_CFLAGS="$CFLAGS" | |
1355 | CFLAGS="$CFLAGS $3" | |
1356 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
1357 | if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then | |
1358 | # The compiler can only warn and ignore the option if not recognized | |
1359 | # So say no if there are warnings | |
1360 | if test -s conftest.err; then | |
1361 | # Append any errors to the config.log. | |
1362 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | |
1363 | else | |
1364 | $2=yes | |
1365 | fi | |
1366 | fi | |
1367 | $rm conftest* | |
1368 | CFLAGS="$save_CFLAGS" | |
1369 | ]) | |
1370 | ||
1371 | if test x"[$]$2" = xyes; then | |
1372 | ifelse([$5], , :, [$5]) | |
1373 | else | |
1374 | ifelse([$6], , :, [$6]) | |
1375 | fi | |
1376 | ])# AC_LIBTOOL_COMPILER_OPTION | |
1377 | ||
1378 | ||
1379 | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
1380 | # [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1381 | # ------------------------------------------------------------ | |
1382 | # Check whether the given compiler option works | |
1383 | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], | |
1384 | [AC_CACHE_CHECK([$1], [$2], | |
1385 | [$2=no | |
1386 | save_LDFLAGS="$LDFLAGS" | |
1387 | LDFLAGS="$LDFLAGS $3" | |
1388 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
1389 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
1390 | # The compiler can only warn and ignore the option if not recognized | |
1391 | # So say no if there are warnings | |
1392 | if test -s conftest.err; then | |
1393 | # Append any errors to the config.log. | |
1394 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | |
1395 | else | |
1396 | $2=yes | |
1397 | fi | |
1398 | fi | |
1399 | $rm conftest* | |
1400 | LDFLAGS="$save_LDFLAGS" | |
1401 | ]) | |
1402 | ||
1403 | if test x"[$]$2" = xyes; then | |
1404 | ifelse([$4], , :, [$4]) | |
1405 | else | |
1406 | ifelse([$5], , :, [$5]) | |
1407 | fi | |
1408 | ])# AC_LIBTOOL_LINKER_OPTION | |
1409 | ||
1410 | ||
1411 | # AC_LIBTOOL_SYS_MAX_CMD_LEN | |
1412 | # -------------------------- | |
1413 | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], | |
1414 | [# find the maximum length of command line arguments | |
1415 | AC_MSG_CHECKING([the maximum length of command line arguments]) | |
1416 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | |
1417 | i=0 | |
1418 | testring="ABCD" | |
1419 | ||
aa1e3b4d | 1420 | case $build_os in |
6908b7d7 RC |
1421 | msdosdjgpp*) |
1422 | # On DJGPP, this test can blow up pretty badly due to problems in libc | |
1423 | # (any single argument exceeding 2000 bytes causes a buffer overrun | |
1424 | # during glob expansion). Even if it were fixed, the result of this | |
1425 | # check would be larger than it should be. | |
1426 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
1427 | ;; | |
1428 | ||
1429 | gnu*) | |
1430 | # Under GNU Hurd, this test is not required because there is | |
1431 | # no limit to the length of command line arguments. | |
1432 | # Libtool will interpret -1 as no limit whatsoever | |
1433 | lt_cv_sys_max_cmd_len=-1; | |
1434 | ;; | |
1435 | ||
1436 | *) | |
1437 | # If test is not a shell built-in, we'll probably end up computing a | |
1438 | # maximum length that is only half of the actual maximum length, but | |
1439 | # we can't tell. | |
1440 | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ | |
1441 | = "XX$testring") >/dev/null 2>&1 && | |
1442 | new_result=`expr "X$testring" : ".*" 2>&1` && | |
1443 | lt_cv_sys_max_cmd_len=$new_result && | |
1444 | test $i != 17 # 1/2 MB should be enough | |
1445 | do | |
1446 | i=`expr $i + 1` | |
1447 | testring=$testring$testring | |
1448 | done | |
1449 | testring= | |
1450 | # Add a significant safety factor because C++ compilers can tack on massive | |
1451 | # amounts of additional arguments before passing them to the linker. | |
1452 | # It appears as though 1/2 is a usable value. | |
1453 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
1454 | ;; | |
1455 | esac | |
1456 | ]) | |
1457 | if test -n $lt_cv_sys_max_cmd_len ; then | |
1458 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | |
1459 | else | |
1460 | AC_MSG_RESULT(none) | |
1461 | fi | |
1462 | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN | |
1463 | ||
1464 | ||
1465 | # _LT_AC_CHECK_DLFCN | |
1466 | # -------------------- | |
1467 | AC_DEFUN([_LT_AC_CHECK_DLFCN], | |
1468 | [AC_CHECK_HEADERS(dlfcn.h)dnl | |
1469 | ])# _LT_AC_CHECK_DLFCN | |
1470 | ||
1471 | ||
1472 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | |
1473 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
1474 | # ------------------------------------------------------------------ | |
1475 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], | |
1476 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1477 | if test "$cross_compiling" = yes; then : | |
1478 | [$4] | |
1479 | else | |
1480 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
1481 | lt_status=$lt_dlunknown | |
1482 | cat > conftest.$ac_ext <<EOF | |
1483 | [#line __oline__ "configure" | |
1484 | #include "confdefs.h" | |
1485 | ||
1486 | #if HAVE_DLFCN_H | |
1487 | #include <dlfcn.h> | |
1488 | #endif | |
1489 | ||
1490 | #include <stdio.h> | |
1491 | ||
1492 | #ifdef RTLD_GLOBAL | |
1493 | # define LT_DLGLOBAL RTLD_GLOBAL | |
1494 | #else | |
1495 | # ifdef DL_GLOBAL | |
1496 | # define LT_DLGLOBAL DL_GLOBAL | |
1497 | # else | |
1498 | # define LT_DLGLOBAL 0 | |
1499 | # endif | |
1500 | #endif | |
1501 | ||
1502 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
1503 | find out it does not work in some platform. */ | |
1504 | #ifndef LT_DLLAZY_OR_NOW | |
1505 | # ifdef RTLD_LAZY | |
1506 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
1507 | # else | |
1508 | # ifdef DL_LAZY | |
1509 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
1510 | # else | |
1511 | # ifdef RTLD_NOW | |
1512 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
1513 | # else | |
1514 | # ifdef DL_NOW | |
1515 | # define LT_DLLAZY_OR_NOW DL_NOW | |
1516 | # else | |
1517 | # define LT_DLLAZY_OR_NOW 0 | |
1518 | # endif | |
1519 | # endif | |
1520 | # endif | |
1521 | # endif | |
1522 | #endif | |
1523 | ||
1524 | #ifdef __cplusplus | |
1525 | extern "C" void exit (int); | |
1526 | #endif | |
1527 | ||
1528 | void fnord() { int i=42;} | |
1529 | int main () | |
1530 | { | |
1531 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
1532 | int status = $lt_dlunknown; | |
1533 | ||
1534 | if (self) | |
1535 | { | |
1536 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
1537 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
1538 | /* dlclose (self); */ | |
1539 | } | |
1540 | ||
1541 | exit (status); | |
1542 | }] | |
1543 | EOF | |
1544 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
1545 | (./conftest; exit; ) 2>/dev/null | |
1546 | lt_status=$? | |
1547 | case x$lt_status in | |
1548 | x$lt_dlno_uscore) $1 ;; | |
1549 | x$lt_dlneed_uscore) $2 ;; | |
1550 | x$lt_unknown|x*) $3 ;; | |
1551 | esac | |
1552 | else : | |
1553 | # compilation failed | |
1554 | $3 | |
1555 | fi | |
1556 | fi | |
1557 | rm -fr conftest* | |
1558 | ])# _LT_AC_TRY_DLOPEN_SELF | |
1559 | ||
1560 | ||
1561 | # AC_LIBTOOL_DLOPEN_SELF | |
1562 | # ------------------- | |
1563 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], | |
1564 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1565 | if test "x$enable_dlopen" != xyes; then | |
1566 | enable_dlopen=unknown | |
1567 | enable_dlopen_self=unknown | |
1568 | enable_dlopen_self_static=unknown | |
1569 | else | |
1570 | lt_cv_dlopen=no | |
1571 | lt_cv_dlopen_libs= | |
1572 | ||
1573 | case $host_os in | |
1574 | beos*) | |
1575 | lt_cv_dlopen="load_add_on" | |
1576 | lt_cv_dlopen_libs= | |
1577 | lt_cv_dlopen_self=yes | |
1578 | ;; | |
1579 | ||
1580 | cygwin* | mingw* | pw32*) | |
1581 | lt_cv_dlopen="LoadLibrary" | |
1582 | lt_cv_dlopen_libs= | |
1583 | ;; | |
1584 | ||
1585 | *) | |
1586 | AC_CHECK_FUNC([shl_load], | |
1587 | [lt_cv_dlopen="shl_load"], | |
1588 | [AC_CHECK_LIB([dld], [shl_load], | |
1589 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], | |
1590 | [AC_CHECK_FUNC([dlopen], | |
1591 | [lt_cv_dlopen="dlopen"], | |
1592 | [AC_CHECK_LIB([dl], [dlopen], | |
1593 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
1594 | [AC_CHECK_LIB([svld], [dlopen], | |
1595 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
1596 | [AC_CHECK_LIB([dld], [dld_link], | |
1597 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) | |
1598 | ]) | |
1599 | ]) | |
1600 | ]) | |
1601 | ]) | |
1602 | ]) | |
1603 | ;; | |
1604 | esac | |
1605 | ||
1606 | if test "x$lt_cv_dlopen" != xno; then | |
1607 | enable_dlopen=yes | |
1608 | else | |
1609 | enable_dlopen=no | |
1610 | fi | |
1611 | ||
1612 | case $lt_cv_dlopen in | |
1613 | dlopen) | |
1614 | save_CPPFLAGS="$CPPFLAGS" | |
1615 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
1616 | ||
1617 | save_LDFLAGS="$LDFLAGS" | |
1618 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
1619 | ||
1620 | save_LIBS="$LIBS" | |
1621 | LIBS="$lt_cv_dlopen_libs $LIBS" | |
1622 | ||
1623 | AC_CACHE_CHECK([whether a program can dlopen itself], | |
1624 | lt_cv_dlopen_self, [dnl | |
1625 | _LT_AC_TRY_DLOPEN_SELF( | |
1626 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
1627 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
1628 | ]) | |
1629 | ||
1630 | if test "x$lt_cv_dlopen_self" = xyes; then | |
1631 | LDFLAGS="$LDFLAGS $link_static_flag" | |
1632 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
1633 | lt_cv_dlopen_self_static, [dnl | |
1634 | _LT_AC_TRY_DLOPEN_SELF( | |
1635 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
1636 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
1637 | ]) | |
1638 | fi | |
1639 | ||
1640 | CPPFLAGS="$save_CPPFLAGS" | |
1641 | LDFLAGS="$save_LDFLAGS" | |
1642 | LIBS="$save_LIBS" | |
1643 | ;; | |
1644 | esac | |
1645 | ||
1646 | case $lt_cv_dlopen_self in | |
1647 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
1648 | *) enable_dlopen_self=unknown ;; | |
1649 | esac | |
1650 | ||
1651 | case $lt_cv_dlopen_self_static in | |
1652 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
1653 | *) enable_dlopen_self_static=unknown ;; | |
1654 | esac | |
1655 | fi | |
1656 | ])# AC_LIBTOOL_DLOPEN_SELF | |
1657 | ||
1658 | ||
1659 | # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) | |
1660 | # --------------------------------- | |
1661 | # Check to see if options -c and -o are simultaneously supported by compiler | |
1662 | AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], | |
1663 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
1664 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | |
1665 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | |
1666 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | |
1667 | $rm -r conftest 2>/dev/null | |
1668 | mkdir conftest | |
1669 | cd conftest | |
1670 | mkdir out | |
1671 | ifelse([$1],[],[save_CFLAGS="$CFLAGS" | |
1672 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"], | |
1673 | [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS" | |
1674 | CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"], | |
1675 | [$1],[GCJ],[save_GCJFLAGS="$CFLAGS" | |
1676 | CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"]) | |
1677 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
1678 | ||
1679 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers | |
1680 | # that will create temporary files in the current directory regardless of | |
1681 | # the output directory. Thus, making CWD read-only will cause this test | |
1682 | # to fail, enabling locking or at least warning the user not to do parallel | |
1683 | # builds. | |
1684 | chmod -w . | |
1685 | ||
1686 | if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext | |
1687 | then | |
1688 | # The compiler can only warn and ignore the option if not recognized | |
1689 | # So say no if there are warnings | |
1690 | if test -s out/conftest.err; then | |
1691 | # Append any errors to the config.log. | |
1692 | cat out/conftest.err 1>&AS_MESSAGE_LOG_FD | |
1693 | else | |
1694 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
1695 | fi | |
1696 | fi | |
1697 | ifelse([$1],[],[CFLAGS="$save_CFLAGS"], | |
1698 | [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"], | |
1699 | [$1],[GCJ],[CFLAGS="$save_CFLAGS"]) | |
1700 | chmod u+w . | |
1701 | $rm conftest* out/* | |
1702 | rmdir out | |
1703 | cd .. | |
1704 | rmdir conftest | |
1705 | $rm conftest* | |
1706 | ]) | |
1707 | ])# AC_LIBTOOL_PROG_CC_C_O | |
1708 | ||
1709 | ||
1710 | # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) | |
1711 | # ----------------------------------------- | |
1712 | # Check to see if we can do hard links to lock some files if needed | |
1713 | AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], | |
1714 | [AC_REQUIRE([_LT_AC_LOCK])dnl | |
1715 | ||
1716 | hard_links="nottested" | |
1717 | if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | |
1718 | # do not overwrite the value of need_locks provided by the user | |
1719 | AC_MSG_CHECKING([if we can lock with hard links]) | |
1720 | hard_links=yes | |
1721 | $rm conftest* | |
1722 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1723 | touch conftest.a | |
1724 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
1725 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1726 | AC_MSG_RESULT([$hard_links]) | |
1727 | if test "$hard_links" = no; then | |
1728 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | |
1729 | need_locks=warn | |
1730 | fi | |
1731 | else | |
1732 | need_locks=no | |
1733 | fi | |
1734 | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS | |
1735 | ||
1736 | ||
1737 | # AC_LIBTOOL_OBJDIR | |
1738 | # ----------------- | |
1739 | AC_DEFUN([AC_LIBTOOL_OBJDIR], | |
1740 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | |
1741 | [rm -f .libs 2>/dev/null | |
1742 | mkdir .libs 2>/dev/null | |
1743 | if test -d .libs; then | |
1744 | lt_cv_objdir=.libs | |
1745 | else | |
1746 | # MS-DOS does not allow filenames that begin with a dot. | |
1747 | lt_cv_objdir=_libs | |
1748 | fi | |
1749 | rmdir .libs 2>/dev/null]) | |
1750 | objdir=$lt_cv_objdir | |
1751 | ])# AC_LIBTOOL_OBJDIR | |
1752 | ||
1753 | ||
1754 | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) | |
1755 | # ---------------------------------------------- | |
1756 | # Check hardcoding attributes. | |
1757 | AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], | |
1758 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
1759 | _LT_AC_TAGVAR(hardcode_action, $1)= | |
1760 | if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ | |
1761 | test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then | |
1762 | ||
1763 | # We can hardcode non-existant directories. | |
1764 | if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && | |
1765 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
1766 | # have to relink, otherwise we might link with an installed library | |
1767 | # when we should be linking with a yet-to-be-installed one | |
1768 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && | |
1769 | test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then | |
1770 | # Linking always hardcodes the temporary library directory. | |
1771 | _LT_AC_TAGVAR(hardcode_action, $1)=relink | |
1772 | else | |
1773 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
1774 | _LT_AC_TAGVAR(hardcode_action, $1)=immediate | |
1775 | fi | |
1776 | else | |
1777 | # We cannot hardcode anything, or else we can only hardcode existing | |
1778 | # directories. | |
1779 | _LT_AC_TAGVAR(hardcode_action, $1)=unsupported | |
1780 | fi | |
1781 | AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) | |
1782 | ||
1783 | if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then | |
1784 | # Fast installation is not supported | |
1785 | enable_fast_install=no | |
1786 | elif test "$shlibpath_overrides_runpath" = yes || | |
1787 | test "$enable_shared" = no; then | |
1788 | # Fast installation is not necessary | |
1789 | enable_fast_install=needless | |
1790 | fi | |
1791 | ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH | |
1792 | ||
1793 | ||
1794 | # AC_LIBTOOL_SYS_LIB_STRIP | |
1795 | # ------------------------ | |
1796 | AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], | |
1797 | [striplib= | |
1798 | old_striplib= | |
1799 | AC_MSG_CHECKING([whether stripping libraries is possible]) | |
1800 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | |
1801 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
1802 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
1803 | AC_MSG_RESULT([yes]) | |
1804 | else | |
1805 | AC_MSG_RESULT([no]) | |
1806 | fi | |
1807 | ])# AC_LIBTOOL_SYS_LIB_STRIP | |
1808 | ||
1809 | ||
1810 | # AC_LIBTOOL_SYS_DYNAMIC_LINKER | |
1811 | # ----------------------------- | |
1812 | # PORTME Fill in your ld.so characteristics | |
1813 | AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], | |
1814 | [AC_MSG_CHECKING([dynamic linker characteristics]) | |
1815 | library_names_spec= | |
1816 | libname_spec='lib$name' | |
1817 | soname_spec= | |
1818 | postinstall_cmds= | |
1819 | postuninstall_cmds= | |
1820 | finish_cmds= | |
1821 | finish_eval= | |
1822 | shlibpath_var= | |
1823 | shlibpath_overrides_runpath=unknown | |
1824 | version_type=none | |
1825 | dynamic_linker="$host_os ld.so" | |
1826 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
1827 | if test "$GCC" = yes; then | |
1828 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"` | |
1829 | if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then | |
1830 | # if the path contains ";" then we assume it to be the separator | |
1831 | # otherwise default to the standard path separator (i.e. ":") - it is | |
1832 | # assumed that no part of a normal pathname contains ";" but that should | |
1833 | # okay in the real world where ";" in dirpaths is itself problematic. | |
1834 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` | |
1835 | else | |
1836 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` | |
1837 | fi | |
1838 | else | |
1839 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
1840 | fi | |
1841 | need_lib_prefix=unknown | |
1842 | hardcode_into_libs=no | |
1843 | ||
1844 | # when you set need_version to no, make sure it does not cause -set_version | |
1845 | # flags to be left without arguments | |
1846 | need_version=unknown | |
1847 | ||
1848 | case $host_os in | |
1849 | aix3*) | |
1850 | version_type=linux | |
1851 | library_names_spec='${libname}${release}.so$versuffix $libname.a' | |
1852 | shlibpath_var=LIBPATH | |
1853 | ||
1854 | # AIX 3 has no versioning support, so we append a major version to the name. | |
1855 | soname_spec='${libname}${release}.so$major' | |
1856 | ;; | |
1857 | ||
1858 | aix4* | aix5*) | |
1859 | version_type=linux | |
1860 | if test "$host_cpu" = ia64; then | |
1861 | # AIX 5 supports IA64 | |
1862 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' | |
1863 | shlibpath_var=LD_LIBRARY_PATH | |
1864 | else | |
1865 | # With GCC up to 2.95.x, collect2 would create an import file | |
1866 | # for dependence libraries. The import file would start with | |
1867 | # the line `#! .'. This would cause the generated library to | |
1868 | # depend on `.', always an invalid library. This was fixed in | |
1869 | # development snapshots of GCC prior to 3.0. | |
1870 | case $host_os in | |
1871 | aix4 | aix4.[[01]] | aix4.[[01]].*) | |
1872 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
1873 | echo ' yes ' | |
1874 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
1875 | : | |
1876 | else | |
1877 | can_build_shared=no | |
1878 | fi | |
1879 | ;; | |
1880 | esac | |
1881 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
1882 | # soname into executable. Probably we can add versioning support to | |
1883 | # collect2, so additional links can be useful in future. | |
1884 | if test "$aix_use_runtimelinking" = yes; then | |
1885 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
1886 | # instead of lib<name>.a to let people know that these are not | |
1887 | # typical AIX shared libraries. | |
1888 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1889 | else | |
1890 | # We preserve .a as extension for shared libraries through AIX4.2 | |
1891 | # and later when we are not doing run time linking. | |
1892 | library_names_spec='${libname}${release}.a $libname.a' | |
1893 | soname_spec='${libname}${release}.so$major' | |
1894 | fi | |
1895 | shlibpath_var=LIBPATH | |
1896 | fi | |
1897 | ;; | |
1898 | ||
1899 | amigaos*) | |
1900 | library_names_spec='$libname.ixlibrary $libname.a' | |
1901 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
1902 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' | |
1903 | ;; | |
1904 | ||
1905 | beos*) | |
1906 | library_names_spec='${libname}.so' | |
1907 | dynamic_linker="$host_os ld.so" | |
1908 | shlibpath_var=LIBRARY_PATH | |
1909 | ;; | |
1910 | ||
1911 | bsdi4*) | |
1912 | version_type=linux | |
1913 | need_version=no | |
1914 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1915 | soname_spec='${libname}${release}.so$major' | |
1916 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
1917 | shlibpath_var=LD_LIBRARY_PATH | |
1918 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
1919 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
1920 | # the default ld.so.conf also contains /usr/contrib/lib and | |
1921 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
1922 | # libtool to hard-code these into programs | |
1923 | ;; | |
1924 | ||
1925 | cygwin* | mingw* | pw32*) | |
1926 | version_type=windows | |
1927 | need_version=no | |
1928 | need_lib_prefix=no | |
1929 | case $GCC,$host_os in | |
1930 | yes,cygwin*) | |
1931 | library_names_spec='$libname.dll.a' | |
1932 | sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" | |
1933 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
1934 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ | |
1935 | dldir=$destdir/`dirname \$dlpath`~ | |
1936 | test -d \$dldir || mkdir -p \$dldir~ | |
1937 | $install_prog .libs/$dlname \$dldir/$dlname' | |
1938 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
1939 | dlpath=$dir/\$dldll~ | |
1940 | $rm \$dlpath' | |
1941 | shlibpath_overrides_runpath=yes | |
1942 | ;; | |
1943 | yes,mingw*) | |
1944 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
1945 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"` | |
1946 | if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then | |
1947 | # It is most probably a Windows format PATH printed by | |
1948 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | |
1949 | # path with ; separators, and with drive letters. We can handle the | |
1950 | # drive letters (cygwin fileutils understands them), so leave them, | |
1951 | # especially as we might pass files found there to a mingw objdump, | |
1952 | # which wouldn't understand a cygwinified path. Ahh. | |
1953 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` | |
1954 | else | |
1955 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` | |
1956 | fi | |
1957 | ;; | |
1958 | yes,pw32*) | |
1959 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' | |
1960 | ;; | |
1961 | *) | |
1962 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' | |
1963 | ;; | |
1964 | esac | |
1965 | dynamic_linker='Win32 ld.exe' | |
1966 | # FIXME: first we should search . and the directory the executable is in | |
1967 | shlibpath_var=PATH | |
1968 | ;; | |
1969 | ||
1970 | darwin* | rhapsody*) | |
1971 | dynamic_linker="$host_os dyld" | |
1972 | version_type=darwin | |
1973 | need_lib_prefix=no | |
1974 | need_version=no | |
1975 | # FIXME: Relying on posixy $() will cause problems for | |
1976 | # cross-compilation, but unfortunately the echo tests do not | |
1977 | # yet detect zsh echo's removal of \ escapes. | |
1978 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' | |
1979 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' | |
1980 | shlibpath_overrides_runpath=yes | |
1981 | shlibpath_var=DYLD_LIBRARY_PATH | |
1982 | ;; | |
1983 | ||
1984 | dgux*) | |
1985 | version_type=linux | |
1986 | need_lib_prefix=no | |
1987 | need_version=no | |
1988 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1989 | soname_spec='${libname}${release}.so$major' | |
1990 | shlibpath_var=LD_LIBRARY_PATH | |
1991 | ;; | |
1992 | ||
1993 | freebsd1*) | |
1994 | dynamic_linker=no | |
1995 | ;; | |
1996 | ||
1997 | freebsd*) | |
1998 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | |
1999 | version_type=freebsd-$objformat | |
2000 | case $version_type in | |
2001 | freebsd-elf*) | |
2002 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2003 | need_version=no | |
2004 | need_lib_prefix=no | |
2005 | ;; | |
2006 | freebsd-*) | |
2007 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' | |
2008 | need_version=yes | |
2009 | ;; | |
2010 | esac | |
2011 | shlibpath_var=LD_LIBRARY_PATH | |
2012 | case $host_os in | |
2013 | freebsd2*) | |
2014 | shlibpath_overrides_runpath=yes | |
2015 | ;; | |
2016 | freebsd3.[01]* | freebsdelf3.[01]*) | |
2017 | shlibpath_overrides_runpath=yes | |
2018 | hardcode_into_libs=yes | |
2019 | ;; | |
2020 | *) # from 3.2 on | |
2021 | shlibpath_overrides_runpath=no | |
2022 | hardcode_into_libs=yes | |
2023 | ;; | |
2024 | esac | |
2025 | ;; | |
2026 | ||
2027 | gnu*) | |
2028 | version_type=linux | |
2029 | need_lib_prefix=no | |
2030 | need_version=no | |
2031 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' | |
2032 | soname_spec='${libname}${release}.so$major' | |
2033 | shlibpath_var=LD_LIBRARY_PATH | |
2034 | hardcode_into_libs=yes | |
2035 | ;; | |
2036 | ||
2037 | hpux9* | hpux10* | hpux11*) | |
2038 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
2039 | # link against other versions. | |
2040 | version_type=sunos | |
2041 | need_lib_prefix=no | |
2042 | need_version=no | |
2043 | if test "$host_cpu" = ia64; then | |
2044 | hardcode_into_libs=yes | |
2045 | dynamic_linker="$host_os dld.so" | |
2046 | shlibpath_var=LD_LIBRARY_PATH | |
2047 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2048 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2049 | soname_spec='${libname}${release}.so$major' | |
2050 | if test "X$HPUX_IA64_MODE" = X32; then | |
2051 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
2052 | else | |
2053 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
2054 | fi | |
2055 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2056 | else | |
2057 | dynamic_linker="$host_os dld.sl" | |
2058 | shlibpath_var=SHLIB_PATH | |
2059 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2060 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' | |
2061 | soname_spec='${libname}${release}.sl$major' | |
2062 | fi | |
2063 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
2064 | postinstall_cmds='chmod 555 $lib' | |
2065 | ;; | |
2066 | ||
2067 | irix5* | irix6* | nonstopux*) | |
2068 | case $host_os in | |
2069 | nonstopux*) version_type=nonstopux ;; | |
2070 | *) version_type=irix ;; | |
2071 | esac | |
2072 | need_lib_prefix=no | |
2073 | need_version=no | |
2074 | soname_spec='${libname}${release}.so$major' | |
2075 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' | |
2076 | case $host_os in | |
2077 | irix5* | nonstopux*) | |
2078 | libsuff= shlibsuff= | |
2079 | ;; | |
2080 | *) | |
2081 | case $LD in # libtool.m4 will add one of these switches to LD | |
2082 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; | |
2083 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2084 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2085 | *) libsuff= shlibsuff= libmagic=never-match;; | |
2086 | esac | |
2087 | ;; | |
2088 | esac | |
2089 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
2090 | shlibpath_overrides_runpath=no | |
2091 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2092 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2093 | ;; | |
2094 | ||
2095 | # No shared lib support for Linux oldld, aout, or coff. | |
2096 | linux*oldld* | linux*aout* | linux*coff*) | |
2097 | dynamic_linker=no | |
2098 | ;; | |
2099 | ||
2100 | # This must be Linux ELF. | |
2101 | linux*) | |
2102 | version_type=linux | |
2103 | need_lib_prefix=no | |
2104 | need_version=no | |
2105 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2106 | soname_spec='${libname}${release}.so$major' | |
2107 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2108 | shlibpath_var=LD_LIBRARY_PATH | |
2109 | shlibpath_overrides_runpath=no | |
2110 | # This implies no fast_install, which is unacceptable. | |
2111 | # Some rework will be needed to allow for fast_install | |
2112 | # before this can be enabled. | |
2113 | hardcode_into_libs=yes | |
2114 | ||
2115 | # We used to test for /lib/ld.so.1 and disable shared libraries on | |
2116 | # powerpc, because MkLinux only supported shared libraries with the | |
2117 | # GNU dynamic linker. Since this was broken with cross compilers, | |
2118 | # most powerpc-linux boxes support dynamic linking these days and | |
2119 | # people can always --disable-shared, the test was removed, and we | |
2120 | # assume the GNU/Linux dynamic linker is in use. | |
2121 | dynamic_linker='GNU/Linux ld.so' | |
2122 | ;; | |
2123 | ||
2124 | netbsd*) | |
2125 | version_type=sunos | |
2126 | need_lib_prefix=no | |
2127 | need_version=no | |
2128 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2129 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2130 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2131 | dynamic_linker='NetBSD (a.out) ld.so' | |
2132 | else | |
2133 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' | |
2134 | soname_spec='${libname}${release}.so$major' | |
2135 | dynamic_linker='NetBSD ld.elf_so' | |
2136 | fi | |
2137 | shlibpath_var=LD_LIBRARY_PATH | |
2138 | shlibpath_overrides_runpath=yes | |
2139 | hardcode_into_libs=yes | |
2140 | ;; | |
2141 | ||
2142 | newsos6) | |
2143 | version_type=linux | |
2144 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2145 | shlibpath_var=LD_LIBRARY_PATH | |
2146 | shlibpath_overrides_runpath=yes | |
2147 | ;; | |
2148 | ||
2149 | nto-qnx) | |
2150 | version_type=linux | |
2151 | need_lib_prefix=no | |
2152 | need_version=no | |
2153 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2154 | soname_spec='${libname}${release}.so$major' | |
2155 | shlibpath_var=LD_LIBRARY_PATH | |
2156 | shlibpath_overrides_runpath=yes | |
2157 | ;; | |
2158 | ||
2159 | openbsd*) | |
2160 | version_type=sunos | |
2161 | need_lib_prefix=no | |
2162 | need_version=no | |
2163 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2164 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2165 | shlibpath_var=LD_LIBRARY_PATH | |
2166 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2167 | case $host_os in | |
2168 | openbsd2.[[89]] | openbsd2.[[89]].*) | |
2169 | shlibpath_overrides_runpath=no | |
2170 | ;; | |
2171 | *) | |
2172 | shlibpath_overrides_runpath=yes | |
2173 | ;; | |
2174 | esac | |
2175 | else | |
2176 | shlibpath_overrides_runpath=yes | |
2177 | fi | |
2178 | ;; | |
2179 | ||
2180 | os2*) | |
2181 | libname_spec='$name' | |
2182 | need_lib_prefix=no | |
2183 | library_names_spec='$libname.dll $libname.a' | |
2184 | dynamic_linker='OS/2 ld.exe' | |
2185 | shlibpath_var=LIBPATH | |
2186 | ;; | |
2187 | ||
2188 | osf3* | osf4* | osf5*) | |
2189 | version_type=osf | |
2190 | need_lib_prefix=no | |
2191 | need_version=no | |
2192 | soname_spec='${libname}${release}.so' | |
2193 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2194 | shlibpath_var=LD_LIBRARY_PATH | |
2195 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
2196 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
2197 | ;; | |
2198 | ||
2199 | sco3.2v5*) | |
2200 | version_type=osf | |
2201 | soname_spec='${libname}${release}.so$major' | |
2202 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2203 | shlibpath_var=LD_LIBRARY_PATH | |
2204 | ;; | |
2205 | ||
2206 | solaris*) | |
2207 | version_type=linux | |
2208 | need_lib_prefix=no | |
2209 | need_version=no | |
2210 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2211 | soname_spec='${libname}${release}.so$major' | |
2212 | shlibpath_var=LD_LIBRARY_PATH | |
2213 | shlibpath_overrides_runpath=yes | |
2214 | hardcode_into_libs=yes | |
2215 | # ldd complains unless libraries are executable | |
2216 | postinstall_cmds='chmod +x $lib' | |
2217 | ;; | |
2218 | ||
2219 | sunos4*) | |
2220 | version_type=sunos | |
2221 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2222 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
2223 | shlibpath_var=LD_LIBRARY_PATH | |
2224 | shlibpath_overrides_runpath=yes | |
2225 | if test "$with_gnu_ld" = yes; then | |
2226 | need_lib_prefix=no | |
2227 | fi | |
2228 | need_version=yes | |
2229 | ;; | |
2230 | ||
2231 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
2232 | version_type=linux | |
2233 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2234 | soname_spec='${libname}${release}.so$major' | |
2235 | shlibpath_var=LD_LIBRARY_PATH | |
2236 | case $host_vendor in | |
2237 | sni) | |
2238 | shlibpath_overrides_runpath=no | |
aa1e3b4d RC |
2239 | need_lib_prefix=no |
2240 | export_dynamic_flag_spec='${wl}-Blargedynsym' | |
2241 | runpath_var=LD_RUN_PATH | |
2242 | ;; | |
2243 | siemens) | |
2244 | need_lib_prefix=no | |
6908b7d7 RC |
2245 | ;; |
2246 | motorola) | |
2247 | need_lib_prefix=no | |
2248 | need_version=no | |
2249 | shlibpath_overrides_runpath=no | |
2250 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
2251 | ;; | |
2252 | esac | |
2253 | ;; | |
2254 | ||
2255 | sysv4*MP*) | |
2256 | if test -d /usr/nec ;then | |
2257 | version_type=linux | |
2258 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' | |
2259 | soname_spec='$libname.so.$major' | |
2260 | shlibpath_var=LD_LIBRARY_PATH | |
2261 | fi | |
2262 | ;; | |
2263 | ||
2264 | uts4*) | |
2265 | version_type=linux | |
2266 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2267 | soname_spec='${libname}${release}.so$major' | |
2268 | shlibpath_var=LD_LIBRARY_PATH | |
2269 | ;; | |
2270 | ||
2271 | *) | |
2272 | dynamic_linker=no | |
2273 | ;; | |
2274 | esac | |
2275 | AC_MSG_RESULT([$dynamic_linker]) | |
2276 | test "$dynamic_linker" = no && can_build_shared=no | |
2277 | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER | |
2278 | ||
2279 | ||
2280 | # _LT_AC_TAGCONFIG | |
2281 | # ---------------- | |
2282 | AC_DEFUN([_LT_AC_TAGCONFIG], | |
2283 | [AC_ARG_WITH([tags], | |
2284 | [AC_HELP_STRING([--with-tags=TAGS], | |
2285 | [include additional configurations @<:@CXX,GCJ@:>@])], | |
2286 | [tagnames="$withval"], | |
2287 | [tagnames="CXX,GCJ" | |
2288 | case $host_os in | |
2289 | mingw*|cygwin*) tagnames="$tagnames,RC" ;; | |
2290 | esac]) | |
2291 | ||
2292 | if test -f "$ltmain" && test -n "$tagnames"; then | |
2293 | if test ! -f "${ofile}"; then | |
2294 | AC_MSG_WARN([output file `$ofile' does not exist]) | |
2295 | fi | |
2296 | ||
2297 | if test -z "$LTCC"; then | |
2298 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" | |
2299 | if test -z "$LTCC"; then | |
2300 | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) | |
2301 | else | |
2302 | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) | |
2303 | fi | |
2304 | fi | |
2305 | ||
2306 | # Extract list of available tagged configurations in $ofile. | |
2307 | # Note that this assumes the entire list is on one line. | |
2308 | available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` | |
2309 | ||
2310 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
2311 | for tagname in $tagnames; do | |
2312 | IFS="$lt_save_ifs" | |
2313 | # Check whether tagname contains only valid characters | |
2314 | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in | |
2315 | "") ;; | |
2316 | *) AC_MSG_ERROR([invalid tag name: $tagname]) | |
2317 | ;; | |
2318 | esac | |
2319 | ||
2320 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null | |
2321 | then | |
2322 | AC_MSG_ERROR([tag name \"$tagname\" already exists]) | |
2323 | fi | |
2324 | ||
2325 | # Update the list of available tags. | |
2326 | if test -n "$tagname"; then | |
2327 | echo appending configuration tag \"$tagname\" to $ofile | |
2328 | ||
2329 | case $tagname in | |
2330 | CXX) | |
2331 | AC_LIBTOOL_LANG_CXX_CONFIG | |
2332 | ;; | |
2333 | ||
2334 | GCJ) | |
2335 | AC_LIBTOOL_LANG_GCJ_CONFIG | |
2336 | ;; | |
2337 | ||
2338 | RC) | |
2339 | AC_LIBTOOL_LANG_RC_CONFIG | |
2340 | ;; | |
2341 | ||
2342 | *) | |
2343 | AC_MSG_ERROR([Unsupported tag name: $tagname]) | |
2344 | ;; | |
2345 | esac | |
2346 | ||
2347 | # Append the new tag name to the list of available tags. | |
2348 | available_tags="$available_tags $tagname" | |
2349 | fi | |
2350 | done | |
2351 | IFS="$lt_save_ifs" | |
2352 | ||
2353 | # Now substitute the updated list of available tags. | |
2354 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then | |
2355 | mv "${ofile}T" "$ofile" | |
2356 | chmod +x "$ofile" | |
2357 | else | |
2358 | rm -f "${ofile}T" | |
2359 | AC_MSG_ERROR([unable to update list of available tagged configurations.]) | |
2360 | fi | |
2361 | fi | |
2362 | ])# _LT_AC_TAGCONFIG | |
2363 | ||
2364 | ||
2365 | # AC_LIBTOOL_DLOPEN | |
2366 | # ----------------- | |
2367 | # enable checks for dlopen support | |
2368 | AC_DEFUN([AC_LIBTOOL_DLOPEN], | |
2369 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) | |
2370 | ])# AC_LIBTOOL_DLOPEN | |
2371 | ||
2372 | ||
2373 | # AC_LIBTOOL_WIN32_DLL | |
2374 | # -------------------- | |
2375 | # declare package support for building win32 dll's | |
2376 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], | |
2377 | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) | |
2378 | ])# AC_LIBTOOL_WIN32_DLL | |
2379 | ||
2380 | ||
2381 | # AC_ENABLE_SHARED([DEFAULT]) | |
2382 | # --------------------------- | |
2383 | # implement the --enable-shared flag | |
2384 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
2385 | AC_DEFUN([AC_ENABLE_SHARED], | |
2386 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
2387 | AC_ARG_ENABLE([shared], | |
2388 | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | |
2389 | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], | |
2390 | [p=${PACKAGE-default} | |
2391 | case $enableval in | |
2392 | yes) enable_shared=yes ;; | |
2393 | no) enable_shared=no ;; | |
2394 | *) | |
2395 | enable_shared=no | |
2396 | # Look at the argument we got. We use all the common list separators. | |
2397 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
2398 | for pkg in $enableval; do | |
2399 | IFS="$lt_save_ifs" | |
2400 | if test "X$pkg" = "X$p"; then | |
2401 | enable_shared=yes | |
2402 | fi | |
2403 | done | |
2404 | IFS="$lt_save_ifs" | |
2405 | ;; | |
2406 | esac], | |
2407 | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) | |
2408 | ])# AC_ENABLE_SHARED | |
2409 | ||
2410 | ||
2411 | # AC_DISABLE_SHARED | |
2412 | # ----------------- | |
2413 | #- set the default shared flag to --disable-shared | |
2414 | AC_DEFUN([AC_DISABLE_SHARED], | |
2415 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2416 | AC_ENABLE_SHARED(no) | |
2417 | ])# AC_DISABLE_SHARED | |
2418 | ||
2419 | ||
2420 | # AC_ENABLE_STATIC([DEFAULT]) | |
2421 | # --------------------------- | |
2422 | # implement the --enable-static flag | |
2423 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
2424 | AC_DEFUN([AC_ENABLE_STATIC], | |
2425 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
2426 | AC_ARG_ENABLE([static], | |
2427 | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], | |
2428 | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], | |
2429 | [p=${PACKAGE-default} | |
2430 | case $enableval in | |
2431 | yes) enable_static=yes ;; | |
2432 | no) enable_static=no ;; | |
2433 | *) | |
2434 | enable_static=no | |
2435 | # Look at the argument we got. We use all the common list separators. | |
2436 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
2437 | for pkg in $enableval; do | |
2438 | IFS="$lt_save_ifs" | |
2439 | if test "X$pkg" = "X$p"; then | |
2440 | enable_static=yes | |
2441 | fi | |
2442 | done | |
2443 | IFS="$lt_save_ifs" | |
2444 | ;; | |
2445 | esac], | |
2446 | [enable_static=]AC_ENABLE_STATIC_DEFAULT) | |
2447 | ])# AC_ENABLE_STATIC | |
2448 | ||
2449 | ||
2450 | # AC_DISABLE_STATIC | |
2451 | # ----------------- | |
2452 | # set the default static flag to --disable-static | |
2453 | AC_DEFUN([AC_DISABLE_STATIC], | |
2454 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2455 | AC_ENABLE_STATIC(no) | |
2456 | ])# AC_DISABLE_STATIC | |
2457 | ||
2458 | ||
2459 | # AC_ENABLE_FAST_INSTALL([DEFAULT]) | |
2460 | # --------------------------------- | |
2461 | # implement the --enable-fast-install flag | |
2462 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
2463 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], | |
2464 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
2465 | AC_ARG_ENABLE([fast-install], | |
2466 | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | |
2467 | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | |
2468 | [p=${PACKAGE-default} | |
2469 | case $enableval in | |
2470 | yes) enable_fast_install=yes ;; | |
2471 | no) enable_fast_install=no ;; | |
2472 | *) | |
2473 | enable_fast_install=no | |
2474 | # Look at the argument we got. We use all the common list separators. | |
2475 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
2476 | for pkg in $enableval; do | |
2477 | IFS="$lt_save_ifs" | |
2478 | if test "X$pkg" = "X$p"; then | |
2479 | enable_fast_install=yes | |
2480 | fi | |
2481 | done | |
2482 | IFS="$lt_save_ifs" | |
2483 | ;; | |
2484 | esac], | |
2485 | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) | |
2486 | ])# AC_ENABLE_FAST_INSTALL | |
2487 | ||
2488 | ||
2489 | # AC_DISABLE_FAST_INSTALL | |
2490 | # ----------------------- | |
2491 | # set the default to --disable-fast-install | |
2492 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], | |
2493 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2494 | AC_ENABLE_FAST_INSTALL(no) | |
2495 | ])# AC_DISABLE_FAST_INSTALL | |
2496 | ||
2497 | ||
2498 | # AC_LIBTOOL_PICMODE([MODE]) | |
2499 | # -------------------------- | |
2500 | # implement the --with-pic flag | |
2501 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. | |
2502 | AC_DEFUN([AC_LIBTOOL_PICMODE], | |
2503 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2504 | pic_mode=ifelse($#,1,$1,default) | |
2505 | ])# AC_LIBTOOL_PICMODE | |
2506 | ||
2507 | ||
2508 | # AC_PATH_TOOL_PREFIX | |
2509 | # ------------------- | |
2510 | # find a file program which can recognise shared library | |
2511 | AC_DEFUN([AC_PATH_TOOL_PREFIX], | |
2512 | [AC_MSG_CHECKING([for $1]) | |
2513 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
2514 | [case $MAGIC_CMD in | |
2515 | [[\\/*] | ?:[\\/]*]) | |
2516 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
2517 | ;; | |
2518 | *) | |
2519 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
2520 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2521 | dnl $ac_dummy forces splitting on constant user-supplied paths. | |
2522 | dnl POSIX.2 word splitting is done only on the output of word expansions, | |
2523 | dnl not every word. This closes a longstanding sh security hole. | |
2524 | ac_dummy="ifelse([$2], , $PATH, [$2])" | |
2525 | for ac_dir in $ac_dummy; do | |
2526 | IFS="$lt_save_ifs" | |
2527 | test -z "$ac_dir" && ac_dir=. | |
2528 | if test -f $ac_dir/$1; then | |
2529 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
2530 | if test -n "$file_magic_test_file"; then | |
2531 | case $deplibs_check_method in | |
2532 | "file_magic "*) | |
2533 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
2534 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
2535 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
2536 | egrep "$file_magic_regex" > /dev/null; then | |
2537 | : | |
2538 | else | |
2539 | cat <<EOF 1>&2 | |
2540 | ||
2541 | *** Warning: the command libtool uses to detect shared libraries, | |
2542 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
2543 | *** The result is that libtool may fail to recognize shared libraries | |
2544 | *** as such. This will affect the creation of libtool libraries that | |
2545 | *** depend on shared libraries, but programs linked with such libtool | |
2546 | *** libraries will work regardless of this problem. Nevertheless, you | |
2547 | *** may want to report the problem to your system manager and/or to | |
2548 | *** bug-libtool@gnu.org | |
2549 | ||
2550 | EOF | |
2551 | fi ;; | |
2552 | esac | |
2553 | fi | |
2554 | break | |
2555 | fi | |
2556 | done | |
2557 | IFS="$lt_save_ifs" | |
2558 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
2559 | ;; | |
2560 | esac]) | |
2561 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
2562 | if test -n "$MAGIC_CMD"; then | |
2563 | AC_MSG_RESULT($MAGIC_CMD) | |
2564 | else | |
2565 | AC_MSG_RESULT(no) | |
2566 | fi | |
2567 | ])# AC_PATH_TOOL_PREFIX | |
2568 | ||
2569 | ||
2570 | # AC_PATH_MAGIC | |
2571 | # ------------- | |
2572 | # find a file program which can recognise a shared library | |
2573 | AC_DEFUN([AC_PATH_MAGIC], | |
2574 | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | |
2575 | if test -z "$lt_cv_path_MAGIC_CMD"; then | |
2576 | if test -n "$ac_tool_prefix"; then | |
2577 | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | |
2578 | else | |
2579 | MAGIC_CMD=: | |
2580 | fi | |
2581 | fi | |
2582 | ])# AC_PATH_MAGIC | |
2583 | ||
2584 | ||
2585 | # AC_PROG_LD | |
2586 | # ---------- | |
2587 | # find the path to the GNU or non-GNU linker | |
2588 | AC_DEFUN([AC_PROG_LD], | |
2589 | [AC_ARG_WITH([gnu-ld], | |
2590 | [AC_HELP_STRING([--with-gnu-ld], | |
2591 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], | |
2592 | [test "$withval" = no || with_gnu_ld=yes], | |
2593 | [with_gnu_ld=no]) | |
2594 | AC_REQUIRE([AC_PROG_CC])dnl | |
2595 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
2596 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
2597 | ac_prog=ld | |
2598 | if test "$GCC" = yes; then | |
2599 | # Check if gcc -print-prog-name=ld gives a path. | |
2600 | AC_MSG_CHECKING([for ld used by GCC]) | |
2601 | case $host in | |
2602 | *-*-mingw*) | |
2603 | # gcc leaves a trailing carriage return which upsets mingw | |
2604 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
2605 | *) | |
2606 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
2607 | esac | |
2608 | case $ac_prog in | |
2609 | # Accept absolute paths. | |
2610 | [[\\/]]* | ?:[[\\/]]*) | |
2611 | re_direlt='/[[^/]][[^/]]*/\.\./' | |
2612 | # Canonicalize the path of ld | |
2613 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
2614 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
2615 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
2616 | done | |
2617 | test -z "$LD" && LD="$ac_prog" | |
2618 | ;; | |
2619 | "") | |
2620 | # If it fails, then pretend we aren't using GCC. | |
2621 | ac_prog=ld | |
2622 | ;; | |
2623 | *) | |
2624 | # If it is relative, then search for the first ld in PATH. | |
2625 | with_gnu_ld=unknown | |
2626 | ;; | |
2627 | esac | |
2628 | elif test "$with_gnu_ld" = yes; then | |
2629 | AC_MSG_CHECKING([for GNU ld]) | |
2630 | else | |
2631 | AC_MSG_CHECKING([for non-GNU ld]) | |
2632 | fi | |
2633 | AC_CACHE_VAL(lt_cv_path_LD, | |
2634 | [if test -z "$LD"; then | |
2635 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2636 | for ac_dir in $PATH; do | |
2637 | IFS="$lt_save_ifs" | |
2638 | test -z "$ac_dir" && ac_dir=. | |
2639 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
2640 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
2641 | # Check to see if the program is GNU ld. I'd rather use --version, | |
2642 | # but apparently some GNU ld's only accept -v. | |
2643 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
2644 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
2645 | test "$with_gnu_ld" != no && break | |
2646 | else | |
2647 | test "$with_gnu_ld" != yes && break | |
2648 | fi | |
2649 | fi | |
2650 | done | |
2651 | IFS="$lt_save_ifs" | |
2652 | else | |
2653 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
2654 | fi]) | |
2655 | LD="$lt_cv_path_LD" | |
2656 | if test -n "$LD"; then | |
2657 | AC_MSG_RESULT($LD) | |
2658 | else | |
2659 | AC_MSG_RESULT(no) | |
2660 | fi | |
2661 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
2662 | AC_PROG_LD_GNU | |
2663 | ])# AC_PROG_LD | |
2664 | ||
2665 | ||
2666 | # AC_PROG_LD_GNU | |
2667 | # -------------- | |
2668 | AC_DEFUN([AC_PROG_LD_GNU], | |
2669 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
2670 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
2671 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
2672 | lt_cv_prog_gnu_ld=yes | |
2673 | else | |
2674 | lt_cv_prog_gnu_ld=no | |
2675 | fi]) | |
2676 | with_gnu_ld=$lt_cv_prog_gnu_ld | |
2677 | ])# AC_PROG_LD_GNU | |
2678 | ||
2679 | ||
2680 | # AC_PROG_LD_RELOAD_FLAG | |
2681 | # ---------------------- | |
2682 | # find reload flag for linker | |
2683 | # -- PORTME Some linkers may need a different reload flag. | |
2684 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], | |
2685 | [AC_CACHE_CHECK([for $LD option to reload object files], | |
2686 | lt_cv_ld_reload_flag, | |
2687 | [lt_cv_ld_reload_flag='-r']) | |
2688 | reload_flag=$lt_cv_ld_reload_flag | |
2689 | case $reload_flag in | |
2690 | "" | " "*) ;; | |
2691 | *) reload_flag=" $reload_flag" ;; | |
2692 | esac | |
2693 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
2694 | ])# AC_PROG_LD_RELOAD_FLAG | |
2695 | ||
2696 | ||
2697 | # AC_DEPLIBS_CHECK_METHOD | |
2698 | # ----------------------- | |
2699 | # how to check for library dependencies | |
2700 | # -- PORTME fill in with the dynamic library characteristics | |
2701 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], | |
2702 | [AC_CACHE_CHECK([how to recognise dependant libraries], | |
2703 | lt_cv_deplibs_check_method, | |
2704 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | |
2705 | lt_cv_file_magic_test_file= | |
2706 | lt_cv_deplibs_check_method='unknown' | |
2707 | # Need to set the preceding variable on all platforms that support | |
2708 | # interlibrary dependencies. | |
2709 | # 'none' -- dependencies not supported. | |
2710 | # `unknown' -- same as none, but documents that we really don't know. | |
2711 | # 'pass_all' -- all dependencies passed with no checks. | |
2712 | # 'test_compile' -- check by making test program. | |
2713 | # 'file_magic [[regex]]' -- check by looking for files in library path | |
2714 | # which responds to the $file_magic_cmd with a given egrep regex. | |
2715 | # If you have `file' or equivalent on your system and you're not sure | |
2716 | # whether `pass_all' will *always* work, you probably want this one. | |
2717 | ||
2718 | case $host_os in | |
2719 | aix4* | aix5*) | |
2720 | lt_cv_deplibs_check_method=pass_all | |
2721 | ;; | |
2722 | ||
2723 | beos*) | |
2724 | lt_cv_deplibs_check_method=pass_all | |
2725 | ;; | |
2726 | ||
2727 | bsdi4*) | |
2728 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
2729 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
2730 | lt_cv_file_magic_test_file=/shlib/libc.so | |
2731 | ;; | |
2732 | ||
2733 | cygwin* | mingw* | pw32*) | |
2734 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
2735 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
2736 | ;; | |
2737 | ||
2738 | darwin* | rhapsody*) | |
2739 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' | |
2740 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
2741 | case "$host_os" in | |
2742 | rhapsody* | darwin1.[[012]]) | |
2743 | lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` | |
2744 | ;; | |
2745 | *) # Darwin 1.3 on | |
2746 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' | |
2747 | ;; | |
2748 | esac | |
2749 | ;; | |
2750 | ||
2751 | freebsd*) | |
2752 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
2753 | case $host_cpu in | |
2754 | i*86 ) | |
2755 | # Not sure whether the presence of OpenBSD here was a mistake. | |
2756 | # Let's accept both of them until this is cleared up. | |
2757 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' | |
2758 | lt_cv_file_magic_cmd=/usr/bin/file | |
2759 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
2760 | ;; | |
2761 | esac | |
2762 | else | |
2763 | lt_cv_deplibs_check_method=pass_all | |
2764 | fi | |
2765 | ;; | |
2766 | ||
2767 | gnu*) | |
2768 | lt_cv_deplibs_check_method=pass_all | |
2769 | ;; | |
2770 | ||
2771 | hpux10.20* | hpux11*) | |
2772 | lt_cv_file_magic_cmd=/usr/bin/file | |
2773 | if test "$host_cpu" = ia64; then | |
2774 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | |
2775 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
2776 | else | |
2777 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | |
2778 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
2779 | fi | |
2780 | ;; | |
2781 | ||
2782 | irix5* | irix6* | nonstopux*) | |
2783 | case $host_os in | |
2784 | irix5* | nonstopux*) | |
2785 | # this will be overridden with pass_all, but let us keep it just in case | |
2786 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
2787 | ;; | |
2788 | *) | |
2789 | case $LD in | |
2790 | *-32|*"-32 ") libmagic=32-bit;; | |
2791 | *-n32|*"-n32 ") libmagic=N32;; | |
2792 | *-64|*"-64 ") libmagic=64-bit;; | |
2793 | *) libmagic=never-match;; | |
2794 | esac | |
2795 | # this will be overridden with pass_all, but let us keep it just in case | |
2796 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" | |
2797 | ;; | |
2798 | esac | |
2799 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
2800 | lt_cv_deplibs_check_method=pass_all | |
2801 | ;; | |
2802 | ||
2803 | # This must be Linux ELF. | |
2804 | linux*) | |
2805 | case $host_cpu in | |
2806 | alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) | |
2807 | lt_cv_deplibs_check_method=pass_all ;; | |
2808 | *) | |
2809 | # glibc up to 2.1.1 does not perform some relocations on ARM | |
2810 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; | |
2811 | esac | |
2812 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` | |
2813 | ;; | |
2814 | ||
2815 | netbsd*) | |
2816 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
2817 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' | |
2818 | else | |
2819 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' | |
2820 | fi | |
2821 | ;; | |
2822 | ||
2823 | newos6*) | |
2824 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
2825 | lt_cv_file_magic_cmd=/usr/bin/file | |
2826 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
2827 | ;; | |
2828 | ||
2829 | nto-qnx) | |
2830 | lt_cv_deplibs_check_method=unknown | |
2831 | ;; | |
2832 | ||
2833 | openbsd*) | |
2834 | lt_cv_file_magic_cmd=/usr/bin/file | |
2835 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
2836 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2837 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' | |
2838 | else | |
2839 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' | |
2840 | fi | |
2841 | ;; | |
2842 | ||
2843 | osf3* | osf4* | osf5*) | |
2844 | # this will be overridden with pass_all, but let us keep it just in case | |
2845 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
2846 | lt_cv_file_magic_test_file=/shlib/libc.so | |
2847 | lt_cv_deplibs_check_method=pass_all | |
2848 | ;; | |
2849 | ||
2850 | sco3.2v5*) | |
2851 | lt_cv_deplibs_check_method=pass_all | |
2852 | ;; | |
2853 | ||
2854 | solaris*) | |
2855 | lt_cv_deplibs_check_method=pass_all | |
2856 | lt_cv_file_magic_test_file=/lib/libc.so | |
2857 | ;; | |
2858 | ||
2859 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
2860 | case $host_vendor in | |
2861 | motorola) | |
2862 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' | |
2863 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
2864 | ;; | |
2865 | ncr) | |
2866 | lt_cv_deplibs_check_method=pass_all | |
2867 | ;; | |
2868 | sequent) | |
2869 | lt_cv_file_magic_cmd='/bin/file' | |
2870 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
2871 | ;; | |
2872 | sni) | |
2873 | lt_cv_file_magic_cmd='/bin/file' | |
2874 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
2875 | lt_cv_file_magic_test_file=/lib/libc.so | |
2876 | ;; | |
aa1e3b4d RC |
2877 | siemens) |
2878 | lt_cv_deplibs_check_method=pass_all | |
2879 | ;; | |
6908b7d7 RC |
2880 | esac |
2881 | ;; | |
2882 | ||
2883 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) | |
2884 | lt_cv_deplibs_check_method=pass_all | |
2885 | ;; | |
2886 | esac | |
2887 | ]) | |
2888 | file_magic_cmd=$lt_cv_file_magic_cmd | |
2889 | deplibs_check_method=$lt_cv_deplibs_check_method | |
2890 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
2891 | ])# AC_DEPLIBS_CHECK_METHOD | |
2892 | ||
2893 | ||
2894 | # AC_PROG_NM | |
2895 | # ---------- | |
2896 | # find the path to a BSD-compatible name lister | |
2897 | AC_DEFUN([AC_PROG_NM], | |
2898 | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, | |
2899 | [if test -n "$NM"; then | |
2900 | # Let the user override the test. | |
2901 | lt_cv_path_NM="$NM" | |
2902 | else | |
2903 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2904 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | |
2905 | IFS="$lt_save_ifs" | |
2906 | test -z "$ac_dir" && ac_dir=. | |
2907 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" | |
2908 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
2909 | # Check to see if the nm accepts a BSD-compat flag. | |
2910 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
2911 | # nm: unknown option "B" ignored | |
2912 | # Tru64's nm complains that /dev/null is an invalid object file | |
2913 | if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then | |
2914 | lt_cv_path_NM="$tmp_nm -B" | |
2915 | break | |
2916 | elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
2917 | lt_cv_path_NM="$tmp_nm -p" | |
2918 | break | |
2919 | else | |
2920 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
2921 | continue # so that we can try to find one that supports BSD flags | |
2922 | fi | |
2923 | fi | |
2924 | done | |
2925 | IFS="$lt_save_ifs" | |
2926 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm | |
2927 | fi]) | |
2928 | NM="$lt_cv_path_NM" | |
2929 | ])# AC_PROG_NM | |
2930 | ||
2931 | ||
2932 | # AC_CHECK_LIBM | |
2933 | # ------------- | |
2934 | # check for math library | |
2935 | AC_DEFUN([AC_CHECK_LIBM], | |
2936 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
2937 | LIBM= | |
2938 | case $host in | |
2939 | *-*-beos* | *-*-cygwin* | *-*-pw32*) | |
2940 | # These system don't have libm | |
2941 | ;; | |
2942 | *-ncr-sysv4.3*) | |
2943 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
2944 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | |
2945 | ;; | |
2946 | *) | |
2947 | AC_CHECK_LIB(m, main, LIBM="-lm") | |
2948 | ;; | |
2949 | esac | |
2950 | ])# AC_CHECK_LIBM | |
2951 | ||
2952 | ||
2953 | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) | |
2954 | # ----------------------------------- | |
2955 | # sets LIBLTDL to the link flags for the libltdl convenience library and | |
2956 | # LTDLINCL to the include flags for the libltdl header and adds | |
2957 | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL | |
2958 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If | |
2959 | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will | |
2960 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with | |
2961 | # '${top_srcdir}/' (note the single quotes!). If your package is not | |
2962 | # flat and you're not using automake, define top_builddir and | |
2963 | # top_srcdir appropriately in the Makefiles. | |
2964 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], | |
2965 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2966 | case $enable_ltdl_convenience in | |
2967 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
2968 | "") enable_ltdl_convenience=yes | |
2969 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
2970 | esac | |
2971 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la | |
2972 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
2973 | # For backwards non-gettext consistent compatibility... | |
2974 | INCLTDL="$LTDLINCL" | |
2975 | ])# AC_LIBLTDL_CONVENIENCE | |
2976 | ||
2977 | ||
2978 | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) | |
2979 | # ----------------------------------- | |
2980 | # sets LIBLTDL to the link flags for the libltdl installable library and | |
2981 | # LTDLINCL to the include flags for the libltdl header and adds | |
2982 | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL | |
2983 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If | |
2984 | # DIRECTORY is not provided and an installed libltdl is not found, it is | |
2985 | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' | |
2986 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single | |
2987 | # quotes!). If your package is not flat and you're not using automake, | |
2988 | # define top_builddir and top_srcdir appropriately in the Makefiles. | |
2989 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
2990 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], | |
2991 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
2992 | AC_CHECK_LIB(ltdl, main, | |
2993 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
2994 | [if test x"$enable_ltdl_install" = xno; then | |
2995 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
2996 | else | |
2997 | enable_ltdl_install=yes | |
2998 | fi | |
2999 | ]) | |
3000 | if test x"$enable_ltdl_install" = x"yes"; then | |
3001 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
3002 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la | |
3003 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
3004 | else | |
3005 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
3006 | LIBLTDL="-lltdl" | |
3007 | LTDLINCL= | |
3008 | fi | |
3009 | # For backwards non-gettext consistent compatibility... | |
3010 | INCLTDL="$LTDLINCL" | |
3011 | ])# AC_LIBLTDL_INSTALLABLE | |
3012 | ||
3013 | ||
3014 | # If this macro is not defined by Autoconf, define it here. | |
3015 | ifdef([AC_PROVIDE_IFELSE], | |
3016 | [], | |
3017 | [define([AC_PROVIDE_IFELSE], | |
3018 | [ifdef([AC_PROVIDE_$1], | |
3019 | [$2], [$3])])]) | |
3020 | ||
3021 | ||
3022 | # AC_LIBTOOL_CXX | |
3023 | # -------------- | |
3024 | # enable support for C++ libraries | |
3025 | AC_DEFUN([AC_LIBTOOL_CXX], | |
3026 | [AC_REQUIRE([_LT_AC_LANG_CXX]) | |
3027 | ])# AC_LIBTOOL_CXX | |
3028 | ||
3029 | ||
3030 | # _LT_AC_LANG_CXX | |
3031 | # --------------- | |
3032 | AC_DEFUN([_LT_AC_LANG_CXX], | |
3033 | [AC_REQUIRE([AC_PROG_CXX]) | |
3034 | AC_REQUIRE([AC_PROG_CXXCPP]) | |
3035 | ])# _LT_AC_LANG_CXX | |
3036 | ||
3037 | ||
3038 | # AC_LIBTOOL_GCJ | |
3039 | # -------------- | |
3040 | # enable support for GCJ libraries | |
3041 | AC_DEFUN([AC_LIBTOOL_GCJ], | |
3042 | [AC_REQUIRE([_LT_AC_LANG_GCJ]) | |
3043 | ])# AC_LIBTOOL_GCJ | |
3044 | ||
3045 | ||
3046 | # _LT_AC_LANG_GCJ | |
3047 | # --------------- | |
3048 | AC_DEFUN([_LT_AC_LANG_GCJ], | |
3049 | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], | |
3050 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], | |
3051 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], | |
3052 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], | |
3053 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], | |
3054 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) | |
3055 | ])# _LT_AC_LANG_GCJ | |
3056 | ||
3057 | ||
3058 | # AC_LIBTOOL_RC | |
3059 | # -------------- | |
3060 | # enable support for Windows resource files | |
3061 | AC_DEFUN([AC_LIBTOOL_RC], | |
3062 | [AC_REQUIRE([AC_PROG_RC]) | |
3063 | ])# AC_LIBTOOL_RC | |
3064 | ||
3065 | ||
3066 | # AC_LIBTOOL_LANG_C_CONFIG | |
3067 | # ------------------------ | |
3068 | # Ensure that the configuration vars for the C compiler are | |
3069 | # suitably defined. Those variables are subsequently used by | |
3070 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
3071 | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) | |
3072 | AC_DEFUN([_LT_AC_LANG_C_CONFIG], | |
3073 | [lt_save_CC="$CC" | |
3074 | AC_LANG_PUSH(C) | |
3075 | ||
3076 | # Source file extension for C test sources. | |
3077 | ac_ext=c | |
3078 | ||
3079 | # Object file extension for compiled C test sources. | |
3080 | objext=o | |
3081 | _LT_AC_TAGVAR(objext, $1)=$objext | |
3082 | ||
3083 | # Code to be used in simple compile tests | |
3084 | lt_simple_compile_test_code="int some_variable = 0;" | |
3085 | ||
3086 | # Code to be used in simple link tests | |
3087 | lt_simple_link_test_code='main(){return(0);}' | |
3088 | ||
3089 | _LT_AC_SYS_COMPILER | |
3090 | ||
3091 | # | |
3092 | # Check for any special shared library compilation flags. | |
3093 | # | |
3094 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= | |
3095 | if test "$GCC" = no; then | |
3096 | case $host_os in | |
3097 | sco3.2v5*) | |
3098 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' | |
3099 | ;; | |
3100 | esac | |
3101 | fi | |
3102 | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then | |
3103 | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) | |
3104 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : | |
3105 | else | |
3106 | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) | |
3107 | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no | |
3108 | fi | |
3109 | fi | |
3110 | ||
3111 | ||
3112 | # | |
3113 | # Check to make sure the static flag actually works. | |
3114 | # | |
3115 | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], | |
3116 | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), | |
3117 | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), | |
3118 | [], | |
3119 | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) | |
3120 | ||
3121 | ||
3122 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | |
3123 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
3124 | AC_LIBTOOL_PROG_CC_C_O($1) | |
3125 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
3126 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
3127 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
3128 | AC_LIBTOOL_SYS_LIB_STRIP | |
3129 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
3130 | AC_LIBTOOL_DLOPEN_SELF($1) | |
3131 | ||
3132 | # Report which librarie types wil actually be built | |
3133 | AC_MSG_CHECKING([if libtool supports shared libraries]) | |
3134 | AC_MSG_RESULT([$can_build_shared]) | |
3135 | ||
3136 | AC_MSG_CHECKING([whether to build shared libraries]) | |
3137 | test "$can_build_shared" = "no" && enable_shared=no | |
3138 | ||
3139 | # On AIX, shared libraries and static libraries use the same namespace, and | |
3140 | # are all built from PIC. | |
3141 | case "$host_os" in | |
3142 | aix3*) | |
3143 | test "$enable_shared" = yes && enable_static=no | |
3144 | if test -n "$RANLIB"; then | |
3145 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
3146 | postinstall_cmds='$RANLIB $lib' | |
3147 | fi | |
3148 | ;; | |
3149 | ||
3150 | aix4*) | |
3151 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
3152 | test "$enable_shared" = yes && enable_static=no | |
3153 | fi | |
3154 | ;; | |
3155 | esac | |
3156 | AC_MSG_RESULT([$enable_shared]) | |
3157 | ||
3158 | AC_MSG_CHECKING([whether to build static libraries]) | |
3159 | # Make sure either enable_shared or enable_static is yes. | |
3160 | test "$enable_shared" = yes || enable_static=yes | |
3161 | AC_MSG_RESULT([$enable_static]) | |
3162 | ||
3163 | AC_LIBTOOL_CONFIG($1) | |
3164 | ||
3165 | AC_LANG_POP | |
3166 | CC="$lt_save_CC" | |
3167 | ])# AC_LIBTOOL_LANG_C_CONFIG | |
3168 | ||
3169 | ||
3170 | # AC_LIBTOOL_LANG_CXX_CONFIG | |
3171 | # -------------------------- | |
3172 | # Ensure that the configuration vars for the C compiler are | |
3173 | # suitably defined. Those variables are subsequently used by | |
3174 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
3175 | AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) | |
3176 | AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], | |
3177 | [AC_LANG_PUSH(C++) | |
3178 | AC_REQUIRE([AC_PROG_CXX]) | |
3179 | AC_REQUIRE([AC_PROG_CXXCPP]) | |
3180 | ||
3181 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
3182 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
3183 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
3184 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | |
3185 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
3186 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
3187 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
3188 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
3189 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
3190 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | |
3191 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
3192 | _LT_AC_TAGVAR(no_undefined_flag, $1)= | |
3193 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
3194 | ||
3195 | # Dependencies to place before and after the object being linked: | |
3196 | _LT_AC_TAGVAR(predep_objects, $1)= | |
3197 | _LT_AC_TAGVAR(postdep_objects, $1)= | |
3198 | _LT_AC_TAGVAR(predeps, $1)= | |
3199 | _LT_AC_TAGVAR(postdeps, $1)= | |
3200 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)= | |
3201 | ||
3202 | # Source file extension for C test sources. | |
3203 | ac_ext=cc | |
3204 | ||
3205 | # Object file extension for compiled C test sources. | |
3206 | objext=o | |
3207 | _LT_AC_TAGVAR(objext, $1)=$objext | |
3208 | ||
3209 | # Code to be used in simple compile tests | |
3210 | lt_simple_compile_test_code="int some_variable = 0;" | |
3211 | ||
3212 | # Code to be used in simple link tests | |
3213 | lt_simple_link_test_code='int main(int char *[]) { return(0); }' | |
3214 | ||
3215 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
3216 | _LT_AC_SYS_COMPILER | |
3217 | ||
3218 | # Allow CC to be a program name with arguments. | |
3219 | lt_save_CC="$CC" | |
3220 | CC=${CXX-"c++"} | |
3221 | set dummy $CC | |
3222 | compiler="[$]2" | |
3223 | _LT_AC_TAGVAR(compiler, $1)=$CC | |
3224 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` | |
3225 | ||
3226 | # We don't want -fno-exception wen compiling C++ code, so set the | |
3227 | # no_builtin_flag separately | |
3228 | if test "$GXX" = yes; then | |
3229 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
3230 | else | |
3231 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
3232 | fi | |
3233 | ||
3234 | if test "$GXX" = yes; then | |
3235 | # Set up default GNU C++ configuration | |
3236 | ||
3237 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
3238 | # archiving commands below assume that GNU ld is being used. | |
3239 | if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ | |
3240 | egrep 'GNU ld' > /dev/null; then | |
3241 | with_gnu_ld=yes | |
3242 | ||
3243 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
3244 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
3245 | ||
3246 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
3247 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
3248 | ||
3249 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
3250 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
3251 | # investigate it a little bit more. (MM) | |
3252 | wlarc='${wl}' | |
3253 | ||
3254 | # ancient GNU ld didn't support --whole-archive et. al. | |
3255 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ | |
3256 | egrep 'no-whole-archive' > /dev/null; then | |
3257 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
3258 | else | |
3259 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
3260 | fi | |
3261 | else | |
3262 | with_gnu_ld=no | |
3263 | wlarc= | |
3264 | ||
3265 | # A generic and very simple default shared library creation | |
3266 | # command for GNU C++ for the case where it uses the native | |
3267 | # linker, instead of GNU ld. If possible, this setting should | |
3268 | # overridden to take advantage of the native linker features on | |
3269 | # the platform it is being used on. | |
3270 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
3271 | fi | |
3272 | ||
3273 | # Commands to make compiler produce verbose output that lists | |
3274 | # what "hidden" libraries, object files and flags are used when | |
3275 | # linking a shared library. | |
3276 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' | |
3277 | ||
3278 | else | |
3279 | GXX=no | |
3280 | with_gnu_ld=no | |
3281 | wlarc= | |
3282 | fi | |
3283 | ||
3284 | # PORTME: fill in a description of your system's C++ link characteristics | |
3285 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
3286 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
3287 | case $host_os in | |
3288 | aix3*) | |
3289 | # FIXME: insert proper C++ library support | |
3290 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3291 | ;; | |
3292 | aix4* | aix5*) | |
3293 | if test "$host_cpu" = ia64; then | |
3294 | # On IA64, the linker does run time linking by default, so we don't | |
3295 | # have to do anything special. | |
3296 | aix_use_runtimelinking=no | |
3297 | exp_sym_flag='-Bexport' | |
3298 | no_entry_flag="" | |
3299 | else | |
3300 | aix_use_runtimelinking=no | |
3301 | ||
3302 | # Test if we are trying to use run time linking or normal | |
3303 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
3304 | # need to do runtime linking. | |
3305 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | |
3306 | for ld_flag in $LDFLAGS; do | |
3307 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
3308 | aix_use_runtimelinking=yes | |
3309 | break | |
3310 | fi | |
3311 | done | |
3312 | esac | |
3313 | ||
3314 | exp_sym_flag='-bexport' | |
3315 | no_entry_flag='-bnoentry' | |
3316 | fi | |
3317 | ||
3318 | # When large executables or shared objects are built, AIX ld can | |
3319 | # have problems creating the table of contents. If linking a library | |
3320 | # or program results in "error TOC overflow" add -mminimal-toc to | |
3321 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
3322 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
3323 | ||
3324 | _LT_AC_TAGVAR(archive_cmds, $1)='' | |
3325 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
3326 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
3327 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
3328 | ||
3329 | if test "$GXX" = yes; then | |
3330 | case $host_os in aix4.[012]|aix4.[012].*) | |
3331 | # We only want to do this on AIX 4.2 and lower, the check | |
3332 | # below for broken collect2 doesn't work under 4.3+ | |
3333 | collect2name=`${CC} -print-prog-name=collect2` | |
3334 | if test -f "$collect2name" && \ | |
3335 | strings "$collect2name" | grep resolve_lib_name >/dev/null | |
3336 | then | |
3337 | # We have reworked collect2 | |
3338 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
3339 | else | |
3340 | # We have old collect2 | |
3341 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
3342 | # It fails to find uninstalled libraries when the uninstalled | |
3343 | # path is not listed in the libpath. Setting hardcode_minus_L | |
3344 | # to unsupported forces relinking | |
3345 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
3346 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
3347 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
3348 | fi | |
3349 | esac | |
3350 | shared_flag='-shared' | |
3351 | else | |
3352 | # not using gcc | |
3353 | if test "$host_cpu" = ia64; then | |
3354 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
3355 | # chokes on -Wl,-G. The following line is correct: | |
3356 | shared_flag='-G' | |
3357 | else | |
3358 | if test "$aix_use_runtimelinking" = yes; then | |
3359 | shared_flag='${wl}-G' | |
3360 | else | |
3361 | shared_flag='${wl}-bM:SRE' | |
3362 | fi | |
3363 | fi | |
3364 | fi | |
3365 | ||
3366 | # It seems that -bexpall does not export symbols beginning with | |
3367 | # underscore (_), so it is better to generate a list of symbols to export. | |
3368 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
3369 | if test "$aix_use_runtimelinking" = yes; then | |
3370 | # Warning - without using the other runtime loading flags (-brtl), | |
3371 | # -berok will link without error, but may produce a broken library. | |
3372 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | |
3373 | # Determine the default libpath from the value encoded in an empty executable. | |
3374 | _LT_AC_SYS_LIBPATH_AIX | |
3375 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
3376 | ||
3377 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
3378 | else | |
3379 | if test "$host_cpu" = ia64; then | |
3380 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
3381 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
3382 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | |
3383 | else | |
3384 | # Determine the default libpath from the value encoded in an empty executable. | |
3385 | _LT_AC_SYS_LIBPATH_AIX | |
3386 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
3387 | # Warning - without using the other run time loading flags, | |
3388 | # -berok will link without error, but may produce a broken library. | |
3389 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
3390 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
3391 | # -bexpall does not export symbols beginning with underscore (_) | |
3392 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
3393 | # Exported symbols can be pulled into shared objects from archives | |
3394 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' | |
3395 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
3396 | # This is similar to how AIX traditionally builds it's shared libraries. | |
3397 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
3398 | fi | |
3399 | fi | |
3400 | ;; | |
3401 | chorus*) | |
3402 | case $cc_basename in | |
3403 | *) | |
3404 | # FIXME: insert proper C++ library support | |
3405 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3406 | ;; | |
3407 | esac | |
3408 | ;; | |
3409 | ||
3410 | cygwin*) | |
3411 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
3412 | # as there is no search path for DLLs. | |
3413 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
3414 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
aa1e3b4d | 3415 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
6908b7d7 RC |
3416 | |
3417 | if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then | |
3418 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | |
3419 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib' | |
3420 | else | |
3421 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3422 | fi | |
3423 | ;; | |
3424 | ||
3425 | mingw* | pw32*) | |
3426 | # FIXME: insert proper C++ library support | |
3427 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3428 | ;; | |
3429 | ||
3430 | dgux*) | |
3431 | case $cc_basename in | |
3432 | ec++) | |
3433 | # FIXME: insert proper C++ library support | |
3434 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3435 | ;; | |
3436 | ghcx) | |
3437 | # Green Hills C++ Compiler | |
3438 | # FIXME: insert proper C++ library support | |
3439 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3440 | ;; | |
3441 | *) | |
3442 | # FIXME: insert proper C++ library support | |
3443 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3444 | ;; | |
3445 | esac | |
3446 | ;; | |
3447 | freebsd[12]*) | |
3448 | # C++ shared libraries reported to be fairly broken before switch to ELF | |
3449 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3450 | ;; | |
3451 | freebsd-elf*) | |
3452 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
3453 | ;; | |
3454 | freebsd*) | |
3455 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
3456 | # conventions | |
3457 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
3458 | ;; | |
3459 | gnu*) | |
3460 | ;; | |
3461 | hpux*) | |
3462 | if test $with_gnu_ld = no; then | |
3463 | if test "$host_cpu" = ia64; then | |
3464 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
3465 | else | |
3466 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
3467 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3468 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
3469 | fi | |
3470 | fi | |
3471 | if test "$host_cpu" = ia64; then | |
3472 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
3473 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
3474 | else | |
3475 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
3476 | fi | |
3477 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
3478 | # but as the default | |
3479 | # location of the library. | |
3480 | ||
3481 | case $cc_basename in | |
3482 | CC) | |
3483 | # FIXME: insert proper C++ library support | |
3484 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3485 | ;; | |
3486 | aCC) | |
3487 | case $host_os in | |
3488 | hpux9*) | |
3489 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
3490 | ;; | |
3491 | *) | |
3492 | if test "$host_cpu" = ia64; then | |
3493 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | |
3494 | else | |
3495 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
3496 | fi | |
3497 | ;; | |
3498 | esac | |
3499 | # Commands to make compiler produce verbose output that lists | |
3500 | # what "hidden" libraries, object files and flags are used when | |
3501 | # linking a shared library. | |
3502 | # | |
3503 | # There doesn't appear to be a way to prevent this compiler from | |
3504 | # explicitly linking system object files so we need to strip them | |
3505 | # from the output so that they don't get included in the library | |
3506 | # dependencies. | |
3507 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3508 | ;; | |
3509 | *) | |
3510 | if test "$GXX" = yes; then | |
3511 | if test $with_gnu_ld = no; then | |
3512 | case $host_os in | |
3513 | hpux9*) | |
3514 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
3515 | ;; | |
3516 | *) | |
3517 | if test "$host_cpu" = ia64; then | |
3518 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | |
3519 | else | |
3520 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
3521 | fi | |
3522 | ;; | |
3523 | esac | |
3524 | fi | |
3525 | else | |
3526 | # FIXME: insert proper C++ library support | |
3527 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3528 | fi | |
3529 | ;; | |
3530 | esac | |
3531 | ;; | |
3532 | irix5* | irix6*) | |
3533 | case $cc_basename in | |
3534 | CC) | |
3535 | # SGI C++ | |
3536 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | |
3537 | ||
3538 | # Archives containing C++ object files must be created using | |
3539 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
3540 | # necessary to make sure instantiated templates are included | |
3541 | # in the archive. | |
3542 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
3543 | ;; | |
3544 | *) | |
3545 | if test "$GXX" = yes; then | |
3546 | if test "$with_gnu_ld" = no; then | |
3547 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | |
3548 | else | |
3549 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' | |
3550 | fi | |
3551 | fi | |
3552 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
3553 | ;; | |
3554 | esac | |
3555 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
3556 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3557 | ;; | |
3558 | linux*) | |
3559 | case $cc_basename in | |
3560 | KCC) | |
3561 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
3562 | ||
3563 | # KCC will only create a shared library if the output file | |
3564 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
3565 | # to its proper name (with version) after linking. | |
3566 | _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
3567 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | |
3568 | ||
3569 | # Commands to make compiler produce verbose output that lists | |
3570 | # what "hidden" libraries, object files and flags are used when | |
3571 | # linking a shared library. | |
3572 | # | |
3573 | # There doesn't appear to be a way to prevent this compiler from | |
3574 | # explicitly linking system object files so we need to strip them | |
3575 | # from the output so that they don't get included in the library | |
3576 | # dependencies. | |
3577 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3578 | ||
3579 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' | |
3580 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
3581 | ||
3582 | # Archives containing C++ object files must be created using | |
3583 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
3584 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
3585 | ;; | |
3586 | cxx) | |
3587 | # Compaq C++ | |
3588 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
3589 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | |
3590 | ||
3591 | runpath_var=LD_RUN_PATH | |
3592 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
3593 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3594 | ||
3595 | # Commands to make compiler produce verbose output that lists | |
3596 | # what "hidden" libraries, object files and flags are used when | |
3597 | # linking a shared library. | |
3598 | # | |
3599 | # There doesn't appear to be a way to prevent this compiler from | |
3600 | # explicitly linking system object files so we need to strip them | |
3601 | # from the output so that they don't get included in the library | |
3602 | # dependencies. | |
3603 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3604 | ;; | |
3605 | esac | |
3606 | ;; | |
3607 | lynxos*) | |
3608 | # FIXME: insert proper C++ library support | |
3609 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3610 | ;; | |
3611 | m88k*) | |
3612 | # FIXME: insert proper C++ library support | |
3613 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3614 | ;; | |
3615 | mvs*) | |
3616 | case $cc_basename in | |
3617 | cxx) | |
3618 | # FIXME: insert proper C++ library support | |
3619 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3620 | ;; | |
3621 | *) | |
3622 | # FIXME: insert proper C++ library support | |
3623 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3624 | ;; | |
3625 | esac | |
3626 | ;; | |
3627 | netbsd*) | |
3628 | # NetBSD uses g++ - do we need to do anything? | |
3629 | ;; | |
3630 | osf3*) | |
3631 | case $cc_basename in | |
3632 | KCC) | |
3633 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
3634 | ||
3635 | # KCC will only create a shared library if the output file | |
3636 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
3637 | # to its proper name (with version) after linking. | |
3638 | _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
3639 | ||
3640 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
3641 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3642 | ||
3643 | # Archives containing C++ object files must be created using | |
3644 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
3645 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
3646 | ||
3647 | ;; | |
3648 | RCC) | |
3649 | # Rational C++ 2.4.1 | |
3650 | # FIXME: insert proper C++ library support | |
3651 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3652 | ;; | |
3653 | cxx) | |
3654 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
3655 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | |
3656 | ||
3657 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
3658 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3659 | ||
3660 | # Commands to make compiler produce verbose output that lists | |
3661 | # what "hidden" libraries, object files and flags are used when | |
3662 | # linking a shared library. | |
3663 | # | |
3664 | # There doesn't appear to be a way to prevent this compiler from | |
3665 | # explicitly linking system object files so we need to strip them | |
3666 | # from the output so that they don't get included in the library | |
3667 | # dependencies. | |
3668 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3669 | ;; | |
3670 | *) | |
3671 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
3672 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
3673 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | |
3674 | ||
3675 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
3676 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3677 | ||
3678 | # Commands to make compiler produce verbose output that lists | |
3679 | # what "hidden" libraries, object files and flags are used when | |
3680 | # linking a shared library. | |
3681 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' | |
3682 | ||
3683 | else | |
3684 | # FIXME: insert proper C++ library support | |
3685 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3686 | fi | |
3687 | ;; | |
3688 | esac | |
3689 | ;; | |
3690 | osf4* | osf5*) | |
3691 | case $cc_basename in | |
3692 | KCC) | |
3693 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
3694 | ||
3695 | # KCC will only create a shared library if the output file | |
3696 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
3697 | # to its proper name (with version) after linking. | |
3698 | _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
3699 | ||
3700 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
3701 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3702 | ||
3703 | # Archives containing C++ object files must be created using | |
3704 | # the KAI C++ compiler. | |
3705 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' | |
3706 | ;; | |
3707 | RCC) | |
3708 | # Rational C++ 2.4.1 | |
3709 | # FIXME: insert proper C++ library support | |
3710 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3711 | ;; | |
3712 | cxx) | |
3713 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
3714 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | |
3715 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ | |
3716 | echo "-hidden">> $lib.exp~ | |
3717 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ | |
3718 | $rm $lib.exp' | |
3719 | ||
3720 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
3721 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3722 | ||
3723 | # Commands to make compiler produce verbose output that lists | |
3724 | # what "hidden" libraries, object files and flags are used when | |
3725 | # linking a shared library. | |
3726 | # | |
3727 | # There doesn't appear to be a way to prevent this compiler from | |
3728 | # explicitly linking system object files so we need to strip them | |
3729 | # from the output so that they don't get included in the library | |
3730 | # dependencies. | |
3731 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3732 | ;; | |
3733 | *) | |
3734 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
3735 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
3736 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | |
3737 | ||
3738 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
3739 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
3740 | ||
3741 | # Commands to make compiler produce verbose output that lists | |
3742 | # what "hidden" libraries, object files and flags are used when | |
3743 | # linking a shared library. | |
3744 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' | |
3745 | ||
3746 | else | |
3747 | # FIXME: insert proper C++ library support | |
3748 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3749 | fi | |
3750 | ;; | |
3751 | esac | |
3752 | ;; | |
3753 | psos*) | |
3754 | # FIXME: insert proper C++ library support | |
3755 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3756 | ;; | |
3757 | sco*) | |
3758 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
3759 | case $cc_basename in | |
3760 | CC) | |
3761 | # FIXME: insert proper C++ library support | |
3762 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3763 | ;; | |
3764 | *) | |
3765 | # FIXME: insert proper C++ library support | |
3766 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3767 | ;; | |
3768 | esac | |
3769 | ;; | |
3770 | sunos4*) | |
3771 | case $cc_basename in | |
3772 | CC) | |
3773 | # Sun C++ 4.x | |
3774 | # FIXME: insert proper C++ library support | |
3775 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3776 | ;; | |
3777 | lcc) | |
3778 | # Lucid | |
3779 | # FIXME: insert proper C++ library support | |
3780 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3781 | ;; | |
3782 | *) | |
3783 | # FIXME: insert proper C++ library support | |
3784 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3785 | ;; | |
3786 | esac | |
3787 | ;; | |
3788 | solaris*) | |
3789 | case $cc_basename in | |
3790 | CC) | |
3791 | # Sun C++ 4.2, 5.x and Centerline C++ | |
3792 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
3793 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
3794 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
3795 | $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | |
3796 | ||
3797 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
3798 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
3799 | case $host_os in | |
3800 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
3801 | *) | |
3802 | # The C++ compiler is used as linker so we must use $wl | |
3803 | # flag to pass the commands to the underlying system | |
3804 | # linker. | |
3805 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
3806 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
3807 | ;; | |
3808 | esac | |
3809 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
3810 | ||
3811 | # Commands to make compiler produce verbose output that lists | |
3812 | # what "hidden" libraries, object files and flags are used when | |
3813 | # linking a shared library. | |
3814 | # | |
3815 | # There doesn't appear to be a way to prevent this compiler from | |
3816 | # explicitly linking system object files so we need to strip them | |
3817 | # from the output so that they don't get included in the library | |
3818 | # dependencies. | |
3819 | output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | |
3820 | ||
3821 | # Archives containing C++ object files must be created using | |
3822 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
3823 | # necessary to make sure instantiated templates are included | |
3824 | # in the archive. | |
3825 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
3826 | ;; | |
3827 | gcx) | |
3828 | # Green Hills C++ Compiler | |
3829 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
3830 | ||
3831 | # The C++ compiler must be used to create the archive. | |
3832 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
3833 | ;; | |
3834 | *) | |
3835 | # GNU C++ compiler with Solaris linker | |
3836 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
3837 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | |
3838 | if $CC --version | egrep -v '^2\.7' > /dev/null; then | |
3839 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' | |
3840 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
3841 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' | |
3842 | ||
3843 | # Commands to make compiler produce verbose output that lists | |
3844 | # what "hidden" libraries, object files and flags are used when | |
3845 | # linking a shared library. | |
3846 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" | |
3847 | else | |
3848 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
3849 | # platform. | |
3850 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' | |
3851 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
3852 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' | |
3853 | ||
3854 | # Commands to make compiler produce verbose output that lists | |
3855 | # what "hidden" libraries, object files and flags are used when | |
3856 | # linking a shared library. | |
3857 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" | |
3858 | fi | |
3859 | ||
3860 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | |
3861 | fi | |
3862 | ;; | |
3863 | esac | |
3864 | ;; | |
3865 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) | |
3866 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
3867 | ;; | |
3868 | tandem*) | |
3869 | case $cc_basename in | |
3870 | NCC) | |
3871 | # NonStop-UX NCC 3.20 | |
3872 | # FIXME: insert proper C++ library support | |
3873 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3874 | ;; | |
3875 | *) | |
3876 | # FIXME: insert proper C++ library support | |
3877 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3878 | ;; | |
3879 | esac | |
3880 | ;; | |
3881 | vxworks*) | |
3882 | # FIXME: insert proper C++ library support | |
3883 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3884 | ;; | |
3885 | *) | |
3886 | # FIXME: insert proper C++ library support | |
3887 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
3888 | ;; | |
3889 | esac | |
3890 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | |
3891 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
3892 | ||
3893 | # Figure out "hidden" C++ library dependencies from verbose | |
3894 | # compiler output whening linking a shared library. | |
3895 | cat > conftest.$ac_ext <<EOF | |
3896 | class Foo | |
3897 | { | |
3898 | public: | |
3899 | Foo (void) { a = 0; } | |
3900 | private: | |
3901 | int a; | |
3902 | }; | |
3903 | EOF | |
3904 | ||
3905 | ||
3906 | if AC_TRY_EVAL(ac_compile); then | |
3907 | # Parse the compiler output and extract the necessary | |
3908 | # objects, libraries and library flags. | |
3909 | ||
3910 | # Sentinel used to keep track of whether or not we are before | |
3911 | # the conftest object file. | |
3912 | pre_test_object_deps_done=no | |
3913 | ||
3914 | # The `*' in the case matches for architectures that use `case' in | |
3915 | # $output_verbose_cmd can trigger glob expansion during the loop | |
3916 | # eval without this substitution. | |
3917 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" | |
3918 | ||
3919 | for p in `eval $output_verbose_link_cmd`; do | |
3920 | case $p in | |
3921 | ||
3922 | -L* | -R* | -l*) | |
3923 | # Some compilers place space between "-{L,R}" and the path. | |
3924 | # Remove the space. | |
3925 | if test $p = "-L" \ | |
3926 | || test $p = "-R"; then | |
3927 | prev=$p | |
3928 | continue | |
3929 | else | |
3930 | prev= | |
3931 | fi | |
3932 | ||
3933 | if test "$pre_test_object_deps_done" = no; then | |
3934 | case $p in | |
3935 | -L* | -R*) | |
3936 | # Internal compiler library paths should come after those | |
3937 | # provided the user. The postdeps already come after the | |
3938 | # user supplied libs so there is no need to process them. | |
3939 | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then | |
3940 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | |
3941 | else | |
3942 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | |
3943 | fi | |
3944 | ;; | |
3945 | # The "-l" case would never come before the object being | |
3946 | # linked, so don't bother handling this case. | |
3947 | esac | |
3948 | else | |
3949 | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then | |
3950 | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" | |
3951 | else | |
3952 | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" | |
3953 | fi | |
3954 | fi | |
3955 | ;; | |
3956 | ||
3957 | *.$objext) | |
3958 | # This assumes that the test object file only shows up | |
3959 | # once in the compiler output. | |
3960 | if test "$p" = "conftest.$objext"; then | |
3961 | pre_test_object_deps_done=yes | |
3962 | continue | |
3963 | fi | |
3964 | ||
3965 | if test "$pre_test_object_deps_done" = no; then | |
3966 | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then | |
3967 | _LT_AC_TAGVAR(predep_objects, $1)="$p" | |
3968 | else | |
3969 | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" | |
3970 | fi | |
3971 | else | |
3972 | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then | |
3973 | _LT_AC_TAGVAR(postdep_objects, $1)="$p" | |
3974 | else | |
3975 | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" | |
3976 | fi | |
3977 | fi | |
3978 | ;; | |
3979 | ||
3980 | *) ;; # Ignore the rest. | |
3981 | ||
3982 | esac | |
3983 | done | |
3984 | ||
3985 | # Clean up. | |
aa1e3b4d | 3986 | rm -f a.out a.exe |
6908b7d7 RC |
3987 | else |
3988 | echo "libtool.m4: error: problem compiling C++ test program" | |
3989 | fi | |
3990 | ||
3991 | $rm -f confest.$objext | |
3992 | ||
3993 | case " $_LT_AC_TAGVAR(postdeps, $1) " in | |
3994 | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; | |
3995 | *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;; | |
3996 | esac | |
3997 | ||
3998 | _LT_AC_TAGVAR(GCC, $1)="$GXX" | |
3999 | _LT_AC_TAGVAR(LD, $1)="$LD" | |
4000 | ||
4001 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
4002 | AC_LIBTOOL_PROG_CC_C_O($1) | |
4003 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
4004 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
4005 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
4006 | AC_LIBTOOL_SYS_LIB_STRIP | |
4007 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
4008 | AC_LIBTOOL_DLOPEN_SELF($1) | |
4009 | ||
4010 | AC_LIBTOOL_CONFIG($1) | |
4011 | ||
4012 | AC_LANG_POP | |
4013 | CC="$lt_save_CC" | |
4014 | ])# AC_LIBTOOL_LANG_CXX_CONFIG | |
4015 | ||
4016 | ||
4017 | # AC_LIBTOOL_LANG_GCJ_CONFIG | |
4018 | # -------------------------- | |
4019 | # Ensure that the configuration vars for the C compiler are | |
4020 | # suitably defined. Those variables are subsequently used by | |
4021 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
4022 | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) | |
4023 | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], | |
4024 | [AC_LANG_SAVE | |
4025 | ||
4026 | # Source file extension for C test sources. | |
4027 | ac_ext=java | |
4028 | ||
4029 | # Object file extension for compiled C test sources. | |
4030 | objext=o | |
4031 | _LT_AC_TAGVAR(objext, $1)=$objext | |
4032 | ||
4033 | # Code to be used in simple compile tests | |
4034 | lt_simple_compile_test_code="class foo {};" | |
4035 | ||
4036 | # Code to be used in simple link tests | |
4037 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' | |
4038 | ||
4039 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
4040 | _LT_AC_SYS_COMPILER | |
4041 | ||
4042 | # Allow CC to be a program name with arguments. | |
4043 | lt_save_CC="$CC" | |
4044 | CC=${GCJ-"gcj"} | |
4045 | set dummy $CC | |
4046 | compiler="[$]2" | |
4047 | _LT_AC_TAGVAR(compiler, $1)=$CC | |
4048 | ||
4049 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | |
4050 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
4051 | ||
4052 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | |
4053 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
4054 | AC_LIBTOOL_PROG_CC_C_O($1) | |
4055 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
4056 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
4057 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
4058 | AC_LIBTOOL_SYS_LIB_STRIP | |
4059 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
4060 | AC_LIBTOOL_DLOPEN_SELF($1) | |
4061 | ||
4062 | AC_LIBTOOL_CONFIG($1) | |
4063 | ||
4064 | AC_LANG_RESTORE | |
4065 | CC="$lt_save_CC" | |
4066 | ])# AC_LIBTOOL_LANG_GCJ_CONFIG | |
4067 | ||
4068 | ||
4069 | # AC_LIBTOOL_LANG_RC_CONFIG | |
4070 | # -------------------------- | |
4071 | # Ensure that the configuration vars for the Windows resource compiler are | |
4072 | # suitably defined. Those variables are subsequently used by | |
4073 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
4074 | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) | |
4075 | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], | |
4076 | [AC_LANG_SAVE | |
4077 | ||
4078 | # Source file extension for RC test sources. | |
4079 | ac_ext=rc | |
4080 | ||
4081 | # Object file extension for compiled RC test sources. | |
4082 | objext=o | |
4083 | _LT_AC_TAGVAR(objext, $1)=$objext | |
4084 | ||
4085 | # Code to be used in simple compile tests | |
4086 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | |
4087 | ||
4088 | # Code to be used in simple link tests | |
4089 | lt_simple_link_test_code="$lt_simple_compile_test_code" | |
4090 | ||
4091 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
4092 | _LT_AC_SYS_COMPILER | |
4093 | ||
4094 | # Allow CC to be a program name with arguments. | |
4095 | lt_save_CC="$CC" | |
4096 | CC=${RC-"windres"} | |
4097 | set dummy $CC | |
4098 | compiler="[$]2" | |
4099 | _LT_AC_TAGVAR(compiler, $1)=$CC | |
4100 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
4101 | ||
4102 | AC_LIBTOOL_CONFIG($1) | |
4103 | ||
4104 | AC_LANG_RESTORE | |
4105 | CC="$lt_save_CC" | |
4106 | ])# AC_LIBTOOL_LANG_RC_CONFIG | |
4107 | ||
4108 | ||
4109 | # AC_LIBTOOL_CONFIG([TAGNAME]) | |
4110 | # ---------------------------- | |
4111 | # If TAGNAME is not passed, then create an initial libtool script | |
4112 | # with a default configuration from the untagged config vars. Otherwise | |
4113 | # add code to config.status for appending the configuration named by | |
4114 | # TAGNAME from the matching tagged config vars. | |
4115 | AC_DEFUN([AC_LIBTOOL_CONFIG], | |
4116 | [# The else clause should only fire when bootstrapping the | |
4117 | # libtool distribution, otherwise you forgot to ship ltmain.sh | |
4118 | # with your package, and you will get complaints that there are | |
4119 | # no rules to generate ltmain.sh. | |
4120 | if test -f "$ltmain"; then | |
4121 | # Now quote all the things that may contain metacharacters while being | |
4122 | # careful not to overquote the AC_SUBSTed values. We take copies of the | |
4123 | # variables and quote the copies for generation of the libtool script. | |
4124 | for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \ | |
4125 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | |
4126 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | |
4127 | deplibs_check_method reload_flag reload_cmds need_locks \ | |
4128 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | |
4129 | lt_cv_sys_global_symbol_to_c_name_address \ | |
4130 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | |
4131 | old_postinstall_cmds old_postuninstall_cmds \ | |
4132 | _LT_AC_TAGVAR(compiler, $1) \ | |
4133 | _LT_AC_TAGVAR(CC, $1) \ | |
4134 | _LT_AC_TAGVAR(LD, $1) \ | |
4135 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ | |
4136 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ | |
4137 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ | |
4138 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ | |
4139 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ | |
4140 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ | |
4141 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ | |
4142 | _LT_AC_TAGVAR(old_archive_cmds, $1) \ | |
4143 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ | |
4144 | _LT_AC_TAGVAR(predep_objects, $1) \ | |
4145 | _LT_AC_TAGVAR(postdep_objects, $1) \ | |
4146 | _LT_AC_TAGVAR(predeps, $1) \ | |
4147 | _LT_AC_TAGVAR(postdeps, $1) \ | |
4148 | _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ | |
4149 | _LT_AC_TAGVAR(archive_cmds, $1) \ | |
4150 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ | |
4151 | _LT_AC_TAGVAR(postinstall_cmds, $1) \ | |
4152 | _LT_AC_TAGVAR(postuninstall_cmds, $1) \ | |
4153 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ | |
4154 | _LT_AC_TAGVAR(allow_undefined_flag, $1) \ | |
4155 | _LT_AC_TAGVAR(no_undefined_flag, $1) \ | |
4156 | _LT_AC_TAGVAR(export_symbols_cmds, $1) \ | |
4157 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ | |
4158 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ | |
4159 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ | |
4160 | _LT_AC_TAGVAR(exclude_expsyms, $1) \ | |
4161 | _LT_AC_TAGVAR(include_expsyms, $1); do | |
4162 | ||
4163 | case $var in | |
4164 | _LT_AC_TAGVAR(old_archive_cmds, $1) | \ | |
4165 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ | |
4166 | _LT_AC_TAGVAR(archive_cmds, $1) | \ | |
4167 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ | |
4168 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ | |
4169 | _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ | |
4170 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | |
4171 | postinstall_cmds | postuninstall_cmds | \ | |
4172 | old_postinstall_cmds | old_postuninstall_cmds | \ | |
4173 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | |
4174 | # Double-quote double-evaled strings. | |
4175 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | |
4176 | ;; | |
4177 | *) | |
4178 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | |
4179 | ;; | |
4180 | esac | |
4181 | done | |
4182 | ||
4183 | case $lt_echo in | |
4184 | *'\[$]0 --fallback-echo"') | |
4185 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` | |
4186 | ;; | |
4187 | esac | |
4188 | ||
4189 | ifelse([$1], [], | |
4190 | [cfgfile="${ofile}T" | |
4191 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 | |
4192 | $rm -f "$cfgfile" | |
4193 | AC_MSG_NOTICE([creating $ofile])], | |
4194 | [cfgfile="$ofile"]) | |
4195 | ||
4196 | cat <<__EOF__ >> "$cfgfile" | |
4197 | ifelse([$1], [], | |
4198 | [#! $SHELL | |
4199 | ||
4200 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
4201 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
4202 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
4203 | # | |
4204 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 | |
4205 | # Free Software Foundation, Inc. | |
4206 | # | |
4207 | # This file is part of GNU Libtool: | |
4208 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
4209 | # | |
4210 | # This program is free software; you can redistribute it and/or modify | |
4211 | # it under the terms of the GNU General Public License as published by | |
4212 | # the Free Software Foundation; either version 2 of the License, or | |
4213 | # (at your option) any later version. | |
4214 | # | |
4215 | # This program is distributed in the hope that it will be useful, but | |
4216 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
4217 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
4218 | # General Public License for more details. | |
4219 | # | |
4220 | # You should have received a copy of the GNU General Public License | |
4221 | # along with this program; if not, write to the Free Software | |
4222 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
4223 | # | |
4224 | # As a special exception to the GNU General Public License, if you | |
4225 | # distribute this file as part of a program that contains a | |
4226 | # configuration script generated by Autoconf, you may include it under | |
4227 | # the same distribution terms that you use for the rest of that program. | |
4228 | ||
4229 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. | |
4230 | Xsed="sed -e s/^X//" | |
4231 | ||
4232 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
4233 | # if CDPATH is set. | |
4234 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
4235 | ||
4236 | # The names of the tagged configurations supported by this script. | |
4237 | available_tags= | |
4238 | ||
4239 | # ### BEGIN LIBTOOL CONFIG], | |
4240 | [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) | |
4241 | ||
4242 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
4243 | ||
4244 | # Shell to use when invoking shell scripts. | |
4245 | SHELL=$lt_SHELL | |
4246 | ||
4247 | # Whether or not to build shared libraries. | |
4248 | build_libtool_libs=$enable_shared | |
4249 | ||
4250 | # Whether or not to build static libraries. | |
4251 | build_old_libs=$enable_static | |
4252 | ||
4253 | # Whether or not to add -lc for building shared libraries. | |
4254 | build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) | |
4255 | ||
4256 | # Whether or not to optimize for fast installation. | |
4257 | fast_install=$enable_fast_install | |
4258 | ||
4259 | # The host system. | |
4260 | host_alias=$host_alias | |
4261 | host=$host | |
4262 | ||
4263 | # An echo program that does not interpret backslashes. | |
4264 | echo=$lt_echo | |
4265 | ||
4266 | # The archiver. | |
4267 | AR=$lt_AR | |
4268 | AR_FLAGS=$lt_AR_FLAGS | |
4269 | ||
4270 | # A C compiler. | |
4271 | LTCC=$lt_LTCC | |
4272 | ||
4273 | # A language-specific compiler. | |
4274 | CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) | |
4275 | ||
4276 | # Is the compiler the GNU C compiler? | |
4277 | with_gcc=$_LT_AC_TAGVAR(GCC, $1) | |
4278 | ||
4279 | # The linker used to build libraries. | |
4280 | LD=$lt_[]_LT_AC_TAGVAR(LD, $1) | |
4281 | ||
4282 | # Whether we need hard or soft links. | |
4283 | LN_S=$lt_LN_S | |
4284 | ||
4285 | # A BSD-compatible nm program. | |
4286 | NM=$lt_NM | |
4287 | ||
4288 | # A sed program that does not truncate output. | |
4289 | SED=$lt_SED | |
4290 | ||
4291 | # A symbol stripping program | |
4292 | STRIP=$STRIP | |
4293 | ||
4294 | # Used to examine libraries when file_magic_cmd begins "file" | |
4295 | MAGIC_CMD=$MAGIC_CMD | |
4296 | ||
4297 | # Used on cygwin: DLL creation program. | |
4298 | DLLTOOL="$DLLTOOL" | |
4299 | ||
4300 | # Used on cygwin: object dumper. | |
4301 | OBJDUMP="$OBJDUMP" | |
4302 | ||
4303 | # Used on cygwin: assembler. | |
4304 | AS="$AS" | |
4305 | ||
4306 | # The name of the directory that contains temporary libtool files. | |
4307 | objdir=$objdir | |
4308 | ||
4309 | # How to create reloadable object files. | |
4310 | reload_flag=$lt_reload_flag | |
4311 | reload_cmds=$lt_reload_cmds | |
4312 | ||
4313 | # How to pass a linker flag through the compiler. | |
4314 | wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | |
4315 | ||
4316 | # Object file suffix (normally "o"). | |
4317 | objext="$ac_objext" | |
4318 | ||
4319 | # Old archive suffix (normally "a"). | |
4320 | libext="$libext" | |
4321 | ||
4322 | # Executable file suffix (normally ""). | |
4323 | exeext="$exeext" | |
4324 | ||
4325 | # Additional compiler flags for building library objects. | |
4326 | pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) | |
4327 | pic_mode=$pic_mode | |
4328 | ||
4329 | # What is the maximum length of a command? | |
4330 | max_cmd_len=$lt_cv_sys_max_cmd_len | |
4331 | ||
4332 | # Does compiler simultaneously support -c and -o options? | |
4333 | compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) | |
4334 | ||
4335 | # Must we lock files when doing compilation ? | |
4336 | need_locks=$lt_need_locks | |
4337 | ||
4338 | # Do we need the lib prefix for modules? | |
4339 | need_lib_prefix=$need_lib_prefix | |
4340 | ||
4341 | # Do we need a version for libraries? | |
4342 | need_version=$need_version | |
4343 | ||
4344 | # Whether dlopen is supported. | |
4345 | dlopen_support=$enable_dlopen | |
4346 | ||
4347 | # Whether dlopen of programs is supported. | |
4348 | dlopen_self=$enable_dlopen_self | |
4349 | ||
4350 | # Whether dlopen of statically linked programs is supported. | |
4351 | dlopen_self_static=$enable_dlopen_self_static | |
4352 | ||
4353 | # Compiler flag to prevent dynamic linking. | |
4354 | link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) | |
4355 | ||
4356 | # Compiler flag to turn off builtin functions. | |
4357 | no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) | |
4358 | ||
4359 | # Compiler flag to allow reflexive dlopens. | |
4360 | export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) | |
4361 | ||
4362 | # Compiler flag to generate shared objects directly from archives. | |
4363 | whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) | |
4364 | ||
4365 | # Compiler flag to generate thread-safe objects. | |
4366 | thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) | |
4367 | ||
4368 | # Library versioning type. | |
4369 | version_type=$version_type | |
4370 | ||
4371 | # Format of library name prefix. | |
4372 | libname_spec=$lt_libname_spec | |
4373 | ||
4374 | # List of archive names. First name is the real one, the rest are links. | |
4375 | # The last name is the one that the linker finds with -lNAME. | |
4376 | library_names_spec=$lt_library_names_spec | |
4377 | ||
4378 | # The coded name of the library, if different from the real name. | |
4379 | soname_spec=$lt_soname_spec | |
4380 | ||
4381 | # Commands used to build and install an old-style archive. | |
4382 | RANLIB=$lt_RANLIB | |
4383 | old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) | |
4384 | old_postinstall_cmds=$lt_old_postinstall_cmds | |
4385 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | |
4386 | ||
4387 | # Create an old-style archive from a shared archive. | |
4388 | old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | |
4389 | ||
4390 | # Create a temporary old-style archive to link instead of a shared archive. | |
4391 | old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | |
4392 | ||
4393 | # Commands used to build and install a shared archive. | |
4394 | archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) | |
4395 | archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) | |
4396 | postinstall_cmds=$lt_postinstall_cmds | |
4397 | postuninstall_cmds=$lt_postuninstall_cmds | |
4398 | ||
4399 | # Commands to strip libraries. | |
4400 | old_striplib=$lt_old_striplib | |
4401 | striplib=$lt_striplib | |
4402 | ||
4403 | # Dependencies to place before the objects being linked to create a | |
4404 | # shared library. | |
4405 | predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) | |
4406 | ||
4407 | # Dependencies to place after the objects being linked to create a | |
4408 | # shared library. | |
4409 | postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | |
4410 | ||
4411 | # Dependencies to place before the objects being linked to create a | |
4412 | # shared library. | |
4413 | predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) | |
4414 | ||
4415 | # Dependencies to place after the objects being linked to create a | |
4416 | # shared library. | |
4417 | postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) | |
4418 | ||
4419 | # The library search path used internally by the compiler when linking | |
4420 | # a shared library. | |
4421 | compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | |
4422 | ||
4423 | # Method to check whether dependent libraries are shared objects. | |
4424 | deplibs_check_method=$lt_deplibs_check_method | |
4425 | ||
4426 | # Command to use when deplibs_check_method == file_magic. | |
4427 | file_magic_cmd=$lt_file_magic_cmd | |
4428 | ||
4429 | # Flag that allows shared libraries with undefined symbols to be built. | |
4430 | allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) | |
4431 | ||
4432 | # Flag that forces no undefined symbols. | |
4433 | no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) | |
4434 | ||
4435 | # Commands used to finish a libtool library installation in a directory. | |
4436 | finish_cmds=$lt_finish_cmds | |
4437 | ||
4438 | # Same as above, but a single script fragment to be evaled but not shown. | |
4439 | finish_eval=$lt_finish_eval | |
4440 | ||
4441 | # Take the output of nm and produce a listing of raw symbols and C names. | |
4442 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | |
4443 | ||
4444 | # Transform the output of nm in a proper C declaration | |
4445 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | |
4446 | ||
4447 | # Transform the output of nm in a C name address pair | |
4448 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | |
4449 | ||
4450 | # This is the shared library runtime path variable. | |
4451 | runpath_var=$runpath_var | |
4452 | ||
4453 | # This is the shared library path variable. | |
4454 | shlibpath_var=$shlibpath_var | |
4455 | ||
4456 | # Is shlibpath searched before the hard-coded library search path? | |
4457 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | |
4458 | ||
4459 | # How to hardcode a shared library path into an executable. | |
4460 | hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) | |
4461 | ||
4462 | # Whether we should hardcode library paths into libraries. | |
4463 | hardcode_into_libs=$hardcode_into_libs | |
4464 | ||
4465 | # Flag to hardcode \$libdir into a binary during linking. | |
4466 | # This must work even if \$libdir does not exist. | |
4467 | hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) | |
4468 | ||
4469 | # Whether we need a single -rpath flag with a separated argument. | |
4470 | hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) | |
4471 | ||
4472 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the | |
4473 | # resulting binary. | |
4474 | hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) | |
4475 | ||
4476 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |
4477 | # resulting binary. | |
4478 | hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) | |
4479 | ||
4480 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | |
4481 | # the resulting binary. | |
4482 | hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) | |
4483 | ||
4484 | # Variables whose values should be saved in libtool wrapper scripts and | |
4485 | # restored at relink time. | |
4486 | variables_saved_for_relink="$variables_saved_for_relink" | |
4487 | ||
4488 | # Whether libtool must link a program against all its dependency libraries. | |
4489 | link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) | |
4490 | ||
4491 | # Compile-time system search path for libraries | |
4492 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | |
4493 | ||
4494 | # Run-time system search path for libraries | |
4495 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | |
4496 | ||
4497 | # Fix the shell variable \$srcfile for the compiler. | |
4498 | fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" | |
4499 | ||
4500 | # Set to yes if exported symbols are required. | |
4501 | always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) | |
4502 | ||
4503 | # The commands to list exported symbols. | |
4504 | export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) | |
4505 | ||
4506 | # The commands to extract the exported symbol list from a shared archive. | |
4507 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | |
4508 | ||
4509 | # Symbols that should not be listed in the preloaded symbols. | |
4510 | exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) | |
4511 | ||
4512 | # Symbols that must always be exported. | |
4513 | include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) | |
4514 | ||
4515 | ifelse([$1],[], | |
4516 | [# ### END LIBTOOL CONFIG], | |
4517 | [# ### END LIBTOOL TAG CONFIG: $tagname]) | |
4518 | ||
4519 | __EOF__ | |
4520 | ||
4521 | ifelse([$1],[], [ | |
4522 | case $host_os in | |
4523 | aix3*) | |
4524 | cat <<\EOF >> "$cfgfile" | |
4525 | ||
4526 | # AIX sometimes has problems with the GCC collect2 program. For some | |
4527 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
4528 | # vanish in a puff of smoke. | |
4529 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
4530 | COLLECT_NAMES= | |
4531 | export COLLECT_NAMES | |
4532 | fi | |
4533 | EOF | |
4534 | ;; | |
4535 | ||
4536 | cygwin* | mingw* | pw32* | os2*) | |
4537 | cat <<'EOF' >> "$cfgfile" | |
4538 | # This is a source program that is used to create dlls on Windows | |
4539 | # Don't remove nor modify the starting and closing comments | |
4540 | _LT_AC_FILE_LTDLL_C | |
4541 | # This is a source program that is used to create import libraries | |
4542 | # on Windows for dlls which lack them. Don't remove nor modify the | |
4543 | # starting and closing comments | |
4544 | _LT_AC_FILE_IMPGEN_C | |
4545 | EOF | |
4546 | ;; | |
4547 | esac | |
4548 | ||
4549 | # We use sed instead of cat because bash on DJGPP gets confused if | |
4550 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
4551 | # text mode, it properly converts lines to CR/LF. This bash problem | |
4552 | # is reportedly fixed, but why not run on old versions too? | |
4553 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) | |
4554 | ||
4555 | mv -f "$cfgfile" "$ofile" || \ | |
4556 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | |
4557 | chmod +x "$ofile" | |
4558 | ]) | |
4559 | else | |
4560 | # If there is no Makefile yet, we rely on a make rule to execute | |
4561 | # `config.status --recheck' to rerun these tests and create the | |
4562 | # libtool script then. | |
4563 | test -f Makefile && make "$ltmain" | |
4564 | fi | |
4565 | ])# AC_LIBTOOL_CONFIG | |
4566 | ||
4567 | ||
4568 | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) | |
4569 | # ------------------------------------------- | |
4570 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], | |
4571 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
4572 | ||
4573 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
4574 | ||
4575 | if test "$GCC" = yes; then | |
4576 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
4577 | ||
4578 | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | |
4579 | lt_cv_prog_compiler_rtti_exceptions, | |
4580 | [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [], | |
4581 | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | |
4582 | fi | |
4583 | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI | |
4584 | ||
4585 | ||
4586 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
4587 | # --------------------------------- | |
4588 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], | |
4589 | [AC_REQUIRE([AC_CANONICAL_HOST]) | |
4590 | AC_REQUIRE([AC_PROG_NM]) | |
4591 | AC_REQUIRE([AC_OBJEXT]) | |
4592 | # Check for command to grab the raw symbol name followed by C symbol from nm. | |
4593 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | |
4594 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | |
4595 | [ | |
4596 | # These are sane defaults that work on at least a few old systems. | |
4597 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
4598 | ||
4599 | # Character class describing NM global symbol codes. | |
4600 | symcode='[[BCDEGRST]]' | |
4601 | ||
4602 | # Regexp to match symbols that can be accessed directly from C. | |
4603 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
4604 | ||
4605 | # Transform the above into a raw symbol and a C symbol. | |
4606 | symxfrm='\1 \2\3 \3' | |
4607 | ||
4608 | # Transform an extracted symbol line into a proper C declaration | |
4609 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" | |
4610 | ||
4611 | # Transform an extracted symbol line into symbol name and symbol address | |
4612 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | |
4613 | ||
4614 | # Define system-specific variables. | |
4615 | case $host_os in | |
4616 | aix*) | |
4617 | symcode='[[BCDT]]' | |
4618 | ;; | |
4619 | cygwin* | mingw* | pw32*) | |
4620 | symcode='[[ABCDGISTW]]' | |
4621 | ;; | |
4622 | hpux*) # Its linker distinguishes data from code symbols | |
4623 | if test "$host_cpu" = ia64; then | |
4624 | symcode='[[ABCDEGRST]]' | |
4625 | fi | |
4626 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
4627 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | |
4628 | ;; | |
4629 | irix* | nonstopux*) | |
4630 | symcode='[[BCDEGRST]]' | |
4631 | ;; | |
4632 | solaris* | sysv5*) | |
4633 | symcode='[[BDT]]' | |
4634 | ;; | |
4635 | sysv4) | |
4636 | symcode='[[DFNSTU]]' | |
4637 | ;; | |
4638 | esac | |
4639 | ||
4640 | # Handle CRLF in mingw tool chain | |
4641 | opt_cr= | |
4642 | case $host_os in | |
4643 | mingw*) | |
4644 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
4645 | ;; | |
4646 | esac | |
4647 | ||
4648 | # If we're using GNU nm, then use its standard symbol codes. | |
4649 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then | |
4650 | symcode='[[ABCDGISTW]]' | |
4651 | fi | |
4652 | ||
4653 | # Try without a prefix undercore, then with it. | |
4654 | for ac_symprfx in "" "_"; do | |
4655 | ||
4656 | # Write the raw and C identifiers. | |
4657 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | |
4658 | ||
4659 | # Check to see that the pipe works correctly. | |
4660 | pipe_works=no | |
4661 | ||
4662 | rm -f conftest* | |
4663 | cat > conftest.$ac_ext <<EOF | |
4664 | #ifdef __cplusplus | |
4665 | extern "C" { | |
4666 | #endif | |
4667 | char nm_test_var; | |
4668 | void nm_test_func(){} | |
4669 | #ifdef __cplusplus | |
4670 | } | |
4671 | #endif | |
4672 | int main(){nm_test_var='a';nm_test_func();return(0);} | |
4673 | EOF | |
4674 | ||
4675 | if AC_TRY_EVAL(ac_compile); then | |
4676 | # Now try to grab the symbols. | |
4677 | nlist=conftest.nm | |
4678 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | |
4679 | # Try sorting and uniquifying the output. | |
4680 | if sort "$nlist" | uniq > "$nlist"T; then | |
4681 | mv -f "$nlist"T "$nlist" | |
4682 | else | |
4683 | rm -f "$nlist"T | |
4684 | fi | |
4685 | ||
4686 | # Make sure that we snagged all the symbols we need. | |
4687 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then | |
4688 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then | |
4689 | cat <<EOF > conftest.$ac_ext | |
4690 | #ifdef __cplusplus | |
4691 | extern "C" { | |
4692 | #endif | |
4693 | ||
4694 | EOF | |
4695 | # Now generate the symbol file. | |
4696 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' | |
4697 | ||
4698 | cat <<EOF >> conftest.$ac_ext | |
4699 | #if defined (__STDC__) && __STDC__ | |
4700 | # define lt_ptr_t void * | |
4701 | #else | |
4702 | # define lt_ptr_t char * | |
4703 | # define const | |
4704 | #endif | |
4705 | ||
4706 | /* The mapping between symbol names and symbols. */ | |
4707 | const struct { | |
4708 | const char *name; | |
4709 | lt_ptr_t address; | |
4710 | } | |
4711 | lt_preloaded_symbols[[]] = | |
4712 | { | |
4713 | EOF | |
4714 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext | |
4715 | cat <<\EOF >> conftest.$ac_ext | |
4716 | {0, (lt_ptr_t) 0} | |
4717 | }; | |
4718 | ||
4719 | #ifdef __cplusplus | |
4720 | } | |
4721 | #endif | |
4722 | EOF | |
4723 | # Now try linking the two files. | |
4724 | mv conftest.$ac_objext conftstm.$ac_objext | |
4725 | lt_save_LIBS="$LIBS" | |
4726 | lt_save_CFLAGS="$CFLAGS" | |
4727 | LIBS="conftstm.$ac_objext" | |
4728 | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | |
4729 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | |
4730 | pipe_works=yes | |
4731 | fi | |
4732 | LIBS="$lt_save_LIBS" | |
4733 | CFLAGS="$lt_save_CFLAGS" | |
4734 | else | |
4735 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | |
4736 | fi | |
4737 | else | |
4738 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | |
4739 | fi | |
4740 | else | |
4741 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | |
4742 | fi | |
4743 | else | |
4744 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | |
4745 | cat conftest.$ac_ext >&5 | |
4746 | fi | |
4747 | rm -f conftest* conftst* | |
4748 | ||
4749 | # Do not use the global_symbol_pipe unless it works. | |
4750 | if test "$pipe_works" = yes; then | |
4751 | break | |
4752 | else | |
4753 | lt_cv_sys_global_symbol_pipe= | |
4754 | fi | |
4755 | done | |
4756 | ]) | |
4757 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
4758 | lt_cv_sys_global_symbol_to_cdecl= | |
4759 | fi | |
4760 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
4761 | AC_MSG_RESULT(failed) | |
4762 | else | |
4763 | AC_MSG_RESULT(ok) | |
4764 | fi | |
4765 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
4766 | ||
4767 | ||
4768 | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) | |
4769 | # --------------------------------------- | |
4770 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], | |
4771 | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= | |
4772 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
4773 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= | |
4774 | ||
4775 | AC_MSG_CHECKING([for $compiler option to produce PIC]) | |
4776 | ifelse([$1],[CXX],[ | |
4777 | # C++ specific cases for pic, static, wl, etc. | |
4778 | if test "$GXX" = yes; then | |
4779 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4780 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4781 | ||
4782 | case $host_os in | |
4783 | aix*) | |
4784 | # All AIX code is PIC. | |
4785 | if test "$host_cpu" = ia64; then | |
4786 | # AIX 5 now supports IA64 processor | |
4787 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4788 | fi | |
4789 | ;; | |
4790 | amigaos*) | |
4791 | # FIXME: we need at least 68020 code to build shared libraries, but | |
4792 | # adding the `-m68020' flag to GCC prevents building anything better, | |
4793 | # like `-m68040'. | |
4794 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
4795 | ;; | |
4796 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
4797 | # PIC is the default for these OSes. | |
4798 | ;; | |
4799 | mingw* | os2*) | |
4800 | # This hack is so that the source file can tell whether it is being | |
4801 | # built for inclusion in a dll (and should export symbols for example). | |
4802 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | |
4803 | ;; | |
4804 | darwin* | rhapsody*) | |
4805 | # PIC is the default on this platform | |
4806 | # Common symbols not allowed in MH_DYLIB files | |
4807 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
4808 | ;; | |
4809 | *djgpp*) | |
4810 | # DJGPP does not support shared libraries at all | |
4811 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
4812 | ;; | |
4813 | sysv4*MP*) | |
4814 | if test -d /usr/nec; then | |
4815 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
4816 | fi | |
4817 | ;; | |
4818 | hpux*) | |
4819 | # PIC is the default for IA64 HP-UX, but not for PA HP-UX. | |
4820 | if test "$host_cpu" != ia64; then | |
4821 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4822 | fi | |
4823 | ;; | |
4824 | *) | |
4825 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4826 | ;; | |
4827 | esac | |
4828 | else | |
4829 | case $host_os in | |
4830 | aix4* | aix5*) | |
4831 | # All AIX code is PIC. | |
4832 | if test "$host_cpu" = ia64; then | |
4833 | # AIX 5 now supports IA64 processor | |
4834 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4835 | else | |
4836 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
4837 | fi | |
4838 | ;; | |
4839 | chorus*) | |
4840 | case $cc_basename in | |
4841 | cxch68) | |
4842 | # Green Hills C++ Compiler | |
4843 | # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | |
4844 | ;; | |
4845 | esac | |
4846 | ;; | |
4847 | dgux*) | |
4848 | case $cc_basename in | |
4849 | ec++) | |
4850 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4851 | ;; | |
4852 | ghcx) | |
4853 | # Green Hills C++ Compiler | |
4854 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4855 | ;; | |
4856 | *) | |
4857 | ;; | |
4858 | esac | |
4859 | ;; | |
4860 | freebsd*) | |
4861 | # FreeBSD uses GNU C++ | |
4862 | ;; | |
4863 | hpux9* | hpux10* | hpux11*) | |
4864 | case $cc_basename in | |
4865 | CC) | |
4866 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4867 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | |
4868 | if test "$host_cpu" != ia64; then | |
4869 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4870 | fi | |
4871 | ;; | |
4872 | aCC) | |
4873 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4874 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | |
4875 | if test "$host_cpu" != ia64; then | |
4876 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4877 | fi | |
4878 | ;; | |
4879 | *) | |
4880 | ;; | |
4881 | esac | |
4882 | ;; | |
4883 | irix5* | irix6* | nonstopux*) | |
4884 | case $cc_basename in | |
4885 | CC) | |
4886 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4887 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4888 | # CC pic flag -KPIC is the default. | |
4889 | ;; | |
4890 | *) | |
4891 | ;; | |
4892 | esac | |
4893 | ;; | |
4894 | linux*) | |
4895 | case $cc_basename in | |
4896 | KCC) | |
4897 | # KAI C++ Compiler | |
4898 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
4899 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4900 | ;; | |
4901 | cxx) | |
4902 | # Compaq C++ | |
4903 | # Make sure the PIC flag is empty. It appears that all Alpha | |
4904 | # Linux and Compaq Tru64 Unix objects are PIC. | |
4905 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
4906 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4907 | ;; | |
4908 | *) | |
4909 | ;; | |
4910 | esac | |
4911 | ;; | |
4912 | lynxos*) | |
4913 | ;; | |
4914 | m88k*) | |
4915 | ;; | |
4916 | mvs*) | |
4917 | case $cc_basename in | |
4918 | cxx) | |
4919 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | |
4920 | ;; | |
4921 | *) | |
4922 | ;; | |
4923 | esac | |
4924 | ;; | |
4925 | netbsd*) | |
4926 | ;; | |
4927 | osf3* | osf4* | osf5*) | |
4928 | case $cc_basename in | |
4929 | KCC) | |
4930 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
4931 | ;; | |
4932 | RCC) | |
4933 | # Rational C++ 2.4.1 | |
4934 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4935 | ;; | |
4936 | cxx) | |
4937 | # Digital/Compaq C++ | |
4938 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4939 | # Make sure the PIC flag is empty. It appears that all Alpha | |
4940 | # Linux and Compaq Tru64 Unix objects are PIC. | |
4941 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
4942 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4943 | ;; | |
4944 | *) | |
4945 | ;; | |
4946 | esac | |
4947 | ;; | |
4948 | psos*) | |
4949 | ;; | |
4950 | sco*) | |
4951 | case $cc_basename in | |
4952 | CC) | |
4953 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4954 | ;; | |
4955 | *) | |
4956 | ;; | |
4957 | esac | |
4958 | ;; | |
4959 | solaris*) | |
4960 | case $cc_basename in | |
4961 | CC) | |
4962 | # Sun C++ 4.2, 5.x and Centerline C++ | |
4963 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4964 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4965 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4966 | ;; | |
4967 | gcx) | |
4968 | # Green Hills C++ Compiler | |
4969 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
4970 | ;; | |
4971 | *) | |
4972 | ;; | |
4973 | esac | |
4974 | ;; | |
4975 | sunos4*) | |
4976 | case $cc_basename in | |
4977 | CC) | |
4978 | # Sun C++ 4.x | |
4979 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4980 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4981 | ;; | |
4982 | lcc) | |
4983 | # Lucid | |
4984 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4985 | ;; | |
4986 | *) | |
4987 | ;; | |
4988 | esac | |
4989 | ;; | |
4990 | tandem*) | |
4991 | case $cc_basename in | |
4992 | NCC) | |
4993 | # NonStop-UX NCC 3.20 | |
4994 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4995 | ;; | |
4996 | *) | |
4997 | ;; | |
4998 | esac | |
4999 | ;; | |
5000 | unixware*) | |
5001 | ;; | |
5002 | vxworks*) | |
5003 | ;; | |
5004 | *) | |
5005 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
5006 | ;; | |
5007 | esac | |
5008 | fi | |
5009 | ], | |
5010 | [ | |
5011 | if test "$GCC" = yes; then | |
5012 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5013 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
5014 | ||
5015 | case $host_os in | |
5016 | aix*) | |
5017 | # All AIX code is PIC. | |
5018 | if test "$host_cpu" = ia64; then | |
5019 | # AIX 5 now supports IA64 processor | |
5020 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5021 | fi | |
5022 | ;; | |
5023 | ||
5024 | amigaos*) | |
5025 | # FIXME: we need at least 68020 code to build shared libraries, but | |
5026 | # adding the `-m68020' flag to GCC prevents building anything better, | |
5027 | # like `-m68040'. | |
5028 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
5029 | ;; | |
5030 | ||
5031 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
5032 | # PIC is the default for these OSes. | |
5033 | ;; | |
5034 | ||
5035 | mingw* | pw32* | os2*) | |
5036 | # This hack is so that the source file can tell whether it is being | |
5037 | # built for inclusion in a dll (and should export symbols for example). | |
5038 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | |
5039 | ;; | |
5040 | ||
5041 | darwin* | rhapsody*) | |
5042 | # PIC is the default on this platform | |
5043 | # Common symbols not allowed in MH_DYLIB files | |
5044 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
5045 | ;; | |
5046 | ||
5047 | msdosdjgpp*) | |
5048 | # Just because we use GCC doesn't mean we suddenly get shared libraries | |
5049 | # on systems that don't support them. | |
5050 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
5051 | enable_shared=no | |
5052 | ;; | |
5053 | ||
5054 | sysv4*MP*) | |
5055 | if test -d /usr/nec; then | |
5056 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
5057 | fi | |
5058 | ;; | |
5059 | ||
5060 | hpux*) | |
5061 | # PIC is the default for IA64 HP-UX, but not for PA HP-UX. | |
5062 | if test "$host_cpu" != ia64; then | |
5063 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
5064 | fi | |
5065 | ;; | |
5066 | ||
5067 | *) | |
5068 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
5069 | ;; | |
5070 | esac | |
5071 | else | |
5072 | # PORTME Check for flag to pass linker flags through the system compiler. | |
5073 | case $host_os in | |
5074 | aix*) | |
5075 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5076 | if test "$host_cpu" = ia64; then | |
5077 | # AIX 5 now supports IA64 processor | |
5078 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5079 | else | |
5080 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
5081 | fi | |
5082 | ;; | |
5083 | ||
5084 | mingw* | pw32* | os2*) | |
5085 | # This hack is so that the source file can tell whether it is being | |
5086 | # built for inclusion in a dll (and should export symbols for example). | |
5087 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | |
5088 | ;; | |
5089 | ||
5090 | hpux9* | hpux10* | hpux11*) | |
5091 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5092 | if test "$host_cpu" != ia64; then | |
5093 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
5094 | fi | |
5095 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
5096 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
5097 | ;; | |
5098 | ||
5099 | irix5* | irix6* | nonstopux*) | |
5100 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5101 | # PIC (with -KPIC) is the default. | |
5102 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
5103 | ;; | |
5104 | ||
5105 | newsos6) | |
5106 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
5107 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5108 | ;; | |
5109 | ||
5110 | osf3* | osf4* | osf5*) | |
5111 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5112 | # All OSF/1 code is PIC. | |
5113 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
5114 | ;; | |
5115 | ||
5116 | sco3.2v5*) | |
5117 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' | |
5118 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' | |
5119 | ;; | |
5120 | ||
5121 | solaris*) | |
5122 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
5123 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
5124 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5125 | ;; | |
5126 | ||
5127 | sunos4*) | |
5128 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
5129 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
5130 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5131 | ;; | |
5132 | ||
5133 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
aa1e3b4d | 5134 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
6908b7d7 RC |
5135 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5136 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5137 | ;; | |
5138 | ||
5139 | sysv4*MP*) | |
5140 | if test -d /usr/nec ;then | |
5141 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | |
5142 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5143 | fi | |
5144 | ;; | |
5145 | ||
5146 | uts4*) | |
5147 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
5148 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
5149 | ;; | |
5150 | ||
5151 | *) | |
5152 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
5153 | ;; | |
5154 | esac | |
5155 | fi | |
5156 | ]) | |
5157 | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) | |
5158 | ||
5159 | # | |
5160 | # Check to make sure the PIC flag actually works. | |
5161 | # | |
5162 | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then | |
5163 | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], | |
5164 | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), | |
5165 | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [], | |
5166 | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in | |
5167 | "" | " "*) ;; | |
5168 | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; | |
5169 | esac], | |
5170 | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
5171 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | |
5172 | fi | |
5173 | case "$host_os" in | |
5174 | # For platforms which do not support PIC, -DPIC is meaningless: | |
5175 | *djgpp*) | |
5176 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
5177 | ;; | |
5178 | *) | |
5179 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])" | |
5180 | ;; | |
5181 | esac | |
5182 | ]) | |
5183 | ||
5184 | ||
5185 | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) | |
5186 | # ------------------------------------ | |
5187 | # See if the linker supports building shared libraries. | |
5188 | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], | |
5189 | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
5190 | ifelse([$1],[CXX],[ | |
5191 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
5192 | case $host_os in | |
5193 | aix4* | aix5*) | |
5194 | # If we're using GNU nm, then we don't want the "-C" option. | |
5195 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
5196 | if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then | |
5197 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | |
5198 | else | |
5199 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | |
5200 | fi | |
5201 | ;; | |
5202 | cygwin*) | |
5203 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
5204 | ;; | |
5205 | mingw* | pw32*) | |
5206 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | |
5207 | ;; | |
5208 | *) | |
5209 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
5210 | ;; | |
5211 | esac | |
5212 | ],[ | |
5213 | runpath_var= | |
5214 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
5215 | ||
5216 | _LT_AC_TAGVAR(archive_cmds, $1)= | |
5217 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= | |
5218 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | |
5219 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= | |
5220 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= | |
5221 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
5222 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
5223 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= | |
5224 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
5225 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
5226 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
5227 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
5228 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
5229 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | |
5230 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
5231 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
5232 | # include_expsyms should be a list of space-separated symbols to be *always* | |
5233 | # included in the symbol list | |
5234 | _LT_AC_TAGVAR(include_expsyms, $1)= | |
5235 | # exclude_expsyms can be an egrep regular expression of symbols to exclude | |
5236 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
5237 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
5238 | # as well as any symbol that contains `d'. | |
5239 | _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" | |
5240 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
5241 | # platforms (ab)use it in PIC code, but their linkers get confused if | |
5242 | # the symbol is explicitly referenced. Since portable code cannot | |
5243 | # rely on this symbol name, it's probably fine to never include it in | |
5244 | # preloaded symbol tables. | |
5245 | extract_expsyms_cmds= | |
5246 | ||
5247 | case $host_os in | |
5248 | cygwin* | mingw* | pw32*) | |
5249 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
5250 | # When not using gcc, we currently assume that we are using | |
5251 | # Microsoft Visual C++. | |
5252 | if test "$GCC" != yes; then | |
5253 | with_gnu_ld=no | |
5254 | fi | |
5255 | ;; | |
5256 | openbsd*) | |
5257 | with_gnu_ld=no | |
5258 | ;; | |
5259 | esac | |
5260 | ||
5261 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
5262 | if test "$with_gnu_ld" = yes; then | |
5263 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
5264 | wlarc='${wl}' | |
5265 | ||
5266 | # See if GNU ld supports shared libraries. | |
5267 | case $host_os in | |
5268 | aix3* | aix4* | aix5*) | |
5269 | # On AIX/PPC, the GNU linker is very broken | |
5270 | if test "$host_cpu" != ia64; then | |
5271 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5272 | cat <<EOF 1>&2 | |
5273 | ||
5274 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | |
5275 | *** to be unable to reliably create shared libraries on AIX. | |
5276 | *** Therefore, libtool is disabling shared libraries support. If you | |
5277 | *** really care for shared libraries, you may want to modify your PATH | |
5278 | *** so that a non-GNU linker is found, and then restart. | |
5279 | ||
5280 | EOF | |
5281 | fi | |
5282 | ;; | |
5283 | ||
5284 | amigaos*) | |
5285 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
5286 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5287 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5288 | ||
5289 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |
5290 | # that the semantics of dynamic libraries on AmigaOS, at least up | |
5291 | # to version 4, is to share data among multiple programs linked | |
5292 | # with the same dynamic library. Since this doesn't match the | |
5293 | # behavior of shared libraries on other platforms, we can't use | |
5294 | # them. | |
5295 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5296 | ;; | |
5297 | ||
5298 | beos*) | |
5299 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
5300 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5301 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
5302 | # support --undefined. This deserves some investigation. FIXME | |
5303 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5304 | else | |
5305 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5306 | fi | |
5307 | ;; | |
5308 | ||
5309 | cygwin*) | |
5310 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
5311 | # as there is no search path for DLLs. | |
5312 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5313 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
aa1e3b4d | 5314 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
6908b7d7 RC |
5315 | |
5316 | if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then | |
5317 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | |
5318 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib' | |
5319 | else | |
5320 | ld_shlibs=no | |
5321 | fi | |
5322 | ;; | |
5323 | ||
5324 | mingw* | pw32*) | |
5325 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is | |
5326 | # no search path for DLLs. | |
5327 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5328 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5329 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
5330 | ||
5331 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ | |
5332 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ | |
5333 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ | |
5334 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ | |
5335 | else $CC -o impgen impgen.c ; fi)~ | |
5336 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' | |
5337 | ||
5338 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' | |
5339 | ||
5340 | # FIXME: what about values for MSVC? | |
5341 | dll_entry=__cygwin_dll_entry@12 | |
5342 | case $host_os in | |
5343 | mingw*) | |
5344 | # mingw values | |
5345 | dll_entry=_DllMainCRTStartup@12 | |
5346 | ;; | |
5347 | esac | |
5348 | ||
5349 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 | |
5350 | ||
5351 | # recent cygwin and mingw systems supply a stub DllMain which the user | |
5352 | # can override, but on older systems we have to supply one (in ltdll.c) | |
5353 | if test "x$lt_cv_need_dllmain" = "xyes"; then | |
5354 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " | |
5355 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ | |
5356 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' | |
5357 | else | |
5358 | ltdll_obj= | |
5359 | ltdll_cmds= | |
5360 | fi | |
5361 | ||
5362 | # Extract the symbol export list from an `--export-all' def file, | |
5363 | # then regenerate the def file from the symbol export list, so that | |
5364 | # the compiled dll only exports the symbol export list. | |
5365 | # Be careful not to strip the DATA tag left by newer dlltools. | |
5366 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"' | |
5367 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ | |
5368 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' | |
5369 | ||
5370 | # If the export-symbols file already is a .def file (1st line | |
5371 | # is EXPORTS), use it as is. | |
5372 | # If DATA tags from a recent dlltool are present, honour them! | |
5373 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then | |
5374 | cp $export_symbols $output_objdir/$soname-def; | |
5375 | else | |
5376 | echo EXPORTS > $output_objdir/$soname-def; | |
5377 | _lt_hint=1; | |
5378 | cat $export_symbols | while read symbol; do | |
5379 | set dummy \$symbol; | |
5380 | case \[$]# in | |
5381 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; | |
aa1e3b4d | 5382 | 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; |
6908b7d7 RC |
5383 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
5384 | esac; | |
5385 | _lt_hint=`expr 1 + \$_lt_hint`; | |
5386 | done; | |
5387 | fi~ | |
5388 | '"$ltdll_cmds"' | |
5389 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
5390 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ | |
5391 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
5392 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ | |
5393 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' | |
5394 | ;; | |
5395 | ||
5396 | netbsd*) | |
5397 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
5398 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
5399 | wlarc= | |
5400 | else | |
5401 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5402 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5403 | fi | |
5404 | ;; | |
5405 | ||
5406 | solaris* | sysv5*) | |
5407 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then | |
5408 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5409 | cat <<EOF 1>&2 | |
5410 | ||
5411 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
5412 | *** create shared libraries on Solaris systems. Therefore, libtool | |
5413 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
5414 | *** binutils to release 2.9.1 or newer. Another option is to modify | |
5415 | *** your PATH or compiler configuration so that the native linker is | |
5416 | *** used, and then restart. | |
5417 | ||
5418 | EOF | |
5419 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
5420 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5421 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5422 | else | |
5423 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5424 | fi | |
5425 | ;; | |
5426 | ||
5427 | sunos4*) | |
5428 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
5429 | wlarc= | |
5430 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5431 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5432 | ;; | |
5433 | ||
5434 | *) | |
5435 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
5436 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5437 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5438 | else | |
5439 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5440 | fi | |
5441 | ;; | |
5442 | esac | |
5443 | ||
5444 | if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then | |
5445 | runpath_var=LD_RUN_PATH | |
5446 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
5447 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
5448 | case $host_os in | |
5449 | cygwin* | mingw* | pw32*) | |
5450 | # dlltool doesn't understand --whole-archive et. al. | |
5451 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
5452 | ;; | |
5453 | *) | |
5454 | # ancient GNU ld didn't support --whole-archive et. al. | |
5455 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then | |
5456 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
5457 | else | |
5458 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
5459 | fi | |
5460 | ;; | |
5461 | esac | |
5462 | fi | |
5463 | else | |
5464 | # PORTME fill in a description of your system's linker (not GNU ld) | |
5465 | case $host_os in | |
5466 | aix3*) | |
5467 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5468 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
5469 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | |
5470 | # Note: this linker hardcodes the directories in LIBPATH if there | |
5471 | # are no directories specified by -L. | |
5472 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5473 | if test "$GCC" = yes && test -z "$link_static_flag"; then | |
5474 | # Neither direct hardcoding nor static linking is supported with a | |
5475 | # broken collect2. | |
5476 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
5477 | fi | |
5478 | ;; | |
5479 | ||
5480 | aix4* | aix5*) | |
5481 | if test "$host_cpu" = ia64; then | |
5482 | # On IA64, the linker does run time linking by default, so we don't | |
5483 | # have to do anything special. | |
5484 | aix_use_runtimelinking=no | |
5485 | exp_sym_flag='-Bexport' | |
5486 | no_entry_flag="" | |
5487 | else | |
5488 | # If we're using GNU nm, then we don't want the "-C" option. | |
5489 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
5490 | if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then | |
5491 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | |
5492 | else | |
5493 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | |
5494 | fi | |
5495 | aix_use_runtimelinking=no | |
5496 | ||
5497 | # Test if we are trying to use run time linking or normal | |
5498 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
5499 | # need to do runtime linking. | |
5500 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | |
5501 | for ld_flag in $LDFLAGS; do | |
5502 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
5503 | aix_use_runtimelinking=yes | |
5504 | break | |
5505 | fi | |
5506 | done | |
5507 | esac | |
5508 | ||
5509 | exp_sym_flag='-bexport' | |
5510 | no_entry_flag='-bnoentry' | |
5511 | fi | |
5512 | ||
5513 | # When large executables or shared objects are built, AIX ld can | |
5514 | # have problems creating the table of contents. If linking a library | |
5515 | # or program results in "error TOC overflow" add -mminimal-toc to | |
5516 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
5517 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
5518 | ||
5519 | _LT_AC_TAGVAR(archive_cmds, $1)='' | |
5520 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5521 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5522 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
5523 | ||
5524 | if test "$GCC" = yes; then | |
5525 | case $host_os in aix4.[012]|aix4.[012].*) | |
5526 | # We only want to do this on AIX 4.2 and lower, the check | |
5527 | # below for broken collect2 doesn't work under 4.3+ | |
5528 | collect2name=`${CC} -print-prog-name=collect2` | |
5529 | if test -f "$collect2name" && \ | |
5530 | strings "$collect2name" | grep resolve_lib_name >/dev/null | |
5531 | then | |
5532 | # We have reworked collect2 | |
5533 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5534 | else | |
5535 | # We have old collect2 | |
5536 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
5537 | # It fails to find uninstalled libraries when the uninstalled | |
5538 | # path is not listed in the libpath. Setting hardcode_minus_L | |
5539 | # to unsupported forces relinking | |
5540 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5541 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5542 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
5543 | fi | |
5544 | esac | |
5545 | shared_flag='-shared' | |
5546 | else | |
5547 | # not using gcc | |
5548 | if test "$host_cpu" = ia64; then | |
5549 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
5550 | # chokes on -Wl,-G. The following line is correct: | |
5551 | shared_flag='-G' | |
5552 | else | |
5553 | if test "$aix_use_runtimelinking" = yes; then | |
5554 | shared_flag='${wl}-G' | |
5555 | else | |
5556 | shared_flag='${wl}-bM:SRE' | |
5557 | fi | |
5558 | fi | |
5559 | fi | |
5560 | ||
5561 | # It seems that -bexpall does not export symbols beginning with | |
5562 | # underscore (_), so it is better to generate a list of symbols to export. | |
5563 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
5564 | if test "$aix_use_runtimelinking" = yes; then | |
5565 | # Warning - without using the other runtime loading flags (-brtl), | |
5566 | # -berok will link without error, but may produce a broken library. | |
5567 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | |
5568 | # Determine the default libpath from the value encoded in an empty executable. | |
5569 | _LT_AC_SYS_LIBPATH_AIX | |
5570 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5571 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
5572 | else | |
5573 | if test "$host_cpu" = ia64; then | |
5574 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
5575 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
5576 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | |
5577 | else | |
5578 | # Determine the default libpath from the value encoded in an empty executable. | |
5579 | _LT_AC_SYS_LIBPATH_AIX | |
5580 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5581 | # Warning - without using the other run time loading flags, | |
5582 | # -berok will link without error, but may produce a broken library. | |
5583 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
5584 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
5585 | # -bexpall does not export symbols beginning with underscore (_) | |
5586 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
5587 | # Exported symbols can be pulled into shared objects from archives | |
5588 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' | |
5589 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5590 | # This is similar to how AIX traditionally builds it's shared libraries. | |
5591 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
5592 | fi | |
5593 | fi | |
5594 | ;; | |
5595 | ||
5596 | amigaos*) | |
5597 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
5598 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5599 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5600 | # see comment about different semantics on the GNU ld section | |
5601 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5602 | ;; | |
5603 | ||
5604 | bsdi4*) | |
5605 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | |
5606 | ;; | |
5607 | ||
5608 | cygwin* | mingw* | pw32*) | |
5609 | # When not using gcc, we currently assume that we are using | |
5610 | # Microsoft Visual C++. | |
5611 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
5612 | # no search path for DLLs. | |
5613 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
aa1e3b4d | 5614 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
6908b7d7 RC |
5615 | # Tell ltmain to make .lib files, not .a files. |
5616 | libext=lib | |
5617 | # FIXME: Setting linknames here is a bad hack. | |
5618 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
5619 | # The linker will automatically build a .lib file if we build a DLL. | |
5620 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' | |
5621 | # FIXME: Should let the user specify the lib program. | |
5622 | _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' | |
5623 | fix_srcfile_path='`cygpath -w "$srcfile"`' | |
5624 | ;; | |
5625 | ||
5626 | darwin* | rhapsody*) | |
5627 | case "$host_os" in | |
5628 | rhapsody* | darwin1.[[012]]) | |
5629 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' | |
5630 | ;; | |
5631 | *) # Darwin 1.3 on | |
5632 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | |
5633 | ;; | |
5634 | esac | |
5635 | ||
5636 | # FIXME: Relying on posixy $() will cause problems for | |
5637 | # cross-compilation, but unfortunately the echo tests do not | |
5638 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles | |
5639 | # `"' quotes if we put them in here... so don't! | |
5640 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' | |
5641 | # We need to add '_' to the symbols in $export_symbols first | |
5642 | #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols' | |
5643 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5644 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5645 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' | |
5646 | ;; | |
5647 | ||
5648 | dgux*) | |
5649 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5650 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5651 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5652 | ;; | |
5653 | ||
5654 | freebsd1*) | |
5655 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5656 | ;; | |
5657 | ||
5658 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
5659 | # support. Future versions do this automatically, but an explicit c++rt0.o | |
5660 | # does not break anything, and helps significantly (at the cost of a little | |
5661 | # extra space). | |
5662 | freebsd2.2*) | |
5663 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
5664 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5665 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5666 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5667 | ;; | |
5668 | ||
5669 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
5670 | freebsd2*) | |
5671 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
5672 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5673 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5674 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5675 | ;; | |
5676 | ||
5677 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
5678 | freebsd*) | |
5679 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
5680 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5681 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5682 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5683 | ;; | |
5684 | ||
5685 | hpux9* | hpux10* | hpux11*) | |
5686 | if test "$GCC" = yes; then | |
5687 | case $host_os in | |
5688 | hpux9*) | |
5689 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
5690 | ;; | |
5691 | *) | |
5692 | if test "$host_cpu" = ia64; then | |
5693 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5694 | else | |
5695 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
5696 | fi | |
5697 | ;; | |
5698 | esac | |
5699 | else | |
5700 | case $host_os in | |
5701 | hpux9*) | |
5702 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
5703 | ;; | |
5704 | *) | |
5705 | if test "$host_cpu" = ia64; then | |
5706 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5707 | else | |
5708 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
5709 | fi | |
5710 | ;; | |
5711 | esac | |
5712 | fi | |
5713 | if test "$host_cpu" = ia64; then | |
5714 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5715 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
5716 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5717 | else | |
5718 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5719 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
5720 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5721 | fi | |
5722 | # hardcode_minus_L: Not really in the search PATH, | |
5723 | # but as the default location of the library. | |
5724 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5725 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5726 | ;; | |
5727 | ||
5728 | irix5* | irix6* | nonstopux*) | |
5729 | if test "$GCC" = yes; then | |
5730 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5731 | else | |
5732 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
5733 | fi | |
5734 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5735 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
5736 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
5737 | ;; | |
5738 | ||
5739 | netbsd*) | |
5740 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
5741 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
5742 | else | |
5743 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
5744 | fi | |
5745 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5746 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5747 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5748 | ;; | |
5749 | ||
5750 | newsos6) | |
5751 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5752 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5753 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5754 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
5755 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5756 | ;; | |
5757 | ||
5758 | openbsd*) | |
5759 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5760 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5761 | ||
5762 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
5763 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
5764 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5765 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5766 | else | |
5767 | case $host_os in | |
5768 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
5769 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
5770 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5771 | ;; | |
5772 | *) | |
5773 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
5774 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5775 | ;; | |
5776 | esac | |
5777 | fi | |
5778 | ;; | |
5779 | ||
5780 | os2*) | |
5781 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5782 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5783 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5784 | _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' | |
5785 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
5786 | ;; | |
5787 | ||
5788 | osf3*) | |
5789 | if test "$GCC" = yes; then | |
5790 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5791 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5792 | else | |
5793 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5794 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
5795 | fi | |
5796 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5797 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
5798 | ;; | |
5799 | ||
5800 | osf4* | osf5*) # as osf3* with the addition of -msym flag | |
5801 | if test "$GCC" = yes; then | |
5802 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5803 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5804 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5805 | else | |
5806 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5807 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
5808 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | |
5809 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | |
5810 | ||
5811 | # Both c and cxx compiler support -rpath directly | |
5812 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
5813 | fi | |
5814 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
5815 | ;; | |
5816 | ||
5817 | sco3.2v5*) | |
5818 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5819 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5820 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
5821 | runpath_var=LD_RUN_PATH | |
5822 | hardcode_runpath_var=yes | |
5823 | ;; | |
5824 | ||
5825 | solaris*) | |
5826 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' | |
5827 | if test "$GCC" = yes; then | |
5828 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5829 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
5830 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | |
5831 | else | |
5832 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5833 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
5834 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
5835 | fi | |
5836 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5837 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5838 | case $host_os in | |
5839 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
5840 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | |
5841 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; | |
5842 | esac | |
5843 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
5844 | ;; | |
5845 | ||
5846 | sunos4*) | |
5847 | if test "x$host_vendor" = xsequent; then | |
5848 | # Use $CC to link under sequent, because it throws in some extra .o | |
5849 | # files that make .init and .fini sections work. | |
5850 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
5851 | else | |
5852 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
5853 | fi | |
5854 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5855 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5856 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
5857 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5858 | ;; | |
5859 | ||
5860 | sysv4) | |
aa1e3b4d RC |
5861 | case $host_vendor in |
5862 | sni) | |
5863 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5864 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | |
5865 | ;; | |
5866 | siemens) | |
5867 | ## LD is ld it makes a PLAMLIB | |
5868 | ## CC just makes a GrossModule. | |
5869 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
5870 | _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | |
5871 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
5872 | ;; | |
5873 | motorola) | |
5874 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5875 | _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | |
5876 | ;; | |
5877 | esac | |
6908b7d7 RC |
5878 | runpath_var='LD_RUN_PATH' |
5879 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5880 | ;; | |
5881 | ||
5882 | sysv4.3*) | |
5883 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5884 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5885 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | |
5886 | ;; | |
5887 | ||
5888 | sysv4*MP*) | |
5889 | if test -d /usr/nec; then | |
5890 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5891 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5892 | runpath_var=LD_RUN_PATH | |
5893 | hardcode_runpath_var=yes | |
5894 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
5895 | fi | |
5896 | ;; | |
5897 | ||
5898 | sysv4.2uw2*) | |
5899 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
5900 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
5901 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
5902 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5903 | hardcode_runpath_var=yes | |
5904 | runpath_var=LD_RUN_PATH | |
5905 | ;; | |
5906 | ||
5907 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) | |
5908 | _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' | |
5909 | if test "$GCC" = yes; then | |
5910 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5911 | else | |
5912 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5913 | fi | |
5914 | runpath_var='LD_RUN_PATH' | |
5915 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5916 | ;; | |
5917 | ||
5918 | sysv5*) | |
5919 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' | |
5920 | # $CC -shared without GNU ld will not create a library from C++ | |
5921 | # object files and a static libstdc++, better avoid it by now | |
5922 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5923 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
5924 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
5925 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
5926 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5927 | runpath_var='LD_RUN_PATH' | |
5928 | ;; | |
5929 | ||
5930 | uts4*) | |
5931 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5932 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5933 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5934 | ;; | |
5935 | ||
5936 | *) | |
5937 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5938 | ;; | |
5939 | esac | |
5940 | fi | |
5941 | ]) | |
5942 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | |
5943 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
5944 | ||
5945 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
5946 | if test "$GCC" = yes; then | |
5947 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
5948 | fi | |
5949 | ||
5950 | # | |
5951 | # Do we need to explicitly link libc? | |
5952 | # | |
5953 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5954 | if test "$enable_shared" = yes && test "$GCC" = yes; then | |
5955 | case $_LT_AC_TAGVAR(archive_cmds, $1) in | |
5956 | *'~'*) | |
5957 | # FIXME: we may have to deal with multi-command sequences. | |
5958 | ;; | |
5959 | '$CC '*) | |
5960 | # Test whether the compiler implicitly links with -lc since on some | |
5961 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
5962 | # to ld, don't add -lc before -lgcc. | |
5963 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | |
5964 | $rm conftest* | |
5965 | echo 'static int dummy;' > conftest.$ac_ext | |
5966 | ||
5967 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | |
5968 | soname=conftest | |
5969 | lib=conftest | |
5970 | libobjs=conftest.$ac_objext | |
5971 | deplibs= | |
5972 | wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | |
5973 | compiler_flags=-v | |
5974 | linker_flags=-v | |
5975 | verstring= | |
5976 | output_objdir=. | |
5977 | libname=conftest | |
5978 | lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) | |
5979 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
5980 | if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) | |
5981 | then | |
5982 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
5983 | else | |
5984 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5985 | fi | |
5986 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | |
5987 | else | |
5988 | cat conftest.err 1>&5 | |
5989 | fi | |
5990 | $rm conftest* | |
5991 | AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) | |
5992 | ;; | |
5993 | esac | |
5994 | fi | |
5995 | ])# AC_LIBTOOL_PROG_LD_SHLIBS | |
5996 | ||
5997 | ||
5998 | # _LT_AC_FILE_LTDLL_C | |
5999 | # ------------------- | |
6000 | # Be careful that the start marker always follows a newline. | |
6001 | AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ | |
6002 | # /* ltdll.c starts here */ | |
6003 | # #define WIN32_LEAN_AND_MEAN | |
6004 | # #include <windows.h> | |
6005 | # #undef WIN32_LEAN_AND_MEAN | |
6006 | # #include <stdio.h> | |
6007 | # | |
6008 | # #ifndef __CYGWIN__ | |
6009 | # # ifdef __CYGWIN32__ | |
6010 | # # define __CYGWIN__ __CYGWIN32__ | |
6011 | # # endif | |
6012 | # #endif | |
6013 | # | |
6014 | # #ifdef __cplusplus | |
6015 | # extern "C" { | |
6016 | # #endif | |
6017 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | |
6018 | # #ifdef __cplusplus | |
6019 | # } | |
6020 | # #endif | |
6021 | # | |
6022 | # #ifdef __CYGWIN__ | |
6023 | # #include <cygwin/cygwin_dll.h> | |
6024 | # DECLARE_CYGWIN_DLL( DllMain ); | |
6025 | # #endif | |
6026 | # HINSTANCE __hDllInstance_base; | |
6027 | # | |
6028 | # BOOL APIENTRY | |
6029 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | |
6030 | # { | |
6031 | # __hDllInstance_base = hInst; | |
6032 | # return TRUE; | |
6033 | # } | |
6034 | # /* ltdll.c ends here */ | |
6035 | ])# _LT_AC_FILE_LTDLL_C | |
6036 | ||
6037 | ||
6038 | # _LT_AC_FILE_IMPGEN_C | |
6039 | # -------------------- | |
6040 | # Be careful that the start marker always follows a newline. | |
6041 | AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [ | |
6042 | # /* impgen.c starts here */ | |
6043 | # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | |
6044 | # | |
6045 | # This file is part of GNU libtool. | |
6046 | # | |
6047 | # This program is free software; you can redistribute it and/or modify | |
6048 | # it under the terms of the GNU General Public License as published by | |
6049 | # the Free Software Foundation; either version 2 of the License, or | |
6050 | # (at your option) any later version. | |
6051 | # | |
6052 | # This program is distributed in the hope that it will be useful, | |
6053 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
6054 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
6055 | # GNU General Public License for more details. | |
6056 | # | |
6057 | # You should have received a copy of the GNU General Public License | |
6058 | # along with this program; if not, write to the Free Software | |
6059 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
6060 | # */ | |
6061 | # | |
6062 | # #include <stdio.h> /* for printf() */ | |
6063 | # #include <unistd.h> /* for open(), lseek(), read() */ | |
6064 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ | |
6065 | # #include <string.h> /* for strdup() */ | |
6066 | # | |
6067 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ | |
6068 | # #ifndef O_BINARY | |
6069 | # #define O_BINARY 0 | |
6070 | # #endif | |
6071 | # | |
6072 | # static unsigned int | |
6073 | # pe_get16 (fd, offset) | |
6074 | # int fd; | |
6075 | # int offset; | |
6076 | # { | |
6077 | # unsigned char b[2]; | |
6078 | # lseek (fd, offset, SEEK_SET); | |
6079 | # read (fd, b, 2); | |
6080 | # return b[0] + (b[1]<<8); | |
6081 | # } | |
6082 | # | |
6083 | # static unsigned int | |
6084 | # pe_get32 (fd, offset) | |
6085 | # int fd; | |
6086 | # int offset; | |
6087 | # { | |
6088 | # unsigned char b[4]; | |
6089 | # lseek (fd, offset, SEEK_SET); | |
6090 | # read (fd, b, 4); | |
6091 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
6092 | # } | |
6093 | # | |
6094 | # static unsigned int | |
6095 | # pe_as32 (ptr) | |
6096 | # void *ptr; | |
6097 | # { | |
6098 | # unsigned char *b = ptr; | |
6099 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
6100 | # } | |
6101 | # | |
6102 | # int | |
6103 | # main (argc, argv) | |
6104 | # int argc; | |
6105 | # char *argv[]; | |
6106 | # { | |
6107 | # int dll; | |
6108 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; | |
6109 | # unsigned long export_rva, export_size, nsections, secptr, expptr; | |
6110 | # unsigned long name_rvas, nexp; | |
6111 | # unsigned char *expdata, *erva; | |
6112 | # char *filename, *dll_name; | |
6113 | # | |
6114 | # filename = argv[1]; | |
6115 | # | |
6116 | # dll = open(filename, O_RDONLY|O_BINARY); | |
6117 | # if (dll < 1) | |
6118 | # return 1; | |
6119 | # | |
6120 | # dll_name = filename; | |
6121 | # | |
6122 | # for (i=0; filename[i]; i++) | |
6123 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') | |
6124 | # dll_name = filename + i +1; | |
6125 | # | |
6126 | # pe_header_offset = pe_get32 (dll, 0x3c); | |
6127 | # opthdr_ofs = pe_header_offset + 4 + 20; | |
6128 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); | |
6129 | # | |
6130 | # if (num_entries < 1) /* no exports */ | |
6131 | # return 1; | |
6132 | # | |
6133 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); | |
6134 | # export_size = pe_get32 (dll, opthdr_ofs + 100); | |
6135 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); | |
6136 | # secptr = (pe_header_offset + 4 + 20 + | |
6137 | # pe_get16 (dll, pe_header_offset + 4 + 16)); | |
6138 | # | |
6139 | # expptr = 0; | |
6140 | # for (i = 0; i < nsections; i++) | |
6141 | # { | |
6142 | # char sname[8]; | |
6143 | # unsigned long secptr1 = secptr + 40 * i; | |
6144 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); | |
6145 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); | |
6146 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); | |
6147 | # lseek(dll, secptr1, SEEK_SET); | |
6148 | # read(dll, sname, 8); | |
6149 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) | |
6150 | # { | |
6151 | # expptr = fptr + (export_rva - vaddr); | |
6152 | # if (export_rva + export_size > vaddr + vsize) | |
6153 | # export_size = vsize - (export_rva - vaddr); | |
6154 | # break; | |
6155 | # } | |
6156 | # } | |
6157 | # | |
6158 | # expdata = (unsigned char*)malloc(export_size); | |
6159 | # lseek (dll, expptr, SEEK_SET); | |
6160 | # read (dll, expdata, export_size); | |
6161 | # erva = expdata - export_rva; | |
6162 | # | |
6163 | # nexp = pe_as32 (expdata+24); | |
6164 | # name_rvas = pe_as32 (expdata+32); | |
6165 | # | |
6166 | # printf ("EXPORTS\n"); | |
6167 | # for (i = 0; i<nexp; i++) | |
6168 | # { | |
6169 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); | |
6170 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); | |
6171 | # } | |
6172 | # | |
6173 | # return 0; | |
6174 | # } | |
6175 | # /* impgen.c ends here */ | |
6176 | ])# _LT_AC_FILE_IMPGEN_C | |
6177 | ||
6178 | # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) | |
6179 | # --------------------------------- | |
6180 | AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) | |
6181 | ||
6182 | ||
6183 | # old names | |
6184 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) | |
6185 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | |
6186 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | |
6187 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | |
6188 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | |
6189 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) | |
6190 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) | |
6191 | ||
6192 | # This is just to silence aclocal about the macro not being used | |
6193 | ifelse([AC_DISABLE_FAST_INSTALL]) | |
6194 | ||
6195 | AC_DEFUN([LT_AC_PROG_GCJ], | |
6196 | [AC_CHECK_TOOL(GCJ, gcj, no) | |
6197 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | |
6198 | AC_SUBST(GCJFLAGS) | |
6199 | ]) | |
6200 | ||
6201 | AC_DEFUN([LT_AC_PROG_RC], | |
6202 | [AC_CHECK_TOOL(RC, windres, no) | |
6203 | ]) | |
6204 | ||
6205 | # NOTE: This macro has been submitted for inclusion into # | |
6206 | # GNU Autoconf as AC_PROG_SED. When it is available in # | |
6207 | # a released version of Autoconf we should remove this # | |
6208 | # macro and use it instead. # | |
6209 | # LT_AC_PROG_SED | |
6210 | # -------------- | |
6211 | # Check for a fully-functional sed program, that truncates | |
6212 | # as few characters as possible. Prefer GNU sed if found. | |
6213 | AC_DEFUN([LT_AC_PROG_SED], | |
6214 | [AC_MSG_CHECKING([for a sed that does not truncate output]) | |
6215 | AC_CACHE_VAL(lt_cv_path_SED, | |
6216 | [# Loop through the user's path and test for sed and gsed. | |
6217 | # Then use that list of sed's as ones to test for truncation. | |
6218 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6219 | for as_dir in $PATH | |
6220 | do | |
6221 | IFS=$as_save_IFS | |
6222 | test -z "$as_dir" && as_dir=. | |
aa1e3b4d | 6223 | for lt_ac_prog in sed gsed; do |
6908b7d7 | 6224 | for ac_exec_ext in '' $ac_executable_extensions; do |
aa1e3b4d RC |
6225 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then |
6226 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | |
6908b7d7 RC |
6227 | fi |
6228 | done | |
6229 | done | |
6230 | done | |
aa1e3b4d RC |
6231 | lt_ac_max=0 |
6232 | lt_ac_count=0 | |
6233 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | |
6234 | # along with /bin/sed that truncates output. | |
6235 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | |
6236 | test ! -f $lt_ac_sed && break | |
6237 | cat /dev/null > conftest.in | |
6238 | lt_ac_count=0 | |
6239 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | |
6240 | # Check for GNU sed and select it if it is found. | |
6241 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | |
6242 | lt_cv_path_SED=$lt_ac_sed | |
6243 | break; | |
6244 | fi | |
6245 | while true; do | |
6246 | cat conftest.in conftest.in >conftest.tmp | |
6247 | mv conftest.tmp conftest.in | |
6248 | cp conftest.in conftest.nl | |
6249 | echo >>conftest.nl | |
6250 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | |
6251 | cmp -s conftest.out conftest.nl || break | |
6252 | # 10000 chars as input seems more than enough | |
6253 | test $lt_ac_count -gt 10 && break | |
6254 | lt_ac_count=`expr $lt_ac_count + 1` | |
6255 | if test $lt_ac_count -gt $lt_ac_max; then | |
6256 | lt_ac_max=$lt_ac_count | |
6257 | lt_cv_path_SED=$lt_ac_sed | |
6908b7d7 | 6258 | fi |
6908b7d7 | 6259 | done |
aa1e3b4d RC |
6260 | done |
6261 | SED=$lt_cv_path_SED | |
6908b7d7 RC |
6262 | ]) |
6263 | AC_MSG_RESULT([$SED]) | |
6264 | ]) | |
6265 |