Codebase list cdck / b3d7aed
* Updated ltmain.sh and aclocal.m4 (closes: #375634). gregor herrmann 17 years ago
3 changed file(s) with 9259 addition(s) and 4644 deletion(s). Raw diff Collapse all Expand all
+6366
-3639
aclocal.m4 less more
0 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
1
2 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
3 # Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005 Free Software Foundation, Inc.
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
66 # with or without modifications, as long as this notice is preserved.
1010 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1111 # PARTICULAR PURPOSE.
1212
13 # Do all the work for Automake. -*- Autoconf -*-
14
15 # This macro actually does too much some checks are only needed if
16 # your package does certain things. But this isn't really a big deal.
17
18 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
19 # Free Software Foundation, Inc.
20
21 # This program is free software; you can redistribute it and/or modify
22 # it under the terms of the GNU General Public License as published by
23 # the Free Software Foundation; either version 2, or (at your option)
24 # any later version.
25
26 # This program is distributed in the hope that it will be useful,
27 # but WITHOUT ANY WARRANTY; without even the implied warranty of
28 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 # GNU General Public License for more details.
30
31 # You should have received a copy of the GNU General Public License
32 # along with this program; if not, write to the Free Software
33 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 # 02111-1307, USA.
35
36 # serial 8
37
38 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
39 # written in clear, in which case automake, when reading aclocal.m4,
40 # will think it sees a *use*, and therefore will trigger all it's
41 # C support machinery. Also note that it means that autoscan, seeing
42 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
43
44
45 AC_PREREQ([2.52])
46
47 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
48 # the ones we care about.
49 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
50
51 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
52 # AM_INIT_AUTOMAKE([OPTIONS])
53 # -----------------------------------------------
54 # The call with PACKAGE and VERSION arguments is the old style
55 # call (pre autoconf-2.50), which is being phased out. PACKAGE
56 # and VERSION should now be passed to AC_INIT and removed from
57 # the call to AM_INIT_AUTOMAKE.
58 # We support both call styles for the transition. After
59 # the next Automake release, Autoconf can make the AC_INIT
60 # arguments mandatory, and then we can depend on a new Autoconf
61 # release and drop the old call support.
62 AC_DEFUN([AM_INIT_AUTOMAKE],
63 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
64 AC_REQUIRE([AC_PROG_INSTALL])dnl
65 # test to see if srcdir already configured
66 if test "`cd $srcdir && pwd`" != "`pwd`" &&
67 test -f $srcdir/config.status; then
68 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
69 fi
70
71 # Define the identity of the package.
72 dnl Distinguish between old-style and new-style calls.
73 m4_ifval([$2],
74 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
75 AC_SUBST([PACKAGE], [$1])dnl
76 AC_SUBST([VERSION], [$2])],
77 [_AM_SET_OPTIONS([$1])dnl
78 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
79 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
80
81 _AM_IF_OPTION([no-define],,
82 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
83 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
84
85 # Some tools Automake needs.
86 AC_REQUIRE([AM_SANITY_CHECK])dnl
87 AC_REQUIRE([AC_ARG_PROGRAM])dnl
88 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
89 AM_MISSING_PROG(AUTOCONF, autoconf)
90 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
91 AM_MISSING_PROG(AUTOHEADER, autoheader)
92 AM_MISSING_PROG(MAKEINFO, makeinfo)
93 AM_MISSING_PROG(AMTAR, tar)
94 AM_PROG_INSTALL_SH
95 AM_PROG_INSTALL_STRIP
96 # We need awk for the "check" target. The system "awk" is bad on
97 # some platforms.
98 AC_REQUIRE([AC_PROG_AWK])dnl
99 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
100
101 _AM_IF_OPTION([no-dependencies],,
102 [AC_PROVIDE_IFELSE([AC_PROG_][CC],
103 [_AM_DEPENDENCIES(CC)],
104 [define([AC_PROG_][CC],
105 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
106 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
107 [_AM_DEPENDENCIES(CXX)],
108 [define([AC_PROG_][CXX],
109 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
110 ])
111 ])
112
113 # Copyright 2002 Free Software Foundation, Inc.
114
115 # This program is free software; you can redistribute it and/or modify
116 # it under the terms of the GNU General Public License as published by
117 # the Free Software Foundation; either version 2, or (at your option)
118 # any later version.
119
120 # This program is distributed in the hope that it will be useful,
121 # but WITHOUT ANY WARRANTY; without even the implied warranty of
122 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
123 # GNU General Public License for more details.
124
125 # You should have received a copy of the GNU General Public License
126 # along with this program; if not, write to the Free Software
127 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
128
129 # AM_AUTOMAKE_VERSION(VERSION)
130 # ----------------------------
131 # Automake X.Y traces this macro to ensure aclocal.m4 has been
132 # generated from the m4 files accompanying Automake X.Y.
133 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
134
135 # AM_SET_CURRENT_AUTOMAKE_VERSION
136 # -------------------------------
137 # Call AM_AUTOMAKE_VERSION so it can be traced.
138 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
139 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
140 [AM_AUTOMAKE_VERSION([1.6.3])])
141
142 # Helper functions for option handling. -*- Autoconf -*-
143
144 # Copyright 2001, 2002 Free Software Foundation, Inc.
145
146 # This program is free software; you can redistribute it and/or modify
147 # it under the terms of the GNU General Public License as published by
148 # the Free Software Foundation; either version 2, or (at your option)
149 # any later version.
150
151 # This program is distributed in the hope that it will be useful,
152 # but WITHOUT ANY WARRANTY; without even the implied warranty of
153 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
154 # GNU General Public License for more details.
155
156 # You should have received a copy of the GNU General Public License
157 # along with this program; if not, write to the Free Software
158 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
159 # 02111-1307, USA.
160
161 # serial 2
162
163 # _AM_MANGLE_OPTION(NAME)
164 # -----------------------
165 AC_DEFUN([_AM_MANGLE_OPTION],
166 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
167
168 # _AM_SET_OPTION(NAME)
169 # ------------------------------
170 # Set option NAME. Presently that only means defining a flag for this option.
171 AC_DEFUN([_AM_SET_OPTION],
172 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
173
174 # _AM_SET_OPTIONS(OPTIONS)
175 # ----------------------------------
176 # OPTIONS is a space-separated list of Automake options.
177 AC_DEFUN([_AM_SET_OPTIONS],
178 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
179
180 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
181 # -------------------------------------------
182 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
183 AC_DEFUN([_AM_IF_OPTION],
184 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
185
186 #
187 # Check to make sure that the build environment is sane.
188 #
189
190 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
191
192 # This program is free software; you can redistribute it and/or modify
193 # it under the terms of the GNU General Public License as published by
194 # the Free Software Foundation; either version 2, or (at your option)
195 # any later version.
196
197 # This program is distributed in the hope that it will be useful,
198 # but WITHOUT ANY WARRANTY; without even the implied warranty of
199 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
200 # GNU General Public License for more details.
201
202 # You should have received a copy of the GNU General Public License
203 # along with this program; if not, write to the Free Software
204 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
205 # 02111-1307, USA.
206
207 # serial 3
208
209 # AM_SANITY_CHECK
13 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
14
15 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
16
17
18 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
19 # -----------------------------------------------------------
20 # If this macro is not defined by Autoconf, define it here.
21 m4_ifdef([AC_PROVIDE_IFELSE],
22 [],
23 [m4_define([AC_PROVIDE_IFELSE],
24 [m4_ifdef([AC_PROVIDE_$1],
25 [$2], [$3])])])
26
27
28 # AC_PROG_LIBTOOL
21029 # ---------------
211 AC_DEFUN([AM_SANITY_CHECK],
212 [AC_MSG_CHECKING([whether build environment is sane])
213 # Just in case
214 sleep 1
215 echo timestamp > conftest.file
216 # Do `set' in a subshell so we don't clobber the current shell's
217 # arguments. Must try -L first in case configure is actually a
218 # symlink; some systems play weird games with the mod time of symlinks
219 # (eg FreeBSD returns the mod time of the symlink's containing
220 # directory).
221 if (
222 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
223 if test "$[*]" = "X"; then
224 # -L didn't work.
225 set X `ls -t $srcdir/configure conftest.file`
226 fi
227 rm -f conftest.file
228 if test "$[*]" != "X $srcdir/configure conftest.file" \
229 && test "$[*]" != "X conftest.file $srcdir/configure"; then
230
231 # If neither matched, then we have a broken ls. This can happen
232 # if, for instance, CONFIG_SHELL is bash and it inherits a
233 # broken ls alias from the environment. This has actually
234 # happened. Such a system could not be considered "sane".
235 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
236 alias in your environment])
237 fi
238
239 test "$[2]" = conftest.file
240 )
241 then
242 # Ok.
243 :
244 else
245 AC_MSG_ERROR([newly created file is older than distributed files!
246 Check your system clock])
247 fi
248 AC_MSG_RESULT(yes)])
249
250 # -*- Autoconf -*-
251
252
253 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
254
255 # This program is free software; you can redistribute it and/or modify
256 # it under the terms of the GNU General Public License as published by
257 # the Free Software Foundation; either version 2, or (at your option)
258 # any later version.
259
260 # This program is distributed in the hope that it will be useful,
261 # but WITHOUT ANY WARRANTY; without even the implied warranty of
262 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
263 # GNU General Public License for more details.
264
265 # You should have received a copy of the GNU General Public License
266 # along with this program; if not, write to the Free Software
267 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
268 # 02111-1307, USA.
269
270 # serial 3
271
272 # AM_MISSING_PROG(NAME, PROGRAM)
273 # ------------------------------
274 AC_DEFUN([AM_MISSING_PROG],
275 [AC_REQUIRE([AM_MISSING_HAS_RUN])
276 $1=${$1-"${am_missing_run}$2"}
277 AC_SUBST($1)])
278
279
280 # AM_MISSING_HAS_RUN
281 # ------------------
282 # Define MISSING if not defined so far and test if it supports --run.
283 # If it does, set am_missing_run to use it, otherwise, to nothing.
284 AC_DEFUN([AM_MISSING_HAS_RUN],
285 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
286 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
287 # Use eval to expand $SHELL
288 if eval "$MISSING --run true"; then
289 am_missing_run="$MISSING --run "
290 else
291 am_missing_run=
292 AC_MSG_WARN([`missing' script is too old or missing])
293 fi
294 ])
295
296 # AM_AUX_DIR_EXPAND
297
298 # Copyright 2001 Free Software Foundation, Inc.
299
300 # This program is free software; you can redistribute it and/or modify
301 # it under the terms of the GNU General Public License as published by
302 # the Free Software Foundation; either version 2, or (at your option)
303 # any later version.
304
305 # This program is distributed in the hope that it will be useful,
306 # but WITHOUT ANY WARRANTY; without even the implied warranty of
307 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
308 # GNU General Public License for more details.
309
310 # You should have received a copy of the GNU General Public License
311 # along with this program; if not, write to the Free Software
312 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
313 # 02111-1307, USA.
314
315 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
316 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
317 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
318 #
319 # Of course, Automake must honor this variable whenever it calls a
320 # tool from the auxiliary directory. The problem is that $srcdir (and
321 # therefore $ac_aux_dir as well) can be either absolute or relative,
322 # depending on how configure is run. This is pretty annoying, since
323 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
324 # source directory, any form will work fine, but in subdirectories a
325 # relative path needs to be adjusted first.
326 #
327 # $ac_aux_dir/missing
328 # fails when called from a subdirectory if $ac_aux_dir is relative
329 # $top_srcdir/$ac_aux_dir/missing
330 # fails if $ac_aux_dir is absolute,
331 # fails when called from a subdirectory in a VPATH build with
332 # a relative $ac_aux_dir
333 #
334 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
335 # are both prefixed by $srcdir. In an in-source build this is usually
336 # harmless because $srcdir is `.', but things will broke when you
337 # start a VPATH build or use an absolute $srcdir.
338 #
339 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
340 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
341 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
342 # and then we would define $MISSING as
343 # MISSING="\${SHELL} $am_aux_dir/missing"
344 # This will work as long as MISSING is not called from configure, because
345 # unfortunately $(top_srcdir) has no meaning in configure.
346 # However there are other variables, like CC, which are often used in
347 # configure, and could therefore not use this "fixed" $ac_aux_dir.
348 #
349 # Another solution, used here, is to always expand $ac_aux_dir to an
350 # absolute PATH. The drawback is that using absolute paths prevent a
351 # configured tree to be moved without reconfiguration.
352
353 # Rely on autoconf to set up CDPATH properly.
354 AC_PREREQ([2.50])
355
356 AC_DEFUN([AM_AUX_DIR_EXPAND], [
357 # expand $ac_aux_dir to an absolute path
358 am_aux_dir=`cd $ac_aux_dir && pwd`
359 ])
360
361 # AM_PROG_INSTALL_SH
362 # ------------------
363 # Define $install_sh.
364
365 # Copyright 2001 Free Software Foundation, Inc.
366
367 # This program is free software; you can redistribute it and/or modify
368 # it under the terms of the GNU General Public License as published by
369 # the Free Software Foundation; either version 2, or (at your option)
370 # any later version.
371
372 # This program is distributed in the hope that it will be useful,
373 # but WITHOUT ANY WARRANTY; without even the implied warranty of
374 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
375 # GNU General Public License for more details.
376
377 # You should have received a copy of the GNU General Public License
378 # along with this program; if not, write to the Free Software
379 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
380 # 02111-1307, USA.
381
382 AC_DEFUN([AM_PROG_INSTALL_SH],
383 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
384 install_sh=${install_sh-"$am_aux_dir/install-sh"}
385 AC_SUBST(install_sh)])
386
387 # AM_PROG_INSTALL_STRIP
388
389 # Copyright 2001 Free Software Foundation, Inc.
390
391 # This program is free software; you can redistribute it and/or modify
392 # it under the terms of the GNU General Public License as published by
393 # the Free Software Foundation; either version 2, or (at your option)
394 # any later version.
395
396 # This program is distributed in the hope that it will be useful,
397 # but WITHOUT ANY WARRANTY; without even the implied warranty of
398 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
399 # GNU General Public License for more details.
400
401 # You should have received a copy of the GNU General Public License
402 # along with this program; if not, write to the Free Software
403 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
404 # 02111-1307, USA.
405
406 # One issue with vendor `install' (even GNU) is that you can't
407 # specify the program used to strip binaries. This is especially
408 # annoying in cross-compiling environments, where the build's strip
409 # is unlikely to handle the host's binaries.
410 # Fortunately install-sh will honor a STRIPPROG variable, so we
411 # always use install-sh in `make install-strip', and initialize
412 # STRIPPROG with the value of the STRIP variable (set by the user).
413 AC_DEFUN([AM_PROG_INSTALL_STRIP],
414 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
415 # Installed binaries are usually stripped using `strip' when the user
416 # run `make install-strip'. However `strip' might not be the right
417 # tool to use in cross-compilation environments, therefore Automake
418 # will honor the `STRIP' environment variable to overrule this program.
419 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
420 if test "$cross_compiling" != no; then
421 AC_CHECK_TOOL([STRIP], [strip], :)
422 fi
423 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
424 AC_SUBST([INSTALL_STRIP_PROGRAM])])
425
426 # serial 4 -*- Autoconf -*-
427
428 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
429
430 # This program is free software; you can redistribute it and/or modify
431 # it under the terms of the GNU General Public License as published by
432 # the Free Software Foundation; either version 2, or (at your option)
433 # any later version.
434
435 # This program is distributed in the hope that it will be useful,
436 # but WITHOUT ANY WARRANTY; without even the implied warranty of
437 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
438 # GNU General Public License for more details.
439
440 # You should have received a copy of the GNU General Public License
441 # along with this program; if not, write to the Free Software
442 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
443 # 02111-1307, USA.
444
445
446 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
447 # written in clear, in which case automake, when reading aclocal.m4,
448 # will think it sees a *use*, and therefore will trigger all it's
449 # C support machinery. Also note that it means that autoscan, seeing
450 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
451
452
453
454 # _AM_DEPENDENCIES(NAME)
455 # ----------------------
456 # See how the compiler implements dependency checking.
457 # NAME is "CC", "CXX", "GCJ", or "OBJC".
458 # We try a few techniques and use that to set a single cache variable.
459 #
460 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
461 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
462 # dependency, and given that the user is not expected to run this macro,
463 # just rely on AC_PROG_CC.
464 AC_DEFUN([_AM_DEPENDENCIES],
465 [AC_REQUIRE([AM_SET_DEPDIR])dnl
466 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
467 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
468 AC_REQUIRE([AM_DEP_TRACK])dnl
469
470 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
471 [$1], CXX, [depcc="$CXX" am_compiler_list=],
472 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
473 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
474 [depcc="$$1" am_compiler_list=])
475
476 AC_CACHE_CHECK([dependency style of $depcc],
477 [am_cv_$1_dependencies_compiler_type],
478 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
479 # We make a subdir and do the tests there. Otherwise we can end up
480 # making bogus files that we don't know about and never remove. For
481 # instance it was reported that on HP-UX the gcc test will end up
482 # making a dummy file named `D' -- because `-MD' means `put the output
483 # in D'.
484 mkdir conftest.dir
485 # Copy depcomp to subdir because otherwise we won't find it if we're
486 # using a relative directory.
487 cp "$am_depcomp" conftest.dir
488 cd conftest.dir
489
490 am_cv_$1_dependencies_compiler_type=none
491 if test "$am_compiler_list" = ""; then
492 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
493 fi
494 for depmode in $am_compiler_list; do
495 # We need to recreate these files for each test, as the compiler may
496 # overwrite some of them when testing with obscure command lines.
497 # This happens at least with the AIX C compiler.
498 echo '#include "conftest.h"' > conftest.c
499 echo 'int i;' > conftest.h
500 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
501
502 case $depmode in
503 nosideeffect)
504 # after this tag, mechanisms are not by side-effect, so they'll
505 # only be used when explicitly requested
506 if test "x$enable_dependency_tracking" = xyes; then
507 continue
508 else
509 break
510 fi
511 ;;
512 none) break ;;
513 esac
514 # We check with `-c' and `-o' for the sake of the "dashmstdout"
515 # mode. It turns out that the SunPro C++ compiler does not properly
516 # handle `-M -o', and we need to detect this.
517 if depmode=$depmode \
518 source=conftest.c object=conftest.o \
519 depfile=conftest.Po tmpdepfile=conftest.TPo \
520 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
521 grep conftest.h conftest.Po > /dev/null 2>&1 &&
522 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
523 am_cv_$1_dependencies_compiler_type=$depmode
524 break
525 fi
526 done
527
528 cd ..
529 rm -rf conftest.dir
530 else
531 am_cv_$1_dependencies_compiler_type=none
532 fi
533 ])
534 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
535 ])
536
537
538 # AM_SET_DEPDIR
539 # -------------
540 # Choose a directory name for dependency files.
541 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
542 AC_DEFUN([AM_SET_DEPDIR],
543 [rm -f .deps 2>/dev/null
544 mkdir .deps 2>/dev/null
545 if test -d .deps; then
546 DEPDIR=.deps
547 else
548 # MS-DOS does not allow filenames that begin with a dot.
549 DEPDIR=_deps
550 fi
551 rmdir .deps 2>/dev/null
552 AC_SUBST([DEPDIR])
553 ])
554
555
556 # AM_DEP_TRACK
557 # ------------
558 AC_DEFUN([AM_DEP_TRACK],
559 [AC_ARG_ENABLE(dependency-tracking,
560 [ --disable-dependency-tracking Speeds up one-time builds
561 --enable-dependency-tracking Do not reject slow dependency extractors])
562 if test "x$enable_dependency_tracking" != xno; then
563 am_depcomp="$ac_aux_dir/depcomp"
564 AMDEPBACKSLASH='\'
565 fi
566 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
567 AC_SUBST([AMDEPBACKSLASH])
568 ])
569
570 # Generate code to set up dependency tracking. -*- Autoconf -*-
571
572 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
573
574 # This program is free software; you can redistribute it and/or modify
575 # it under the terms of the GNU General Public License as published by
576 # the Free Software Foundation; either version 2, or (at your option)
577 # any later version.
578
579 # This program is distributed in the hope that it will be useful,
580 # but WITHOUT ANY WARRANTY; without even the implied warranty of
581 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
582 # GNU General Public License for more details.
583
584 # You should have received a copy of the GNU General Public License
585 # along with this program; if not, write to the Free Software
586 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
587 # 02111-1307, USA.
588
589 #serial 2
590
591 # _AM_OUTPUT_DEPENDENCY_COMMANDS
592 # ------------------------------
593 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
594 [for mf in $CONFIG_FILES; do
595 # Strip MF so we end up with the name of the file.
596 mf=`echo "$mf" | sed -e 's/:.*$//'`
597 # Check whether this is an Automake generated Makefile or not.
598 # We used to match only the files named `Makefile.in', but
599 # some people rename them; so instead we look at the file content.
600 # Grep'ing the first line is not enough: some people post-process
601 # each Makefile.in and add a new line on top of each file to say so.
602 # So let's grep whole file.
603 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
604 dirpart=`AS_DIRNAME("$mf")`
605 else
606 continue
607 fi
608 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
609 # Extract the definition of DEP_FILES from the Makefile without
610 # running `make'.
611 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
612 test -z "$DEPDIR" && continue
613 # When using ansi2knr, U may be empty or an underscore; expand it
614 U=`sed -n -e '/^U = / s///p' < "$mf"`
615 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
616 # We invoke sed twice because it is the simplest approach to
617 # changing $(DEPDIR) to its actual value in the expansion.
618 for file in `sed -n -e '
619 /^DEP_FILES = .*\\\\$/ {
620 s/^DEP_FILES = //
621 :loop
622 s/\\\\$//
623 p
624 n
625 /\\\\$/ b loop
626 p
627 }
628 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
629 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
630 # Make sure the directory exists.
631 test -f "$dirpart/$file" && continue
632 fdir=`AS_DIRNAME(["$file"])`
633 AS_MKDIR_P([$dirpart/$fdir])
634 # echo "creating $dirpart/$file"
635 echo '# dummy' > "$dirpart/$file"
636 done
637 done
638 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
639
640
641 # AM_OUTPUT_DEPENDENCY_COMMANDS
642 # -----------------------------
643 # This macro should only be invoked once -- use via AC_REQUIRE.
644 #
645 # This code is only required when automatic dependency tracking
646 # is enabled. FIXME. This creates each `.P' file that we will
647 # need in order to bootstrap the dependency handling code.
648 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
649 [AC_CONFIG_COMMANDS([depfiles],
650 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
651 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
652 ])
653
654 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
655
656 # This program is free software; you can redistribute it and/or modify
657 # it under the terms of the GNU General Public License as published by
658 # the Free Software Foundation; either version 2, or (at your option)
659 # any later version.
660
661 # This program is distributed in the hope that it will be useful,
662 # but WITHOUT ANY WARRANTY; without even the implied warranty of
663 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
664 # GNU General Public License for more details.
665
666 # You should have received a copy of the GNU General Public License
667 # along with this program; if not, write to the Free Software
668 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
669 # 02111-1307, USA.
670
671 # serial 2
672
673 # AM_MAKE_INCLUDE()
674 # -----------------
675 # Check to see how make treats includes.
676 AC_DEFUN([AM_MAKE_INCLUDE],
677 [am_make=${MAKE-make}
678 cat > confinc << 'END'
679 doit:
680 @echo done
681 END
682 # If we don't find an include directive, just comment out the code.
683 AC_MSG_CHECKING([for style of include used by $am_make])
684 am__include="#"
685 am__quote=
686 _am_result=none
687 # First try GNU make style include.
688 echo "include confinc" > confmf
689 # We grep out `Entering directory' and `Leaving directory'
690 # messages which can occur if `w' ends up in MAKEFLAGS.
691 # In particular we don't look at `^make:' because GNU make might
692 # be invoked under some other name (usually "gmake"), in which
693 # case it prints its new name instead of `make'.
694 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
695 am__include=include
696 am__quote=
697 _am_result=GNU
698 fi
699 # Now try BSD make style include.
700 if test "$am__include" = "#"; then
701 echo '.include "confinc"' > confmf
702 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
703 am__include=.include
704 am__quote="\""
705 _am_result=BSD
706 fi
707 fi
708 AC_SUBST(am__include)
709 AC_SUBST(am__quote)
710 AC_MSG_RESULT($_am_result)
711 rm -f confinc confmf
712 ])
713
714 # AM_CONDITIONAL -*- Autoconf -*-
715
716 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
717
718 # This program is free software; you can redistribute it and/or modify
719 # it under the terms of the GNU General Public License as published by
720 # the Free Software Foundation; either version 2, or (at your option)
721 # any later version.
722
723 # This program is distributed in the hope that it will be useful,
724 # but WITHOUT ANY WARRANTY; without even the implied warranty of
725 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
726 # GNU General Public License for more details.
727
728 # You should have received a copy of the GNU General Public License
729 # along with this program; if not, write to the Free Software
730 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
731 # 02111-1307, USA.
732
733 # serial 5
734
735 AC_PREREQ(2.52)
736
737 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
738 # -------------------------------------
739 # Define a conditional.
740 AC_DEFUN([AM_CONDITIONAL],
741 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
742 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
743 AC_SUBST([$1_TRUE])
744 AC_SUBST([$1_FALSE])
745 if $2; then
746 $1_TRUE=
747 $1_FALSE='#'
748 else
749 $1_TRUE='#'
750 $1_FALSE=
751 fi
752 AC_CONFIG_COMMANDS_PRE(
753 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
754 AC_MSG_ERROR([conditional \"$1\" was never defined.
755 Usually this means the macro was only invoked conditionally.])
756 fi])])
757
758 # isc-posix.m4 serial 2 (gettext-0.11.2)
759 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
760 dnl This file is free software, distributed under the terms of the GNU
761 dnl General Public License. As a special exception to the GNU General
762 dnl Public License, this file may be distributed as part of a program
763 dnl that contains a configuration script generated by Autoconf, under
764 dnl the same distribution terms as the rest of that program.
765
766 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
767
768 # This test replaces the one in autoconf.
769 # Currently this macro should have the same name as the autoconf macro
770 # because gettext's gettext.m4 (distributed in the automake package)
771 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
772 # give these diagnostics:
773 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
774 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
775
776 undefine([AC_ISC_POSIX])
777
778 AC_DEFUN([AC_ISC_POSIX],
779 [
780 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
781 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
782 ]
783 )
784
785 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
786
787 # serial 46 AC_PROG_LIBTOOL
788
78930 AC_DEFUN([AC_PROG_LIBTOOL],
31 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
32 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
33 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
34 AC_PROVIDE_IFELSE([AC_PROG_CXX],
35 [AC_LIBTOOL_CXX],
36 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
37 ])])
38 dnl And a similar setup for Fortran 77 support
39 AC_PROVIDE_IFELSE([AC_PROG_F77],
40 [AC_LIBTOOL_F77],
41 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
42 ])])
43
44 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
45 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
46 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
47 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
48 [AC_LIBTOOL_GCJ],
49 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
50 [AC_LIBTOOL_GCJ],
51 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
52 [AC_LIBTOOL_GCJ],
53 [ifdef([AC_PROG_GCJ],
54 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
55 ifdef([A][M_PROG_GCJ],
56 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
57 ifdef([LT_AC_PROG_GCJ],
58 [define([LT_AC_PROG_GCJ],
59 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
60 ])])# AC_PROG_LIBTOOL
61
62
63 # _AC_PROG_LIBTOOL
64 # ----------------
65 AC_DEFUN([_AC_PROG_LIBTOOL],
79066 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
67 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
68 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
69 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79170
79271 # This can be used to rebuild libtool when needed
79372 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
79877
79978 # Prevent multiple expansion
80079 define([AC_PROG_LIBTOOL], [])
801 ])
802
80 ])# _AC_PROG_LIBTOOL
81
82
83 # AC_LIBTOOL_SETUP
84 # ----------------
80385 AC_DEFUN([AC_LIBTOOL_SETUP],
804 [AC_PREREQ(2.13)dnl
86 [AC_PREREQ(2.50)dnl
80587 AC_REQUIRE([AC_ENABLE_SHARED])dnl
80688 AC_REQUIRE([AC_ENABLE_STATIC])dnl
80789 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
81193 AC_REQUIRE([AC_PROG_LD])dnl
81294 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
81395 AC_REQUIRE([AC_PROG_NM])dnl
814 AC_REQUIRE([LT_AC_PROG_SED])dnl
81596
81697 AC_REQUIRE([AC_PROG_LN_S])dnl
81798 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
99 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
818100 AC_REQUIRE([AC_OBJEXT])dnl
819101 AC_REQUIRE([AC_EXEEXT])dnl
820102 dnl
821103
104 AC_LIBTOOL_SYS_MAX_CMD_LEN
105 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
106 AC_LIBTOOL_OBJDIR
107
108 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
822109 _LT_AC_PROG_ECHO_BACKSLASH
110
111 case $host_os in
112 aix3*)
113 # AIX sometimes has problems with the GCC collect2 program. For some
114 # reason, if we set the COLLECT_NAMES environment variable, the problems
115 # vanish in a puff of smoke.
116 if test "X${COLLECT_NAMES+set}" != Xset; then
117 COLLECT_NAMES=
118 export COLLECT_NAMES
119 fi
120 ;;
121 esac
122
123 # Sed substitution that helps us do robust quoting. It backslashifies
124 # metacharacters that are still active within double-quoted strings.
125 Xsed='sed -e 1s/^X//'
126 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
127
128 # Same as above, but do not quote variable references.
129 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
130
131 # Sed substitution to delay expansion of an escaped shell variable in a
132 # double_quote_subst'ed string.
133 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
134
135 # Sed substitution to avoid accidental globbing in evaled expressions
136 no_glob_subst='s/\*/\\\*/g'
137
138 # Constants:
139 rm="rm -f"
140
141 # Global variables:
142 default_ofile=libtool
143 can_build_shared=yes
144
145 # All known linkers require a `.a' archive for static linking (except MSVC,
146 # which needs '.lib').
147 libext=a
148 ltmain="$ac_aux_dir/ltmain.sh"
149 ofile="$default_ofile"
150 with_gnu_ld="$lt_cv_prog_gnu_ld"
151
152 AC_CHECK_TOOL(AR, ar, false)
153 AC_CHECK_TOOL(RANLIB, ranlib, :)
154 AC_CHECK_TOOL(STRIP, strip, :)
155
156 old_CC="$CC"
157 old_CFLAGS="$CFLAGS"
158
159 # Set sane defaults for various variables
160 test -z "$AR" && AR=ar
161 test -z "$AR_FLAGS" && AR_FLAGS=cru
162 test -z "$AS" && AS=as
163 test -z "$CC" && CC=cc
164 test -z "$LTCC" && LTCC=$CC
165 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
166 test -z "$DLLTOOL" && DLLTOOL=dlltool
167 test -z "$LD" && LD=ld
168 test -z "$LN_S" && LN_S="ln -s"
169 test -z "$MAGIC_CMD" && MAGIC_CMD=file
170 test -z "$NM" && NM=nm
171 test -z "$SED" && SED=sed
172 test -z "$OBJDUMP" && OBJDUMP=objdump
173 test -z "$RANLIB" && RANLIB=:
174 test -z "$STRIP" && STRIP=:
175 test -z "$ac_objext" && ac_objext=o
176
177 # Determine commands to create old-style static archives.
178 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
179 old_postinstall_cmds='chmod 644 $oldlib'
180 old_postuninstall_cmds=
181
182 if test -n "$RANLIB"; then
183 case $host_os in
184 openbsd*)
185 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
186 ;;
187 *)
188 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
189 ;;
190 esac
191 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
192 fi
193
194 _LT_CC_BASENAME([$compiler])
195
823196 # Only perform the check for file, if the check method requires it
824197 case $deplibs_check_method in
825198 file_magic*)
829202 ;;
830203 esac
831204
832 AC_CHECK_TOOL(RANLIB, ranlib, :)
833 AC_CHECK_TOOL(STRIP, strip, :)
834
835 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
836 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
205 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
206 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
837207 enable_win32_dll=yes, enable_win32_dll=no)
838208
839 AC_ARG_ENABLE(libtool-lock,
840 [ --disable-libtool-lock avoid locking (might break parallel builds)])
209 AC_ARG_ENABLE([libtool-lock],
210 [AC_HELP_STRING([--disable-libtool-lock],
211 [avoid locking (might break parallel builds)])])
841212 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
842213
843 # Some flags need to be propagated to the compiler or linker for good
844 # libtool support.
845 case $host in
846 *-*-irix6*)
847 # Find out which ABI we are using.
848 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
849 if AC_TRY_EVAL(ac_compile); then
850 case `/usr/bin/file conftest.$ac_objext` in
851 *32-bit*)
852 LD="${LD-ld} -32"
853 ;;
854 *N32*)
855 LD="${LD-ld} -n32"
856 ;;
857 *64-bit*)
858 LD="${LD-ld} -64"
859 ;;
860 esac
861 fi
862 rm -rf conftest*
863 ;;
864
865 *-*-sco3.2v5*)
866 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
867 SAVE_CFLAGS="$CFLAGS"
868 CFLAGS="$CFLAGS -belf"
869 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
870 [AC_LANG_SAVE
871 AC_LANG_C
872 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
873 AC_LANG_RESTORE])
874 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
875 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
876 CFLAGS="$SAVE_CFLAGS"
877 fi
878 ;;
879
880 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
881 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
882 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
883 AC_CHECK_TOOL(AS, as, false)
884 AC_CHECK_TOOL(OBJDUMP, objdump, false)
885
886 # recent cygwin and mingw systems supply a stub DllMain which the user
887 # can override, but on older systems we have to supply one
888 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
889 [AC_TRY_LINK([],
890 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
891 DllMain (0, 0, 0);],
892 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
893
894 case $host/$CC in
895 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
896 # old mingw systems require "-dll" to link a DLL, while more recent ones
897 # require "-mdll"
898 SAVE_CFLAGS="$CFLAGS"
899 CFLAGS="$CFLAGS -mdll"
900 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
901 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
902 CFLAGS="$SAVE_CFLAGS" ;;
903 *-*-cygwin* | *-*-pw32*)
904 # cygwin systems need to pass --dll to the linker, and not link
905 # crt.o which will require a WinMain@16 definition.
906 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
214 AC_ARG_WITH([pic],
215 [AC_HELP_STRING([--with-pic],
216 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
217 [pic_mode="$withval"],
218 [pic_mode=default])
219 test -z "$pic_mode" && pic_mode=default
220
221 # Use C for the default configuration in the libtool script
222 tagname=
223 AC_LIBTOOL_LANG_C_CONFIG
224 _LT_AC_TAGCONFIG
225 ])# AC_LIBTOOL_SETUP
226
227
228 # _LT_AC_SYS_COMPILER
229 # -------------------
230 AC_DEFUN([_LT_AC_SYS_COMPILER],
231 [AC_REQUIRE([AC_PROG_CC])dnl
232
233 # If no C compiler was specified, use CC.
234 LTCC=${LTCC-"$CC"}
235
236 # If no C compiler flags were specified, use CFLAGS.
237 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
238
239 # Allow CC to be a program name with arguments.
240 compiler=$CC
241 ])# _LT_AC_SYS_COMPILER
242
243
244 # _LT_CC_BASENAME(CC)
245 # -------------------
246 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
247 AC_DEFUN([_LT_CC_BASENAME],
248 [for cc_temp in $1""; do
249 case $cc_temp in
250 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
251 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
252 \-*) ;;
253 *) break;;
907254 esac
908 ;;
909 ])
910 esac
911
912 _LT_AC_LTCONFIG_HACK
913
255 done
256 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
914257 ])
915258
916 # AC_LIBTOOL_HEADER_ASSERT
259
260 # _LT_COMPILER_BOILERPLATE
917261 # ------------------------
918 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
919 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
920 [lt_cv_func_assert_works],
921 [case $host in
922 *-*-solaris*)
923 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
924 case `$CC --version 2>/dev/null` in
925 [[12]].*) lt_cv_func_assert_works=no ;;
926 *) lt_cv_func_assert_works=yes ;;
927 esac
928 fi
929 ;;
930 esac])
931
932 if test "x$lt_cv_func_assert_works" = xyes; then
933 AC_CHECK_HEADERS(assert.h)
934 fi
935 ])# AC_LIBTOOL_HEADER_ASSERT
936
937 # _LT_AC_CHECK_DLFCN
938 # --------------------
939 AC_DEFUN([_LT_AC_CHECK_DLFCN],
940 [AC_CHECK_HEADERS(dlfcn.h)
941 ])# _LT_AC_CHECK_DLFCN
942
943 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
944 # ---------------------------------
945 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
946 [AC_REQUIRE([AC_CANONICAL_HOST])
947 AC_REQUIRE([AC_PROG_NM])
948 AC_REQUIRE([AC_OBJEXT])
949 # Check for command to grab the raw symbol name followed by C symbol from nm.
950 AC_MSG_CHECKING([command to parse $NM output])
951 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
952
953 # These are sane defaults that work on at least a few old systems.
954 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
955
956 # Character class describing NM global symbol codes.
957 symcode='[[BCDEGRST]]'
958
959 # Regexp to match symbols that can be accessed directly from C.
960 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
961
962 # Transform the above into a raw symbol and a C symbol.
963 symxfrm='\1 \2\3 \3'
964
965 # Transform an extracted symbol line into a proper C declaration
966 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
967
968 # Transform an extracted symbol line into symbol name and symbol address
969 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
970
971 # Define system-specific variables.
972 case $host_os in
973 aix*)
974 symcode='[[BCDT]]'
975 ;;
976 cygwin* | mingw* | pw32*)
977 symcode='[[ABCDGISTW]]'
978 ;;
979 hpux*) # Its linker distinguishes data from code symbols
980 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
981 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
982 ;;
983 irix* | nonstopux*)
984 symcode='[[BCDEGRST]]'
985 ;;
986 osf*)
987 symcode='[[BCDEGQRST]]'
988 ;;
989 solaris* | sysv5*)
990 symcode='[[BDT]]'
991 ;;
992 sysv4)
993 symcode='[[DFNSTU]]'
994 ;;
995 esac
996
997 # Handle CRLF in mingw tool chain
998 opt_cr=
999 case $host_os in
1000 mingw*)
1001 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1002 ;;
1003 esac
1004
1005 # If we're using GNU nm, then use its standard symbol codes.
1006 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1007 symcode='[[ABCDGISTW]]'
1008 fi
1009
1010 # Try without a prefix undercore, then with it.
1011 for ac_symprfx in "" "_"; do
1012
1013 # Write the raw and C identifiers.
1014 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1015
1016 # Check to see that the pipe works correctly.
1017 pipe_works=no
1018 rm -f conftest*
1019 cat > conftest.$ac_ext <<EOF
1020 #ifdef __cplusplus
1021 extern "C" {
1022 #endif
1023 char nm_test_var;
1024 void nm_test_func(){}
1025 #ifdef __cplusplus
1026 }
1027 #endif
1028 int main(){nm_test_var='a';nm_test_func();return(0);}
1029 EOF
1030
1031 if AC_TRY_EVAL(ac_compile); then
1032 # Now try to grab the symbols.
1033 nlist=conftest.nm
1034 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1035 # Try sorting and uniquifying the output.
1036 if sort "$nlist" | uniq > "$nlist"T; then
1037 mv -f "$nlist"T "$nlist"
1038 else
1039 rm -f "$nlist"T
1040 fi
1041
1042 # Make sure that we snagged all the symbols we need.
1043 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1044 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1045 cat <<EOF > conftest.$ac_ext
1046 #ifdef __cplusplus
1047 extern "C" {
1048 #endif
1049
1050 EOF
1051 # Now generate the symbol file.
1052 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1053
1054 cat <<EOF >> conftest.$ac_ext
1055 #if defined (__STDC__) && __STDC__
1056 # define lt_ptr void *
1057 #else
1058 # define lt_ptr char *
1059 # define const
1060 #endif
1061
1062 /* The mapping between symbol names and symbols. */
1063 const struct {
1064 const char *name;
1065 lt_ptr address;
1066 }
1067 lt_preloaded_symbols[[]] =
1068 {
1069 EOF
1070 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1071 cat <<\EOF >> conftest.$ac_ext
1072 {0, (lt_ptr) 0}
1073 };
1074
1075 #ifdef __cplusplus
1076 }
1077 #endif
1078 EOF
1079 # Now try linking the two files.
1080 mv conftest.$ac_objext conftstm.$ac_objext
1081 save_LIBS="$LIBS"
1082 save_CFLAGS="$CFLAGS"
1083 LIBS="conftstm.$ac_objext"
1084 CFLAGS="$CFLAGS$no_builtin_flag"
1085 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1086 pipe_works=yes
1087 fi
1088 LIBS="$save_LIBS"
1089 CFLAGS="$save_CFLAGS"
1090 else
1091 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1092 fi
1093 else
1094 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1095 fi
1096 else
1097 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1098 fi
1099 else
1100 echo "$progname: failed program was:" >&AC_FD_CC
1101 cat conftest.$ac_ext >&5
1102 fi
1103 rm -f conftest* conftst*
1104
1105 # Do not use the global_symbol_pipe unless it works.
1106 if test "$pipe_works" = yes; then
1107 break
1108 else
1109 lt_cv_sys_global_symbol_pipe=
1110 fi
1111 done
1112 ])
1113 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1114 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1115 global_symbol_to_cdecl=
1116 global_symbol_to_c_name_address=
1117 else
1118 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1119 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1120 fi
1121 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1122 then
1123 AC_MSG_RESULT(failed)
1124 else
1125 AC_MSG_RESULT(ok)
1126 fi
1127 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1128
1129 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1130 # ---------------------------------
1131 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1132 [# Find the correct PATH separator. Usually this is `:', but
1133 # DJGPP uses `;' like DOS.
1134 if test "X${PATH_SEPARATOR+set}" != Xset; then
1135 UNAME=${UNAME-`uname 2>/dev/null`}
1136 case X$UNAME in
1137 *-DOS) lt_cv_sys_path_separator=';' ;;
1138 *) lt_cv_sys_path_separator=':' ;;
1139 esac
1140 PATH_SEPARATOR=$lt_cv_sys_path_separator
1141 fi
1142 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
262 # Check for compiler boilerplate output or warnings with
263 # the simple compiler test code.
264 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
265 [ac_outfile=conftest.$ac_objext
266 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
267 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
268 _lt_compiler_boilerplate=`cat conftest.err`
269 $rm conftest*
270 ])# _LT_COMPILER_BOILERPLATE
271
272
273 # _LT_LINKER_BOILERPLATE
274 # ----------------------
275 # Check for linker boilerplate output or warnings with
276 # the simple link test code.
277 AC_DEFUN([_LT_LINKER_BOILERPLATE],
278 [ac_outfile=conftest.$ac_objext
279 printf "$lt_simple_link_test_code" >conftest.$ac_ext
280 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
281 _lt_linker_boilerplate=`cat conftest.err`
282 $rm conftest*
283 ])# _LT_LINKER_BOILERPLATE
284
285
286 # _LT_AC_SYS_LIBPATH_AIX
287 # ----------------------
288 # Links a minimal program and checks the executable
289 # for the system default hardcoded library path. In most cases,
290 # this is /usr/lib:/lib, but when the MPI compilers are used
291 # the location of the communication and MPI libs are included too.
292 # If we don't find anything, use the default library path according
293 # to the aix ld manual.
294 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
295 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
296 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
297 }'`
298 # Check for a 64-bit object if we didn't find anything.
299 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; }
300 }'`; fi],[])
301 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
302 ])# _LT_AC_SYS_LIBPATH_AIX
303
304
305 # _LT_AC_SHELL_INIT(ARG)
306 # ----------------------
307 AC_DEFUN([_LT_AC_SHELL_INIT],
308 [ifdef([AC_DIVERSION_NOTICE],
309 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
310 [AC_DIVERT_PUSH(NOTICE)])
311 $1
312 AC_DIVERT_POP
313 ])# _LT_AC_SHELL_INIT
314
1143315
1144316 # _LT_AC_PROG_ECHO_BACKSLASH
1145317 # --------------------------
1146318 # Add some code to the start of the generated configure script which
1147319 # will find an echo command which doesn't interpret backslashes.
1148320 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1149 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1150 [AC_DIVERT_PUSH(NOTICE)])
1151 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1152
321 [_LT_AC_SHELL_INIT([
1153322 # Check that we are running under the correct shell.
1154323 SHELL=${CONFIG_SHELL-/bin/sh}
1155324
1167336 elif test "X[$]1" = X--fallback-echo; then
1168337 # Avoid inline document here, it may be left over
1169338 :
1170 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
339 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1171340 # Yippee, $echo works!
1172341 :
1173342 else
1179348 # used as fallback echo
1180349 shift
1181350 cat <<EOF
1182 $*
351 [$]*
1183352 EOF
1184353 exit 0
1185354 fi
1186355
1187356 # The HP-UX ksh and POSIX shell print the target directory to stdout
1188357 # if CDPATH is set.
1189 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
358 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1190359
1191360 if test -z "$ECHO"; then
1192361 if test "X${echo_test_string+set}" != Xset; then
1193362 # find a string as large as possible, as long as the shell can cope with it
1194363 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1195364 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1196 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1197 echo_test_string="`eval $cmd`" &&
365 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
366 echo_test_string=`eval $cmd` &&
1198367 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1199368 then
1200369 break
1213382 #
1214383 # So, first we look for a working echo in the user's PATH.
1215384
1216 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
385 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1217386 for dir in $PATH /usr/ucb; do
387 IFS="$lt_save_ifs"
1218388 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1219389 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1220390 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1223393 break
1224394 fi
1225395 done
1226 IFS="$save_ifs"
396 IFS="$lt_save_ifs"
1227397
1228398 if test "X$echo" = Xecho; then
1229399 # We didn't find a better echo, so look for alternatives.
1296466 fi
1297467
1298468 AC_SUBST(ECHO)
1299 AC_DIVERT_POP
1300 ])# _LT_AC_PROG_ECHO_BACKSLASH
469 ])])# _LT_AC_PROG_ECHO_BACKSLASH
470
471
472 # _LT_AC_LOCK
473 # -----------
474 AC_DEFUN([_LT_AC_LOCK],
475 [AC_ARG_ENABLE([libtool-lock],
476 [AC_HELP_STRING([--disable-libtool-lock],
477 [avoid locking (might break parallel builds)])])
478 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
479
480 # Some flags need to be propagated to the compiler or linker for good
481 # libtool support.
482 case $host in
483 ia64-*-hpux*)
484 # Find out which ABI we are using.
485 echo 'int i;' > conftest.$ac_ext
486 if AC_TRY_EVAL(ac_compile); then
487 case `/usr/bin/file conftest.$ac_objext` in
488 *ELF-32*)
489 HPUX_IA64_MODE="32"
490 ;;
491 *ELF-64*)
492 HPUX_IA64_MODE="64"
493 ;;
494 esac
495 fi
496 rm -rf conftest*
497 ;;
498 *-*-irix6*)
499 # Find out which ABI we are using.
500 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
501 if AC_TRY_EVAL(ac_compile); then
502 if test "$lt_cv_prog_gnu_ld" = yes; then
503 case `/usr/bin/file conftest.$ac_objext` in
504 *32-bit*)
505 LD="${LD-ld} -melf32bsmip"
506 ;;
507 *N32*)
508 LD="${LD-ld} -melf32bmipn32"
509 ;;
510 *64-bit*)
511 LD="${LD-ld} -melf64bmip"
512 ;;
513 esac
514 else
515 case `/usr/bin/file conftest.$ac_objext` in
516 *32-bit*)
517 LD="${LD-ld} -32"
518 ;;
519 *N32*)
520 LD="${LD-ld} -n32"
521 ;;
522 *64-bit*)
523 LD="${LD-ld} -64"
524 ;;
525 esac
526 fi
527 fi
528 rm -rf conftest*
529 ;;
530
531 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
532 # Find out which ABI we are using.
533 echo 'int i;' > conftest.$ac_ext
534 if AC_TRY_EVAL(ac_compile); then
535 case `/usr/bin/file conftest.o` in
536 *32-bit*)
537 case $host in
538 x86_64-*linux*)
539 LD="${LD-ld} -m elf_i386"
540 ;;
541 ppc64-*linux*|powerpc64-*linux*)
542 LD="${LD-ld} -m elf32ppclinux"
543 ;;
544 s390x-*linux*)
545 LD="${LD-ld} -m elf_s390"
546 ;;
547 sparc64-*linux*)
548 LD="${LD-ld} -m elf32_sparc"
549 ;;
550 esac
551 ;;
552 *64-bit*)
553 case $host in
554 x86_64-*linux*)
555 LD="${LD-ld} -m elf_x86_64"
556 ;;
557 ppc*-*linux*|powerpc*-*linux*)
558 LD="${LD-ld} -m elf64ppc"
559 ;;
560 s390*-*linux*)
561 LD="${LD-ld} -m elf64_s390"
562 ;;
563 sparc*-*linux*)
564 LD="${LD-ld} -m elf64_sparc"
565 ;;
566 esac
567 ;;
568 esac
569 fi
570 rm -rf conftest*
571 ;;
572
573 *-*-sco3.2v5*)
574 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
575 SAVE_CFLAGS="$CFLAGS"
576 CFLAGS="$CFLAGS -belf"
577 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
578 [AC_LANG_PUSH(C)
579 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
580 AC_LANG_POP])
581 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
582 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
583 CFLAGS="$SAVE_CFLAGS"
584 fi
585 ;;
586 sparc*-*solaris*)
587 # Find out which ABI we are using.
588 echo 'int i;' > conftest.$ac_ext
589 if AC_TRY_EVAL(ac_compile); then
590 case `/usr/bin/file conftest.o` in
591 *64-bit*)
592 case $lt_cv_prog_gnu_ld in
593 yes*) LD="${LD-ld} -m elf64_sparc" ;;
594 *) LD="${LD-ld} -64" ;;
595 esac
596 ;;
597 esac
598 fi
599 rm -rf conftest*
600 ;;
601
602 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
603 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
604 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
605 AC_CHECK_TOOL(AS, as, false)
606 AC_CHECK_TOOL(OBJDUMP, objdump, false)
607 ;;
608 ])
609 esac
610
611 need_locks="$enable_libtool_lock"
612
613 ])# _LT_AC_LOCK
614
615
616 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
617 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
618 # ----------------------------------------------------------------
619 # Check whether the given compiler option works
620 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
621 [AC_REQUIRE([LT_AC_PROG_SED])
622 AC_CACHE_CHECK([$1], [$2],
623 [$2=no
624 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
625 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
626 lt_compiler_flag="$3"
627 # Insert the option either (1) after the last *FLAGS variable, or
628 # (2) before a word containing "conftest.", or (3) at the end.
629 # Note that $ac_compile itself does not contain backslashes and begins
630 # with a dollar sign (not a hyphen), so the echo should work correctly.
631 # The option is referenced via a variable to avoid confusing sed.
632 lt_compile=`echo "$ac_compile" | $SED \
633 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
634 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
635 -e 's:$: $lt_compiler_flag:'`
636 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
637 (eval "$lt_compile" 2>conftest.err)
638 ac_status=$?
639 cat conftest.err >&AS_MESSAGE_LOG_FD
640 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
641 if (exit $ac_status) && test -s "$ac_outfile"; then
642 # The compiler can only warn and ignore the option if not recognized
643 # So say no if there are warnings other than the usual output.
644 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
645 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
646 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
647 $2=yes
648 fi
649 fi
650 $rm conftest*
651 ])
652
653 if test x"[$]$2" = xyes; then
654 ifelse([$5], , :, [$5])
655 else
656 ifelse([$6], , :, [$6])
657 fi
658 ])# AC_LIBTOOL_COMPILER_OPTION
659
660
661 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
662 # [ACTION-SUCCESS], [ACTION-FAILURE])
663 # ------------------------------------------------------------
664 # Check whether the given compiler option works
665 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
666 [AC_CACHE_CHECK([$1], [$2],
667 [$2=no
668 save_LDFLAGS="$LDFLAGS"
669 LDFLAGS="$LDFLAGS $3"
670 printf "$lt_simple_link_test_code" > conftest.$ac_ext
671 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
672 # The linker can only warn and ignore the option if not recognized
673 # So say no if there are warnings
674 if test -s conftest.err; then
675 # Append any errors to the config.log.
676 cat conftest.err 1>&AS_MESSAGE_LOG_FD
677 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
678 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
679 if diff conftest.exp conftest.er2 >/dev/null; then
680 $2=yes
681 fi
682 else
683 $2=yes
684 fi
685 fi
686 $rm conftest*
687 LDFLAGS="$save_LDFLAGS"
688 ])
689
690 if test x"[$]$2" = xyes; then
691 ifelse([$4], , :, [$4])
692 else
693 ifelse([$5], , :, [$5])
694 fi
695 ])# AC_LIBTOOL_LINKER_OPTION
696
697
698 # AC_LIBTOOL_SYS_MAX_CMD_LEN
699 # --------------------------
700 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
701 [# find the maximum length of command line arguments
702 AC_MSG_CHECKING([the maximum length of command line arguments])
703 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
704 i=0
705 teststring="ABCD"
706
707 case $build_os in
708 msdosdjgpp*)
709 # On DJGPP, this test can blow up pretty badly due to problems in libc
710 # (any single argument exceeding 2000 bytes causes a buffer overrun
711 # during glob expansion). Even if it were fixed, the result of this
712 # check would be larger than it should be.
713 lt_cv_sys_max_cmd_len=12288; # 12K is about right
714 ;;
715
716 gnu*)
717 # Under GNU Hurd, this test is not required because there is
718 # no limit to the length of command line arguments.
719 # Libtool will interpret -1 as no limit whatsoever
720 lt_cv_sys_max_cmd_len=-1;
721 ;;
722
723 cygwin* | mingw*)
724 # On Win9x/ME, this test blows up -- it succeeds, but takes
725 # about 5 minutes as the teststring grows exponentially.
726 # Worse, since 9x/ME are not pre-emptively multitasking,
727 # you end up with a "frozen" computer, even though with patience
728 # the test eventually succeeds (with a max line length of 256k).
729 # Instead, let's just punt: use the minimum linelength reported by
730 # all of the supported platforms: 8192 (on NT/2K/XP).
731 lt_cv_sys_max_cmd_len=8192;
732 ;;
733
734 amigaos*)
735 # On AmigaOS with pdksh, this test takes hours, literally.
736 # So we just punt and use a minimum line length of 8192.
737 lt_cv_sys_max_cmd_len=8192;
738 ;;
739
740 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
741 # This has been around since 386BSD, at least. Likely further.
742 if test -x /sbin/sysctl; then
743 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
744 elif test -x /usr/sbin/sysctl; then
745 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
746 else
747 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
748 fi
749 # And add a safety zone
750 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
751 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
752 ;;
753
754 interix*)
755 # We know the value 262144 and hardcode it with a safety zone (like BSD)
756 lt_cv_sys_max_cmd_len=196608
757 ;;
758
759 osf*)
760 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
761 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
762 # nice to cause kernel panics so lets avoid the loop below.
763 # First set a reasonable default.
764 lt_cv_sys_max_cmd_len=16384
765 #
766 if test -x /sbin/sysconfig; then
767 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
768 *1*) lt_cv_sys_max_cmd_len=-1 ;;
769 esac
770 fi
771 ;;
772 sco3.2v5*)
773 lt_cv_sys_max_cmd_len=102400
774 ;;
775 sysv5* | sco5v6* | sysv4.2uw2*)
776 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
777 if test -n "$kargmax"; then
778 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
779 else
780 lt_cv_sys_max_cmd_len=32768
781 fi
782 ;;
783 *)
784 # If test is not a shell built-in, we'll probably end up computing a
785 # maximum length that is only half of the actual maximum length, but
786 # we can't tell.
787 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
788 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
789 = "XX$teststring") >/dev/null 2>&1 &&
790 new_result=`expr "X$teststring" : ".*" 2>&1` &&
791 lt_cv_sys_max_cmd_len=$new_result &&
792 test $i != 17 # 1/2 MB should be enough
793 do
794 i=`expr $i + 1`
795 teststring=$teststring$teststring
796 done
797 teststring=
798 # Add a significant safety factor because C++ compilers can tack on massive
799 # amounts of additional arguments before passing them to the linker.
800 # It appears as though 1/2 is a usable value.
801 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
802 ;;
803 esac
804 ])
805 if test -n $lt_cv_sys_max_cmd_len ; then
806 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
807 else
808 AC_MSG_RESULT(none)
809 fi
810 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
811
812
813 # _LT_AC_CHECK_DLFCN
814 # ------------------
815 AC_DEFUN([_LT_AC_CHECK_DLFCN],
816 [AC_CHECK_HEADERS(dlfcn.h)dnl
817 ])# _LT_AC_CHECK_DLFCN
818
1301819
1302820 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1303821 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1304 # ------------------------------------------------------------------
822 # ---------------------------------------------------------------------
1305823 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1306 [if test "$cross_compiling" = yes; then :
824 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
825 if test "$cross_compiling" = yes; then :
1307826 [$4]
1308827 else
1309 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1310828 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1311829 lt_status=$lt_dlunknown
1312830 cat > conftest.$ac_ext <<EOF
1367885 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1368886 /* dlclose (self); */
1369887 }
888 else
889 puts (dlerror ());
1370890
1371891 exit (status);
1372892 }]
1373893 EOF
1374894 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1375 (./conftest; exit; ) 2>/dev/null
895 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1376896 lt_status=$?
1377897 case x$lt_status in
1378898 x$lt_dlno_uscore) $1 ;;
1379899 x$lt_dlneed_uscore) $2 ;;
1380 x$lt_unknown|x*) $3 ;;
900 x$lt_dlunknown|x*) $3 ;;
1381901 esac
1382902 else :
1383903 # compilation failed
1387907 rm -fr conftest*
1388908 ])# _LT_AC_TRY_DLOPEN_SELF
1389909
910
1390911 # AC_LIBTOOL_DLOPEN_SELF
1391 # -------------------
912 # ----------------------
1392913 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1393 [if test "x$enable_dlopen" != xyes; then
914 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
915 if test "x$enable_dlopen" != xyes; then
1394916 enable_dlopen=unknown
1395917 enable_dlopen_self=unknown
1396918 enable_dlopen_self_static=unknown
1405927 lt_cv_dlopen_self=yes
1406928 ;;
1407929
1408 cygwin* | mingw* | pw32*)
930 mingw* | pw32*)
1409931 lt_cv_dlopen="LoadLibrary"
1410932 lt_cv_dlopen_libs=
1411933 ;;
1412934
935 cygwin*)
936 lt_cv_dlopen="dlopen"
937 lt_cv_dlopen_libs=
938 ;;
939
940 darwin*)
941 # if libdl is installed we need to link against it
942 AC_CHECK_LIB([dl], [dlopen],
943 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
944 lt_cv_dlopen="dyld"
945 lt_cv_dlopen_libs=
946 lt_cv_dlopen_self=yes
947 ])
948 ;;
949
1413950 *)
1414951 AC_CHECK_FUNC([shl_load],
1415 [lt_cv_dlopen="shl_load"],
952 [lt_cv_dlopen="shl_load"],
1416953 [AC_CHECK_LIB([dld], [shl_load],
1417 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
954 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1418955 [AC_CHECK_FUNC([dlopen],
1419956 [lt_cv_dlopen="dlopen"],
1420957 [AC_CHECK_LIB([dl], [dlopen],
1421 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
958 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1422959 [AC_CHECK_LIB([svld], [dlopen],
1423 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
960 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1424961 [AC_CHECK_LIB([dld], [dld_link],
1425 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
962 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1426963 ])
1427964 ])
1428965 ])
1440977 case $lt_cv_dlopen in
1441978 dlopen)
1442979 save_CPPFLAGS="$CPPFLAGS"
1443 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1444980 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1445981
1446982 save_LDFLAGS="$LDFLAGS"
1447 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
983 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1448984
1449985 save_LIBS="$LIBS"
1450986 LIBS="$lt_cv_dlopen_libs $LIBS"
1457993 ])
1458994
1459995 if test "x$lt_cv_dlopen_self" = xyes; then
1460 LDFLAGS="$LDFLAGS $link_static_flag"
996 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1461997 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1462998 lt_cv_dlopen_self_static, [dnl
1463999 _LT_AC_TRY_DLOPEN_SELF(
14841020 fi
14851021 ])# AC_LIBTOOL_DLOPEN_SELF
14861022
1487 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1488 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1489 # Sed substitution that helps us do robust quoting. It backslashifies
1490 # metacharacters that are still active within double-quoted strings.
1491 Xsed='sed -e s/^X//'
1492 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1493
1494 # Same as above, but do not quote variable references.
1495 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1496
1497 # Sed substitution to delay expansion of an escaped shell variable in a
1498 # double_quote_subst'ed string.
1499 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1500
1501 # Constants:
1502 rm="rm -f"
1503
1504 # Global variables:
1505 default_ofile=libtool
1506 can_build_shared=yes
1507
1508 # All known linkers require a `.a' archive for static linking (except M$VC,
1509 # which needs '.lib').
1510 libext=a
1511 ltmain="$ac_aux_dir/ltmain.sh"
1512 ofile="$default_ofile"
1513 with_gnu_ld="$lt_cv_prog_gnu_ld"
1514 need_locks="$enable_libtool_lock"
1515
1516 old_CC="$CC"
1517 old_CFLAGS="$CFLAGS"
1518
1519 # Set sane defaults for various variables
1520 test -z "$AR" && AR=ar
1521 test -z "$AR_FLAGS" && AR_FLAGS=cru
1522 test -z "$AS" && AS=as
1523 test -z "$CC" && CC=cc
1524 test -z "$DLLTOOL" && DLLTOOL=dlltool
1525 test -z "$LD" && LD=ld
1526 test -z "$LN_S" && LN_S="ln -s"
1527 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1528 test -z "$NM" && NM=nm
1529 test -z "$OBJDUMP" && OBJDUMP=objdump
1530 test -z "$RANLIB" && RANLIB=:
1531 test -z "$STRIP" && STRIP=:
1532 test -z "$ac_objext" && ac_objext=o
1533
1534 if test x"$host" != x"$build"; then
1535 ac_tool_prefix=${host_alias}-
1536 else
1537 ac_tool_prefix=
1538 fi
1539
1540 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1541 case $host_os in
1542 linux-gnu*) ;;
1543 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1544 esac
1545
1546 case $host_os in
1547 aix3*)
1548 # AIX sometimes has problems with the GCC collect2 program. For some
1549 # reason, if we set the COLLECT_NAMES environment variable, the problems
1550 # vanish in a puff of smoke.
1551 if test "X${COLLECT_NAMES+set}" != Xset; then
1552 COLLECT_NAMES=
1553 export COLLECT_NAMES
1554 fi
1555 ;;
1556 esac
1557
1558 # Determine commands to create old-style static archives.
1559 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1560 old_postinstall_cmds='chmod 644 $oldlib'
1561 old_postuninstall_cmds=
1562
1563 if test -n "$RANLIB"; then
1564 case $host_os in
1565 openbsd*)
1566 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1567 ;;
1568 *)
1569 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1570 ;;
1571 esac
1572 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1573 fi
1574
1575 # Allow CC to be a program name with arguments.
1576 set dummy $CC
1577 compiler="[$]2"
1578
1579 AC_MSG_CHECKING([for objdir])
1580 rm -f .libs 2>/dev/null
1581 mkdir .libs 2>/dev/null
1582 if test -d .libs; then
1583 objdir=.libs
1584 else
1585 # MS-DOS does not allow filenames that begin with a dot.
1586 objdir=_libs
1587 fi
1588 rmdir .libs 2>/dev/null
1589 AC_MSG_RESULT($objdir)
1590
1591
1592 AC_ARG_WITH(pic,
1593 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1594 pic_mode="$withval", pic_mode=default)
1595 test -z "$pic_mode" && pic_mode=default
1596
1597 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1598 # in isolation, and that seeing it set (from the cache) indicates that
1599 # the associated values are set (in the cache) correctly too.
1600 AC_MSG_CHECKING([for $compiler option to produce PIC])
1601 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1602 [ lt_cv_prog_cc_pic=
1603 lt_cv_prog_cc_shlib=
1604 lt_cv_prog_cc_wl=
1605 lt_cv_prog_cc_static=
1606 lt_cv_prog_cc_no_builtin=
1607 lt_cv_prog_cc_can_build_shared=$can_build_shared
1608
1609 if test "$GCC" = yes; then
1610 lt_cv_prog_cc_wl='-Wl,'
1611 lt_cv_prog_cc_static='-static'
1612
1613 case $host_os in
1614 aix*)
1615 # Below there is a dirty hack to force normal static linking with -ldl
1616 # The problem is because libdl dynamically linked with both libc and
1617 # libC (AIX C++ library), which obviously doesn't included in libraries
1618 # list by gcc. This cause undefined symbols with -static flags.
1619 # This hack allows C programs to be linked with "-static -ldl", but
1620 # not sure about C++ programs.
1621 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1622 ;;
1623 amigaos*)
1624 # FIXME: we need at least 68020 code to build shared libraries, but
1625 # adding the `-m68020' flag to GCC prevents building anything better,
1626 # like `-m68040'.
1627 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1628 ;;
1629 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1630 # PIC is the default for these OSes.
1631 ;;
1632 darwin* | rhapsody*)
1633 # PIC is the default on this platform
1634 # Common symbols not allowed in MH_DYLIB files
1635 lt_cv_prog_cc_pic='-fno-common'
1636 ;;
1637 cygwin* | mingw* | pw32* | os2*)
1638 # This hack is so that the source file can tell whether it is being
1639 # built for inclusion in a dll (and should export symbols for example).
1640 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1641 ;;
1642 sysv4*MP*)
1643 if test -d /usr/nec; then
1644 lt_cv_prog_cc_pic=-Kconform_pic
1645 fi
1646 ;;
1647 *)
1648 lt_cv_prog_cc_pic='-fPIC'
1649 ;;
1650 esac
1651 else
1652 # PORTME Check for PIC flags for the system compiler.
1653 case $host_os in
1654 aix3* | aix4* | aix5*)
1655 lt_cv_prog_cc_wl='-Wl,'
1656 # All AIX code is PIC.
1657 if test "$host_cpu" = ia64; then
1658 # AIX 5 now supports IA64 processor
1659 lt_cv_prog_cc_static='-Bstatic'
1660 else
1661 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1662 fi
1663 ;;
1664
1665 hpux9* | hpux10* | hpux11*)
1666 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1667 lt_cv_prog_cc_wl='-Wl,'
1668 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1669 lt_cv_prog_cc_pic='+Z'
1670 ;;
1671
1672 irix5* | irix6* | nonstopux*)
1673 lt_cv_prog_cc_wl='-Wl,'
1674 lt_cv_prog_cc_static='-non_shared'
1675 # PIC (with -KPIC) is the default.
1676 ;;
1677
1678 cygwin* | mingw* | pw32* | os2*)
1679 # This hack is so that the source file can tell whether it is being
1680 # built for inclusion in a dll (and should export symbols for example).
1681 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1682 ;;
1683
1684 newsos6)
1685 lt_cv_prog_cc_pic='-KPIC'
1686 lt_cv_prog_cc_static='-Bstatic'
1687 ;;
1688
1689 osf3* | osf4* | osf5*)
1690 # All OSF/1 code is PIC.
1691 lt_cv_prog_cc_wl='-Wl,'
1692 lt_cv_prog_cc_static='-non_shared'
1693 ;;
1694
1695 sco3.2v5*)
1696 lt_cv_prog_cc_pic='-Kpic'
1697 lt_cv_prog_cc_static='-dn'
1698 lt_cv_prog_cc_shlib='-belf'
1699 ;;
1700
1701 solaris*)
1702 lt_cv_prog_cc_pic='-KPIC'
1703 lt_cv_prog_cc_static='-Bstatic'
1704 lt_cv_prog_cc_wl='-Wl,'
1705 ;;
1706
1707 sunos4*)
1708 lt_cv_prog_cc_pic='-PIC'
1709 lt_cv_prog_cc_static='-Bstatic'
1710 lt_cv_prog_cc_wl='-Qoption ld '
1711 ;;
1712
1713 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1714 lt_cv_prog_cc_pic='-KPIC'
1715 lt_cv_prog_cc_static='-Bstatic'
1716 lt_cv_prog_cc_wl='-Wl,'
1717 ;;
1718
1719 uts4*)
1720 lt_cv_prog_cc_pic='-pic'
1721 lt_cv_prog_cc_static='-Bstatic'
1722 ;;
1723
1724 sysv4*MP*)
1725 if test -d /usr/nec ;then
1726 lt_cv_prog_cc_pic='-Kconform_pic'
1727 lt_cv_prog_cc_static='-Bstatic'
1728 fi
1729 ;;
1730
1731 *)
1732 lt_cv_prog_cc_can_build_shared=no
1733 ;;
1734 esac
1735 fi
1023
1024 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1025 # ---------------------------------
1026 # Check to see if options -c and -o are simultaneously supported by compiler
1027 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1028 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1029 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1030 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1031 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1032 $rm -r conftest 2>/dev/null
1033 mkdir conftest
1034 cd conftest
1035 mkdir out
1036 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1037
1038 lt_compiler_flag="-o out/conftest2.$ac_objext"
1039 # Insert the option either (1) after the last *FLAGS variable, or
1040 # (2) before a word containing "conftest.", or (3) at the end.
1041 # Note that $ac_compile itself does not contain backslashes and begins
1042 # with a dollar sign (not a hyphen), so the echo should work correctly.
1043 lt_compile=`echo "$ac_compile" | $SED \
1044 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1045 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1046 -e 's:$: $lt_compiler_flag:'`
1047 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1048 (eval "$lt_compile" 2>out/conftest.err)
1049 ac_status=$?
1050 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1051 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1052 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1053 then
1054 # The compiler can only warn and ignore the option if not recognized
1055 # So say no if there are warnings
1056 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1057 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1058 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1059 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1060 fi
1061 fi
1062 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1063 $rm conftest*
1064 # SGI C++ compiler will create directory out/ii_files/ for
1065 # template instantiation
1066 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1067 $rm out/* && rmdir out
1068 cd ..
1069 rmdir conftest
1070 $rm conftest*
17361071 ])
1737 if test -z "$lt_cv_prog_cc_pic"; then
1738 AC_MSG_RESULT([none])
1739 else
1740 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1741
1742 # Check to make sure the pic_flag actually works.
1743 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1744 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1745 save_CFLAGS="$CFLAGS"
1746 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1747 AC_TRY_COMPILE([], [], [dnl
1748 case $host_os in
1749 hpux9* | hpux10* | hpux11*)
1750 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1751 # they create non-PIC objects. So, if there were any warnings, we
1752 # assume that PIC is not supported.
1753 if test -s conftest.err; then
1754 lt_cv_prog_cc_pic_works=no
1755 else
1756 lt_cv_prog_cc_pic_works=yes
1757 fi
1758 ;;
1759 *)
1760 lt_cv_prog_cc_pic_works=yes
1761 ;;
1762 esac
1763 ], [dnl
1764 lt_cv_prog_cc_pic_works=no
1765 ])
1766 CFLAGS="$save_CFLAGS"
1767 ])
1768
1769 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1770 lt_cv_prog_cc_pic=
1771 lt_cv_prog_cc_can_build_shared=no
1772 else
1773 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1774 fi
1775
1776 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1777 fi
1778
1779 # Check for any special shared library compilation flags.
1780 if test -n "$lt_cv_prog_cc_shlib"; then
1781 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1782 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1783 else
1784 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1785 lt_cv_prog_cc_can_build_shared=no
1786 fi
1787 fi
1788
1789 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1790 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1791 lt_cv_prog_cc_static_works=no
1792 save_LDFLAGS="$LDFLAGS"
1793 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1794 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1795 LDFLAGS="$save_LDFLAGS"
1796 ])
1797
1798 # Belt *and* braces to stop my trousers falling down:
1799 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1800 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1801
1802 pic_flag="$lt_cv_prog_cc_pic"
1803 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1804 wl="$lt_cv_prog_cc_wl"
1805 link_static_flag="$lt_cv_prog_cc_static"
1806 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1807 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1808
1809
1810 # Check to see if options -o and -c are simultaneously supported by compiler
1811 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1812 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1813 $rm -r conftest 2>/dev/null
1814 mkdir conftest
1815 cd conftest
1816 echo "int some_variable = 0;" > conftest.$ac_ext
1817 mkdir out
1818 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1819 # that will create temporary files in the current directory regardless of
1820 # the output directory. Thus, making CWD read-only will cause this test
1821 # to fail, enabling locking or at least warning the user not to do parallel
1822 # builds.
1823 chmod -w .
1824 save_CFLAGS="$CFLAGS"
1825 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1826 compiler_c_o=no
1827 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1828 # The compiler can only warn and ignore the option if not recognized
1829 # So say no if there are warnings
1830 if test -s out/conftest.err; then
1831 lt_cv_compiler_c_o=no
1832 else
1833 lt_cv_compiler_c_o=yes
1834 fi
1835 else
1836 # Append any errors to the config.log.
1837 cat out/conftest.err 1>&AC_FD_CC
1838 lt_cv_compiler_c_o=no
1839 fi
1840 CFLAGS="$save_CFLAGS"
1841 chmod u+w .
1842 $rm conftest* out/*
1843 rmdir out
1844 cd ..
1845 rmdir conftest
1846 $rm -r conftest 2>/dev/null
1847 ])
1848 compiler_c_o=$lt_cv_compiler_c_o
1849 AC_MSG_RESULT([$compiler_c_o])
1850
1851 if test x"$compiler_c_o" = x"yes"; then
1852 # Check to see if we can write to a .lo
1853 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1854 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1855 lt_cv_compiler_o_lo=no
1856 save_CFLAGS="$CFLAGS"
1857 CFLAGS="$CFLAGS -c -o conftest.lo"
1858 save_objext="$ac_objext"
1859 ac_objext=lo
1860 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1861 # The compiler can only warn and ignore the option if not recognized
1862 # So say no if there are warnings
1863 if test -s conftest.err; then
1864 lt_cv_compiler_o_lo=no
1865 else
1866 lt_cv_compiler_o_lo=yes
1867 fi
1868 ])
1869 ac_objext="$save_objext"
1870 CFLAGS="$save_CFLAGS"
1871 ])
1872 compiler_o_lo=$lt_cv_compiler_o_lo
1873 AC_MSG_RESULT([$compiler_o_lo])
1874 else
1875 compiler_o_lo=no
1876 fi
1877
1072 ])# AC_LIBTOOL_PROG_CC_C_O
1073
1074
1075 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1076 # -----------------------------------------
18781077 # Check to see if we can do hard links to lock some files if needed
1078 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1079 [AC_REQUIRE([_LT_AC_LOCK])dnl
1080
18791081 hard_links="nottested"
1880 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1082 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
18811083 # do not overwrite the value of need_locks provided by the user
18821084 AC_MSG_CHECKING([if we can lock with hard links])
18831085 hard_links=yes
18881090 ln conftest.a conftest.b 2>/dev/null && hard_links=no
18891091 AC_MSG_RESULT([$hard_links])
18901092 if test "$hard_links" = no; then
1891 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1093 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
18921094 need_locks=warn
18931095 fi
18941096 else
18951097 need_locks=no
18961098 fi
1897
1099 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1100
1101
1102 # AC_LIBTOOL_OBJDIR
1103 # -----------------
1104 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1105 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1106 [rm -f .libs 2>/dev/null
1107 mkdir .libs 2>/dev/null
1108 if test -d .libs; then
1109 lt_cv_objdir=.libs
1110 else
1111 # MS-DOS does not allow filenames that begin with a dot.
1112 lt_cv_objdir=_libs
1113 fi
1114 rmdir .libs 2>/dev/null])
1115 objdir=$lt_cv_objdir
1116 ])# AC_LIBTOOL_OBJDIR
1117
1118
1119 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1120 # ----------------------------------------------
1121 # Check hardcoding attributes.
1122 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1123 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1124 _LT_AC_TAGVAR(hardcode_action, $1)=
1125 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1126 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1127 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1128
1129 # We can hardcode non-existant directories.
1130 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1131 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1132 # have to relink, otherwise we might link with an installed library
1133 # when we should be linking with a yet-to-be-installed one
1134 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1135 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1136 # Linking always hardcodes the temporary library directory.
1137 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1138 else
1139 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1140 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1141 fi
1142 else
1143 # We cannot hardcode anything, or else we can only hardcode existing
1144 # directories.
1145 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1146 fi
1147 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1148
1149 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1150 # Fast installation is not supported
1151 enable_fast_install=no
1152 elif test "$shlibpath_overrides_runpath" = yes ||
1153 test "$enable_shared" = no; then
1154 # Fast installation is not necessary
1155 enable_fast_install=needless
1156 fi
1157 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1158
1159
1160 # AC_LIBTOOL_SYS_LIB_STRIP
1161 # ------------------------
1162 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1163 [striplib=
1164 old_striplib=
1165 AC_MSG_CHECKING([whether stripping libraries is possible])
1166 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1167 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1168 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1169 AC_MSG_RESULT([yes])
1170 else
1171 # FIXME - insert some real tests, host_os isn't really good enough
1172 case $host_os in
1173 darwin*)
1174 if test -n "$STRIP" ; then
1175 striplib="$STRIP -x"
1176 AC_MSG_RESULT([yes])
1177 else
1178 AC_MSG_RESULT([no])
1179 fi
1180 ;;
1181 *)
1182 AC_MSG_RESULT([no])
1183 ;;
1184 esac
1185 fi
1186 ])# AC_LIBTOOL_SYS_LIB_STRIP
1187
1188
1189 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1190 # -----------------------------
1191 # PORTME Fill in your ld.so characteristics
1192 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1193 [AC_MSG_CHECKING([dynamic linker characteristics])
1194 library_names_spec=
1195 libname_spec='lib$name'
1196 soname_spec=
1197 shrext_cmds=".so"
1198 postinstall_cmds=
1199 postuninstall_cmds=
1200 finish_cmds=
1201 finish_eval=
1202 shlibpath_var=
1203 shlibpath_overrides_runpath=unknown
1204 version_type=none
1205 dynamic_linker="$host_os ld.so"
1206 sys_lib_dlsearch_path_spec="/lib /usr/lib"
18981207 if test "$GCC" = yes; then
1899 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1900 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1901 echo "int some_variable = 0;" > conftest.$ac_ext
1902 save_CFLAGS="$CFLAGS"
1903 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1904 compiler_rtti_exceptions=no
1905 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1906 # The compiler can only warn and ignore the option if not recognized
1907 # So say no if there are warnings
1908 if test -s conftest.err; then
1909 compiler_rtti_exceptions=no
1208 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1209 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1210 # if the path contains ";" then we assume it to be the separator
1211 # otherwise default to the standard path separator (i.e. ":") - it is
1212 # assumed that no part of a normal pathname contains ";" but that should
1213 # okay in the real world where ";" in dirpaths is itself problematic.
1214 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1215 else
1216 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1217 fi
1218 else
1219 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1220 fi
1221 need_lib_prefix=unknown
1222 hardcode_into_libs=no
1223
1224 # when you set need_version to no, make sure it does not cause -set_version
1225 # flags to be left without arguments
1226 need_version=unknown
1227
1228 case $host_os in
1229 aix3*)
1230 version_type=linux
1231 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1232 shlibpath_var=LIBPATH
1233
1234 # AIX 3 has no versioning support, so we append a major version to the name.
1235 soname_spec='${libname}${release}${shared_ext}$major'
1236 ;;
1237
1238 aix4* | aix5*)
1239 version_type=linux
1240 need_lib_prefix=no
1241 need_version=no
1242 hardcode_into_libs=yes
1243 if test "$host_cpu" = ia64; then
1244 # AIX 5 supports IA64
1245 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1246 shlibpath_var=LD_LIBRARY_PATH
1247 else
1248 # With GCC up to 2.95.x, collect2 would create an import file
1249 # for dependence libraries. The import file would start with
1250 # the line `#! .'. This would cause the generated library to
1251 # depend on `.', always an invalid library. This was fixed in
1252 # development snapshots of GCC prior to 3.0.
1253 case $host_os in
1254 aix4 | aix4.[[01]] | aix4.[[01]].*)
1255 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1256 echo ' yes '
1257 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1258 :
1259 else
1260 can_build_shared=no
1261 fi
1262 ;;
1263 esac
1264 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1265 # soname into executable. Probably we can add versioning support to
1266 # collect2, so additional links can be useful in future.
1267 if test "$aix_use_runtimelinking" = yes; then
1268 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1269 # instead of lib<name>.a to let people know that these are not
1270 # typical AIX shared libraries.
1271 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19101272 else
1911 compiler_rtti_exceptions=yes
1273 # We preserve .a as extension for shared libraries through AIX4.2
1274 # and later when we are not doing run time linking.
1275 library_names_spec='${libname}${release}.a $libname.a'
1276 soname_spec='${libname}${release}${shared_ext}$major'
19121277 fi
1913 ])
1914 CFLAGS="$save_CFLAGS"
1915 AC_MSG_RESULT([$compiler_rtti_exceptions])
1916
1917 if test "$compiler_rtti_exceptions" = "yes"; then
1918 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1278 shlibpath_var=LIBPATH
1279 fi
1280 ;;
1281
1282 amigaos*)
1283 library_names_spec='$libname.ixlibrary $libname.a'
1284 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1285 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'
1286 ;;
1287
1288 beos*)
1289 library_names_spec='${libname}${shared_ext}'
1290 dynamic_linker="$host_os ld.so"
1291 shlibpath_var=LIBRARY_PATH
1292 ;;
1293
1294 bsdi[[45]]*)
1295 version_type=linux
1296 need_version=no
1297 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1298 soname_spec='${libname}${release}${shared_ext}$major'
1299 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1300 shlibpath_var=LD_LIBRARY_PATH
1301 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1302 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1303 # the default ld.so.conf also contains /usr/contrib/lib and
1304 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1305 # libtool to hard-code these into programs
1306 ;;
1307
1308 cygwin* | mingw* | pw32*)
1309 version_type=windows
1310 shrext_cmds=".dll"
1311 need_version=no
1312 need_lib_prefix=no
1313
1314 case $GCC,$host_os in
1315 yes,cygwin* | yes,mingw* | yes,pw32*)
1316 library_names_spec='$libname.dll.a'
1317 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1318 postinstall_cmds='base_file=`basename \${file}`~
1319 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1320 dldir=$destdir/`dirname \$dlpath`~
1321 test -d \$dldir || mkdir -p \$dldir~
1322 $install_prog $dir/$dlname \$dldir/$dlname~
1323 chmod a+x \$dldir/$dlname'
1324 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1325 dlpath=$dir/\$dldll~
1326 $rm \$dlpath'
1327 shlibpath_overrides_runpath=yes
1328
1329 case $host_os in
1330 cygwin*)
1331 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1332 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1333 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1334 ;;
1335 mingw*)
1336 # MinGW DLLs use traditional 'lib' prefix
1337 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1338 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1339 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1340 # It is most probably a Windows format PATH printed by
1341 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1342 # path with ; separators, and with drive letters. We can handle the
1343 # drive letters (cygwin fileutils understands them), so leave them,
1344 # especially as we might pass files found there to a mingw objdump,
1345 # which wouldn't understand a cygwinified path. Ahh.
1346 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1347 else
1348 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1349 fi
1350 ;;
1351 pw32*)
1352 # pw32 DLLs use 'pw' prefix rather than 'lib'
1353 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1354 ;;
1355 esac
1356 ;;
1357
1358 *)
1359 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1360 ;;
1361 esac
1362 dynamic_linker='Win32 ld.exe'
1363 # FIXME: first we should search . and the directory the executable is in
1364 shlibpath_var=PATH
1365 ;;
1366
1367 darwin* | rhapsody*)
1368 dynamic_linker="$host_os dyld"
1369 version_type=darwin
1370 need_lib_prefix=no
1371 need_version=no
1372 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1373 soname_spec='${libname}${release}${major}$shared_ext'
1374 shlibpath_overrides_runpath=yes
1375 shlibpath_var=DYLD_LIBRARY_PATH
1376 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1377 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1378 if test "$GCC" = yes; then
1379 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
19191380 else
1920 no_builtin_flag=' -fno-builtin'
1381 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1382 fi
1383 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1384 ;;
1385
1386 dgux*)
1387 version_type=linux
1388 need_lib_prefix=no
1389 need_version=no
1390 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1391 soname_spec='${libname}${release}${shared_ext}$major'
1392 shlibpath_var=LD_LIBRARY_PATH
1393 ;;
1394
1395 freebsd1*)
1396 dynamic_linker=no
1397 ;;
1398
1399 freebsd* | dragonfly*)
1400 # DragonFly does not have aout. When/if they implement a new
1401 # versioning mechanism, adjust this.
1402 if test -x /usr/bin/objformat; then
1403 objformat=`/usr/bin/objformat`
1404 else
1405 case $host_os in
1406 freebsd[[123]]*) objformat=aout ;;
1407 *) objformat=elf ;;
1408 esac
1409 fi
1410 version_type=freebsd-$objformat
1411 case $version_type in
1412 freebsd-elf*)
1413 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1414 need_version=no
1415 need_lib_prefix=no
1416 ;;
1417 freebsd-*)
1418 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1419 need_version=yes
1420 ;;
1421 esac
1422 shlibpath_var=LD_LIBRARY_PATH
1423 case $host_os in
1424 freebsd2*)
1425 shlibpath_overrides_runpath=yes
1426 ;;
1427 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1428 shlibpath_overrides_runpath=yes
1429 hardcode_into_libs=yes
1430 ;;
1431 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1432 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1433 shlibpath_overrides_runpath=no
1434 hardcode_into_libs=yes
1435 ;;
1436 freebsd*) # from 4.6 on
1437 shlibpath_overrides_runpath=yes
1438 hardcode_into_libs=yes
1439 ;;
1440 esac
1441 ;;
1442
1443 gnu*)
1444 version_type=linux
1445 need_lib_prefix=no
1446 need_version=no
1447 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1448 soname_spec='${libname}${release}${shared_ext}$major'
1449 shlibpath_var=LD_LIBRARY_PATH
1450 hardcode_into_libs=yes
1451 ;;
1452
1453 hpux9* | hpux10* | hpux11*)
1454 # Give a soname corresponding to the major version so that dld.sl refuses to
1455 # link against other versions.
1456 version_type=sunos
1457 need_lib_prefix=no
1458 need_version=no
1459 case $host_cpu in
1460 ia64*)
1461 shrext_cmds='.so'
1462 hardcode_into_libs=yes
1463 dynamic_linker="$host_os dld.so"
1464 shlibpath_var=LD_LIBRARY_PATH
1465 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1467 soname_spec='${libname}${release}${shared_ext}$major'
1468 if test "X$HPUX_IA64_MODE" = X32; then
1469 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1470 else
1471 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1472 fi
1473 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1474 ;;
1475 hppa*64*)
1476 shrext_cmds='.sl'
1477 hardcode_into_libs=yes
1478 dynamic_linker="$host_os dld.sl"
1479 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1480 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1481 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1482 soname_spec='${libname}${release}${shared_ext}$major'
1483 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1484 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1485 ;;
1486 *)
1487 shrext_cmds='.sl'
1488 dynamic_linker="$host_os dld.sl"
1489 shlibpath_var=SHLIB_PATH
1490 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1491 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1492 soname_spec='${libname}${release}${shared_ext}$major'
1493 ;;
1494 esac
1495 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1496 postinstall_cmds='chmod 555 $lib'
1497 ;;
1498
1499 interix3*)
1500 version_type=linux
1501 need_lib_prefix=no
1502 need_version=no
1503 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1504 soname_spec='${libname}${release}${shared_ext}$major'
1505 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1506 shlibpath_var=LD_LIBRARY_PATH
1507 shlibpath_overrides_runpath=no
1508 hardcode_into_libs=yes
1509 ;;
1510
1511 irix5* | irix6* | nonstopux*)
1512 case $host_os in
1513 nonstopux*) version_type=nonstopux ;;
1514 *)
1515 if test "$lt_cv_prog_gnu_ld" = yes; then
1516 version_type=linux
1517 else
1518 version_type=irix
1519 fi ;;
1520 esac
1521 need_lib_prefix=no
1522 need_version=no
1523 soname_spec='${libname}${release}${shared_ext}$major'
1524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1525 case $host_os in
1526 irix5* | nonstopux*)
1527 libsuff= shlibsuff=
1528 ;;
1529 *)
1530 case $LD in # libtool.m4 will add one of these switches to LD
1531 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1532 libsuff= shlibsuff= libmagic=32-bit;;
1533 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1534 libsuff=32 shlibsuff=N32 libmagic=N32;;
1535 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1536 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1537 *) libsuff= shlibsuff= libmagic=never-match;;
1538 esac
1539 ;;
1540 esac
1541 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1542 shlibpath_overrides_runpath=no
1543 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1544 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1545 hardcode_into_libs=yes
1546 ;;
1547
1548 # No shared lib support for Linux oldld, aout, or coff.
1549 linux*oldld* | linux*aout* | linux*coff*)
1550 dynamic_linker=no
1551 ;;
1552
1553 # This must be Linux ELF.
1554 linux* | k*bsd*-gnu)
1555 version_type=linux
1556 need_lib_prefix=no
1557 need_version=no
1558 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1559 soname_spec='${libname}${release}${shared_ext}$major'
1560 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1561 shlibpath_var=LD_LIBRARY_PATH
1562 shlibpath_overrides_runpath=no
1563 # This implies no fast_install, which is unacceptable.
1564 # Some rework will be needed to allow for fast_install
1565 # before this can be enabled.
1566 hardcode_into_libs=yes
1567
1568 # Append ld.so.conf contents to the search path
1569 if test -f /etc/ld.so.conf; then
1570 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1571 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1572 fi
1573
1574 # We used to test for /lib/ld.so.1 and disable shared libraries on
1575 # powerpc, because MkLinux only supported shared libraries with the
1576 # GNU dynamic linker. Since this was broken with cross compilers,
1577 # most powerpc-linux boxes support dynamic linking these days and
1578 # people can always --disable-shared, the test was removed, and we
1579 # assume the GNU/Linux dynamic linker is in use.
1580 dynamic_linker='GNU/Linux ld.so'
1581 ;;
1582
1583 netbsdelf*-gnu)
1584 version_type=linux
1585 need_lib_prefix=no
1586 need_version=no
1587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1588 soname_spec='${libname}${release}${shared_ext}$major'
1589 shlibpath_var=LD_LIBRARY_PATH
1590 shlibpath_overrides_runpath=no
1591 hardcode_into_libs=yes
1592 dynamic_linker='NetBSD ld.elf_so'
1593 ;;
1594
1595 netbsd*)
1596 version_type=sunos
1597 need_lib_prefix=no
1598 need_version=no
1599 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1601 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1602 dynamic_linker='NetBSD (a.out) ld.so'
1603 else
1604 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1605 soname_spec='${libname}${release}${shared_ext}$major'
1606 dynamic_linker='NetBSD ld.elf_so'
1607 fi
1608 shlibpath_var=LD_LIBRARY_PATH
1609 shlibpath_overrides_runpath=yes
1610 hardcode_into_libs=yes
1611 ;;
1612
1613 newsos6)
1614 version_type=linux
1615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1616 shlibpath_var=LD_LIBRARY_PATH
1617 shlibpath_overrides_runpath=yes
1618 ;;
1619
1620 nto-qnx*)
1621 version_type=linux
1622 need_lib_prefix=no
1623 need_version=no
1624 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1625 soname_spec='${libname}${release}${shared_ext}$major'
1626 shlibpath_var=LD_LIBRARY_PATH
1627 shlibpath_overrides_runpath=yes
1628 ;;
1629
1630 openbsd*)
1631 version_type=sunos
1632 sys_lib_dlsearch_path_spec="/usr/lib"
1633 need_lib_prefix=no
1634 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1635 case $host_os in
1636 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1637 *) need_version=no ;;
1638 esac
1639 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1640 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1641 shlibpath_var=LD_LIBRARY_PATH
1642 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1643 case $host_os in
1644 openbsd2.[[89]] | openbsd2.[[89]].*)
1645 shlibpath_overrides_runpath=no
1646 ;;
1647 *)
1648 shlibpath_overrides_runpath=yes
1649 ;;
1650 esac
1651 else
1652 shlibpath_overrides_runpath=yes
1653 fi
1654 ;;
1655
1656 os2*)
1657 libname_spec='$name'
1658 shrext_cmds=".dll"
1659 need_lib_prefix=no
1660 library_names_spec='$libname${shared_ext} $libname.a'
1661 dynamic_linker='OS/2 ld.exe'
1662 shlibpath_var=LIBPATH
1663 ;;
1664
1665 osf3* | osf4* | osf5*)
1666 version_type=osf
1667 need_lib_prefix=no
1668 need_version=no
1669 soname_spec='${libname}${release}${shared_ext}$major'
1670 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1671 shlibpath_var=LD_LIBRARY_PATH
1672 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1673 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1674 ;;
1675
1676 solaris*)
1677 version_type=linux
1678 need_lib_prefix=no
1679 need_version=no
1680 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1681 soname_spec='${libname}${release}${shared_ext}$major'
1682 shlibpath_var=LD_LIBRARY_PATH
1683 shlibpath_overrides_runpath=yes
1684 hardcode_into_libs=yes
1685 # ldd complains unless libraries are executable
1686 postinstall_cmds='chmod +x $lib'
1687 ;;
1688
1689 sunos4*)
1690 version_type=sunos
1691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1692 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1693 shlibpath_var=LD_LIBRARY_PATH
1694 shlibpath_overrides_runpath=yes
1695 if test "$with_gnu_ld" = yes; then
1696 need_lib_prefix=no
1697 fi
1698 need_version=yes
1699 ;;
1700
1701 sysv4 | sysv4.3*)
1702 version_type=linux
1703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1704 soname_spec='${libname}${release}${shared_ext}$major'
1705 shlibpath_var=LD_LIBRARY_PATH
1706 case $host_vendor in
1707 sni)
1708 shlibpath_overrides_runpath=no
1709 need_lib_prefix=no
1710 export_dynamic_flag_spec='${wl}-Blargedynsym'
1711 runpath_var=LD_RUN_PATH
1712 ;;
1713 siemens)
1714 need_lib_prefix=no
1715 ;;
1716 motorola)
1717 need_lib_prefix=no
1718 need_version=no
1719 shlibpath_overrides_runpath=no
1720 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1721 ;;
1722 esac
1723 ;;
1724
1725 sysv4*MP*)
1726 if test -d /usr/nec ;then
1727 version_type=linux
1728 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1729 soname_spec='$libname${shared_ext}.$major'
1730 shlibpath_var=LD_LIBRARY_PATH
1731 fi
1732 ;;
1733
1734 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1735 version_type=freebsd-elf
1736 need_lib_prefix=no
1737 need_version=no
1738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1739 soname_spec='${libname}${release}${shared_ext}$major'
1740 shlibpath_var=LD_LIBRARY_PATH
1741 hardcode_into_libs=yes
1742 if test "$with_gnu_ld" = yes; then
1743 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1744 shlibpath_overrides_runpath=no
1745 else
1746 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1747 shlibpath_overrides_runpath=yes
1748 case $host_os in
1749 sco3.2v5*)
1750 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1751 ;;
1752 esac
1753 fi
1754 sys_lib_dlsearch_path_spec='/usr/lib'
1755 ;;
1756
1757 uts4*)
1758 version_type=linux
1759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1760 soname_spec='${libname}${release}${shared_ext}$major'
1761 shlibpath_var=LD_LIBRARY_PATH
1762 ;;
1763
1764 *)
1765 dynamic_linker=no
1766 ;;
1767 esac
1768 AC_MSG_RESULT([$dynamic_linker])
1769 test "$dynamic_linker" = no && can_build_shared=no
1770
1771 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1772 if test "$GCC" = yes; then
1773 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1774 fi
1775 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1776
1777
1778 # _LT_AC_TAGCONFIG
1779 # ----------------
1780 AC_DEFUN([_LT_AC_TAGCONFIG],
1781 [AC_ARG_WITH([tags],
1782 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1783 [include additional configurations @<:@automatic@:>@])],
1784 [tagnames="$withval"])
1785
1786 if test -f "$ltmain" && test -n "$tagnames"; then
1787 if test ! -f "${ofile}"; then
1788 AC_MSG_WARN([output file `$ofile' does not exist])
1789 fi
1790
1791 if test -z "$LTCC"; then
1792 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1793 if test -z "$LTCC"; then
1794 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1795 else
1796 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1797 fi
1798 fi
1799 if test -z "$LTCFLAGS"; then
1800 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1801 fi
1802
1803 # Extract list of available tagged configurations in $ofile.
1804 # Note that this assumes the entire list is on one line.
1805 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1806
1807 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1808 for tagname in $tagnames; do
1809 IFS="$lt_save_ifs"
1810 # Check whether tagname contains only valid characters
1811 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1812 "") ;;
1813 *) AC_MSG_ERROR([invalid tag name: $tagname])
1814 ;;
1815 esac
1816
1817 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1818 then
1819 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1820 fi
1821
1822 # Update the list of available tags.
1823 if test -n "$tagname"; then
1824 echo appending configuration tag \"$tagname\" to $ofile
1825
1826 case $tagname in
1827 CXX)
1828 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1829 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1830 (test "X$CXX" != "Xg++"))) ; then
1831 AC_LIBTOOL_LANG_CXX_CONFIG
1832 else
1833 tagname=""
1834 fi
1835 ;;
1836
1837 F77)
1838 if test -n "$F77" && test "X$F77" != "Xno"; then
1839 AC_LIBTOOL_LANG_F77_CONFIG
1840 else
1841 tagname=""
1842 fi
1843 ;;
1844
1845 GCJ)
1846 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1847 AC_LIBTOOL_LANG_GCJ_CONFIG
1848 else
1849 tagname=""
1850 fi
1851 ;;
1852
1853 RC)
1854 AC_LIBTOOL_LANG_RC_CONFIG
1855 ;;
1856
1857 *)
1858 AC_MSG_ERROR([Unsupported tag name: $tagname])
1859 ;;
1860 esac
1861
1862 # Append the new tag name to the list of available tags.
1863 if test -n "$tagname" ; then
1864 available_tags="$available_tags $tagname"
1865 fi
1866 fi
1867 done
1868 IFS="$lt_save_ifs"
1869
1870 # Now substitute the updated list of available tags.
1871 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1872 mv "${ofile}T" "$ofile"
1873 chmod +x "$ofile"
1874 else
1875 rm -f "${ofile}T"
1876 AC_MSG_ERROR([unable to update list of available tagged configurations.])
19211877 fi
19221878 fi
1923
1924 # See if the linker supports building shared libraries.
1925 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1926
1927 allow_undefined_flag=
1928 no_undefined_flag=
1929 need_lib_prefix=unknown
1930 need_version=unknown
1931 # when you set need_version to no, make sure it does not cause -set_version
1932 # flags to be left without arguments
1933 archive_cmds=
1934 archive_expsym_cmds=
1935 old_archive_from_new_cmds=
1936 old_archive_from_expsyms_cmds=
1937 export_dynamic_flag_spec=
1938 whole_archive_flag_spec=
1939 thread_safe_flag_spec=
1940 hardcode_into_libs=no
1941 hardcode_libdir_flag_spec=
1942 hardcode_libdir_separator=
1943 hardcode_direct=no
1944 hardcode_minus_L=no
1945 hardcode_shlibpath_var=unsupported
1946 runpath_var=
1947 link_all_deplibs=unknown
1948 always_export_symbols=no
1949 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1950 # include_expsyms should be a list of space-separated symbols to be *always*
1951 # included in the symbol list
1952 include_expsyms=
1953 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1954 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1955 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1956 # as well as any symbol that contains `d'.
1957 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1958 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1959 # platforms (ab)use it in PIC code, but their linkers get confused if
1960 # the symbol is explicitly referenced. Since portable code cannot
1961 # rely on this symbol name, it's probably fine to never include it in
1962 # preloaded symbol tables.
1963 extract_expsyms_cmds=
1964
1879 ])# _LT_AC_TAGCONFIG
1880
1881
1882 # AC_LIBTOOL_DLOPEN
1883 # -----------------
1884 # enable checks for dlopen support
1885 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1886 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1887 ])# AC_LIBTOOL_DLOPEN
1888
1889
1890 # AC_LIBTOOL_WIN32_DLL
1891 # --------------------
1892 # declare package support for building win32 DLLs
1893 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1894 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1895 ])# AC_LIBTOOL_WIN32_DLL
1896
1897
1898 # AC_ENABLE_SHARED([DEFAULT])
1899 # ---------------------------
1900 # implement the --enable-shared flag
1901 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1902 AC_DEFUN([AC_ENABLE_SHARED],
1903 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1904 AC_ARG_ENABLE([shared],
1905 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1906 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1907 [p=${PACKAGE-default}
1908 case $enableval in
1909 yes) enable_shared=yes ;;
1910 no) enable_shared=no ;;
1911 *)
1912 enable_shared=no
1913 # Look at the argument we got. We use all the common list separators.
1914 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1915 for pkg in $enableval; do
1916 IFS="$lt_save_ifs"
1917 if test "X$pkg" = "X$p"; then
1918 enable_shared=yes
1919 fi
1920 done
1921 IFS="$lt_save_ifs"
1922 ;;
1923 esac],
1924 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1925 ])# AC_ENABLE_SHARED
1926
1927
1928 # AC_DISABLE_SHARED
1929 # -----------------
1930 # set the default shared flag to --disable-shared
1931 AC_DEFUN([AC_DISABLE_SHARED],
1932 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1933 AC_ENABLE_SHARED(no)
1934 ])# AC_DISABLE_SHARED
1935
1936
1937 # AC_ENABLE_STATIC([DEFAULT])
1938 # ---------------------------
1939 # implement the --enable-static flag
1940 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1941 AC_DEFUN([AC_ENABLE_STATIC],
1942 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1943 AC_ARG_ENABLE([static],
1944 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1945 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1946 [p=${PACKAGE-default}
1947 case $enableval in
1948 yes) enable_static=yes ;;
1949 no) enable_static=no ;;
1950 *)
1951 enable_static=no
1952 # Look at the argument we got. We use all the common list separators.
1953 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1954 for pkg in $enableval; do
1955 IFS="$lt_save_ifs"
1956 if test "X$pkg" = "X$p"; then
1957 enable_static=yes
1958 fi
1959 done
1960 IFS="$lt_save_ifs"
1961 ;;
1962 esac],
1963 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1964 ])# AC_ENABLE_STATIC
1965
1966
1967 # AC_DISABLE_STATIC
1968 # -----------------
1969 # set the default static flag to --disable-static
1970 AC_DEFUN([AC_DISABLE_STATIC],
1971 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1972 AC_ENABLE_STATIC(no)
1973 ])# AC_DISABLE_STATIC
1974
1975
1976 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1977 # ---------------------------------
1978 # implement the --enable-fast-install flag
1979 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1980 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1981 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1982 AC_ARG_ENABLE([fast-install],
1983 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1984 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1985 [p=${PACKAGE-default}
1986 case $enableval in
1987 yes) enable_fast_install=yes ;;
1988 no) enable_fast_install=no ;;
1989 *)
1990 enable_fast_install=no
1991 # Look at the argument we got. We use all the common list separators.
1992 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1993 for pkg in $enableval; do
1994 IFS="$lt_save_ifs"
1995 if test "X$pkg" = "X$p"; then
1996 enable_fast_install=yes
1997 fi
1998 done
1999 IFS="$lt_save_ifs"
2000 ;;
2001 esac],
2002 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2003 ])# AC_ENABLE_FAST_INSTALL
2004
2005
2006 # AC_DISABLE_FAST_INSTALL
2007 # -----------------------
2008 # set the default to --disable-fast-install
2009 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2010 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2011 AC_ENABLE_FAST_INSTALL(no)
2012 ])# AC_DISABLE_FAST_INSTALL
2013
2014
2015 # AC_LIBTOOL_PICMODE([MODE])
2016 # --------------------------
2017 # implement the --with-pic flag
2018 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2019 AC_DEFUN([AC_LIBTOOL_PICMODE],
2020 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2021 pic_mode=ifelse($#,1,$1,default)
2022 ])# AC_LIBTOOL_PICMODE
2023
2024
2025 # AC_PROG_EGREP
2026 # -------------
2027 # This is predefined starting with Autoconf 2.54, so this conditional
2028 # definition can be removed once we require Autoconf 2.54 or later.
2029 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2030 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2031 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2032 then ac_cv_prog_egrep='grep -E'
2033 else ac_cv_prog_egrep='egrep'
2034 fi])
2035 EGREP=$ac_cv_prog_egrep
2036 AC_SUBST([EGREP])
2037 ])])
2038
2039
2040 # AC_PATH_TOOL_PREFIX
2041 # -------------------
2042 # find a file program which can recognise shared library
2043 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2044 [AC_REQUIRE([AC_PROG_EGREP])dnl
2045 AC_MSG_CHECKING([for $1])
2046 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2047 [case $MAGIC_CMD in
2048 [[\\/*] | ?:[\\/]*])
2049 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2050 ;;
2051 *)
2052 lt_save_MAGIC_CMD="$MAGIC_CMD"
2053 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2054 dnl $ac_dummy forces splitting on constant user-supplied paths.
2055 dnl POSIX.2 word splitting is done only on the output of word expansions,
2056 dnl not every word. This closes a longstanding sh security hole.
2057 ac_dummy="ifelse([$2], , $PATH, [$2])"
2058 for ac_dir in $ac_dummy; do
2059 IFS="$lt_save_ifs"
2060 test -z "$ac_dir" && ac_dir=.
2061 if test -f $ac_dir/$1; then
2062 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2063 if test -n "$file_magic_test_file"; then
2064 case $deplibs_check_method in
2065 "file_magic "*)
2066 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2067 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2068 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2069 $EGREP "$file_magic_regex" > /dev/null; then
2070 :
2071 else
2072 cat <<EOF 1>&2
2073
2074 *** Warning: the command libtool uses to detect shared libraries,
2075 *** $file_magic_cmd, produces output that libtool cannot recognize.
2076 *** The result is that libtool may fail to recognize shared libraries
2077 *** as such. This will affect the creation of libtool libraries that
2078 *** depend on shared libraries, but programs linked with such libtool
2079 *** libraries will work regardless of this problem. Nevertheless, you
2080 *** may want to report the problem to your system manager and/or to
2081 *** bug-libtool@gnu.org
2082
2083 EOF
2084 fi ;;
2085 esac
2086 fi
2087 break
2088 fi
2089 done
2090 IFS="$lt_save_ifs"
2091 MAGIC_CMD="$lt_save_MAGIC_CMD"
2092 ;;
2093 esac])
2094 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2095 if test -n "$MAGIC_CMD"; then
2096 AC_MSG_RESULT($MAGIC_CMD)
2097 else
2098 AC_MSG_RESULT(no)
2099 fi
2100 ])# AC_PATH_TOOL_PREFIX
2101
2102
2103 # AC_PATH_MAGIC
2104 # -------------
2105 # find a file program which can recognise a shared library
2106 AC_DEFUN([AC_PATH_MAGIC],
2107 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2108 if test -z "$lt_cv_path_MAGIC_CMD"; then
2109 if test -n "$ac_tool_prefix"; then
2110 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2111 else
2112 MAGIC_CMD=:
2113 fi
2114 fi
2115 ])# AC_PATH_MAGIC
2116
2117
2118 # AC_PROG_LD
2119 # ----------
2120 # find the pathname to the GNU or non-GNU linker
2121 AC_DEFUN([AC_PROG_LD],
2122 [AC_ARG_WITH([gnu-ld],
2123 [AC_HELP_STRING([--with-gnu-ld],
2124 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2125 [test "$withval" = no || with_gnu_ld=yes],
2126 [with_gnu_ld=no])
2127 AC_REQUIRE([LT_AC_PROG_SED])dnl
2128 AC_REQUIRE([AC_PROG_CC])dnl
2129 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2130 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2131 ac_prog=ld
2132 if test "$GCC" = yes; then
2133 # Check if gcc -print-prog-name=ld gives a path.
2134 AC_MSG_CHECKING([for ld used by $CC])
2135 case $host in
2136 *-*-mingw*)
2137 # gcc leaves a trailing carriage return which upsets mingw
2138 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2139 *)
2140 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2141 esac
2142 case $ac_prog in
2143 # Accept absolute paths.
2144 [[\\/]]* | ?:[[\\/]]*)
2145 re_direlt='/[[^/]][[^/]]*/\.\./'
2146 # Canonicalize the pathname of ld
2147 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2148 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2149 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2150 done
2151 test -z "$LD" && LD="$ac_prog"
2152 ;;
2153 "")
2154 # If it fails, then pretend we aren't using GCC.
2155 ac_prog=ld
2156 ;;
2157 *)
2158 # If it is relative, then search for the first ld in PATH.
2159 with_gnu_ld=unknown
2160 ;;
2161 esac
2162 elif test "$with_gnu_ld" = yes; then
2163 AC_MSG_CHECKING([for GNU ld])
2164 else
2165 AC_MSG_CHECKING([for non-GNU ld])
2166 fi
2167 AC_CACHE_VAL(lt_cv_path_LD,
2168 [if test -z "$LD"; then
2169 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2170 for ac_dir in $PATH; do
2171 IFS="$lt_save_ifs"
2172 test -z "$ac_dir" && ac_dir=.
2173 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2174 lt_cv_path_LD="$ac_dir/$ac_prog"
2175 # Check to see if the program is GNU ld. I'd rather use --version,
2176 # but apparently some variants of GNU ld only accept -v.
2177 # Break only if it was the GNU/non-GNU ld that we prefer.
2178 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2179 *GNU* | *'with BFD'*)
2180 test "$with_gnu_ld" != no && break
2181 ;;
2182 *)
2183 test "$with_gnu_ld" != yes && break
2184 ;;
2185 esac
2186 fi
2187 done
2188 IFS="$lt_save_ifs"
2189 else
2190 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2191 fi])
2192 LD="$lt_cv_path_LD"
2193 if test -n "$LD"; then
2194 AC_MSG_RESULT($LD)
2195 else
2196 AC_MSG_RESULT(no)
2197 fi
2198 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2199 AC_PROG_LD_GNU
2200 ])# AC_PROG_LD
2201
2202
2203 # AC_PROG_LD_GNU
2204 # --------------
2205 AC_DEFUN([AC_PROG_LD_GNU],
2206 [AC_REQUIRE([AC_PROG_EGREP])dnl
2207 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2208 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2209 case `$LD -v 2>&1 </dev/null` in
2210 *GNU* | *'with BFD'*)
2211 lt_cv_prog_gnu_ld=yes
2212 ;;
2213 *)
2214 lt_cv_prog_gnu_ld=no
2215 ;;
2216 esac])
2217 with_gnu_ld=$lt_cv_prog_gnu_ld
2218 ])# AC_PROG_LD_GNU
2219
2220
2221 # AC_PROG_LD_RELOAD_FLAG
2222 # ----------------------
2223 # find reload flag for linker
2224 # -- PORTME Some linkers may need a different reload flag.
2225 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2226 [AC_CACHE_CHECK([for $LD option to reload object files],
2227 lt_cv_ld_reload_flag,
2228 [lt_cv_ld_reload_flag='-r'])
2229 reload_flag=$lt_cv_ld_reload_flag
2230 case $reload_flag in
2231 "" | " "*) ;;
2232 *) reload_flag=" $reload_flag" ;;
2233 esac
2234 reload_cmds='$LD$reload_flag -o $output$reload_objs'
19652235 case $host_os in
1966 cygwin* | mingw* | pw32*)
1967 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1968 # When not using gcc, we currently assume that we are using
1969 # Microsoft Visual C++.
1970 if test "$GCC" != yes; then
2236 darwin*)
2237 if test "$GCC" = yes; then
2238 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2239 else
2240 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2241 fi
2242 ;;
2243 esac
2244 ])# AC_PROG_LD_RELOAD_FLAG
2245
2246
2247 # AC_DEPLIBS_CHECK_METHOD
2248 # -----------------------
2249 # how to check for library dependencies
2250 # -- PORTME fill in with the dynamic library characteristics
2251 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2252 [AC_CACHE_CHECK([how to recognise dependent libraries],
2253 lt_cv_deplibs_check_method,
2254 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2255 lt_cv_file_magic_test_file=
2256 lt_cv_deplibs_check_method='unknown'
2257 # Need to set the preceding variable on all platforms that support
2258 # interlibrary dependencies.
2259 # 'none' -- dependencies not supported.
2260 # `unknown' -- same as none, but documents that we really don't know.
2261 # 'pass_all' -- all dependencies passed with no checks.
2262 # 'test_compile' -- check by making test program.
2263 # 'file_magic [[regex]]' -- check by looking for files in library path
2264 # which responds to the $file_magic_cmd with a given extended regex.
2265 # If you have `file' or equivalent on your system and you're not sure
2266 # whether `pass_all' will *always* work, you probably want this one.
2267
2268 case $host_os in
2269 aix4* | aix5*)
2270 lt_cv_deplibs_check_method=pass_all
2271 ;;
2272
2273 beos*)
2274 lt_cv_deplibs_check_method=pass_all
2275 ;;
2276
2277 bsdi[[45]]*)
2278 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2279 lt_cv_file_magic_cmd='/usr/bin/file -L'
2280 lt_cv_file_magic_test_file=/shlib/libc.so
2281 ;;
2282
2283 cygwin*)
2284 # func_win32_libid is a shell function defined in ltmain.sh
2285 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2286 lt_cv_file_magic_cmd='func_win32_libid'
2287 ;;
2288
2289 mingw* | pw32*)
2290 # Base MSYS/MinGW do not provide the 'file' command needed by
2291 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2292 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2293 lt_cv_file_magic_cmd='$OBJDUMP -f'
2294 ;;
2295
2296 darwin* | rhapsody*)
2297 lt_cv_deplibs_check_method=pass_all
2298 ;;
2299
2300 freebsd* | dragonfly*)
2301 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2302 case $host_cpu in
2303 i*86 )
2304 # Not sure whether the presence of OpenBSD here was a mistake.
2305 # Let's accept both of them until this is cleared up.
2306 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2307 lt_cv_file_magic_cmd=/usr/bin/file
2308 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2309 ;;
2310 esac
2311 else
2312 lt_cv_deplibs_check_method=pass_all
2313 fi
2314 ;;
2315
2316 gnu*)
2317 lt_cv_deplibs_check_method=pass_all
2318 ;;
2319
2320 hpux10.20* | hpux11*)
2321 lt_cv_file_magic_cmd=/usr/bin/file
2322 case $host_cpu in
2323 ia64*)
2324 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2325 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2326 ;;
2327 hppa*64*)
2328 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2329 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2330 ;;
2331 *)
2332 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2333 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2334 ;;
2335 esac
2336 ;;
2337
2338 interix3*)
2339 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2340 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2341 ;;
2342
2343 irix5* | irix6* | nonstopux*)
2344 case $LD in
2345 *-32|*"-32 ") libmagic=32-bit;;
2346 *-n32|*"-n32 ") libmagic=N32;;
2347 *-64|*"-64 ") libmagic=64-bit;;
2348 *) libmagic=never-match;;
2349 esac
2350 lt_cv_deplibs_check_method=pass_all
2351 ;;
2352
2353 # This must be Linux ELF.
2354 linux* | k*bsd*-gnu)
2355 lt_cv_deplibs_check_method=pass_all
2356 ;;
2357
2358 netbsd* | netbsdelf*-gnu)
2359 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2360 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2361 else
2362 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2363 fi
2364 ;;
2365
2366 newos6*)
2367 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2368 lt_cv_file_magic_cmd=/usr/bin/file
2369 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2370 ;;
2371
2372 nto-qnx*)
2373 lt_cv_deplibs_check_method=unknown
2374 ;;
2375
2376 openbsd*)
2377 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2378 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2379 else
2380 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2381 fi
2382 ;;
2383
2384 osf3* | osf4* | osf5*)
2385 lt_cv_deplibs_check_method=pass_all
2386 ;;
2387
2388 solaris*)
2389 lt_cv_deplibs_check_method=pass_all
2390 ;;
2391
2392 sysv4 | sysv4.3*)
2393 case $host_vendor in
2394 motorola)
2395 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]]'
2396 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2397 ;;
2398 ncr)
2399 lt_cv_deplibs_check_method=pass_all
2400 ;;
2401 sequent)
2402 lt_cv_file_magic_cmd='/bin/file'
2403 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2404 ;;
2405 sni)
2406 lt_cv_file_magic_cmd='/bin/file'
2407 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2408 lt_cv_file_magic_test_file=/lib/libc.so
2409 ;;
2410 siemens)
2411 lt_cv_deplibs_check_method=pass_all
2412 ;;
2413 pc)
2414 lt_cv_deplibs_check_method=pass_all
2415 ;;
2416 esac
2417 ;;
2418
2419 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2420 lt_cv_deplibs_check_method=pass_all
2421 ;;
2422 esac
2423 ])
2424 file_magic_cmd=$lt_cv_file_magic_cmd
2425 deplibs_check_method=$lt_cv_deplibs_check_method
2426 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2427 ])# AC_DEPLIBS_CHECK_METHOD
2428
2429
2430 # AC_PROG_NM
2431 # ----------
2432 # find the pathname to a BSD-compatible name lister
2433 AC_DEFUN([AC_PROG_NM],
2434 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2435 [if test -n "$NM"; then
2436 # Let the user override the test.
2437 lt_cv_path_NM="$NM"
2438 else
2439 lt_nm_to_check="${ac_tool_prefix}nm"
2440 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2441 lt_nm_to_check="$lt_nm_to_check nm"
2442 fi
2443 for lt_tmp_nm in $lt_nm_to_check; do
2444 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2445 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2446 IFS="$lt_save_ifs"
2447 test -z "$ac_dir" && ac_dir=.
2448 tmp_nm="$ac_dir/$lt_tmp_nm"
2449 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2450 # Check to see if the nm accepts a BSD-compat flag.
2451 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2452 # nm: unknown option "B" ignored
2453 # Tru64's nm complains that /dev/null is an invalid object file
2454 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2455 */dev/null* | *'Invalid file or object type'*)
2456 lt_cv_path_NM="$tmp_nm -B"
2457 break
2458 ;;
2459 *)
2460 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2461 */dev/null*)
2462 lt_cv_path_NM="$tmp_nm -p"
2463 break
2464 ;;
2465 *)
2466 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2467 continue # so that we can try to find one that supports BSD flags
2468 ;;
2469 esac
2470 ;;
2471 esac
2472 fi
2473 done
2474 IFS="$lt_save_ifs"
2475 done
2476 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2477 fi])
2478 NM="$lt_cv_path_NM"
2479 ])# AC_PROG_NM
2480
2481
2482 # AC_CHECK_LIBM
2483 # -------------
2484 # check for math library
2485 AC_DEFUN([AC_CHECK_LIBM],
2486 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2487 LIBM=
2488 case $host in
2489 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2490 # These system don't have libm, or don't need it
2491 ;;
2492 *-ncr-sysv4.3*)
2493 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2494 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2495 ;;
2496 *)
2497 AC_CHECK_LIB(m, cos, LIBM="-lm")
2498 ;;
2499 esac
2500 ])# AC_CHECK_LIBM
2501
2502
2503 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2504 # -----------------------------------
2505 # sets LIBLTDL to the link flags for the libltdl convenience library and
2506 # LTDLINCL to the include flags for the libltdl header and adds
2507 # --enable-ltdl-convenience to the configure arguments. Note that
2508 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2509 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2510 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2511 # (note the single quotes!). If your package is not flat and you're not
2512 # using automake, define top_builddir and top_srcdir appropriately in
2513 # the Makefiles.
2514 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2515 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2516 case $enable_ltdl_convenience in
2517 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2518 "") enable_ltdl_convenience=yes
2519 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2520 esac
2521 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2522 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2523 # For backwards non-gettext consistent compatibility...
2524 INCLTDL="$LTDLINCL"
2525 ])# AC_LIBLTDL_CONVENIENCE
2526
2527
2528 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2529 # -----------------------------------
2530 # sets LIBLTDL to the link flags for the libltdl installable library and
2531 # LTDLINCL to the include flags for the libltdl header and adds
2532 # --enable-ltdl-install to the configure arguments. Note that
2533 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2534 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2535 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2536 # '${top_srcdir}/' (note the single quotes!). If your package is not
2537 # flat and you're not using automake, define top_builddir and top_srcdir
2538 # appropriately in the Makefiles.
2539 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2540 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2541 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2542 AC_CHECK_LIB(ltdl, lt_dlinit,
2543 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2544 [if test x"$enable_ltdl_install" = xno; then
2545 AC_MSG_WARN([libltdl not installed, but installation disabled])
2546 else
2547 enable_ltdl_install=yes
2548 fi
2549 ])
2550 if test x"$enable_ltdl_install" = x"yes"; then
2551 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2552 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2553 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2554 else
2555 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2556 LIBLTDL="-lltdl"
2557 LTDLINCL=
2558 fi
2559 # For backwards non-gettext consistent compatibility...
2560 INCLTDL="$LTDLINCL"
2561 ])# AC_LIBLTDL_INSTALLABLE
2562
2563
2564 # AC_LIBTOOL_CXX
2565 # --------------
2566 # enable support for C++ libraries
2567 AC_DEFUN([AC_LIBTOOL_CXX],
2568 [AC_REQUIRE([_LT_AC_LANG_CXX])
2569 ])# AC_LIBTOOL_CXX
2570
2571
2572 # _LT_AC_LANG_CXX
2573 # ---------------
2574 AC_DEFUN([_LT_AC_LANG_CXX],
2575 [AC_REQUIRE([AC_PROG_CXX])
2576 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2577 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2578 ])# _LT_AC_LANG_CXX
2579
2580 # _LT_AC_PROG_CXXCPP
2581 # ------------------
2582 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2583 [
2584 AC_REQUIRE([AC_PROG_CXX])
2585 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2586 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2587 (test "X$CXX" != "Xg++"))) ; then
2588 AC_PROG_CXXCPP
2589 fi
2590 ])# _LT_AC_PROG_CXXCPP
2591
2592 # AC_LIBTOOL_F77
2593 # --------------
2594 # enable support for Fortran 77 libraries
2595 AC_DEFUN([AC_LIBTOOL_F77],
2596 [AC_REQUIRE([_LT_AC_LANG_F77])
2597 ])# AC_LIBTOOL_F77
2598
2599
2600 # _LT_AC_LANG_F77
2601 # ---------------
2602 AC_DEFUN([_LT_AC_LANG_F77],
2603 [AC_REQUIRE([AC_PROG_F77])
2604 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2605 ])# _LT_AC_LANG_F77
2606
2607
2608 # AC_LIBTOOL_GCJ
2609 # --------------
2610 # enable support for GCJ libraries
2611 AC_DEFUN([AC_LIBTOOL_GCJ],
2612 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2613 ])# AC_LIBTOOL_GCJ
2614
2615
2616 # _LT_AC_LANG_GCJ
2617 # ---------------
2618 AC_DEFUN([_LT_AC_LANG_GCJ],
2619 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2620 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2621 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2622 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2623 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2624 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2625 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2626 ])# _LT_AC_LANG_GCJ
2627
2628
2629 # AC_LIBTOOL_RC
2630 # -------------
2631 # enable support for Windows resource files
2632 AC_DEFUN([AC_LIBTOOL_RC],
2633 [AC_REQUIRE([LT_AC_PROG_RC])
2634 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2635 ])# AC_LIBTOOL_RC
2636
2637
2638 # AC_LIBTOOL_LANG_C_CONFIG
2639 # ------------------------
2640 # Ensure that the configuration vars for the C compiler are
2641 # suitably defined. Those variables are subsequently used by
2642 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2643 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2644 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2645 [lt_save_CC="$CC"
2646 AC_LANG_PUSH(C)
2647
2648 # Source file extension for C test sources.
2649 ac_ext=c
2650
2651 # Object file extension for compiled C test sources.
2652 objext=o
2653 _LT_AC_TAGVAR(objext, $1)=$objext
2654
2655 # Code to be used in simple compile tests
2656 lt_simple_compile_test_code="int some_variable = 0;\n"
2657
2658 # Code to be used in simple link tests
2659 lt_simple_link_test_code='int main(){return(0);}\n'
2660
2661 _LT_AC_SYS_COMPILER
2662
2663 # save warnings/boilerplate of simple test code
2664 _LT_COMPILER_BOILERPLATE
2665 _LT_LINKER_BOILERPLATE
2666
2667 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2668 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2669 AC_LIBTOOL_PROG_CC_C_O($1)
2670 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2671 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2672 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2673 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2674 AC_LIBTOOL_SYS_LIB_STRIP
2675 AC_LIBTOOL_DLOPEN_SELF
2676
2677 # Report which library types will actually be built
2678 AC_MSG_CHECKING([if libtool supports shared libraries])
2679 AC_MSG_RESULT([$can_build_shared])
2680
2681 AC_MSG_CHECKING([whether to build shared libraries])
2682 test "$can_build_shared" = "no" && enable_shared=no
2683
2684 # On AIX, shared libraries and static libraries use the same namespace, and
2685 # are all built from PIC.
2686 case $host_os in
2687 aix3*)
2688 test "$enable_shared" = yes && enable_static=no
2689 if test -n "$RANLIB"; then
2690 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2691 postinstall_cmds='$RANLIB $lib'
2692 fi
2693 ;;
2694
2695 aix4* | aix5*)
2696 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2697 test "$enable_shared" = yes && enable_static=no
2698 fi
2699 ;;
2700 esac
2701 AC_MSG_RESULT([$enable_shared])
2702
2703 AC_MSG_CHECKING([whether to build static libraries])
2704 # Make sure either enable_shared or enable_static is yes.
2705 test "$enable_shared" = yes || enable_static=yes
2706 AC_MSG_RESULT([$enable_static])
2707
2708 AC_LIBTOOL_CONFIG($1)
2709
2710 AC_LANG_POP
2711 CC="$lt_save_CC"
2712 ])# AC_LIBTOOL_LANG_C_CONFIG
2713
2714
2715 # AC_LIBTOOL_LANG_CXX_CONFIG
2716 # --------------------------
2717 # Ensure that the configuration vars for the C compiler are
2718 # suitably defined. Those variables are subsequently used by
2719 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2720 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2721 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2722 [AC_LANG_PUSH(C++)
2723 AC_REQUIRE([AC_PROG_CXX])
2724 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2725
2726 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2727 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2728 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2729 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2730 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2731 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2732 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2733 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2734 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2735 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2736 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2737 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2738 _LT_AC_TAGVAR(module_cmds, $1)=
2739 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2740 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2741 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2742 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2743 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2744 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2745
2746 # Dependencies to place before and after the object being linked:
2747 _LT_AC_TAGVAR(predep_objects, $1)=
2748 _LT_AC_TAGVAR(postdep_objects, $1)=
2749 _LT_AC_TAGVAR(predeps, $1)=
2750 _LT_AC_TAGVAR(postdeps, $1)=
2751 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2752
2753 # Source file extension for C++ test sources.
2754 ac_ext=cpp
2755
2756 # Object file extension for compiled C++ test sources.
2757 objext=o
2758 _LT_AC_TAGVAR(objext, $1)=$objext
2759
2760 # Code to be used in simple compile tests
2761 lt_simple_compile_test_code="int some_variable = 0;\n"
2762
2763 # Code to be used in simple link tests
2764 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2765
2766 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2767 _LT_AC_SYS_COMPILER
2768
2769 # save warnings/boilerplate of simple test code
2770 _LT_COMPILER_BOILERPLATE
2771 _LT_LINKER_BOILERPLATE
2772
2773 # Allow CC to be a program name with arguments.
2774 lt_save_CC=$CC
2775 lt_save_LD=$LD
2776 lt_save_GCC=$GCC
2777 GCC=$GXX
2778 lt_save_with_gnu_ld=$with_gnu_ld
2779 lt_save_path_LD=$lt_cv_path_LD
2780 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2781 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2782 else
2783 $as_unset lt_cv_prog_gnu_ld
2784 fi
2785 if test -n "${lt_cv_path_LDCXX+set}"; then
2786 lt_cv_path_LD=$lt_cv_path_LDCXX
2787 else
2788 $as_unset lt_cv_path_LD
2789 fi
2790 test -z "${LDCXX+set}" || LD=$LDCXX
2791 CC=${CXX-"c++"}
2792 compiler=$CC
2793 _LT_AC_TAGVAR(compiler, $1)=$CC
2794 _LT_CC_BASENAME([$compiler])
2795
2796 # We don't want -fno-exception wen compiling C++ code, so set the
2797 # no_builtin_flag separately
2798 if test "$GXX" = yes; then
2799 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2800 else
2801 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2802 fi
2803
2804 if test "$GXX" = yes; then
2805 # Set up default GNU C++ configuration
2806
2807 AC_PROG_LD
2808
2809 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2810 # archiving commands below assume that GNU ld is being used.
2811 if test "$with_gnu_ld" = yes; then
2812 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2813 _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'
2814
2815 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2816 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2817
2818 # If archive_cmds runs LD, not CC, wlarc should be empty
2819 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2820 # investigate it a little bit more. (MM)
2821 wlarc='${wl}'
2822
2823 # ancient GNU ld didn't support --whole-archive et. al.
2824 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2825 grep 'no-whole-archive' > /dev/null; then
2826 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2827 else
2828 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2829 fi
2830 else
19712831 with_gnu_ld=no
2832 wlarc=
2833
2834 # A generic and very simple default shared library creation
2835 # command for GNU C++ for the case where it uses the native
2836 # linker, instead of GNU ld. If possible, this setting should
2837 # overridden to take advantage of the native linker features on
2838 # the platform it is being used on.
2839 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
19722840 fi
1973 ;;
1974 openbsd*)
2841
2842 # Commands to make compiler produce verbose output that lists
2843 # what "hidden" libraries, object files and flags are used when
2844 # linking a shared library.
2845 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2846
2847 else
2848 GXX=no
19752849 with_gnu_ld=no
1976 ;;
1977 esac
1978
1979 ld_shlibs=yes
1980 if test "$with_gnu_ld" = yes; then
1981 # If archive_cmds runs LD, not CC, wlarc should be empty
1982 wlarc='${wl}'
1983
1984 # See if GNU ld supports shared libraries.
1985 case $host_os in
1986 aix3* | aix4* | aix5*)
1987 # On AIX, the GNU linker is very broken
1988 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1989 ld_shlibs=no
1990 cat <<EOF 1>&2
1991
1992 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1993 *** to be unable to reliably create shared libraries on AIX.
1994 *** Therefore, libtool is disabling shared libraries support. If you
1995 *** really care for shared libraries, you may want to modify your PATH
1996 *** so that a non-GNU linker is found, and then restart.
1997
1998 EOF
1999 ;;
2000
2001 amigaos*)
2002 archive_cmds='$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)'
2003 hardcode_libdir_flag_spec='-L$libdir'
2004 hardcode_minus_L=yes
2005
2006 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2007 # that the semantics of dynamic libraries on AmigaOS, at least up
2008 # to version 4, is to share data among multiple programs linked
2009 # with the same dynamic library. Since this doesn't match the
2010 # behavior of shared libraries on other platforms, we can use
2011 # them.
2012 ld_shlibs=no
2013 ;;
2014
2015 beos*)
2016 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2017 allow_undefined_flag=unsupported
2018 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2019 # support --undefined. This deserves some investigation. FIXME
2020 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2021 else
2022 ld_shlibs=no
2023 fi
2024 ;;
2025
2026 cygwin* | mingw* | pw32*)
2027 # hardcode_libdir_flag_spec is actually meaningless, as there is
2028 # no search path for DLLs.
2029 hardcode_libdir_flag_spec='-L$libdir'
2030 allow_undefined_flag=unsupported
2031 always_export_symbols=yes
2032
2033 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2034 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2035 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2036 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2037 else $CC -o impgen impgen.c ; fi)~
2038 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2039
2040 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2041
2042 # cygwin and mingw dlls have different entry points and sets of symbols
2043 # to exclude.
2044 # FIXME: what about values for MSVC?
2045 dll_entry=__cygwin_dll_entry@12
2046 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2047 case $host_os in
2048 mingw*)
2049 # mingw values
2050 dll_entry=_DllMainCRTStartup@12
2051 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2052 ;;
2053 esac
2054
2055 # mingw and cygwin differ, and it's simplest to just exclude the union
2056 # of the two symbol sets.
2057 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2058
2059 # recent cygwin and mingw systems supply a stub DllMain which the user
2060 # can override, but on older systems we have to supply one (in ltdll.c)
2061 if test "x$lt_cv_need_dllmain" = "xyes"; then
2062 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2063 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~
2064 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2065 else
2066 ltdll_obj=
2067 ltdll_cmds=
2068 fi
2069
2070 # Extract the symbol export list from an `--export-all' def file,
2071 # then regenerate the def file from the symbol export list, so that
2072 # the compiled dll only exports the symbol export list.
2073 # Be careful not to strip the DATA tag left be newer dlltools.
2074 export_symbols_cmds="$ltdll_cmds"'
2075 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2076 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2077
2078 # If the export-symbols file already is a .def file (1st line
2079 # is EXPORTS), use it as is.
2080 # If DATA tags from a recent dlltool are present, honour them!
2081 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2082 cp $export_symbols $output_objdir/$soname-def;
2083 else
2084 echo EXPORTS > $output_objdir/$soname-def;
2085 _lt_hint=1;
2086 cat $export_symbols | while read symbol; do
2087 set dummy \$symbol;
2088 case \[$]# in
2089 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2090 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2091 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2092 esac;
2093 _lt_hint=`expr 1 + \$_lt_hint`;
2094 done;
2095 fi~
2096 '"$ltdll_cmds"'
2097 $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~
2098 $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~
2099 $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~
2100 $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~
2101 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2102 ;;
2103
2104 netbsd*)
2105 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2106 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2107 wlarc=
2108 else
2109 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2110 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2111 fi
2112 ;;
2113
2114 solaris* | sysv5*)
2115 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2116 ld_shlibs=no
2117 cat <<EOF 1>&2
2118
2119 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2120 *** create shared libraries on Solaris systems. Therefore, libtool
2121 *** is disabling shared libraries support. We urge you to upgrade GNU
2122 *** binutils to release 2.9.1 or newer. Another option is to modify
2123 *** your PATH or compiler configuration so that the native linker is
2124 *** used, and then restart.
2125
2126 EOF
2127 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2128 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2129 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2130 else
2131 ld_shlibs=no
2132 fi
2133 ;;
2134
2135 sunos4*)
2136 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2137 wlarc=
2138 hardcode_direct=yes
2139 hardcode_shlibpath_var=no
2140 ;;
2141
2142 *)
2143 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2144 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2145 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2146 else
2147 ld_shlibs=no
2148 fi
2149 ;;
2150 esac
2151
2152 if test "$ld_shlibs" = yes; then
2153 runpath_var=LD_RUN_PATH
2154 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2155 export_dynamic_flag_spec='${wl}--export-dynamic'
2156 case $host_os in
2157 cygwin* | mingw* | pw32*)
2158 # dlltool doesn't understand --whole-archive et. al.
2159 whole_archive_flag_spec=
2160 ;;
2161 *)
2162 # ancient GNU ld didn't support --whole-archive et. al.
2163 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2164 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2165 else
2166 whole_archive_flag_spec=
2167 fi
2168 ;;
2169 esac
2170 fi
2171 else
2172 # PORTME fill in a description of your system's linker (not GNU ld)
2173 case $host_os in
2850 wlarc=
2851 fi
2852
2853 # PORTME: fill in a description of your system's C++ link characteristics
2854 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2855 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2856 case $host_os in
21742857 aix3*)
2175 allow_undefined_flag=unsupported
2176 always_export_symbols=yes
2177 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2178 # Note: this linker hardcodes the directories in LIBPATH if there
2179 # are no directories specified by -L.
2180 hardcode_minus_L=yes
2181 if test "$GCC" = yes && test -z "$link_static_flag"; then
2182 # Neither direct hardcoding nor static linking is supported with a
2183 # broken collect2.
2184 hardcode_direct=unsupported
2185 fi
2186 ;;
2187
2858 # FIXME: insert proper C++ library support
2859 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2860 ;;
21882861 aix4* | aix5*)
21892862 if test "$host_cpu" = ia64; then
21902863 # On IA64, the linker does run time linking by default, so we don't
22042877 *-brtl*)
22052878 aix_use_runtimelinking=yes
22062879 break
2207 ;;
2880 ;;
22082881 esac
22092882 done
2883 ;;
22102884 esac
22112885
22122886 exp_sym_flag='-bexport'
22192893 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
22202894 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
22212895
2222 hardcode_direct=yes
2223 archive_cmds=''
2224 hardcode_libdir_separator=':'
2225 if test "$GCC" = yes; then
2896 _LT_AC_TAGVAR(archive_cmds, $1)=''
2897 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2898 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2899 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2900
2901 if test "$GXX" = yes; then
22262902 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2903 # We only want to do this on AIX 4.2 and lower, the check
2904 # below for broken collect2 doesn't work under 4.3+
22272905 collect2name=`${CC} -print-prog-name=collect2`
22282906 if test -f "$collect2name" && \
2229 strings "$collect2name" | grep resolve_lib_name >/dev/null
2907 strings "$collect2name" | grep resolve_lib_name >/dev/null
22302908 then
22312909 # We have reworked collect2
2232 hardcode_direct=yes
2910 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
22332911 else
22342912 # We have old collect2
2235 hardcode_direct=unsupported
2913 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
22362914 # It fails to find uninstalled libraries when the uninstalled
22372915 # path is not listed in the libpath. Setting hardcode_minus_L
22382916 # to unsupported forces relinking
2239 hardcode_minus_L=yes
2240 hardcode_libdir_flag_spec='-L$libdir'
2241 hardcode_libdir_separator=
2917 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2918 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2919 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
22422920 fi
2921 ;;
22432922 esac
2244
22452923 shared_flag='-shared'
2924 if test "$aix_use_runtimelinking" = yes; then
2925 shared_flag="$shared_flag "'${wl}-G'
2926 fi
22462927 else
22472928 # not using gcc
22482929 if test "$host_cpu" = ia64; then
2249 shared_flag='${wl}-G'
2930 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2931 # chokes on -Wl,-G. The following line is correct:
2932 shared_flag='-G'
22502933 else
22512934 if test "$aix_use_runtimelinking" = yes; then
22522935 shared_flag='${wl}-G'
22562939 fi
22572940 fi
22582941
2259 # It seems that -bexpall can do strange things, so it is better to
2260 # generate a list of symbols to export.
2261 always_export_symbols=yes
2942 # It seems that -bexpall does not export symbols beginning with
2943 # underscore (_), so it is better to generate a list of symbols to export.
2944 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
22622945 if test "$aix_use_runtimelinking" = yes; then
22632946 # Warning - without using the other runtime loading flags (-brtl),
22642947 # -berok will link without error, but may produce a broken library.
2265 allow_undefined_flag='-berok'
2266 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2267 archive_expsym_cmds="\$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"
2268 else
2948 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2949 # Determine the default libpath from the value encoded in an empty executable.
2950 _LT_AC_SYS_LIBPATH_AIX
2951 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2952
2953 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2954 else
22692955 if test "$host_cpu" = ia64; then
2270 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2271 allow_undefined_flag="-z nodefs"
2272 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2956 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2957 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2958 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
22732959 else
2274 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2960 # Determine the default libpath from the value encoded in an empty executable.
2961 _LT_AC_SYS_LIBPATH_AIX
2962 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
22752963 # Warning - without using the other run time loading flags,
22762964 # -berok will link without error, but may produce a broken library.
2277 allow_undefined_flag='${wl}-berok'
2278 # This is a bit strange, but is similar to how AIX traditionally builds
2279 # it's shared libraries.
2280 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2965 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2966 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2967 # Exported symbols can be pulled into shared objects from archives
2968 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2969 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2970 # This is similar to how AIX traditionally builds its shared libraries.
2971 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
22812972 fi
22822973 fi
22832974 ;;
22842975
2285 amigaos*)
2286 archive_cmds='$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)'
2287 hardcode_libdir_flag_spec='-L$libdir'
2288 hardcode_minus_L=yes
2289 # see comment about different semantics on the GNU ld section
2290 ld_shlibs=no
2976 beos*)
2977 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2978 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2979 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2980 # support --undefined. This deserves some investigation. FIXME
2981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2982 else
2983 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2984 fi
2985 ;;
2986
2987 chorus*)
2988 case $cc_basename in
2989 *)
2990 # FIXME: insert proper C++ library support
2991 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2992 ;;
2993 esac
22912994 ;;
22922995
22932996 cygwin* | mingw* | pw32*)
2294 # When not using gcc, we currently assume that we are using
2295 # Microsoft Visual C++.
2296 # hardcode_libdir_flag_spec is actually meaningless, as there is
2297 # no search path for DLLs.
2298 hardcode_libdir_flag_spec=' '
2299 allow_undefined_flag=unsupported
2300 # Tell ltmain to make .lib files, not .a files.
2301 libext=lib
2302 # FIXME: Setting linknames here is a bad hack.
2303 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2304 # The linker will automatically build a .lib file if we build a DLL.
2305 old_archive_from_new_cmds='true'
2306 # FIXME: Should let the user specify the lib program.
2307 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2308 fix_srcfile_path='`cygpath -w "$srcfile"`'
2309 ;;
2310
2311 darwin* | rhapsody*)
2312 case "$host_os" in
2313 rhapsody* | darwin1.[[012]])
2314 allow_undefined_flag='-undefined suppress'
2315 ;;
2316 *) # Darwin 1.3 on
2317 allow_undefined_flag='-flat_namespace -undefined suppress'
2318 ;;
2997 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2998 # as there is no search path for DLLs.
2999 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3000 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3001 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3002 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3003
3004 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3005 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3006 # If the export-symbols file already is a .def file (1st line
3007 # is EXPORTS), use it as is; otherwise, prepend...
3008 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3009 cp $export_symbols $output_objdir/$soname.def;
3010 else
3011 echo EXPORTS > $output_objdir/$soname.def;
3012 cat $export_symbols >> $output_objdir/$soname.def;
3013 fi~
3014 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3015 else
3016 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3017 fi
3018 ;;
3019 darwin* | rhapsody*)
3020 case $host_os in
3021 rhapsody* | darwin1.[[012]])
3022 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3023 ;;
3024 *) # Darwin 1.3 on
3025 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3026 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3027 else
3028 case ${MACOSX_DEPLOYMENT_TARGET} in
3029 10.[[012]])
3030 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3031 ;;
3032 10.*)
3033 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3034 ;;
3035 esac
3036 fi
3037 ;;
3038 esac
3039 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3040 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3041 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3042 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3043 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3044 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3045
3046 if test "$GXX" = yes ; then
3047 lt_int_apple_cc_single_mod=no
3048 output_verbose_link_cmd='echo'
3049 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3050 lt_int_apple_cc_single_mod=yes
3051 fi
3052 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3053 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3054 else
3055 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3056 fi
3057 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3058 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3059 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3060 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3061 else
3062 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3063 fi
3064 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3065 else
3066 case $cc_basename in
3067 xlc*)
3068 output_verbose_link_cmd='echo'
3069 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3070 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3071 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3072 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3073 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3074 ;;
3075 *)
3076 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3077 ;;
3078 esac
3079 fi
3080 ;;
3081
3082 dgux*)
3083 case $cc_basename in
3084 ec++*)
3085 # FIXME: insert proper C++ library support
3086 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3087 ;;
3088 ghcx*)
3089 # Green Hills C++ Compiler
3090 # FIXME: insert proper C++ library support
3091 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3092 ;;
3093 *)
3094 # FIXME: insert proper C++ library support
3095 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3096 ;;
23193097 esac
2320 # FIXME: Relying on posixy $() will cause problems for
2321 # cross-compilation, but unfortunately the echo tests do not
2322 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2323 # `"' quotes if we put them in here... so don't!
2324 archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2325 # We need to add '_' to the symbols in $export_symbols first
2326 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2327 hardcode_direct=yes
2328 hardcode_shlibpath_var=no
2329 whole_archive_flag_spec='-all_load $convenience'
2330 ;;
2331
2332 freebsd1*)
2333 ld_shlibs=no
2334 ;;
2335
2336 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2337 # support. Future versions do this automatically, but an explicit c++rt0.o
2338 # does not break anything, and helps significantly (at the cost of a little
2339 # extra space).
2340 freebsd2.2*)
2341 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2342 hardcode_libdir_flag_spec='-R$libdir'
2343 hardcode_direct=yes
2344 hardcode_shlibpath_var=no
2345 ;;
2346
2347 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2348 freebsd2*)
2349 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2350 hardcode_direct=yes
2351 hardcode_minus_L=yes
2352 hardcode_shlibpath_var=no
2353 ;;
2354
2355 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2356 freebsd*)
2357 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2358 hardcode_libdir_flag_spec='-R$libdir'
2359 hardcode_direct=yes
2360 hardcode_shlibpath_var=no
2361 ;;
2362
2363 hpux9* | hpux10* | hpux11*)
2364 case $host_os in
2365 hpux9*) archive_cmds='$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' ;;
2366 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
3098 ;;
3099 freebsd[[12]]*)
3100 # C++ shared libraries reported to be fairly broken before switch to ELF
3101 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3102 ;;
3103 freebsd-elf*)
3104 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3105 ;;
3106 freebsd* | dragonfly*)
3107 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3108 # conventions
3109 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3110 ;;
3111 gnu*)
3112 ;;
3113 hpux9*)
3114 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3115 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3116 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3117 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3118 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3119 # but as the default
3120 # location of the library.
3121
3122 case $cc_basename in
3123 CC*)
3124 # FIXME: insert proper C++ library support
3125 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3126 ;;
3127 aCC*)
3128 _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'
3129 # Commands to make compiler produce verbose output that lists
3130 # what "hidden" libraries, object files and flags are used when
3131 # linking a shared library.
3132 #
3133 # There doesn't appear to be a way to prevent this compiler from
3134 # explicitly linking system object files so we need to strip them
3135 # from the output so that they don't get included in the library
3136 # dependencies.
3137 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3138 ;;
3139 *)
3140 if test "$GXX" = yes; then
3141 _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'
3142 else
3143 # FIXME: insert proper C++ library support
3144 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3145 fi
3146 ;;
23673147 esac
2368 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2369 hardcode_libdir_separator=:
2370 hardcode_direct=yes
2371 hardcode_minus_L=yes # Not in the search PATH, but as the default
2372 # location of the library.
2373 export_dynamic_flag_spec='${wl}-E'
2374 ;;
2375
2376 irix5* | irix6* | nonstopux*)
2377 if test "$GCC" = yes; then
2378 archive_cmds='$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'
2379 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2380 else
2381 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2382 hardcode_libdir_flag_spec='-rpath $libdir'
2383 fi
2384 hardcode_libdir_separator=:
2385 link_all_deplibs=yes
2386 ;;
2387
2388 netbsd*)
2389 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2390 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2391 else
2392 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2393 fi
2394 hardcode_libdir_flag_spec='-R$libdir'
2395 hardcode_direct=yes
2396 hardcode_shlibpath_var=no
2397 ;;
2398
2399 newsos6)
2400 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2401 hardcode_direct=yes
2402 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2403 hardcode_libdir_separator=:
2404 hardcode_shlibpath_var=no
2405 ;;
2406
2407 openbsd*)
2408 hardcode_direct=yes
2409 hardcode_shlibpath_var=no
2410 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2411 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2412 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2413 export_dynamic_flag_spec='${wl}-E'
2414 else
2415 case "$host_os" in
2416 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2417 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2418 hardcode_libdir_flag_spec='-R$libdir'
3148 ;;
3149 hpux10*|hpux11*)
3150 if test $with_gnu_ld = no; then
3151 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3152 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3153
3154 case $host_cpu in
3155 hppa*64*|ia64*)
3156 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
24193157 ;;
24203158 *)
2421 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2422 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3159 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
24233160 ;;
24243161 esac
24253162 fi
2426 ;;
2427
2428 os2*)
2429 hardcode_libdir_flag_spec='-L$libdir'
2430 hardcode_minus_L=yes
2431 allow_undefined_flag=unsupported
2432 archive_cmds='$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'
2433 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2434 ;;
2435
3163 case $host_cpu in
3164 hppa*64*|ia64*)
3165 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3166 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3167 ;;
3168 *)
3169 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3170 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3171 # but as the default
3172 # location of the library.
3173 ;;
3174 esac
3175
3176 case $cc_basename in
3177 CC*)
3178 # FIXME: insert proper C++ library support
3179 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3180 ;;
3181 aCC*)
3182 case $host_cpu in
3183 hppa*64*)
3184 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3185 ;;
3186 ia64*)
3187 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3188 ;;
3189 *)
3190 _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'
3191 ;;
3192 esac
3193 # Commands to make compiler produce verbose output that lists
3194 # what "hidden" libraries, object files and flags are used when
3195 # linking a shared library.
3196 #
3197 # There doesn't appear to be a way to prevent this compiler from
3198 # explicitly linking system object files so we need to strip them
3199 # from the output so that they don't get included in the library
3200 # dependencies.
3201 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3202 ;;
3203 *)
3204 if test "$GXX" = yes; then
3205 if test $with_gnu_ld = no; then
3206 case $host_cpu in
3207 hppa*64*)
3208 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3209 ;;
3210 ia64*)
3211 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3212 ;;
3213 *)
3214 _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'
3215 ;;
3216 esac
3217 fi
3218 else
3219 # FIXME: insert proper C++ library support
3220 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3221 fi
3222 ;;
3223 esac
3224 ;;
3225 interix3*)
3226 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3227 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3228 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3229 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3230 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3231 # Instead, shared libraries are loaded at an image base (0x10000000 by
3232 # default) and relocated if they conflict, which is a slow very memory
3233 # consuming and fragmenting process. To avoid this, we pick a random,
3234 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3235 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3237 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3238 ;;
3239 irix5* | irix6*)
3240 case $cc_basename in
3241 CC*)
3242 # SGI C++
3243 _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 ${output_objdir}/so_locations -o $lib'
3244
3245 # Archives containing C++ object files must be created using
3246 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3247 # necessary to make sure instantiated templates are included
3248 # in the archive.
3249 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3250 ;;
3251 *)
3252 if test "$GXX" = yes; then
3253 if test "$with_gnu_ld" = no; then
3254 _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}${output_objdir}/so_locations -o $lib'
3255 else
3256 _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` -o $lib'
3257 fi
3258 fi
3259 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3260 ;;
3261 esac
3262 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3263 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3264 ;;
3265 linux* | k*bsd*-gnu)
3266 case $cc_basename in
3267 KCC*)
3268 # Kuck and Associates, Inc. (KAI) C++ Compiler
3269
3270 # KCC will only create a shared library if the output file
3271 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3272 # to its proper name (with version) after linking.
3273 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3274 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3275 # Commands to make compiler produce verbose output that lists
3276 # what "hidden" libraries, object files and flags are used when
3277 # linking a shared library.
3278 #
3279 # There doesn't appear to be a way to prevent this compiler from
3280 # explicitly linking system object files so we need to strip them
3281 # from the output so that they don't get included in the library
3282 # dependencies.
3283 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3284
3285 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3286 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3287
3288 # Archives containing C++ object files must be created using
3289 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3290 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3291 ;;
3292 icpc*)
3293 # Intel C++
3294 with_gnu_ld=yes
3295 # version 8.0 and above of icpc choke on multiply defined symbols
3296 # if we add $predep_objects and $postdep_objects, however 7.1 and
3297 # earlier do not add the objects themselves.
3298 case `$CC -V 2>&1` in
3299 *"Version 7."*)
3300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3301 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3302 ;;
3303 *) # Version 8.0 or newer
3304 tmp_idyn=
3305 case $host_cpu in
3306 ia64*) tmp_idyn=' -i_dynamic';;
3307 esac
3308 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3309 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3310 ;;
3311 esac
3312 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3313 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3314 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3315 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3316 ;;
3317 pgCC*)
3318 # Portland Group C++ compiler
3319 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3320 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3321
3322 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3323 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3324 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3325 ;;
3326 cxx*)
3327 # Compaq C++
3328 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3329 _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'
3330
3331 runpath_var=LD_RUN_PATH
3332 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3333 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3334
3335 # Commands to make compiler produce verbose output that lists
3336 # what "hidden" libraries, object files and flags are used when
3337 # linking a shared library.
3338 #
3339 # There doesn't appear to be a way to prevent this compiler from
3340 # explicitly linking system object files so we need to strip them
3341 # from the output so that they don't get included in the library
3342 # dependencies.
3343 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'
3344 ;;
3345 esac
3346 ;;
3347 lynxos*)
3348 # FIXME: insert proper C++ library support
3349 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3350 ;;
3351 m88k*)
3352 # FIXME: insert proper C++ library support
3353 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3354 ;;
3355 mvs*)
3356 case $cc_basename in
3357 cxx*)
3358 # FIXME: insert proper C++ library support
3359 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3360 ;;
3361 *)
3362 # FIXME: insert proper C++ library support
3363 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3364 ;;
3365 esac
3366 ;;
3367 netbsd* | netbsdelf*-gnu)
3368 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3369 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3370 wlarc=
3371 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3372 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3373 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3374 fi
3375 # Workaround some broken pre-1.5 toolchains
3376 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3377 ;;
3378 openbsd2*)
3379 # C++ shared libraries are fairly broken
3380 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3381 ;;
3382 openbsd*)
3383 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3384 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3385 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3387 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3388 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3389 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3390 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3391 fi
3392 output_verbose_link_cmd='echo'
3393 ;;
24363394 osf3*)
2437 if test "$GCC" = yes; then
2438 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2439 archive_cmds='$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'
2440 else
2441 allow_undefined_flag=' -expect_unresolved \*'
2442 archive_cmds='$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'
2443 fi
2444 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2445 hardcode_libdir_separator=:
2446 ;;
2447
2448 osf4* | osf5*) # as osf3* with the addition of -msym flag
2449 if test "$GCC" = yes; then
2450 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2451 archive_cmds='$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'
2452 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2453 else
2454 allow_undefined_flag=' -expect_unresolved \*'
2455 archive_cmds='$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'
2456 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2457 $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'
2458
2459 #Both c and cxx compiler support -rpath directly
2460 hardcode_libdir_flag_spec='-rpath $libdir'
2461 fi
2462 hardcode_libdir_separator=:
2463 ;;
2464
2465 sco3.2v5*)
2466 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2467 hardcode_shlibpath_var=no
2468 runpath_var=LD_RUN_PATH
2469 hardcode_runpath_var=yes
2470 export_dynamic_flag_spec='${wl}-Bexport'
2471 ;;
2472
3395 case $cc_basename in
3396 KCC*)
3397 # Kuck and Associates, Inc. (KAI) C++ Compiler
3398
3399 # KCC will only create a shared library if the output file
3400 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3401 # to its proper name (with version) after linking.
3402 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3403
3404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3405 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3406
3407 # Archives containing C++ object files must be created using
3408 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3409 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3410
3411 ;;
3412 RCC*)
3413 # Rational C++ 2.4.1
3414 # FIXME: insert proper C++ library support
3415 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3416 ;;
3417 cxx*)
3418 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3419 _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 ${output_objdir}/so_locations -o $lib'
3420
3421 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3422 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3423
3424 # Commands to make compiler produce verbose output that lists
3425 # what "hidden" libraries, object files and flags are used when
3426 # linking a shared library.
3427 #
3428 # There doesn't appear to be a way to prevent this compiler from
3429 # explicitly linking system object files so we need to strip them
3430 # from the output so that they don't get included in the library
3431 # dependencies.
3432 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'
3433 ;;
3434 *)
3435 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3436 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3437 _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}${output_objdir}/so_locations -o $lib'
3438
3439 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3440 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3441
3442 # Commands to make compiler produce verbose output that lists
3443 # what "hidden" libraries, object files and flags are used when
3444 # linking a shared library.
3445 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3446
3447 else
3448 # FIXME: insert proper C++ library support
3449 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3450 fi
3451 ;;
3452 esac
3453 ;;
3454 osf4* | osf5*)
3455 case $cc_basename in
3456 KCC*)
3457 # Kuck and Associates, Inc. (KAI) C++ Compiler
3458
3459 # KCC will only create a shared library if the output file
3460 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3461 # to its proper name (with version) after linking.
3462 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3463
3464 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3465 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3466
3467 # Archives containing C++ object files must be created using
3468 # the KAI C++ compiler.
3469 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3470 ;;
3471 RCC*)
3472 # Rational C++ 2.4.1
3473 # FIXME: insert proper C++ library support
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3475 ;;
3476 cxx*)
3477 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3478 _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 ${output_objdir}/so_locations -o $lib'
3479 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3480 echo "-hidden">> $lib.exp~
3481 $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 ${output_objdir}/so_locations -o $lib~
3482 $rm $lib.exp'
3483
3484 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3485 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3486
3487 # Commands to make compiler produce verbose output that lists
3488 # what "hidden" libraries, object files and flags are used when
3489 # linking a shared library.
3490 #
3491 # There doesn't appear to be a way to prevent this compiler from
3492 # explicitly linking system object files so we need to strip them
3493 # from the output so that they don't get included in the library
3494 # dependencies.
3495 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'
3496 ;;
3497 *)
3498 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3499 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3500 _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}${output_objdir}/so_locations -o $lib'
3501
3502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3503 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3504
3505 # Commands to make compiler produce verbose output that lists
3506 # what "hidden" libraries, object files and flags are used when
3507 # linking a shared library.
3508 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3509
3510 else
3511 # FIXME: insert proper C++ library support
3512 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3513 fi
3514 ;;
3515 esac
3516 ;;
3517 psos*)
3518 # FIXME: insert proper C++ library support
3519 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3520 ;;
3521 sunos4*)
3522 case $cc_basename in
3523 CC*)
3524 # Sun C++ 4.x
3525 # FIXME: insert proper C++ library support
3526 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3527 ;;
3528 lcc*)
3529 # Lucid
3530 # FIXME: insert proper C++ library support
3531 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3532 ;;
3533 *)
3534 # FIXME: insert proper C++ library support
3535 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3536 ;;
3537 esac
3538 ;;
24733539 solaris*)
2474 # gcc --version < 3.0 without binutils cannot create self contained
2475 # shared libraries reliably, requiring libgcc.a to resolve some of
2476 # the object symbols generated in some cases. Libraries that use
2477 # assert need libgcc.a to resolve __eprintf, for example. Linking
2478 # a copy of libgcc.a into every shared library to guarantee resolving
2479 # such symbols causes other problems: According to Tim Van Holder
2480 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2481 # (to the application) exception stack for one thing.
2482 no_undefined_flag=' -z defs'
2483 if test "$GCC" = yes; then
2484 case `$CC --version 2>/dev/null` in
2485 [[12]].*)
2486 cat <<EOF 1>&2
2487
2488 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2489 *** create self contained shared libraries on Solaris systems, without
2490 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2491 *** -no-undefined support, which will at least allow you to build shared
2492 *** libraries. However, you may find that when you link such libraries
2493 *** into an application without using GCC, you have to manually add
2494 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2495 *** upgrade to a newer version of GCC. Another option is to rebuild your
2496 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2497
3540 case $cc_basename in
3541 CC*)
3542 # Sun C++ 4.2, 5.x and Centerline C++
3543 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3544 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3545 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3546 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3547 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3548
3549 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3550 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3551 case $host_os in
3552 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3553 *)
3554 # The C++ compiler is used as linker so we must use $wl
3555 # flag to pass the commands to the underlying system
3556 # linker. We must also pass each convience library through
3557 # to the system linker between allextract/defaultextract.
3558 # The C++ compiler will combine linker options so we
3559 # cannot just pass the convience library names through
3560 # without $wl.
3561 # Supported since Solaris 2.6 (maybe 2.5.1?)
3562 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3563 ;;
3564 esac
3565 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3566
3567 output_verbose_link_cmd='echo'
3568
3569 # Archives containing C++ object files must be created using
3570 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3571 # necessary to make sure instantiated templates are included
3572 # in the archive.
3573 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3574 ;;
3575 gcx*)
3576 # Green Hills C++ Compiler
3577 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3578
3579 # The C++ compiler must be used to create the archive.
3580 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3581 ;;
3582 *)
3583 # GNU C++ compiler with Solaris linker
3584 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3585 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3586 if $CC --version | grep -v '^2\.7' > /dev/null; then
3587 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3588 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3589 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3590
3591 # Commands to make compiler produce verbose output that lists
3592 # what "hidden" libraries, object files and flags are used when
3593 # linking a shared library.
3594 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3595 else
3596 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3597 # platform.
3598 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3599 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3600 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3601
3602 # Commands to make compiler produce verbose output that lists
3603 # what "hidden" libraries, object files and flags are used when
3604 # linking a shared library.
3605 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3606 fi
3607
3608 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3609 fi
3610 ;;
3611 esac
3612 ;;
3613 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3614 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3615 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3616 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3617 runpath_var='LD_RUN_PATH'
3618
3619 case $cc_basename in
3620 CC*)
3621 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3622 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3623 ;;
3624 *)
3625 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3626 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3627 ;;
3628 esac
3629 ;;
3630 sysv5* | sco3.2v5* | sco5v6*)
3631 # Note: We can NOT use -z defs as we might desire, because we do not
3632 # link with -lc, and that would cause any symbols used from libc to
3633 # always be unresolved, which means just about no library would
3634 # ever link correctly. If we're not using GNU ld we use -z text
3635 # though, which does catch some bad symbols but isn't as heavy-handed
3636 # as -z defs.
3637 # For security reasons, it is highly recommended that you always
3638 # use absolute paths for naming shared libraries, and exclude the
3639 # DT_RUNPATH tag from executables and libraries. But doing so
3640 # requires that you compile everything twice, which is a pain.
3641 # So that behaviour is only enabled if SCOABSPATH is set to a
3642 # non-empty value in the environment. Most likely only useful for
3643 # creating official distributions of packages.
3644 # This is a hack until libtool officially supports absolute path
3645 # names for shared libraries.
3646 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3647 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3648 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3649 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3650 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3651 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3652 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3653 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3654 runpath_var='LD_RUN_PATH'
3655
3656 case $cc_basename in
3657 CC*)
3658 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3659 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3660 ;;
3661 *)
3662 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3663 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3664 ;;
3665 esac
3666 ;;
3667 tandem*)
3668 case $cc_basename in
3669 NCC*)
3670 # NonStop-UX NCC 3.20
3671 # FIXME: insert proper C++ library support
3672 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3673 ;;
3674 *)
3675 # FIXME: insert proper C++ library support
3676 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3677 ;;
3678 esac
3679 ;;
3680 vxworks*)
3681 # FIXME: insert proper C++ library support
3682 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3683 ;;
3684 *)
3685 # FIXME: insert proper C++ library support
3686 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3687 ;;
3688 esac
3689 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3690 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3691
3692 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3693 _LT_AC_TAGVAR(LD, $1)="$LD"
3694
3695 AC_LIBTOOL_POSTDEP_PREDEP($1)
3696 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3697 AC_LIBTOOL_PROG_CC_C_O($1)
3698 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3699 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3700 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3701 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3702
3703 AC_LIBTOOL_CONFIG($1)
3704
3705 AC_LANG_POP
3706 CC=$lt_save_CC
3707 LDCXX=$LD
3708 LD=$lt_save_LD
3709 GCC=$lt_save_GCC
3710 with_gnu_ldcxx=$with_gnu_ld
3711 with_gnu_ld=$lt_save_with_gnu_ld
3712 lt_cv_path_LDCXX=$lt_cv_path_LD
3713 lt_cv_path_LD=$lt_save_path_LD
3714 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3715 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3716 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3717
3718 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3719 # ------------------------------------
3720 # Figure out "hidden" library dependencies from verbose
3721 # compiler output when linking a shared library.
3722 # Parse the compiler output and extract the necessary
3723 # objects, libraries and library flags.
3724 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3725 dnl we can't use the lt_simple_compile_test_code here,
3726 dnl because it contains code intended for an executable,
3727 dnl not a library. It's possible we should let each
3728 dnl tag define a new lt_????_link_test_code variable,
3729 dnl but it's only used here...
3730 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3731 int a;
3732 void foo (void) { a = 0; }
24983733 EOF
2499 no_undefined_flag=
2500 ;;
2501 esac
2502 fi
2503 # $CC -shared without GNU ld will not create a library from C++
2504 # object files and a static libstdc++, better avoid it by now
2505 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2506 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2507 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2508 hardcode_libdir_flag_spec='-R$libdir'
2509 hardcode_shlibpath_var=no
2510 case $host_os in
2511 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2512 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2513 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
3734 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3735 class Foo
3736 {
3737 public:
3738 Foo (void) { a = 0; }
3739 private:
3740 int a;
3741 };
3742 EOF
3743 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3744 subroutine foo
3745 implicit none
3746 integer*4 a
3747 a=0
3748 return
3749 end
3750 EOF
3751 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3752 public class foo {
3753 private int a;
3754 public void bar (void) {
3755 a = 0;
3756 }
3757 };
3758 EOF
3759 ])
3760 dnl Parse the compiler output and extract the necessary
3761 dnl objects, libraries and library flags.
3762 if AC_TRY_EVAL(ac_compile); then
3763 # Parse the compiler output and extract the necessary
3764 # objects, libraries and library flags.
3765
3766 # Sentinel used to keep track of whether or not we are before
3767 # the conftest object file.
3768 pre_test_object_deps_done=no
3769
3770 # The `*' in the case matches for architectures that use `case' in
3771 # $output_verbose_cmd can trigger glob expansion during the loop
3772 # eval without this substitution.
3773 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3774
3775 for p in `eval $output_verbose_link_cmd`; do
3776 case $p in
3777
3778 -L* | -R* | -l*)
3779 # Some compilers place space between "-{L,R}" and the path.
3780 # Remove the space.
3781 if test $p = "-L" \
3782 || test $p = "-R"; then
3783 prev=$p
3784 continue
3785 else
3786 prev=
3787 fi
3788
3789 if test "$pre_test_object_deps_done" = no; then
3790 case $p in
3791 -L* | -R*)
3792 # Internal compiler library paths should come after those
3793 # provided the user. The postdeps already come after the
3794 # user supplied libs so there is no need to process them.
3795 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3796 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3797 else
3798 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3799 fi
3800 ;;
3801 # The "-l" case would never come before the object being
3802 # linked, so don't bother handling this case.
3803 esac
3804 else
3805 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3806 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3807 else
3808 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3809 fi
3810 fi
3811 ;;
3812
3813 *.$objext)
3814 # This assumes that the test object file only shows up
3815 # once in the compiler output.
3816 if test "$p" = "conftest.$objext"; then
3817 pre_test_object_deps_done=yes
3818 continue
3819 fi
3820
3821 if test "$pre_test_object_deps_done" = no; then
3822 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3823 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3824 else
3825 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3826 fi
3827 else
3828 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3829 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3830 else
3831 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3832 fi
3833 fi
3834 ;;
3835
3836 *) ;; # Ignore the rest.
3837
25143838 esac
2515 link_all_deplibs=yes
2516 ;;
2517
2518 sunos4*)
2519 if test "x$host_vendor" = xsequent; then
2520 # Use $CC to link under sequent, because it throws in some extra .o
2521 # files that make .init and .fini sections work.
2522 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2523 else
2524 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2525 fi
2526 hardcode_libdir_flag_spec='-L$libdir'
2527 hardcode_direct=yes
2528 hardcode_minus_L=yes
2529 hardcode_shlibpath_var=no
2530 ;;
2531
2532 sysv4)
2533 case $host_vendor in
2534 sni)
2535 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2536 hardcode_direct=yes # is this really true???
2537 ;;
2538 siemens)
2539 ## LD is ld it makes a PLAMLIB
2540 ## CC just makes a GrossModule.
2541 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2542 reload_cmds='$CC -r -o $output$reload_objs'
2543 hardcode_direct=no
2544 ;;
2545 motorola)
2546 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2547 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2548 ;;
2549 esac
2550 runpath_var='LD_RUN_PATH'
2551 hardcode_shlibpath_var=no
2552 ;;
2553
2554 sysv4.3*)
2555 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2556 hardcode_shlibpath_var=no
2557 export_dynamic_flag_spec='-Bexport'
2558 ;;
2559
2560 sysv5*)
2561 no_undefined_flag=' -z text'
2562 # $CC -shared without GNU ld will not create a library from C++
2563 # object files and a static libstdc++, better avoid it by now
2564 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2565 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2566 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2567 hardcode_libdir_flag_spec=
2568 hardcode_shlibpath_var=no
2569 runpath_var='LD_RUN_PATH'
2570 ;;
2571
2572 uts4*)
2573 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2574 hardcode_libdir_flag_spec='-L$libdir'
2575 hardcode_shlibpath_var=no
2576 ;;
2577
2578 dgux*)
2579 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2580 hardcode_libdir_flag_spec='-L$libdir'
2581 hardcode_shlibpath_var=no
2582 ;;
2583
2584 sysv4*MP*)
2585 if test -d /usr/nec; then
2586 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2587 hardcode_shlibpath_var=no
2588 runpath_var=LD_RUN_PATH
2589 hardcode_runpath_var=yes
2590 ld_shlibs=yes
2591 fi
2592 ;;
2593
2594 sysv4.2uw2*)
2595 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2596 hardcode_direct=yes
2597 hardcode_minus_L=no
2598 hardcode_shlibpath_var=no
2599 hardcode_runpath_var=yes
2600 runpath_var=LD_RUN_PATH
2601 ;;
2602
2603 sysv5uw7* | unixware7*)
2604 no_undefined_flag='${wl}-z ${wl}text'
2605 if test "$GCC" = yes; then
2606 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2607 else
2608 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2609 fi
2610 runpath_var='LD_RUN_PATH'
2611 hardcode_shlibpath_var=no
2612 ;;
2613
2614 *)
2615 ld_shlibs=no
3839 done
3840
3841 # Clean up.
3842 rm -f a.out a.exe
3843 else
3844 echo "libtool.m4: error: problem compiling $1 test program"
3845 fi
3846
3847 $rm -f confest.$objext
3848
3849 # PORTME: override above test on systems where it is broken
3850 ifelse([$1],[CXX],
3851 [case $host_os in
3852 interix3*)
3853 # Interix 3.5 installs completely hosed .la files for C++, so rather than
3854 # hack all around it, let's just trust "g++" to DTRT.
3855 _LT_AC_TAGVAR(predep_objects,$1)=
3856 _LT_AC_TAGVAR(postdep_objects,$1)=
3857 _LT_AC_TAGVAR(postdeps,$1)=
3858 ;;
3859
3860 solaris*)
3861 case $cc_basename in
3862 CC*)
3863 # Adding this requires a known-good setup of shared libraries for
3864 # Sun compiler versions before 5.6, else PIC objects from an old
3865 # archive will be linked into the output, leading to subtle bugs.
3866 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
26163867 ;;
26173868 esac
2618 fi
2619 AC_MSG_RESULT([$ld_shlibs])
2620 test "$ld_shlibs" = no && can_build_shared=no
2621
2622 # Check hardcoding attributes.
2623 AC_MSG_CHECKING([how to hardcode library paths into programs])
2624 hardcode_action=
2625 if test -n "$hardcode_libdir_flag_spec" || \
2626 test -n "$runpath_var"; then
2627
2628 # We can hardcode non-existant directories.
2629 if test "$hardcode_direct" != no &&
2630 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2631 # have to relink, otherwise we might link with an installed library
2632 # when we should be linking with a yet-to-be-installed one
2633 ## test "$hardcode_shlibpath_var" != no &&
2634 test "$hardcode_minus_L" != no; then
2635 # Linking always hardcodes the temporary library directory.
2636 hardcode_action=relink
2637 else
2638 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2639 hardcode_action=immediate
2640 fi
2641 else
2642 # We cannot hardcode anything, or else we can only hardcode existing
2643 # directories.
2644 hardcode_action=unsupported
2645 fi
2646 AC_MSG_RESULT([$hardcode_action])
2647
2648 striplib=
2649 old_striplib=
2650 AC_MSG_CHECKING([whether stripping libraries is possible])
2651 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2652 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2653 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2654 AC_MSG_RESULT([yes])
2655 else
2656 AC_MSG_RESULT([no])
2657 fi
2658
2659 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2660 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2661
2662 # PORTME Fill in your ld.so characteristics
2663 AC_MSG_CHECKING([dynamic linker characteristics])
2664 library_names_spec=
2665 libname_spec='lib$name'
2666 soname_spec=
2667 postinstall_cmds=
2668 postuninstall_cmds=
2669 finish_cmds=
2670 finish_eval=
2671 shlibpath_var=
2672 shlibpath_overrides_runpath=unknown
2673 version_type=none
2674 dynamic_linker="$host_os ld.so"
2675 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2676 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2677
2678 case $host_os in
2679 aix3*)
2680 version_type=linux
2681 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2682 shlibpath_var=LIBPATH
2683
2684 # AIX has no versioning support, so we append a major version to the name.
2685 soname_spec='${libname}${release}.so$major'
2686 ;;
2687
2688 aix4* | aix5*)
2689 version_type=linux
2690 need_lib_prefix=no
2691 need_version=no
2692 hardcode_into_libs=yes
2693 if test "$host_cpu" = ia64; then
2694 # AIX 5 supports IA64
2695 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2696 shlibpath_var=LD_LIBRARY_PATH
2697 else
2698 # With GCC up to 2.95.x, collect2 would create an import file
2699 # for dependence libraries. The import file would start with
2700 # the line `#! .'. This would cause the generated library to
2701 # depend on `.', always an invalid library. This was fixed in
2702 # development snapshots of GCC prior to 3.0.
2703 case $host_os in
2704 aix4 | aix4.[[01]] | aix4.[[01]].*)
2705 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2706 echo ' yes '
2707 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2708 :
2709 else
2710 can_build_shared=no
2711 fi
2712 ;;
2713 esac
2714 # AIX (on Power*) has no versioning support, so currently we can
2715 # not hardcode correct soname into executable. Probably we can
2716 # add versioning support to collect2, so additional links can
2717 # be useful in future.
2718 if test "$aix_use_runtimelinking" = yes; then
2719 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2720 # instead of lib<name>.a to let people know that these are not
2721 # typical AIX shared libraries.
2722 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2723 else
2724 # We preserve .a as extension for shared libraries through AIX4.2
2725 # and later when we are not doing run time linking.
2726 library_names_spec='${libname}${release}.a $libname.a'
2727 soname_spec='${libname}${release}.so$major'
2728 fi
2729 shlibpath_var=LIBPATH
2730 fi
2731 hardcode_into_libs=yes
2732 ;;
2733
2734 amigaos*)
2735 library_names_spec='$libname.ixlibrary $libname.a'
2736 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2737 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'
2738 ;;
2739
2740 beos*)
2741 library_names_spec='${libname}.so'
2742 dynamic_linker="$host_os ld.so"
2743 shlibpath_var=LIBRARY_PATH
2744 ;;
2745
2746 bsdi4*)
2747 version_type=linux
2748 need_version=no
2749 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2750 soname_spec='${libname}${release}.so$major'
2751 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2752 shlibpath_var=LD_LIBRARY_PATH
2753 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2754 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2755 export_dynamic_flag_spec=-rdynamic
2756 # the default ld.so.conf also contains /usr/contrib/lib and
2757 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2758 # libtool to hard-code these into programs
2759 ;;
2760
2761 cygwin* | mingw* | pw32*)
2762 version_type=windows
2763 need_version=no
2764 need_lib_prefix=no
2765 case $GCC,$host_os in
2766 yes,cygwin*)
2767 library_names_spec='$libname.dll.a'
2768 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2769 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2770 dldir=$destdir/`dirname \$dlpath`~
2771 test -d \$dldir || mkdir -p \$dldir~
2772 $install_prog .libs/$dlname \$dldir/$dlname'
2773 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2774 dlpath=$dir/\$dldll~
2775 $rm \$dlpath'
2776 ;;
2777 yes,mingw*)
2778 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2779 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2780 ;;
2781 yes,pw32*)
2782 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2783 ;;
2784 *)
2785 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2786 ;;
2787 esac
2788 dynamic_linker='Win32 ld.exe'
2789 # FIXME: first we should search . and the directory the executable is in
2790 shlibpath_var=PATH
2791 ;;
2792
2793 darwin* | rhapsody*)
2794 dynamic_linker="$host_os dyld"
2795 version_type=darwin
2796 need_lib_prefix=no
2797 need_version=no
2798 # FIXME: Relying on posixy $() will cause problems for
2799 # cross-compilation, but unfortunately the echo tests do not
2800 # yet detect zsh echo's removal of \ escapes.
2801 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)'
2802 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2803 shlibpath_overrides_runpath=yes
2804 shlibpath_var=DYLD_LIBRARY_PATH
2805 ;;
2806
2807 freebsd1*)
2808 dynamic_linker=no
2809 ;;
2810
2811 freebsd*)
2812 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2813 version_type=freebsd-$objformat
2814 case $version_type in
2815 freebsd-elf*)
2816 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2817 need_version=no
2818 need_lib_prefix=no
2819 ;;
2820 freebsd-*)
2821 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2822 need_version=yes
2823 ;;
2824 esac
2825 shlibpath_var=LD_LIBRARY_PATH
2826 case $host_os in
2827 freebsd2*)
2828 shlibpath_overrides_runpath=yes
2829 ;;
2830 *)
2831 shlibpath_overrides_runpath=no
2832 hardcode_into_libs=yes
2833 ;;
2834 esac
2835 ;;
2836
2837 gnu*)
2838 version_type=linux
2839 need_lib_prefix=no
2840 need_version=no
2841 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2842 soname_spec='${libname}${release}.so$major'
2843 shlibpath_var=LD_LIBRARY_PATH
2844 hardcode_into_libs=yes
2845 ;;
2846
2847 hpux9* | hpux10* | hpux11*)
2848 # Give a soname corresponding to the major version so that dld.sl refuses to
2849 # link against other versions.
2850 dynamic_linker="$host_os dld.sl"
2851 version_type=sunos
2852 need_lib_prefix=no
2853 need_version=no
2854 shlibpath_var=SHLIB_PATH
2855 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2856 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2857 soname_spec='${libname}${release}.sl$major'
2858 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2859 postinstall_cmds='chmod 555 $lib'
2860 ;;
2861
2862 irix5* | irix6* | nonstopux*)
2863 case $host_os in
2864 nonstopux*) version_type=nonstopux ;;
2865 *) version_type=irix ;;
2866 esac
2867 need_lib_prefix=no
2868 need_version=no
2869 soname_spec='${libname}${release}.so$major'
2870 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2871 case $host_os in
2872 irix5* | nonstopux*)
2873 libsuff= shlibsuff=
2874 ;;
2875 *)
2876 case $LD in # libtool.m4 will add one of these switches to LD
2877 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2878 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2879 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2880 *) libsuff= shlibsuff= libmagic=never-match;;
2881 esac
2882 ;;
2883 esac
2884 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2885 shlibpath_overrides_runpath=no
2886 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2887 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2888 ;;
2889
2890 # No shared lib support for Linux oldld, aout, or coff.
2891 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2892 dynamic_linker=no
2893 ;;
2894
2895 # This must be Linux ELF.
2896 linux-gnu*)
2897 version_type=linux
2898 need_lib_prefix=no
2899 need_version=no
2900 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2901 soname_spec='${libname}${release}.so$major'
2902 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2903 shlibpath_var=LD_LIBRARY_PATH
2904 shlibpath_overrides_runpath=no
2905 # This implies no fast_install, which is unacceptable.
2906 # Some rework will be needed to allow for fast_install
2907 # before this can be enabled.
2908 hardcode_into_libs=yes
2909
2910 # We used to test for /lib/ld.so.1 and disable shared libraries on
2911 # powerpc, because MkLinux only supported shared libraries with the
2912 # GNU dynamic linker. Since this was broken with cross compilers,
2913 # most powerpc-linux boxes support dynamic linking these days and
2914 # people can always --disable-shared, the test was removed, and we
2915 # assume the GNU/Linux dynamic linker is in use.
2916 dynamic_linker='GNU/Linux ld.so'
2917
2918 # Find out which ABI we are using (multilib Linux x86_64 hack).
2919 libsuff=
2920 case "$host_cpu" in
2921 x86_64*|s390x*)
2922 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2923 if AC_TRY_EVAL(ac_compile); then
2924 case `/usr/bin/file conftest.$ac_objext` in
2925 *64-bit*)
2926 libsuff=64
2927 ;;
2928 esac
2929 fi
2930 rm -rf conftest*
2931 ;;
2932 *)
2933 ;;
2934 esac
2935 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
2936 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
2937 ;;
2938
2939 netbsd*)
2940 version_type=sunos
2941 need_lib_prefix=no
2942 need_version=no
2943 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2944 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2945 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2946 dynamic_linker='NetBSD (a.out) ld.so'
2947 else
2948 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2949 soname_spec='${libname}${release}.so$major'
2950 dynamic_linker='NetBSD ld.elf_so'
2951 fi
2952 shlibpath_var=LD_LIBRARY_PATH
2953 shlibpath_overrides_runpath=yes
2954 hardcode_into_libs=yes
2955 ;;
2956
2957 newsos6)
2958 version_type=linux
2959 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2960 shlibpath_var=LD_LIBRARY_PATH
2961 shlibpath_overrides_runpath=yes
2962 ;;
2963
2964 openbsd*)
2965 version_type=sunos
2966 need_lib_prefix=no
2967 need_version=no
2968 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2969 case "$host_os" in
2970 openbsd2.[[89]] | openbsd2.[[89]].*)
2971 shlibpath_overrides_runpath=no
2972 ;;
2973 *)
2974 shlibpath_overrides_runpath=yes
2975 ;;
2976 esac
2977 else
2978 shlibpath_overrides_runpath=yes
2979 fi
2980 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2981 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2982 shlibpath_var=LD_LIBRARY_PATH
2983 ;;
2984
2985 os2*)
2986 libname_spec='$name'
2987 need_lib_prefix=no
2988 library_names_spec='$libname.dll $libname.a'
2989 dynamic_linker='OS/2 ld.exe'
2990 shlibpath_var=LIBPATH
2991 ;;
2992
2993 osf3* | osf4* | osf5*)
2994 version_type=osf
2995 need_version=no
2996 soname_spec='${libname}${release}.so$major'
2997 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2998 shlibpath_var=LD_LIBRARY_PATH
2999 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3000 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3001 hardcode_into_libs=yes
3002 ;;
3003
3004 sco3.2v5*)
3005 version_type=osf
3006 soname_spec='${libname}${release}.so$major'
3007 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3008 shlibpath_var=LD_LIBRARY_PATH
3009 ;;
3010
3011 solaris*)
3012 version_type=linux
3013 need_lib_prefix=no
3014 need_version=no
3015 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3016 soname_spec='${libname}${release}.so$major'
3017 shlibpath_var=LD_LIBRARY_PATH
3018 shlibpath_overrides_runpath=yes
3019 hardcode_into_libs=yes
3020 # ldd complains unless libraries are executable
3021 postinstall_cmds='chmod +x $lib'
3022 ;;
3023
3024 sunos4*)
3025 version_type=sunos
3026 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3027 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3028 shlibpath_var=LD_LIBRARY_PATH
3029 shlibpath_overrides_runpath=yes
3030 if test "$with_gnu_ld" = yes; then
3031 need_lib_prefix=no
3032 fi
3033 need_version=yes
3034 ;;
3035
3036 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3037 version_type=linux
3038 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3039 soname_spec='${libname}${release}.so$major'
3040 shlibpath_var=LD_LIBRARY_PATH
3041 case $host_vendor in
3042 sni)
3043 shlibpath_overrides_runpath=no
3044 need_lib_prefix=no
3045 export_dynamic_flag_spec='${wl}-Blargedynsym'
3046 runpath_var=LD_RUN_PATH
3047 ;;
3048 siemens)
3049 need_lib_prefix=no
3050 ;;
3051 motorola)
3052 need_lib_prefix=no
3053 need_version=no
3054 shlibpath_overrides_runpath=no
3055 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3056 ;;
3057 esac
3058 ;;
3059
3060 uts4*)
3061 version_type=linux
3062 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3063 soname_spec='${libname}${release}.so$major'
3064 shlibpath_var=LD_LIBRARY_PATH
3065 ;;
3066
3067 dgux*)
3068 version_type=linux
3069 need_lib_prefix=no
3070 need_version=no
3071 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3072 soname_spec='${libname}${release}.so$major'
3073 shlibpath_var=LD_LIBRARY_PATH
3074 ;;
3075
3076 sysv4*MP*)
3077 if test -d /usr/nec ;then
3078 version_type=linux
3079 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3080 soname_spec='$libname.so.$major'
3081 shlibpath_var=LD_LIBRARY_PATH
3082 fi
3083 ;;
3084
3085 *)
3086 dynamic_linker=no
30873869 ;;
30883870 esac
3089 AC_MSG_RESULT([$dynamic_linker])
3090 test "$dynamic_linker" = no && can_build_shared=no
3091
3092 # Report the final consequences.
3871 ])
3872
3873 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3874 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3875 esac
3876 ])# AC_LIBTOOL_POSTDEP_PREDEP
3877
3878 # AC_LIBTOOL_LANG_F77_CONFIG
3879 # --------------------------
3880 # Ensure that the configuration vars for the C compiler are
3881 # suitably defined. Those variables are subsequently used by
3882 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3883 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3884 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3885 [AC_REQUIRE([AC_PROG_F77])
3886 AC_LANG_PUSH(Fortran 77)
3887
3888 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3889 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3890 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3891 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3892 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3893 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3894 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3895 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3896 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3897 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3898 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3899 _LT_AC_TAGVAR(module_cmds, $1)=
3900 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3901 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3902 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3903 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3904 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3905 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3906
3907 # Source file extension for f77 test sources.
3908 ac_ext=f
3909
3910 # Object file extension for compiled f77 test sources.
3911 objext=o
3912 _LT_AC_TAGVAR(objext, $1)=$objext
3913
3914 # Code to be used in simple compile tests
3915 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3916
3917 # Code to be used in simple link tests
3918 lt_simple_link_test_code=" program t\n end\n"
3919
3920 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3921 _LT_AC_SYS_COMPILER
3922
3923 # save warnings/boilerplate of simple test code
3924 _LT_COMPILER_BOILERPLATE
3925 _LT_LINKER_BOILERPLATE
3926
3927 # Allow CC to be a program name with arguments.
3928 lt_save_CC="$CC"
3929 CC=${F77-"f77"}
3930 compiler=$CC
3931 _LT_AC_TAGVAR(compiler, $1)=$CC
3932 _LT_CC_BASENAME([$compiler])
3933
30933934 AC_MSG_CHECKING([if libtool supports shared libraries])
30943935 AC_MSG_RESULT([$can_build_shared])
30953936
30983939
30993940 # On AIX, shared libraries and static libraries use the same namespace, and
31003941 # are all built from PIC.
3101 case "$host_os" in
3942 case $host_os in
31023943 aix3*)
31033944 test "$enable_shared" = yes && enable_static=no
31043945 if test -n "$RANLIB"; then
31063947 postinstall_cmds='$RANLIB $lib'
31073948 fi
31083949 ;;
3109
3110 aix4*)
3950 aix4* | aix5*)
31113951 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
31123952 test "$enable_shared" = yes && enable_static=no
31133953 fi
31203960 test "$enable_shared" = yes || enable_static=yes
31213961 AC_MSG_RESULT([$enable_static])
31223962
3123 if test "$hardcode_action" = relink; then
3124 # Fast installation is not supported
3125 enable_fast_install=no
3126 elif test "$shlibpath_overrides_runpath" = yes ||
3127 test "$enable_shared" = no; then
3128 # Fast installation is not necessary
3129 enable_fast_install=needless
3130 fi
3131
3132 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3133 if test "$GCC" = yes; then
3134 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3135 fi
3136
3137 AC_LIBTOOL_DLOPEN_SELF
3138
3139 if test "$enable_shared" = yes && test "$GCC" = yes; then
3140 case $archive_cmds in
3141 *'~'*)
3142 # FIXME: we may have to deal with multi-command sequences.
3143 ;;
3144 '$CC '*)
3145 # Test whether the compiler implicitly links with -lc since on some
3146 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3147 # to ld, don't add -lc before -lgcc.
3148 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3149 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3150 [$rm conftest*
3151 echo 'static int dummy;' > conftest.$ac_ext
3152
3153 if AC_TRY_EVAL(ac_compile); then
3154 soname=conftest
3155 lib=conftest
3156 libobjs=conftest.$ac_objext
3157 deplibs=
3158 wl=$lt_cv_prog_cc_wl
3159 compiler_flags=-v
3160 linker_flags=-v
3161 verstring=
3162 output_objdir=.
3163 libname=conftest
3164 save_allow_undefined_flag=$allow_undefined_flag
3165 allow_undefined_flag=
3166 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3167 then
3168 lt_cv_archive_cmds_need_lc=no
3169 else
3170 lt_cv_archive_cmds_need_lc=yes
3171 fi
3172 allow_undefined_flag=$save_allow_undefined_flag
3173 else
3174 cat conftest.err 1>&5
3175 fi])
3176 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3177 ;;
3178 esac
3179 fi
3180 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3181
3182 # The second clause should only fire when bootstrapping the
3963 _LT_AC_TAGVAR(GCC, $1)="$G77"
3964 _LT_AC_TAGVAR(LD, $1)="$LD"
3965
3966 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3967 AC_LIBTOOL_PROG_CC_C_O($1)
3968 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3969 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3970 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3971 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3972
3973 AC_LIBTOOL_CONFIG($1)
3974
3975 AC_LANG_POP
3976 CC="$lt_save_CC"
3977 ])# AC_LIBTOOL_LANG_F77_CONFIG
3978
3979
3980 # AC_LIBTOOL_LANG_GCJ_CONFIG
3981 # --------------------------
3982 # Ensure that the configuration vars for the C compiler are
3983 # suitably defined. Those variables are subsequently used by
3984 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3985 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3986 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3987 [AC_LANG_SAVE
3988
3989 # Source file extension for Java test sources.
3990 ac_ext=java
3991
3992 # Object file extension for compiled Java test sources.
3993 objext=o
3994 _LT_AC_TAGVAR(objext, $1)=$objext
3995
3996 # Code to be used in simple compile tests
3997 lt_simple_compile_test_code="class foo {}\n"
3998
3999 # Code to be used in simple link tests
4000 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4001
4002 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4003 _LT_AC_SYS_COMPILER
4004
4005 # save warnings/boilerplate of simple test code
4006 _LT_COMPILER_BOILERPLATE
4007 _LT_LINKER_BOILERPLATE
4008
4009 # Allow CC to be a program name with arguments.
4010 lt_save_CC="$CC"
4011 CC=${GCJ-"gcj"}
4012 compiler=$CC
4013 _LT_AC_TAGVAR(compiler, $1)=$CC
4014 _LT_CC_BASENAME([$compiler])
4015
4016 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4017 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4018
4019 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4020
4021 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4022 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4023 AC_LIBTOOL_PROG_CC_C_O($1)
4024 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4025 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4026 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4027 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4028
4029 AC_LIBTOOL_CONFIG($1)
4030
4031 AC_LANG_RESTORE
4032 CC="$lt_save_CC"
4033 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4034
4035
4036 # AC_LIBTOOL_LANG_RC_CONFIG
4037 # -------------------------
4038 # Ensure that the configuration vars for the Windows resource compiler are
4039 # suitably defined. Those variables are subsequently used by
4040 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4041 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4042 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4043 [AC_LANG_SAVE
4044
4045 # Source file extension for RC test sources.
4046 ac_ext=rc
4047
4048 # Object file extension for compiled RC test sources.
4049 objext=o
4050 _LT_AC_TAGVAR(objext, $1)=$objext
4051
4052 # Code to be used in simple compile tests
4053 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4054
4055 # Code to be used in simple link tests
4056 lt_simple_link_test_code="$lt_simple_compile_test_code"
4057
4058 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4059 _LT_AC_SYS_COMPILER
4060
4061 # save warnings/boilerplate of simple test code
4062 _LT_COMPILER_BOILERPLATE
4063 _LT_LINKER_BOILERPLATE
4064
4065 # Allow CC to be a program name with arguments.
4066 lt_save_CC="$CC"
4067 CC=${RC-"windres"}
4068 compiler=$CC
4069 _LT_AC_TAGVAR(compiler, $1)=$CC
4070 _LT_CC_BASENAME([$compiler])
4071 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4072
4073 AC_LIBTOOL_CONFIG($1)
4074
4075 AC_LANG_RESTORE
4076 CC="$lt_save_CC"
4077 ])# AC_LIBTOOL_LANG_RC_CONFIG
4078
4079
4080 # AC_LIBTOOL_CONFIG([TAGNAME])
4081 # ----------------------------
4082 # If TAGNAME is not passed, then create an initial libtool script
4083 # with a default configuration from the untagged config vars. Otherwise
4084 # add code to config.status for appending the configuration named by
4085 # TAGNAME from the matching tagged config vars.
4086 AC_DEFUN([AC_LIBTOOL_CONFIG],
4087 [# The else clause should only fire when bootstrapping the
31834088 # libtool distribution, otherwise you forgot to ship ltmain.sh
31844089 # with your package, and you will get complaints that there are
31854090 # no rules to generate ltmain.sh.
31864091 if test -f "$ltmain"; then
3187 :
3188 else
3189 # If there is no Makefile yet, we rely on a make rule to execute
3190 # `config.status --recheck' to rerun these tests and create the
3191 # libtool script then.
3192 test -f Makefile && make "$ltmain"
3193 fi
3194
3195 if test -f "$ltmain"; then
3196 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3197 $rm -f "${ofile}T"
3198
3199 echo creating $ofile
3200
4092 # See if we are running on zsh, and set the options which allow our commands through
4093 # without removal of \ escapes.
4094 if test -n "${ZSH_VERSION+set}" ; then
4095 setopt NO_GLOB_SUBST
4096 fi
32014097 # Now quote all the things that may contain metacharacters while being
32024098 # careful not to overquote the AC_SUBSTed values. We take copies of the
32034099 # variables and quote the copies for generation of the libtool script.
3204 for var in echo old_CC old_CFLAGS SED \
3205 AR AR_FLAGS CC LD LN_S NM SHELL \
3206 reload_flag reload_cmds wl \
3207 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3208 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3209 library_names_spec soname_spec \
3210 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3211 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3212 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3213 old_striplib striplib file_magic_cmd export_symbols_cmds \
3214 deplibs_check_method allow_undefined_flag no_undefined_flag \
3215 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3216 global_symbol_to_c_name_address \
3217 hardcode_libdir_flag_spec hardcode_libdir_separator \
4100 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4101 SED SHELL STRIP \
4102 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4103 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4104 deplibs_check_method reload_flag reload_cmds need_locks \
4105 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4106 lt_cv_sys_global_symbol_to_c_name_address \
32184107 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3219 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4108 old_postinstall_cmds old_postuninstall_cmds \
4109 _LT_AC_TAGVAR(compiler, $1) \
4110 _LT_AC_TAGVAR(CC, $1) \
4111 _LT_AC_TAGVAR(LD, $1) \
4112 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4113 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4114 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4115 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4116 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4117 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4118 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4119 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4120 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4121 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4122 _LT_AC_TAGVAR(predep_objects, $1) \
4123 _LT_AC_TAGVAR(postdep_objects, $1) \
4124 _LT_AC_TAGVAR(predeps, $1) \
4125 _LT_AC_TAGVAR(postdeps, $1) \
4126 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4127 _LT_AC_TAGVAR(archive_cmds, $1) \
4128 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4129 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4130 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4131 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4132 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4133 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4134 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4135 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4137 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4138 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4139 _LT_AC_TAGVAR(module_cmds, $1) \
4140 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4141 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4142 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4143 _LT_AC_TAGVAR(include_expsyms, $1); do
32204144
32214145 case $var in
3222 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4146 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4147 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4148 _LT_AC_TAGVAR(archive_cmds, $1) | \
4149 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4150 _LT_AC_TAGVAR(module_cmds, $1) | \
4151 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4152 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4153 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4154 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4155 postinstall_cmds | postuninstall_cmds | \
32234156 old_postinstall_cmds | old_postuninstall_cmds | \
3224 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3225 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3226 postinstall_cmds | postuninstall_cmds | \
3227 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4157 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
32284158 # Double-quote double-evaled strings.
32294159 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
32304160 ;;
32344164 esac
32354165 done
32364166
3237 cat <<__EOF__ > "${ofile}T"
3238 #! $SHELL
3239
3240 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4167 case $lt_echo in
4168 *'\[$]0 --fallback-echo"')
4169 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4170 ;;
4171 esac
4172
4173 ifelse([$1], [],
4174 [cfgfile="${ofile}T"
4175 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4176 $rm -f "$cfgfile"
4177 AC_MSG_NOTICE([creating $ofile])],
4178 [cfgfile="$ofile"])
4179
4180 cat <<__EOF__ >> "$cfgfile"
4181 ifelse([$1], [],
4182 [#! $SHELL
4183
4184 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
32414185 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
32424186 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
32434187 #
3244 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
4188 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4189 # Free Software Foundation, Inc.
4190 #
4191 # This file is part of GNU Libtool:
32454192 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
32464193 #
32474194 # This program is free software; you can redistribute it and/or modify
32564203 #
32574204 # You should have received a copy of the GNU General Public License
32584205 # along with this program; if not, write to the Free Software
3259 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4206 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32604207 #
32614208 # As a special exception to the GNU General Public License, if you
32624209 # distribute this file as part of a program that contains a
32634210 # configuration script generated by Autoconf, you may include it under
32644211 # the same distribution terms that you use for the rest of that program.
32654212
3266 # A sed that does not truncate output.
4213 # A sed program that does not truncate output.
32674214 SED=$lt_SED
32684215
32694216 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3270 Xsed="${SED} -e s/^X//"
4217 Xsed="$SED -e 1s/^X//"
32714218
32724219 # The HP-UX ksh and POSIX shell print the target directory to stdout
32734220 # if CDPATH is set.
3274 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3275
3276 # ### BEGIN LIBTOOL CONFIG
4221 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4222
4223 # The names of the tagged configurations supported by this script.
4224 available_tags=
4225
4226 # ### BEGIN LIBTOOL CONFIG],
4227 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
32774228
32784229 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
32794230
32874238 build_old_libs=$enable_static
32884239
32894240 # Whether or not to add -lc for building shared libraries.
3290 build_libtool_need_lc=$need_lc
4241 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4242
4243 # Whether or not to disallow shared libs when runtime libs are static
4244 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
32914245
32924246 # Whether or not to optimize for fast installation.
32934247 fast_install=$enable_fast_install
32954249 # The host system.
32964250 host_alias=$host_alias
32974251 host=$host
4252 host_os=$host_os
4253
4254 # The build system.
4255 build_alias=$build_alias
4256 build=$build
4257 build_os=$build_os
32984258
32994259 # An echo program that does not interpret backslashes.
33004260 echo=$lt_echo
33034263 AR=$lt_AR
33044264 AR_FLAGS=$lt_AR_FLAGS
33054265
3306 # The default C compiler.
3307 CC=$lt_CC
4266 # A C compiler.
4267 LTCC=$lt_LTCC
4268
4269 # LTCC compiler flags.
4270 LTCFLAGS=$lt_LTCFLAGS
4271
4272 # A language-specific compiler.
4273 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
33084274
33094275 # Is the compiler the GNU C compiler?
3310 with_gcc=$GCC
4276 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4277
4278 # An ERE matcher.
4279 EGREP=$lt_EGREP
33114280
33124281 # The linker used to build libraries.
3313 LD=$lt_LD
4282 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
33144283
33154284 # Whether we need hard or soft links.
33164285 LN_S=$lt_LN_S
33194288 NM=$lt_NM
33204289
33214290 # A symbol stripping program
3322 STRIP=$STRIP
4291 STRIP=$lt_STRIP
33234292
33244293 # Used to examine libraries when file_magic_cmd begins "file"
33254294 MAGIC_CMD=$MAGIC_CMD
33414310 reload_cmds=$lt_reload_cmds
33424311
33434312 # How to pass a linker flag through the compiler.
3344 wl=$lt_wl
4313 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
33454314
33464315 # Object file suffix (normally "o").
33474316 objext="$ac_objext"
33494318 # Old archive suffix (normally "a").
33504319 libext="$libext"
33514320
4321 # Shared library suffix (normally ".so").
4322 shrext_cmds='$shrext_cmds'
4323
33524324 # Executable file suffix (normally "").
33534325 exeext="$exeext"
33544326
33554327 # Additional compiler flags for building library objects.
3356 pic_flag=$lt_pic_flag
4328 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
33574329 pic_mode=$pic_mode
33584330
4331 # What is the maximum length of a command?
4332 max_cmd_len=$lt_cv_sys_max_cmd_len
4333
33594334 # Does compiler simultaneously support -c and -o options?
3360 compiler_c_o=$lt_compiler_c_o
3361
3362 # Can we write directly to a .lo ?
3363 compiler_o_lo=$lt_compiler_o_lo
3364
3365 # Must we lock files when doing compilation ?
4335 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4336
4337 # Must we lock files when doing compilation?
33664338 need_locks=$lt_need_locks
33674339
33684340 # Do we need the lib prefix for modules?
33814353 dlopen_self_static=$enable_dlopen_self_static
33824354
33834355 # Compiler flag to prevent dynamic linking.
3384 link_static_flag=$lt_link_static_flag
4356 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
33854357
33864358 # Compiler flag to turn off builtin functions.
3387 no_builtin_flag=$lt_no_builtin_flag
4359 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
33884360
33894361 # Compiler flag to allow reflexive dlopens.
3390 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
4362 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
33914363
33924364 # Compiler flag to generate shared objects directly from archives.
3393 whole_archive_flag_spec=$lt_whole_archive_flag_spec
4365 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
33944366
33954367 # Compiler flag to generate thread-safe objects.
3396 thread_safe_flag_spec=$lt_thread_safe_flag_spec
4368 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
33974369
33984370 # Library versioning type.
33994371 version_type=$version_type
34104382
34114383 # Commands used to build and install an old-style archive.
34124384 RANLIB=$lt_RANLIB
3413 old_archive_cmds=$lt_old_archive_cmds
4385 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
34144386 old_postinstall_cmds=$lt_old_postinstall_cmds
34154387 old_postuninstall_cmds=$lt_old_postuninstall_cmds
34164388
34174389 # Create an old-style archive from a shared archive.
3418 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
4390 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
34194391
34204392 # Create a temporary old-style archive to link instead of a shared archive.
3421 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
4393 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
34224394
34234395 # Commands used to build and install a shared archive.
3424 archive_cmds=$lt_archive_cmds
3425 archive_expsym_cmds=$lt_archive_expsym_cmds
4396 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4397 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
34264398 postinstall_cmds=$lt_postinstall_cmds
34274399 postuninstall_cmds=$lt_postuninstall_cmds
4400
4401 # Commands used to build a loadable module (assumed same as above if empty)
4402 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4403 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
34284404
34294405 # Commands to strip libraries.
34304406 old_striplib=$lt_old_striplib
34314407 striplib=$lt_striplib
34324408
4409 # Dependencies to place before the objects being linked to create a
4410 # shared library.
4411 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4412
4413 # Dependencies to place after the objects being linked to create a
4414 # shared library.
4415 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4416
4417 # Dependencies to place before the objects being linked to create a
4418 # shared library.
4419 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4420
4421 # Dependencies to place after the objects being linked to create a
4422 # shared library.
4423 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4424
4425 # The library search path used internally by the compiler when linking
4426 # a shared library.
4427 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4428
34334429 # Method to check whether dependent libraries are shared objects.
34344430 deplibs_check_method=$lt_deplibs_check_method
34354431
34374433 file_magic_cmd=$lt_file_magic_cmd
34384434
34394435 # Flag that allows shared libraries with undefined symbols to be built.
3440 allow_undefined_flag=$lt_allow_undefined_flag
4436 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
34414437
34424438 # Flag that forces no undefined symbols.
3443 no_undefined_flag=$lt_no_undefined_flag
4439 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
34444440
34454441 # Commands used to finish a libtool library installation in a directory.
34464442 finish_cmds=$lt_finish_cmds
34494445 finish_eval=$lt_finish_eval
34504446
34514447 # Take the output of nm and produce a listing of raw symbols and C names.
3452 global_symbol_pipe=$lt_global_symbol_pipe
4448 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
34534449
34544450 # Transform the output of nm in a proper C declaration
3455 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
4451 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
34564452
34574453 # Transform the output of nm in a C name address pair
3458 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
4454 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
34594455
34604456 # This is the shared library runtime path variable.
34614457 runpath_var=$runpath_var
34674463 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
34684464
34694465 # How to hardcode a shared library path into an executable.
3470 hardcode_action=$hardcode_action
4466 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
34714467
34724468 # Whether we should hardcode library paths into libraries.
34734469 hardcode_into_libs=$hardcode_into_libs
34744470
34754471 # Flag to hardcode \$libdir into a binary during linking.
34764472 # This must work even if \$libdir does not exist.
3477 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
4473 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4474
4475 # If ld is used when linking, flag to hardcode \$libdir into
4476 # a binary during linking. This must work even if \$libdir does
4477 # not exist.
4478 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
34784479
34794480 # Whether we need a single -rpath flag with a separated argument.
3480 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3481
3482 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4481 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4482
4483 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
34834484 # resulting binary.
3484 hardcode_direct=$hardcode_direct
4485 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
34854486
34864487 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
34874488 # resulting binary.
3488 hardcode_minus_L=$hardcode_minus_L
4489 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
34894490
34904491 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
34914492 # the resulting binary.
3492 hardcode_shlibpath_var=$hardcode_shlibpath_var
4493 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4494
4495 # Set to yes if building a shared library automatically hardcodes DIR into the library
4496 # and all subsequent libraries and executables linked against it.
4497 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
34934498
34944499 # Variables whose values should be saved in libtool wrapper scripts and
34954500 # restored at relink time.
34964501 variables_saved_for_relink="$variables_saved_for_relink"
34974502
34984503 # Whether libtool must link a program against all its dependency libraries.
3499 link_all_deplibs=$link_all_deplibs
4504 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
35004505
35014506 # Compile-time system search path for libraries
35024507 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
35054510 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
35064511
35074512 # Fix the shell variable \$srcfile for the compiler.
3508 fix_srcfile_path="$fix_srcfile_path"
4513 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
35094514
35104515 # Set to yes if exported symbols are required.
3511 always_export_symbols=$always_export_symbols
4516 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
35124517
35134518 # The commands to list exported symbols.
3514 export_symbols_cmds=$lt_export_symbols_cmds
4519 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
35154520
35164521 # The commands to extract the exported symbol list from a shared archive.
35174522 extract_expsyms_cmds=$lt_extract_expsyms_cmds
35184523
35194524 # Symbols that should not be listed in the preloaded symbols.
3520 exclude_expsyms=$lt_exclude_expsyms
4525 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
35214526
35224527 # Symbols that must always be exported.
3523 include_expsyms=$lt_include_expsyms
3524
3525 # ### END LIBTOOL CONFIG
4528 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4529
4530 ifelse([$1],[],
4531 [# ### END LIBTOOL CONFIG],
4532 [# ### END LIBTOOL TAG CONFIG: $tagname])
35264533
35274534 __EOF__
35284535
4536 ifelse([$1],[], [
35294537 case $host_os in
35304538 aix3*)
3531 cat <<\EOF >> "${ofile}T"
4539 cat <<\EOF >> "$cfgfile"
35324540
35334541 # AIX sometimes has problems with the GCC collect2 program. For some
35344542 # reason, if we set the COLLECT_NAMES environment variable, the problems
35414549 ;;
35424550 esac
35434551
4552 # We use sed instead of cat because bash on DJGPP gets confused if
4553 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4554 # text mode, it properly converts lines to CR/LF. This bash problem
4555 # is reportedly fixed, but why not run on old versions too?
4556 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4557
4558 mv -f "$cfgfile" "$ofile" || \
4559 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4560 chmod +x "$ofile"
4561 ])
4562 else
4563 # If there is no Makefile yet, we rely on a make rule to execute
4564 # `config.status --recheck' to rerun these tests and create the
4565 # libtool script then.
4566 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4567 if test -f "$ltmain_in"; then
4568 test -f Makefile && make "$ltmain"
4569 fi
4570 fi
4571 ])# AC_LIBTOOL_CONFIG
4572
4573
4574 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4575 # -------------------------------------------
4576 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4577 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4578
4579 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4580
4581 if test "$GCC" = yes; then
4582 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4583
4584 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4585 lt_cv_prog_compiler_rtti_exceptions,
4586 [-fno-rtti -fno-exceptions], [],
4587 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4588 fi
4589 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4590
4591
4592 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4593 # ---------------------------------
4594 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4595 [AC_REQUIRE([AC_CANONICAL_HOST])
4596 AC_REQUIRE([AC_PROG_NM])
4597 AC_REQUIRE([AC_OBJEXT])
4598 # Check for command to grab the raw symbol name followed by C symbol from nm.
4599 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4600 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4601 [
4602 # These are sane defaults that work on at least a few old systems.
4603 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4604
4605 # Character class describing NM global symbol codes.
4606 symcode='[[BCDEGRST]]'
4607
4608 # Regexp to match symbols that can be accessed directly from C.
4609 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4610
4611 # Transform an extracted symbol line into a proper C declaration
4612 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4613
4614 # Transform an extracted symbol line into symbol name and symbol address
4615 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'"
4616
4617 # Define system-specific variables.
4618 case $host_os in
4619 aix*)
4620 symcode='[[BCDT]]'
4621 ;;
4622 cygwin* | mingw* | pw32*)
4623 symcode='[[ABCDGISTW]]'
4624 ;;
4625 hpux*) # Its linker distinguishes data from code symbols
4626 if test "$host_cpu" = ia64; then
4627 symcode='[[ABCDEGRST]]'
4628 fi
4629 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4630 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'"
4631 ;;
4632 linux* | k*bsd*-gnu)
4633 if test "$host_cpu" = ia64; then
4634 symcode='[[ABCDGIRSTW]]'
4635 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4636 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'"
4637 fi
4638 ;;
4639 irix* | nonstopux*)
4640 symcode='[[BCDEGRST]]'
4641 ;;
4642 osf*)
4643 symcode='[[BCDEGQRST]]'
4644 ;;
4645 solaris*)
4646 symcode='[[BDRT]]'
4647 ;;
4648 sco3.2v5*)
4649 symcode='[[DT]]'
4650 ;;
4651 sysv4.2uw2*)
4652 symcode='[[DT]]'
4653 ;;
4654 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4655 symcode='[[ABDT]]'
4656 ;;
4657 sysv4)
4658 symcode='[[DFNSTU]]'
4659 ;;
4660 esac
4661
4662 # Handle CRLF in mingw tool chain
4663 opt_cr=
4664 case $build_os in
4665 mingw*)
4666 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4667 ;;
4668 esac
4669
4670 # If we're using GNU nm, then use its standard symbol codes.
4671 case `$NM -V 2>&1` in
4672 *GNU* | *'with BFD'*)
4673 symcode='[[ABCDGIRSTW]]' ;;
4674 esac
4675
4676 # Try without a prefix undercore, then with it.
4677 for ac_symprfx in "" "_"; do
4678
4679 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4680 symxfrm="\\1 $ac_symprfx\\2 \\2"
4681
4682 # Write the raw and C identifiers.
4683 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4684
4685 # Check to see that the pipe works correctly.
4686 pipe_works=no
4687
4688 rm -f conftest*
4689 cat > conftest.$ac_ext <<EOF
4690 #ifdef __cplusplus
4691 extern "C" {
4692 #endif
4693 char nm_test_var;
4694 void nm_test_func(){}
4695 #ifdef __cplusplus
4696 }
4697 #endif
4698 int main(){nm_test_var='a';nm_test_func();return(0);}
4699 EOF
4700
4701 if AC_TRY_EVAL(ac_compile); then
4702 # Now try to grab the symbols.
4703 nlist=conftest.nm
4704 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4705 # Try sorting and uniquifying the output.
4706 if sort "$nlist" | uniq > "$nlist"T; then
4707 mv -f "$nlist"T "$nlist"
4708 else
4709 rm -f "$nlist"T
4710 fi
4711
4712 # Make sure that we snagged all the symbols we need.
4713 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4714 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4715 cat <<EOF > conftest.$ac_ext
4716 #ifdef __cplusplus
4717 extern "C" {
4718 #endif
4719
4720 EOF
4721 # Now generate the symbol file.
4722 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4723
4724 cat <<EOF >> conftest.$ac_ext
4725 #if defined (__STDC__) && __STDC__
4726 # define lt_ptr_t void *
4727 #else
4728 # define lt_ptr_t char *
4729 # define const
4730 #endif
4731
4732 /* The mapping between symbol names and symbols. */
4733 const struct {
4734 const char *name;
4735 lt_ptr_t address;
4736 }
4737 lt_preloaded_symbols[[]] =
4738 {
4739 EOF
4740 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4741 cat <<\EOF >> conftest.$ac_ext
4742 {0, (lt_ptr_t) 0}
4743 };
4744
4745 #ifdef __cplusplus
4746 }
4747 #endif
4748 EOF
4749 # Now try linking the two files.
4750 mv conftest.$ac_objext conftstm.$ac_objext
4751 lt_save_LIBS="$LIBS"
4752 lt_save_CFLAGS="$CFLAGS"
4753 LIBS="conftstm.$ac_objext"
4754 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4755 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4756 pipe_works=yes
4757 fi
4758 LIBS="$lt_save_LIBS"
4759 CFLAGS="$lt_save_CFLAGS"
4760 else
4761 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4762 fi
4763 else
4764 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4765 fi
4766 else
4767 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4768 fi
4769 else
4770 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4771 cat conftest.$ac_ext >&5
4772 fi
4773 rm -f conftest* conftst*
4774
4775 # Do not use the global_symbol_pipe unless it works.
4776 if test "$pipe_works" = yes; then
4777 break
4778 else
4779 lt_cv_sys_global_symbol_pipe=
4780 fi
4781 done
4782 ])
4783 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4784 lt_cv_sys_global_symbol_to_cdecl=
4785 fi
4786 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4787 AC_MSG_RESULT(failed)
4788 else
4789 AC_MSG_RESULT(ok)
4790 fi
4791 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4792
4793
4794 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4795 # ---------------------------------------
4796 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4797 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4798 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4799 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4800
4801 AC_MSG_CHECKING([for $compiler option to produce PIC])
4802 ifelse([$1],[CXX],[
4803 # C++ specific cases for pic, static, wl, etc.
4804 if test "$GXX" = yes; then
4805 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4806 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4807
4808 case $host_os in
4809 aix*)
4810 # All AIX code is PIC.
4811 if test "$host_cpu" = ia64; then
4812 # AIX 5 now supports IA64 processor
4813 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4814 fi
4815 ;;
4816 amigaos*)
4817 # FIXME: we need at least 68020 code to build shared libraries, but
4818 # adding the `-m68020' flag to GCC prevents building anything better,
4819 # like `-m68040'.
4820 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4821 ;;
4822 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4823 # PIC is the default for these OSes.
4824 ;;
4825 mingw* | os2* | pw32*)
4826 # This hack is so that the source file can tell whether it is being
4827 # built for inclusion in a dll (and should export symbols for example).
4828 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4829 ;;
4830 darwin* | rhapsody*)
4831 # PIC is the default on this platform
4832 # Common symbols not allowed in MH_DYLIB files
4833 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4834 ;;
4835 *djgpp*)
4836 # DJGPP does not support shared libraries at all
4837 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4838 ;;
4839 interix3*)
4840 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4841 # Instead, we relocate shared libraries at runtime.
4842 ;;
4843 sysv4*MP*)
4844 if test -d /usr/nec; then
4845 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4846 fi
4847 ;;
4848 hpux*)
4849 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4850 # not for PA HP-UX.
4851 case $host_cpu in
4852 hppa*64*|ia64*)
4853 ;;
4854 *)
4855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4856 ;;
4857 esac
4858 ;;
4859 *)
4860 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4861 ;;
4862 esac
4863 else
4864 case $host_os in
4865 aix4* | aix5*)
4866 # All AIX code is PIC.
4867 if test "$host_cpu" = ia64; then
4868 # AIX 5 now supports IA64 processor
4869 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4870 else
4871 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4872 fi
4873 ;;
4874 chorus*)
4875 case $cc_basename in
4876 cxch68*)
4877 # Green Hills C++ Compiler
4878 # _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"
4879 ;;
4880 esac
4881 ;;
4882 darwin*)
4883 # PIC is the default on this platform
4884 # Common symbols not allowed in MH_DYLIB files
4885 case $cc_basename in
4886 xlc*)
4887 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4888 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4889 ;;
4890 esac
4891 ;;
4892 dgux*)
4893 case $cc_basename in
4894 ec++*)
4895 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4896 ;;
4897 ghcx*)
4898 # Green Hills C++ Compiler
4899 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4900 ;;
4901 *)
4902 ;;
4903 esac
4904 ;;
4905 freebsd* | dragonfly*)
4906 # FreeBSD uses GNU C++
4907 ;;
4908 hpux9* | hpux10* | hpux11*)
4909 case $cc_basename in
4910 CC*)
4911 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4912 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4913 if test "$host_cpu" != ia64; then
4914 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4915 fi
4916 ;;
4917 aCC*)
4918 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4919 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4920 case $host_cpu in
4921 hppa*64*|ia64*)
4922 # +Z the default
4923 ;;
4924 *)
4925 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4926 ;;
4927 esac
4928 ;;
4929 *)
4930 ;;
4931 esac
4932 ;;
4933 interix*)
4934 # This is c89, which is MS Visual C++ (no shared libs)
4935 # Anyone wants to do a port?
4936 ;;
4937 irix5* | irix6* | nonstopux*)
4938 case $cc_basename in
4939 CC*)
4940 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4942 # CC pic flag -KPIC is the default.
4943 ;;
4944 *)
4945 ;;
4946 esac
4947 ;;
4948 linux* | k*bsd*-gnu)
4949 case $cc_basename in
4950 KCC*)
4951 # KAI C++ Compiler
4952 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4953 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4954 ;;
4955 icpc* | ecpc*)
4956 # Intel C++
4957 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4958 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4959 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4960 ;;
4961 pgCC*)
4962 # Portland Group C++ compiler.
4963 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4964 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4965 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4966 ;;
4967 cxx*)
4968 # Compaq C++
4969 # Make sure the PIC flag is empty. It appears that all Alpha
4970 # Linux and Compaq Tru64 Unix objects are PIC.
4971 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4972 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4973 ;;
4974 *)
4975 ;;
4976 esac
4977 ;;
4978 lynxos*)
4979 ;;
4980 m88k*)
4981 ;;
4982 mvs*)
4983 case $cc_basename in
4984 cxx*)
4985 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4986 ;;
4987 *)
4988 ;;
4989 esac
4990 ;;
4991 netbsd* | netbsdelf*-gnu)
4992 ;;
4993 osf3* | osf4* | osf5*)
4994 case $cc_basename in
4995 KCC*)
4996 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4997 ;;
4998 RCC*)
4999 # Rational C++ 2.4.1
5000 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5001 ;;
5002 cxx*)
5003 # Digital/Compaq C++
5004 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5005 # Make sure the PIC flag is empty. It appears that all Alpha
5006 # Linux and Compaq Tru64 Unix objects are PIC.
5007 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5008 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5009 ;;
5010 *)
5011 ;;
5012 esac
5013 ;;
5014 psos*)
5015 ;;
5016 solaris*)
5017 case $cc_basename in
5018 CC*)
5019 # Sun C++ 4.2, 5.x and Centerline C++
5020 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5021 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5022 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5023 ;;
5024 gcx*)
5025 # Green Hills C++ Compiler
5026 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5027 ;;
5028 *)
5029 ;;
5030 esac
5031 ;;
5032 sunos4*)
5033 case $cc_basename in
5034 CC*)
5035 # Sun C++ 4.x
5036 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5037 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5038 ;;
5039 lcc*)
5040 # Lucid
5041 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5042 ;;
5043 *)
5044 ;;
5045 esac
5046 ;;
5047 tandem*)
5048 case $cc_basename in
5049 NCC*)
5050 # NonStop-UX NCC 3.20
5051 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5052 ;;
5053 *)
5054 ;;
5055 esac
5056 ;;
5057 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5058 case $cc_basename in
5059 CC*)
5060 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5061 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5062 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5063 ;;
5064 esac
5065 ;;
5066 vxworks*)
5067 ;;
5068 *)
5069 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5070 ;;
5071 esac
5072 fi
5073 ],
5074 [
5075 if test "$GCC" = yes; then
5076 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5077 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5078
5079 case $host_os in
5080 aix*)
5081 # All AIX code is PIC.
5082 if test "$host_cpu" = ia64; then
5083 # AIX 5 now supports IA64 processor
5084 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5085 fi
5086 ;;
5087
5088 amigaos*)
5089 # FIXME: we need at least 68020 code to build shared libraries, but
5090 # adding the `-m68020' flag to GCC prevents building anything better,
5091 # like `-m68040'.
5092 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5093 ;;
5094
5095 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5096 # PIC is the default for these OSes.
5097 ;;
5098
5099 mingw* | pw32* | os2*)
5100 # This hack is so that the source file can tell whether it is being
5101 # built for inclusion in a dll (and should export symbols for example).
5102 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5103 ;;
5104
5105 darwin* | rhapsody*)
5106 # PIC is the default on this platform
5107 # Common symbols not allowed in MH_DYLIB files
5108 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5109 ;;
5110
5111 interix3*)
5112 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5113 # Instead, we relocate shared libraries at runtime.
5114 ;;
5115
5116 msdosdjgpp*)
5117 # Just because we use GCC doesn't mean we suddenly get shared libraries
5118 # on systems that don't support them.
5119 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5120 enable_shared=no
5121 ;;
5122
5123 sysv4*MP*)
5124 if test -d /usr/nec; then
5125 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5126 fi
5127 ;;
5128
5129 hpux*)
5130 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5131 # not for PA HP-UX.
5132 case $host_cpu in
5133 hppa*64*|ia64*)
5134 # +Z the default
5135 ;;
5136 *)
5137 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5138 ;;
5139 esac
5140 ;;
5141
5142 *)
5143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5144 ;;
5145 esac
5146 else
5147 # PORTME Check for flag to pass linker flags through the system compiler.
5148 case $host_os in
5149 aix*)
5150 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5151 if test "$host_cpu" = ia64; then
5152 # AIX 5 now supports IA64 processor
5153 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5154 else
5155 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5156 fi
5157 ;;
5158 darwin*)
5159 # PIC is the default on this platform
5160 # Common symbols not allowed in MH_DYLIB files
5161 case $cc_basename in
5162 xlc*)
5163 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5164 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5165 ;;
5166 esac
5167 ;;
5168
5169 mingw* | pw32* | os2*)
5170 # This hack is so that the source file can tell whether it is being
5171 # built for inclusion in a dll (and should export symbols for example).
5172 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5173 ;;
5174
5175 hpux9* | hpux10* | hpux11*)
5176 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5177 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5178 # not for PA HP-UX.
5179 case $host_cpu in
5180 hppa*64*|ia64*)
5181 # +Z the default
5182 ;;
5183 *)
5184 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5185 ;;
5186 esac
5187 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5188 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5189 ;;
5190
5191 irix5* | irix6* | nonstopux*)
5192 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5193 # PIC (with -KPIC) is the default.
5194 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5195 ;;
5196
5197 newsos6)
5198 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5199 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5200 ;;
5201
5202 linux* | k*bsd*-gnu)
5203 case $cc_basename in
5204 icc* | ecc*)
5205 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5207 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5208 ;;
5209 pgcc* | pgf77* | pgf90* | pgf95*)
5210 # Portland Group compilers (*not* the Pentium gcc compiler,
5211 # which looks to be a dead project)
5212 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5213 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5214 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5215 ;;
5216 ccc*)
5217 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5218 # All Alpha code is PIC.
5219 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5220 ;;
5221 esac
5222 ;;
5223
5224 osf3* | osf4* | osf5*)
5225 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5226 # All OSF/1 code is PIC.
5227 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5228 ;;
5229
5230 solaris*)
5231 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5232 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5233 case $cc_basename in
5234 f77* | f90* | f95*)
5235 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5236 *)
5237 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5238 esac
5239 ;;
5240
5241 sunos4*)
5242 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5243 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5244 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5245 ;;
5246
5247 sysv4 | sysv4.2uw2* | sysv4.3*)
5248 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5249 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5250 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5251 ;;
5252
5253 sysv4*MP*)
5254 if test -d /usr/nec ;then
5255 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5256 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5257 fi
5258 ;;
5259
5260 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5261 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5262 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5264 ;;
5265
5266 unicos*)
5267 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5268 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5269 ;;
5270
5271 uts4*)
5272 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5273 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5274 ;;
5275
5276 *)
5277 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5278 ;;
5279 esac
5280 fi
5281 ])
5282 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5283
5284 #
5285 # Check to make sure the PIC flag actually works.
5286 #
5287 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5288 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5289 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5290 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5291 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5292 "" | " "*) ;;
5293 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5294 esac],
5295 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5296 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5297 fi
5298 case $host_os in
5299 # For platforms which do not support PIC, -DPIC is meaningless:
5300 *djgpp*)
5301 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5302 ;;
5303 *)
5304 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5305 ;;
5306 esac
5307
5308 #
5309 # Check to make sure the static flag actually works.
5310 #
5311 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5312 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5313 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5314 $lt_tmp_static_flag,
5315 [],
5316 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5317 ])
5318
5319
5320 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5321 # ------------------------------------
5322 # See if the linker supports building shared libraries.
5323 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5324 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5325 ifelse([$1],[CXX],[
5326 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
35445327 case $host_os in
3545 cygwin* | mingw* | pw32* | os2*)
3546 cat <<'EOF' >> "${ofile}T"
3547 # This is a source program that is used to create dlls on Windows
3548 # Don't remove nor modify the starting and closing comments
5328 aix4* | aix5*)
5329 # If we're using GNU nm, then we don't want the "-C" option.
5330 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5331 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5332 _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'
5333 else
5334 _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'
5335 fi
5336 ;;
5337 pw32*)
5338 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5339 ;;
5340 cygwin* | mingw*)
5341 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5342 ;;
5343 linux* | k*bsd*-gnu)
5344 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5345 ;;
5346 *)
5347 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5348 ;;
5349 esac
5350 ],[
5351 runpath_var=
5352 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5353 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5354 _LT_AC_TAGVAR(archive_cmds, $1)=
5355 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5356 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5357 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5358 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5359 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5360 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5361 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5364 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5365 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5366 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5367 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5368 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5369 _LT_AC_TAGVAR(module_cmds, $1)=
5370 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5371 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5372 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5373 # include_expsyms should be a list of space-separated symbols to be *always*
5374 # included in the symbol list
5375 _LT_AC_TAGVAR(include_expsyms, $1)=
5376 # exclude_expsyms can be an extended regexp of symbols to exclude
5377 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5378 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5379 # as well as any symbol that contains `d'.
5380 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5381 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5382 # platforms (ab)use it in PIC code, but their linkers get confused if
5383 # the symbol is explicitly referenced. Since portable code cannot
5384 # rely on this symbol name, it's probably fine to never include it in
5385 # preloaded symbol tables.
5386 extract_expsyms_cmds=
5387 # Just being paranoid about ensuring that cc_basename is set.
5388 _LT_CC_BASENAME([$compiler])
5389 case $host_os in
5390 cygwin* | mingw* | pw32*)
5391 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5392 # When not using gcc, we currently assume that we are using
5393 # Microsoft Visual C++.
5394 if test "$GCC" != yes; then
5395 with_gnu_ld=no
5396 fi
5397 ;;
5398 interix*)
5399 # we just hope/assume this is gcc and not c89 (= MSVC++)
5400 with_gnu_ld=yes
5401 ;;
5402 openbsd*)
5403 with_gnu_ld=no
5404 ;;
5405 esac
5406
5407 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5408 if test "$with_gnu_ld" = yes; then
5409 # If archive_cmds runs LD, not CC, wlarc should be empty
5410 wlarc='${wl}'
5411
5412 # Set some defaults for GNU ld with shared library support. These
5413 # are reset later if shared libraries are not supported. Putting them
5414 # here allows them to be overridden if necessary.
5415 runpath_var=LD_RUN_PATH
5416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5417 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5418 # ancient GNU ld didn't support --whole-archive et. al.
5419 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5420 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5421 else
5422 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5423 fi
5424 supports_anon_versioning=no
5425 case `$LD -v 2>/dev/null` in
5426 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5427 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5428 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5429 *\ 2.11.*) ;; # other 2.11 versions
5430 *) supports_anon_versioning=yes ;;
5431 esac
5432
5433 # See if GNU ld supports shared libraries.
5434 case $host_os in
5435 aix3* | aix4* | aix5*)
5436 # On AIX/PPC, the GNU linker is very broken
5437 if test "$host_cpu" != ia64; then
5438 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5439 cat <<EOF 1>&2
5440
5441 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5442 *** to be unable to reliably create shared libraries on AIX.
5443 *** Therefore, libtool is disabling shared libraries support. If you
5444 *** really care for shared libraries, you may want to modify your PATH
5445 *** so that a non-GNU linker is found, and then restart.
5446
5447 EOF
5448 fi
5449 ;;
5450
5451 amigaos*)
5452 _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)'
5453 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5454 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5455
5456 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5457 # that the semantics of dynamic libraries on AmigaOS, at least up
5458 # to version 4, is to share data among multiple programs linked
5459 # with the same dynamic library. Since this doesn't match the
5460 # behavior of shared libraries on other platforms, we can't use
5461 # them.
5462 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5463 ;;
5464
5465 beos*)
5466 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5467 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5468 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5469 # support --undefined. This deserves some investigation. FIXME
5470 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5471 else
5472 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5473 fi
5474 ;;
5475
5476 cygwin* | mingw* | pw32*)
5477 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5478 # as there is no search path for DLLs.
5479 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5480 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5481 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5482 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5483 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5484
5485 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5486 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5487 # If the export-symbols file already is a .def file (1st line
5488 # is EXPORTS), use it as is; otherwise, prepend...
5489 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5490 cp $export_symbols $output_objdir/$soname.def;
5491 else
5492 echo EXPORTS > $output_objdir/$soname.def;
5493 cat $export_symbols >> $output_objdir/$soname.def;
5494 fi~
5495 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5496 else
5497 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5498 fi
5499 ;;
5500
5501 interix3*)
5502 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5503 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5504 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5505 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5506 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5507 # Instead, shared libraries are loaded at an image base (0x10000000 by
5508 # default) and relocated if they conflict, which is a slow very memory
5509 # consuming and fragmenting process. To avoid this, we pick a random,
5510 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5511 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5512 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5513 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5514 ;;
5515
5516 linux* | k*bsd*-gnu)
5517 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5518 tmp_addflag=
5519 case $cc_basename,$host_cpu in
5520 pgcc*) # Portland Group C compiler
5521 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5522 tmp_addflag=' $pic_flag'
5523 ;;
5524 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5525 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5526 tmp_addflag=' $pic_flag -Mnomain' ;;
5527 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5528 tmp_addflag=' -i_dynamic' ;;
5529 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5530 tmp_addflag=' -i_dynamic -nofor_main' ;;
5531 ifc* | ifort*) # Intel Fortran compiler
5532 tmp_addflag=' -nofor_main' ;;
5533 esac
5534 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5535
5536 if test $supports_anon_versioning = yes; then
5537 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5538 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5539 $echo "local: *; };" >> $output_objdir/$libname.ver~
5540 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5541 fi
5542 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5543 else
5544 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5545 fi
5546 ;;
5547
5548 netbsd* | netbsdelf*-gnu)
5549 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5550 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5551 wlarc=
5552 else
5553 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5554 _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'
5555 fi
5556 ;;
5557
5558 solaris*)
5559 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5560 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5561 cat <<EOF 1>&2
5562
5563 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5564 *** create shared libraries on Solaris systems. Therefore, libtool
5565 *** is disabling shared libraries support. We urge you to upgrade GNU
5566 *** binutils to release 2.9.1 or newer. Another option is to modify
5567 *** your PATH or compiler configuration so that the native linker is
5568 *** used, and then restart.
5569
5570 EOF
5571 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5572 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5573 _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'
5574 else
5575 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5576 fi
5577 ;;
5578
5579 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5580 case `$LD -v 2>&1` in
5581 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5582 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5583 cat <<_LT_EOF 1>&2
5584
5585 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5586 *** reliably create shared libraries on SCO systems. Therefore, libtool
5587 *** is disabling shared libraries support. We urge you to upgrade GNU
5588 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5589 *** your PATH or compiler configuration so that the native linker is
5590 *** used, and then restart.
5591
5592 _LT_EOF
5593 ;;
5594 *)
5595 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5596 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5597 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5598 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5599 else
5600 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5601 fi
5602 ;;
5603 esac
5604 ;;
5605
5606 sunos4*)
5607 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5608 wlarc=
5609 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5610 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5611 ;;
5612
5613 *)
5614 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5615 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5616 _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'
5617 else
5618 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5619 fi
5620 ;;
5621 esac
5622
5623 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5624 runpath_var=
5625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5626 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5627 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5628 fi
5629 else
5630 # PORTME fill in a description of your system's linker (not GNU ld)
5631 case $host_os in
5632 aix3*)
5633 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5634 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5635 _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'
5636 # Note: this linker hardcodes the directories in LIBPATH if there
5637 # are no directories specified by -L.
5638 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5639 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5640 # Neither direct hardcoding nor static linking is supported with a
5641 # broken collect2.
5642 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5643 fi
5644 ;;
5645
5646 aix4* | aix5*)
5647 if test "$host_cpu" = ia64; then
5648 # On IA64, the linker does run time linking by default, so we don't
5649 # have to do anything special.
5650 aix_use_runtimelinking=no
5651 exp_sym_flag='-Bexport'
5652 no_entry_flag=""
5653 else
5654 # If we're using GNU nm, then we don't want the "-C" option.
5655 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5656 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5657 _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'
5658 else
5659 _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'
5660 fi
5661 aix_use_runtimelinking=no
5662
5663 # Test if we are trying to use run time linking or normal
5664 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5665 # need to do runtime linking.
5666 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5667 for ld_flag in $LDFLAGS; do
5668 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5669 aix_use_runtimelinking=yes
5670 break
5671 fi
5672 done
5673 ;;
5674 esac
5675
5676 exp_sym_flag='-bexport'
5677 no_entry_flag='-bnoentry'
5678 fi
5679
5680 # When large executables or shared objects are built, AIX ld can
5681 # have problems creating the table of contents. If linking a library
5682 # or program results in "error TOC overflow" add -mminimal-toc to
5683 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5684 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5685
5686 _LT_AC_TAGVAR(archive_cmds, $1)=''
5687 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5688 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5689 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5690
5691 if test "$GCC" = yes; then
5692 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5693 # We only want to do this on AIX 4.2 and lower, the check
5694 # below for broken collect2 doesn't work under 4.3+
5695 collect2name=`${CC} -print-prog-name=collect2`
5696 if test -f "$collect2name" && \
5697 strings "$collect2name" | grep resolve_lib_name >/dev/null
5698 then
5699 # We have reworked collect2
5700 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5701 else
5702 # We have old collect2
5703 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5704 # It fails to find uninstalled libraries when the uninstalled
5705 # path is not listed in the libpath. Setting hardcode_minus_L
5706 # to unsupported forces relinking
5707 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5708 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5709 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5710 fi
5711 ;;
5712 esac
5713 shared_flag='-shared'
5714 if test "$aix_use_runtimelinking" = yes; then
5715 shared_flag="$shared_flag "'${wl}-G'
5716 fi
5717 else
5718 # not using gcc
5719 if test "$host_cpu" = ia64; then
5720 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5721 # chokes on -Wl,-G. The following line is correct:
5722 shared_flag='-G'
5723 else
5724 if test "$aix_use_runtimelinking" = yes; then
5725 shared_flag='${wl}-G'
5726 else
5727 shared_flag='${wl}-bM:SRE'
5728 fi
5729 fi
5730 fi
5731
5732 # It seems that -bexpall does not export symbols beginning with
5733 # underscore (_), so it is better to generate a list of symbols to export.
5734 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5735 if test "$aix_use_runtimelinking" = yes; then
5736 # Warning - without using the other runtime loading flags (-brtl),
5737 # -berok will link without error, but may produce a broken library.
5738 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5739 # Determine the default libpath from the value encoded in an empty executable.
5740 _LT_AC_SYS_LIBPATH_AIX
5741 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5742 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5743 else
5744 if test "$host_cpu" = ia64; then
5745 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5746 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5747 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5748 else
5749 # Determine the default libpath from the value encoded in an empty executable.
5750 _LT_AC_SYS_LIBPATH_AIX
5751 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5752 # Warning - without using the other run time loading flags,
5753 # -berok will link without error, but may produce a broken library.
5754 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5755 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5756 # Exported symbols can be pulled into shared objects from archives
5757 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5758 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5759 # This is similar to how AIX traditionally builds its shared libraries.
5760 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5761 fi
5762 fi
5763 ;;
5764
5765 amigaos*)
5766 _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)'
5767 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5768 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5769 # see comment about different semantics on the GNU ld section
5770 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5771 ;;
5772
5773 bsdi[[45]]*)
5774 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5775 ;;
5776
5777 cygwin* | mingw* | pw32*)
5778 # When not using gcc, we currently assume that we are using
5779 # Microsoft Visual C++.
5780 # hardcode_libdir_flag_spec is actually meaningless, as there is
5781 # no search path for DLLs.
5782 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5783 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5784 # Tell ltmain to make .lib files, not .a files.
5785 libext=lib
5786 # Tell ltmain to make .dll files, not .so files.
5787 shrext_cmds=".dll"
5788 # FIXME: Setting linknames here is a bad hack.
5789 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5790 # The linker will automatically build a .lib file if we build a DLL.
5791 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5792 # FIXME: Should let the user specify the lib program.
5793 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5794 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5795 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5796 ;;
5797
5798 darwin* | rhapsody*)
5799 case $host_os in
5800 rhapsody* | darwin1.[[012]])
5801 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5802 ;;
5803 *) # Darwin 1.3 on
5804 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5805 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5806 else
5807 case ${MACOSX_DEPLOYMENT_TARGET} in
5808 10.[[012]])
5809 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5810 ;;
5811 10.*)
5812 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5813 ;;
5814 esac
5815 fi
5816 ;;
5817 esac
5818 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5819 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5820 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5821 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5822 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5823 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5824 if test "$GCC" = yes ; then
5825 output_verbose_link_cmd='echo'
5826 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5827 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5828 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5829 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5830 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5831 else
5832 case $cc_basename in
5833 xlc*)
5834 output_verbose_link_cmd='echo'
5835 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5836 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5837 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5838 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5839 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5840 ;;
5841 *)
5842 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5843 ;;
5844 esac
5845 fi
5846 ;;
5847
5848 dgux*)
5849 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5850 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5851 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5852 ;;
5853
5854 freebsd1*)
5855 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5856 ;;
5857
5858 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5859 # support. Future versions do this automatically, but an explicit c++rt0.o
5860 # does not break anything, and helps significantly (at the cost of a little
5861 # extra space).
5862 freebsd2.2*)
5863 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5864 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5865 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5866 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5867 ;;
5868
5869 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5870 freebsd2*)
5871 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5872 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5873 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5874 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5875 ;;
5876
5877 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5878 freebsd* | dragonfly*)
5879 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5880 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5881 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5882 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5883 ;;
5884
5885 hpux9*)
5886 if test "$GCC" = yes; then
5887 _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'
5888 else
5889 _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'
5890 fi
5891 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5892 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5893 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5894
5895 # hardcode_minus_L: Not really in the search PATH,
5896 # but as the default location of the library.
5897 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5898 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5899 ;;
5900
5901 hpux10*)
5902 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5903 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5904 else
5905 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5906 fi
5907 if test "$with_gnu_ld" = no; then
5908 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5909 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5910
5911 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5912 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5913
5914 # hardcode_minus_L: Not really in the search PATH,
5915 # but as the default location of the library.
5916 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5917 fi
5918 ;;
5919
5920 hpux11*)
5921 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5922 case $host_cpu in
5923 hppa*64*)
5924 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5925 ;;
5926 ia64*)
5927 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5928 ;;
5929 *)
5930 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5931 ;;
5932 esac
5933 else
5934 case $host_cpu in
5935 hppa*64*)
5936 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5937 ;;
5938 ia64*)
5939 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5940 ;;
5941 *)
5942 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5943 ;;
5944 esac
5945 fi
5946 if test "$with_gnu_ld" = no; then
5947 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5948 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5949
5950 case $host_cpu in
5951 hppa*64*|ia64*)
5952 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5953 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5954 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5955 ;;
5956 *)
5957 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5958 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5959
5960 # hardcode_minus_L: Not really in the search PATH,
5961 # but as the default location of the library.
5962 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5963 ;;
5964 esac
5965 fi
5966 ;;
5967
5968 irix5* | irix6* | nonstopux*)
5969 if test "$GCC" = yes; then
5970 _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'
5971 else
5972 _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'
5973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5974 fi
5975 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5976 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5977 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5978 ;;
5979
5980 netbsd* | netbsdelf*-gnu)
5981 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5982 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5983 else
5984 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5985 fi
5986 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5987 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5989 ;;
5990
5991 newsos6)
5992 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5993 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5994 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5995 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5996 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5997 ;;
5998
5999 openbsd*)
6000 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6001 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6002 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6003 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6004 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6005 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6006 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6007 else
6008 case $host_os in
6009 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6010 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6011 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6012 ;;
6013 *)
6014 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6015 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6016 ;;
6017 esac
6018 fi
6019 ;;
6020
6021 os2*)
6022 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6023 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6024 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6025 _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'
6026 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6027 ;;
6028
6029 osf3*)
6030 if test "$GCC" = yes; then
6031 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6032 _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'
6033 else
6034 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6035 _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'
6036 fi
6037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6038 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6039 ;;
6040
6041 osf4* | osf5*) # as osf3* with the addition of -msym flag
6042 if test "$GCC" = yes; then
6043 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6044 _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'
6045 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6046 else
6047 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6048 _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'
6049 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6050 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6051
6052 # Both c and cxx compiler support -rpath directly
6053 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6054 fi
6055 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6056 ;;
6057
6058 solaris*)
6059 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6060 if test "$GCC" = yes; then
6061 wlarc='${wl}'
6062 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6063 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6064 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6065 else
6066 wlarc=''
6067 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6069 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6070 fi
6071 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6072 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6073 case $host_os in
6074 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6075 *)
6076 # The compiler driver will combine linker options so we
6077 # cannot just pass the convience library names through
6078 # without $wl, iff we do not link with $LD.
6079 # Luckily, gcc supports the same syntax we need for Sun Studio.
6080 # Supported since Solaris 2.6 (maybe 2.5.1?)
6081 case $wlarc in
6082 '')
6083 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6084 *)
6085 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6086 esac ;;
6087 esac
6088 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6089 ;;
6090
6091 sunos4*)
6092 if test "x$host_vendor" = xsequent; then
6093 # Use $CC to link under sequent, because it throws in some extra .o
6094 # files that make .init and .fini sections work.
6095 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6096 else
6097 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6098 fi
6099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6100 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6101 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6102 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6103 ;;
6104
6105 sysv4)
6106 case $host_vendor in
6107 sni)
6108 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6109 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6110 ;;
6111 siemens)
6112 ## LD is ld it makes a PLAMLIB
6113 ## CC just makes a GrossModule.
6114 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6115 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6116 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6117 ;;
6118 motorola)
6119 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6120 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6121 ;;
6122 esac
6123 runpath_var='LD_RUN_PATH'
6124 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125 ;;
6126
6127 sysv4.3*)
6128 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6129 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6130 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6131 ;;
6132
6133 sysv4*MP*)
6134 if test -d /usr/nec; then
6135 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6136 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6137 runpath_var=LD_RUN_PATH
6138 hardcode_runpath_var=yes
6139 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6140 fi
6141 ;;
6142
6143 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6144 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6145 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6146 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6147 runpath_var='LD_RUN_PATH'
6148
6149 if test "$GCC" = yes; then
6150 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6151 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6152 else
6153 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6154 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6155 fi
6156 ;;
6157
6158 sysv5* | sco3.2v5* | sco5v6*)
6159 # Note: We can NOT use -z defs as we might desire, because we do not
6160 # link with -lc, and that would cause any symbols used from libc to
6161 # always be unresolved, which means just about no library would
6162 # ever link correctly. If we're not using GNU ld we use -z text
6163 # though, which does catch some bad symbols but isn't as heavy-handed
6164 # as -z defs.
6165 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6166 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6167 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6168 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6169 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6170 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6171 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6172 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6173 runpath_var='LD_RUN_PATH'
6174
6175 if test "$GCC" = yes; then
6176 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6177 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6178 else
6179 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6180 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6181 fi
6182 ;;
6183
6184 uts4*)
6185 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6186 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6187 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6188 ;;
6189
6190 *)
6191 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6192 ;;
6193 esac
6194 fi
6195 ])
6196 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6197 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6198
6199 #
6200 # Do we need to explicitly link libc?
6201 #
6202 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6203 x|xyes)
6204 # Assume -lc should be added
6205 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6206
6207 if test "$enable_shared" = yes && test "$GCC" = yes; then
6208 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6209 *'~'*)
6210 # FIXME: we may have to deal with multi-command sequences.
6211 ;;
6212 '$CC '*)
6213 # Test whether the compiler implicitly links with -lc since on some
6214 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6215 # to ld, don't add -lc before -lgcc.
6216 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6217 $rm conftest*
6218 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6219
6220 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6221 soname=conftest
6222 lib=conftest
6223 libobjs=conftest.$ac_objext
6224 deplibs=
6225 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6226 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6227 compiler_flags=-v
6228 linker_flags=-v
6229 verstring=
6230 output_objdir=.
6231 libname=conftest
6232 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6233 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6234 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6235 then
6236 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6237 else
6238 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6239 fi
6240 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6241 else
6242 cat conftest.err 1>&5
6243 fi
6244 $rm conftest*
6245 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6246 ;;
6247 esac
6248 fi
6249 ;;
6250 esac
6251 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6252
6253
6254 # _LT_AC_FILE_LTDLL_C
6255 # -------------------
6256 # Be careful that the start marker always follows a newline.
6257 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
35496258 # /* ltdll.c starts here */
35506259 # #define WIN32_LEAN_AND_MEAN
35516260 # #include <windows.h>
35796288 # return TRUE;
35806289 # }
35816290 # /* ltdll.c ends here */
3582 # This is a source program that is used to create import libraries
3583 # on Windows for dlls which lack them. Don't remove nor modify the
3584 # starting and closing comments
3585 # /* impgen.c starts here */
3586 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3587 #
3588 # This file is part of GNU libtool.
3589 #
3590 # This program is free software; you can redistribute it and/or modify
3591 # it under the terms of the GNU General Public License as published by
3592 # the Free Software Foundation; either version 2 of the License, or
3593 # (at your option) any later version.
3594 #
3595 # This program is distributed in the hope that it will be useful,
3596 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3597 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3598 # GNU General Public License for more details.
3599 #
3600 # You should have received a copy of the GNU General Public License
3601 # along with this program; if not, write to the Free Software
3602 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3603 # */
3604 #
3605 # #include <stdio.h> /* for printf() */
3606 # #include <unistd.h> /* for open(), lseek(), read() */
3607 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3608 # #include <string.h> /* for strdup() */
3609 #
3610 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3611 # #ifndef O_BINARY
3612 # #define O_BINARY 0
3613 # #endif
3614 #
3615 # static unsigned int
3616 # pe_get16 (fd, offset)
3617 # int fd;
3618 # int offset;
3619 # {
3620 # unsigned char b[2];
3621 # lseek (fd, offset, SEEK_SET);
3622 # read (fd, b, 2);
3623 # return b[0] + (b[1]<<8);
3624 # }
3625 #
3626 # static unsigned int
3627 # pe_get32 (fd, offset)
3628 # int fd;
3629 # int offset;
3630 # {
3631 # unsigned char b[4];
3632 # lseek (fd, offset, SEEK_SET);
3633 # read (fd, b, 4);
3634 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3635 # }
3636 #
3637 # static unsigned int
3638 # pe_as32 (ptr)
3639 # void *ptr;
3640 # {
3641 # unsigned char *b = ptr;
3642 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3643 # }
3644 #
3645 # int
3646 # main (argc, argv)
3647 # int argc;
3648 # char *argv[];
3649 # {
3650 # int dll;
3651 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3652 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3653 # unsigned long name_rvas, nexp;
3654 # unsigned char *expdata, *erva;
3655 # char *filename, *dll_name;
3656 #
3657 # filename = argv[1];
3658 #
3659 # dll = open(filename, O_RDONLY|O_BINARY);
3660 # if (dll < 1)
3661 # return 1;
3662 #
3663 # dll_name = filename;
3664 #
3665 # for (i=0; filename[i]; i++)
3666 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3667 # dll_name = filename + i +1;
3668 #
3669 # pe_header_offset = pe_get32 (dll, 0x3c);
3670 # opthdr_ofs = pe_header_offset + 4 + 20;
3671 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3672 #
3673 # if (num_entries < 1) /* no exports */
3674 # return 1;
3675 #
3676 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3677 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3678 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3679 # secptr = (pe_header_offset + 4 + 20 +
3680 # pe_get16 (dll, pe_header_offset + 4 + 16));
3681 #
3682 # expptr = 0;
3683 # for (i = 0; i < nsections; i++)
3684 # {
3685 # char sname[8];
3686 # unsigned long secptr1 = secptr + 40 * i;
3687 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3688 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3689 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3690 # lseek(dll, secptr1, SEEK_SET);
3691 # read(dll, sname, 8);
3692 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3693 # {
3694 # expptr = fptr + (export_rva - vaddr);
3695 # if (export_rva + export_size > vaddr + vsize)
3696 # export_size = vsize - (export_rva - vaddr);
3697 # break;
3698 # }
3699 # }
3700 #
3701 # expdata = (unsigned char*)malloc(export_size);
3702 # lseek (dll, expptr, SEEK_SET);
3703 # read (dll, expdata, export_size);
3704 # erva = expdata - export_rva;
3705 #
3706 # nexp = pe_as32 (expdata+24);
3707 # name_rvas = pe_as32 (expdata+32);
3708 #
3709 # printf ("EXPORTS\n");
3710 # for (i = 0; i<nexp; i++)
3711 # {
3712 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3713 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3714 # }
3715 #
3716 # return 0;
3717 # }
3718 # /* impgen.c ends here */
3719
3720 EOF
3721 ;;
3722 esac
3723
3724 # We use sed instead of cat because bash on DJGPP gets confused if
3725 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3726 # text mode, it properly converts lines to CR/LF. This bash problem
3727 # is reportedly fixed, but why not run on old versions too?
3728 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3729
3730 mv -f "${ofile}T" "$ofile" || \
3731 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3732 chmod +x "$ofile"
3733 fi
3734
3735 ])# _LT_AC_LTCONFIG_HACK
3736
3737 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3738 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3739
3740 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3741 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3742
3743 # AC_ENABLE_SHARED - implement the --enable-shared flag
3744 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3745 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3746 # `yes'.
3747 AC_DEFUN([AC_ENABLE_SHARED],
3748 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3749 AC_ARG_ENABLE(shared,
3750 changequote(<<, >>)dnl
3751 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3752 changequote([, ])dnl
3753 [p=${PACKAGE-default}
3754 case $enableval in
3755 yes) enable_shared=yes ;;
3756 no) enable_shared=no ;;
3757 *)
3758 enable_shared=no
3759 # Look at the argument we got. We use all the common list separators.
3760 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3761 for pkg in $enableval; do
3762 if test "X$pkg" = "X$p"; then
3763 enable_shared=yes
3764 fi
3765 done
3766 IFS="$ac_save_ifs"
3767 ;;
3768 esac],
3769 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3770 ])
3771
3772 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3773 AC_DEFUN([AC_DISABLE_SHARED],
3774 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3775 AC_ENABLE_SHARED(no)])
3776
3777 # AC_ENABLE_STATIC - implement the --enable-static flag
3778 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3779 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3780 # `yes'.
3781 AC_DEFUN([AC_ENABLE_STATIC],
3782 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3783 AC_ARG_ENABLE(static,
3784 changequote(<<, >>)dnl
3785 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3786 changequote([, ])dnl
3787 [p=${PACKAGE-default}
3788 case $enableval in
3789 yes) enable_static=yes ;;
3790 no) enable_static=no ;;
3791 *)
3792 enable_static=no
3793 # Look at the argument we got. We use all the common list separators.
3794 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3795 for pkg in $enableval; do
3796 if test "X$pkg" = "X$p"; then
3797 enable_static=yes
3798 fi
3799 done
3800 IFS="$ac_save_ifs"
3801 ;;
3802 esac],
3803 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3804 ])
3805
3806 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3807 AC_DEFUN([AC_DISABLE_STATIC],
3808 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3809 AC_ENABLE_STATIC(no)])
3810
3811
3812 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3813 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3814 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3815 # `yes'.
3816 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3817 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3818 AC_ARG_ENABLE(fast-install,
3819 changequote(<<, >>)dnl
3820 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3821 changequote([, ])dnl
3822 [p=${PACKAGE-default}
3823 case $enableval in
3824 yes) enable_fast_install=yes ;;
3825 no) enable_fast_install=no ;;
3826 *)
3827 enable_fast_install=no
3828 # Look at the argument we got. We use all the common list separators.
3829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3830 for pkg in $enableval; do
3831 if test "X$pkg" = "X$p"; then
3832 enable_fast_install=yes
3833 fi
3834 done
3835 IFS="$ac_save_ifs"
3836 ;;
3837 esac],
3838 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3839 ])
3840
3841 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3842 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3843 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3844 AC_ENABLE_FAST_INSTALL(no)])
3845
3846 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3847 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3848 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3849 # `both'.
3850 AC_DEFUN([AC_LIBTOOL_PICMODE],
3851 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3852 pic_mode=ifelse($#,1,$1,default)])
3853
3854
3855 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3856 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3857 [AC_MSG_CHECKING([for $1])
3858 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3859 [case $MAGIC_CMD in
3860 /*)
3861 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3862 ;;
3863 ?:/*)
3864 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3865 ;;
3866 *)
3867 ac_save_MAGIC_CMD="$MAGIC_CMD"
3868 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3869 dnl $ac_dummy forces splitting on constant user-supplied paths.
3870 dnl POSIX.2 word splitting is done only on the output of word expansions,
3871 dnl not every word. This closes a longstanding sh security hole.
3872 ac_dummy="ifelse([$2], , $PATH, [$2])"
3873 for ac_dir in $ac_dummy; do
3874 test -z "$ac_dir" && ac_dir=.
3875 if test -f $ac_dir/$1; then
3876 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3877 if test -n "$file_magic_test_file"; then
3878 case $deplibs_check_method in
3879 "file_magic "*)
3880 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3881 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3882 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3883 egrep "$file_magic_regex" > /dev/null; then
3884 :
3885 else
3886 cat <<EOF 1>&2
3887
3888 *** Warning: the command libtool uses to detect shared libraries,
3889 *** $file_magic_cmd, produces output that libtool cannot recognize.
3890 *** The result is that libtool may fail to recognize shared libraries
3891 *** as such. This will affect the creation of libtool libraries that
3892 *** depend on shared libraries, but programs linked with such libtool
3893 *** libraries will work regardless of this problem. Nevertheless, you
3894 *** may want to report the problem to your system manager and/or to
3895 *** bug-libtool@gnu.org
3896
3897 EOF
3898 fi ;;
3899 esac
3900 fi
3901 break
3902 fi
3903 done
3904 IFS="$ac_save_ifs"
3905 MAGIC_CMD="$ac_save_MAGIC_CMD"
3906 ;;
3907 esac])
3908 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3909 if test -n "$MAGIC_CMD"; then
3910 AC_MSG_RESULT($MAGIC_CMD)
3911 else
3912 AC_MSG_RESULT(no)
3913 fi
3914 ])
3915
3916
3917 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3918 AC_DEFUN([AC_PATH_MAGIC],
3919 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3920 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3921 if test -z "$lt_cv_path_MAGIC_CMD"; then
3922 if test -n "$ac_tool_prefix"; then
3923 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3924 else
3925 MAGIC_CMD=:
3926 fi
3927 fi
3928 ])
3929
3930
3931 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3932 AC_DEFUN([AC_PROG_LD],
3933 [AC_ARG_WITH(gnu-ld,
3934 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3935 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3936 AC_REQUIRE([AC_PROG_CC])dnl
3937 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3938 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3939 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3940 ac_prog=ld
3941 if test "$GCC" = yes; then
3942 # Check if gcc -print-prog-name=ld gives a path.
3943 AC_MSG_CHECKING([for ld used by GCC])
3944 case $host in
3945 *-*-mingw*)
3946 # gcc leaves a trailing carriage return which upsets mingw
3947 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3948 *)
3949 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3950 esac
3951 case $ac_prog in
3952 # Accept absolute paths.
3953 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3954 re_direlt='/[[^/]][[^/]]*/\.\./'
3955 # Canonicalize the path of ld
3956 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3957 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3958 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3959 done
3960 test -z "$LD" && LD="$ac_prog"
3961 ;;
3962 "")
3963 # If it fails, then pretend we aren't using GCC.
3964 ac_prog=ld
3965 ;;
3966 *)
3967 # If it is relative, then search for the first ld in PATH.
3968 with_gnu_ld=unknown
3969 ;;
3970 esac
3971 elif test "$with_gnu_ld" = yes; then
3972 AC_MSG_CHECKING([for GNU ld])
3973 else
3974 AC_MSG_CHECKING([for non-GNU ld])
3975 fi
3976 AC_CACHE_VAL(lt_cv_path_LD,
3977 [if test -z "$LD"; then
3978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3979 for ac_dir in $PATH; do
3980 test -z "$ac_dir" && ac_dir=.
3981 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3982 lt_cv_path_LD="$ac_dir/$ac_prog"
3983 # Check to see if the program is GNU ld. I'd rather use --version,
3984 # but apparently some GNU ld's only accept -v.
3985 # Break only if it was the GNU/non-GNU ld that we prefer.
3986 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3987 test "$with_gnu_ld" != no && break
3988 else
3989 test "$with_gnu_ld" != yes && break
3990 fi
3991 fi
3992 done
3993 IFS="$ac_save_ifs"
3994 else
3995 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3996 fi])
3997 LD="$lt_cv_path_LD"
3998 if test -n "$LD"; then
3999 AC_MSG_RESULT($LD)
4000 else
4001 AC_MSG_RESULT(no)
4002 fi
4003 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4004 AC_PROG_LD_GNU
4005 ])
4006
4007 # AC_PROG_LD_GNU -
4008 AC_DEFUN([AC_PROG_LD_GNU],
4009 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4010 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4011 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4012 lt_cv_prog_gnu_ld=yes
4013 else
4014 lt_cv_prog_gnu_ld=no
4015 fi])
4016 with_gnu_ld=$lt_cv_prog_gnu_ld
4017 ])
4018
4019 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4020 # -- PORTME Some linkers may need a different reload flag.
4021 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4022 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4023 [lt_cv_ld_reload_flag='-r'])
4024 reload_flag=$lt_cv_ld_reload_flag
4025 test -n "$reload_flag" && reload_flag=" $reload_flag"
4026 ])
4027
4028 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4029 # -- PORTME fill in with the dynamic library characteristics
4030 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4031 [AC_CACHE_CHECK([how to recognise dependent libraries],
4032 lt_cv_deplibs_check_method,
4033 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4034 lt_cv_file_magic_test_file=
4035 lt_cv_deplibs_check_method='unknown'
4036 # Need to set the preceding variable on all platforms that support
4037 # interlibrary dependencies.
4038 # 'none' -- dependencies not supported.
4039 # `unknown' -- same as none, but documents that we really don't know.
4040 # 'pass_all' -- all dependencies passed with no checks.
4041 # 'test_compile' -- check by making test program.
4042 # 'file_magic [[regex]]' -- check by looking for files in library path
4043 # which responds to the $file_magic_cmd with a given egrep regex.
4044 # If you have `file' or equivalent on your system and you're not sure
4045 # whether `pass_all' will *always* work, you probably want this one.
4046
4047 case $host_os in
4048 aix4* | aix5*)
4049 lt_cv_deplibs_check_method=pass_all
4050 ;;
4051
4052 beos*)
4053 lt_cv_deplibs_check_method=pass_all
4054 ;;
4055
4056 bsdi4*)
4057 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4058 lt_cv_file_magic_cmd='/usr/bin/file -L'
4059 lt_cv_file_magic_test_file=/shlib/libc.so
4060 ;;
4061
4062 cygwin* | mingw* | pw32*)
4063 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4064 lt_cv_file_magic_cmd='$OBJDUMP -f'
4065 ;;
4066
4067 darwin* | rhapsody*)
4068 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4069 lt_cv_file_magic_cmd='/usr/bin/file -L'
4070 case "$host_os" in
4071 rhapsody* | darwin1.[[012]])
4072 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4073 ;;
4074 *) # Darwin 1.3 on
4075 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4076 ;;
4077 esac
4078 ;;
4079
4080 freebsd*)
4081 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4082 case $host_cpu in
4083 i*86 )
4084 # Not sure whether the presence of OpenBSD here was a mistake.
4085 # Let's accept both of them until this is cleared up.
4086 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4087 lt_cv_file_magic_cmd=/usr/bin/file
4088 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4089 ;;
4090 esac
4091 else
4092 lt_cv_deplibs_check_method=pass_all
4093 fi
4094 ;;
4095
4096 gnu*)
4097 lt_cv_deplibs_check_method=pass_all
4098 ;;
4099
4100 hpux10.20*|hpux11*)
4101 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4102 lt_cv_file_magic_cmd=/usr/bin/file
4103 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4104 ;;
4105
4106 irix5* | irix6* | nonstopux*)
4107 case $host_os in
4108 irix5* | nonstopux*)
4109 # this will be overridden with pass_all, but let us keep it just in case
4110 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4111 ;;
4112 *)
4113 case $LD in
4114 *-32|*"-32 ") libmagic=32-bit;;
4115 *-n32|*"-n32 ") libmagic=N32;;
4116 *-64|*"-64 ") libmagic=64-bit;;
4117 *) libmagic=never-match;;
4118 esac
4119 # this will be overridden with pass_all, but let us keep it just in case
4120 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4121 ;;
4122 esac
4123 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4124 lt_cv_deplibs_check_method=pass_all
4125 ;;
4126
4127 # This must be Linux ELF.
4128 linux-gnu*)
4129 case $host_cpu in
4130 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
4131 lt_cv_deplibs_check_method=pass_all ;;
4132 *)
4133 # glibc up to 2.1.1 does not perform some relocations on ARM
4134 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4135 esac
4136 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4137 ;;
4138
4139 netbsd*)
4140 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4141 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4142 else
4143 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4144 fi
4145 ;;
4146
4147 newos6*)
4148 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4149 lt_cv_file_magic_cmd=/usr/bin/file
4150 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4151 ;;
4152
4153 openbsd*)
4154 lt_cv_file_magic_cmd=/usr/bin/file
4155 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4156 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4157 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4158 else
4159 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4160 fi
4161 ;;
4162
4163 osf3* | osf4* | osf5*)
4164 # this will be overridden with pass_all, but let us keep it just in case
4165 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4166 lt_cv_file_magic_test_file=/shlib/libc.so
4167 lt_cv_deplibs_check_method=pass_all
4168 ;;
4169
4170 sco3.2v5*)
4171 lt_cv_deplibs_check_method=pass_all
4172 ;;
4173
4174 solaris*)
4175 lt_cv_deplibs_check_method=pass_all
4176 lt_cv_file_magic_test_file=/lib/libc.so
4177 ;;
4178
4179 sysv5uw[[78]]* | sysv4*uw2*)
4180 lt_cv_deplibs_check_method=pass_all
4181 ;;
4182
4183 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4184 case $host_vendor in
4185 motorola)
4186 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]]'
4187 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4188 ;;
4189 ncr)
4190 lt_cv_deplibs_check_method=pass_all
4191 ;;
4192 sequent)
4193 lt_cv_file_magic_cmd='/bin/file'
4194 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4195 ;;
4196 sni)
4197 lt_cv_file_magic_cmd='/bin/file'
4198 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4199 lt_cv_file_magic_test_file=/lib/libc.so
4200 ;;
4201 siemens)
4202 lt_cv_deplibs_check_method=pass_all
4203 ;;
4204 esac
4205 ;;
4206 esac
4207 ])
4208 file_magic_cmd=$lt_cv_file_magic_cmd
4209 deplibs_check_method=$lt_cv_deplibs_check_method
4210 ])
4211
4212
4213 # AC_PROG_NM - find the path to a BSD-compatible name lister
4214 AC_DEFUN([AC_PROG_NM],
4215 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4216 AC_MSG_CHECKING([for BSD-compatible nm])
4217 AC_CACHE_VAL(lt_cv_path_NM,
4218 [if test -n "$NM"; then
4219 # Let the user override the test.
4220 lt_cv_path_NM="$NM"
4221 else
4222 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4223 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4224 test -z "$ac_dir" && ac_dir=.
4225 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4226 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4227 # Check to see if the nm accepts a BSD-compat flag.
4228 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4229 # nm: unknown option "B" ignored
4230 # Tru64's nm complains that /dev/null is an invalid object file
4231 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4232 lt_cv_path_NM="$tmp_nm -B"
4233 break
4234 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4235 lt_cv_path_NM="$tmp_nm -p"
4236 break
4237 else
4238 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4239 continue # so that we can try to find one that supports BSD flags
4240 fi
4241 fi
4242 done
4243 IFS="$ac_save_ifs"
4244 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4245 fi])
4246 NM="$lt_cv_path_NM"
4247 AC_MSG_RESULT([$NM])
4248 ])
4249
4250 # AC_CHECK_LIBM - check for math library
4251 AC_DEFUN([AC_CHECK_LIBM],
4252 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4253 LIBM=
4254 case $host in
4255 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4256 # These system don't have libm
4257 ;;
4258 *-ncr-sysv4.3*)
4259 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4260 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4261 ;;
4262 *)
4263 AC_CHECK_LIB(m, main, LIBM="-lm")
4264 ;;
4265 esac
4266 ])
4267
4268 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4269 # the libltdl convenience library and LTDLINCL to the include flags for
4270 # the libltdl header and adds --enable-ltdl-convenience to the
4271 # configure arguments. Note that LIBLTDL and LTDLINCL are not
4272 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4273 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4274 # with '${top_builddir}/' and LTDLINCL will be prefixed with
4275 # '${top_srcdir}/' (note the single quotes!). If your package is not
4276 # flat and you're not using automake, define top_builddir and
4277 # top_srcdir appropriately in the Makefiles.
4278 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4279 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4280 case $enable_ltdl_convenience in
4281 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4282 "") enable_ltdl_convenience=yes
4283 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4284 esac
4285 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4286 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4287 # For backwards non-gettext consistent compatibility...
4288 INCLTDL="$LTDLINCL"
4289 ])
4290
4291 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4292 # the libltdl installable library and LTDLINCL to the include flags for
4293 # the libltdl header and adds --enable-ltdl-install to the configure
4294 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4295 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4296 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4297 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4298 # with '${top_srcdir}/' (note the single quotes!). If your package is
4299 # not flat and you're not using automake, define top_builddir and
4300 # top_srcdir appropriately in the Makefiles.
4301 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4302 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4303 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4304 AC_CHECK_LIB(ltdl, main,
4305 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4306 [if test x"$enable_ltdl_install" = xno; then
4307 AC_MSG_WARN([libltdl not installed, but installation disabled])
4308 else
4309 enable_ltdl_install=yes
4310 fi
4311 ])
4312 if test x"$enable_ltdl_install" = x"yes"; then
4313 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4314 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4315 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4316 else
4317 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4318 LIBLTDL="-lltdl"
4319 LTDLINCL=
4320 fi
4321 # For backwards non-gettext consistent compatibility...
4322 INCLTDL="$LTDLINCL"
4323 ])
6291 ])# _LT_AC_FILE_LTDLL_C
6292
6293
6294 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6295 # ---------------------------------
6296 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6297
43246298
43256299 # old names
43266300 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
43336307
43346308 # This is just to silence aclocal about the macro not being used
43356309 ifelse([AC_DISABLE_FAST_INSTALL])
6310
6311 AC_DEFUN([LT_AC_PROG_GCJ],
6312 [AC_CHECK_TOOL(GCJ, gcj, no)
6313 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6314 AC_SUBST(GCJFLAGS)
6315 ])
6316
6317 AC_DEFUN([LT_AC_PROG_RC],
6318 [AC_CHECK_TOOL(RC, windres, no)
6319 ])
43366320
43376321 # NOTE: This macro has been submitted for inclusion into #
43386322 # GNU Autoconf as AC_PROG_SED. When it is available in #
43476331 AC_CACHE_VAL(lt_cv_path_SED,
43486332 [# Loop through the user's path and test for sed and gsed.
43496333 # Then use that list of sed's as ones to test for truncation.
4350 as_executable_p="test -f"
43516334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43526335 for as_dir in $PATH
43536336 do
43546337 IFS=$as_save_IFS
43556338 test -z "$as_dir" && as_dir=.
4356 for ac_prog in sed gsed; do
6339 for lt_ac_prog in sed gsed; do
43576340 for ac_exec_ext in '' $ac_executable_extensions; do
4358 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4359 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
6341 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6342 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
43606343 fi
43616344 done
43626345 done
43636346 done
4364
4365 # Create a temporary directory, and hook for its removal unless debugging.
4366 $debug ||
4367 {
4368 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4369 trap '{ (exit 1); exit 1; }' 1 2 13 15
4370 }
4371
4372 # Create a (secure) tmp directory for tmp files.
4373 : ${TMPDIR=/tmp}
4374 {
4375 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4376 test -n "$tmp" && test -d "$tmp"
4377 } ||
4378 {
4379 tmp=$TMPDIR/sed$$-$RANDOM
4380 (umask 077 && mkdir $tmp)
4381 } ||
4382 {
4383 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4384 { (exit 1); exit 1; }
4385 }
4386 _max=0
4387 _count=0
4388 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4389 # along with /bin/sed that truncates output.
4390 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4391 test ! -f ${_sed} && break
4392 cat /dev/null > "$tmp/sed.in"
4393 _count=0
4394 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4395 # Check for GNU sed and select it if it is found.
4396 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4397 lt_cv_path_SED=${_sed}
4398 break
6347 lt_ac_max=0
6348 lt_ac_count=0
6349 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6350 # along with /bin/sed that truncates output.
6351 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6352 test ! -f $lt_ac_sed && continue
6353 cat /dev/null > conftest.in
6354 lt_ac_count=0
6355 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6356 # Check for GNU sed and select it if it is found.
6357 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6358 lt_cv_path_SED=$lt_ac_sed
6359 break
6360 fi
6361 while true; do
6362 cat conftest.in conftest.in >conftest.tmp
6363 mv conftest.tmp conftest.in
6364 cp conftest.in conftest.nl
6365 echo >>conftest.nl
6366 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6367 cmp -s conftest.out conftest.nl || break
6368 # 10000 chars as input seems more than enough
6369 test $lt_ac_count -gt 10 && break
6370 lt_ac_count=`expr $lt_ac_count + 1`
6371 if test $lt_ac_count -gt $lt_ac_max; then
6372 lt_ac_max=$lt_ac_count
6373 lt_cv_path_SED=$lt_ac_sed
43996374 fi
4400 while true; do
4401 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4402 mv "$tmp/sed.tmp" "$tmp/sed.in"
4403 cp "$tmp/sed.in" "$tmp/sed.nl"
4404 echo >>"$tmp/sed.nl"
4405 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4406 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4407 # 40000 chars as input seems more than enough
4408 test $_count -gt 10 && break
4409 _count=`expr $_count + 1`
4410 if test $_count -gt $_max; then
4411 _max=$_count
4412 lt_cv_path_SED=$_sed
4413 fi
4414 done
44156375 done
4416 rm -rf "$tmp"
6376 done
44176377 ])
4418 if test "X$SED" != "X"; then
4419 lt_cv_path_SED=$SED
4420 else
4421 SED=$lt_cv_path_SED
4422 fi
6378 SED=$lt_cv_path_SED
44236379 AC_MSG_RESULT([$SED])
44246380 ])
44256381
4426 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
4427
4428 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
4429
4430 # This program is free software; you can redistribute it and/or modify
4431 # it under the terms of the GNU General Public License as published by
4432 # the Free Software Foundation; either version 2, or (at your option)
4433 # any later version.
4434
4435 # This program is distributed in the hope that it will be useful,
4436 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4437 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4438 # GNU General Public License for more details.
4439
4440 # You should have received a copy of the GNU General Public License
4441 # along with this program; if not, write to the Free Software
4442 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4443 # 02111-1307, USA.
4444
4445 AC_PREREQ([2.52])
4446
4447 # serial 6
6382 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6383 #
6384 # This file is free software; the Free Software Foundation
6385 # gives unlimited permission to copy and/or distribute it,
6386 # with or without modifications, as long as this notice is preserved.
6387
6388 # AM_AUTOMAKE_VERSION(VERSION)
6389 # ----------------------------
6390 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6391 # generated from the m4 files accompanying Automake X.Y.
6392 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6393
6394 # AM_SET_CURRENT_AUTOMAKE_VERSION
6395 # -------------------------------
6396 # Call AM_AUTOMAKE_VERSION so it can be traced.
6397 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6398 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6399 [AM_AUTOMAKE_VERSION([1.9.6])])
6400
6401 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
6402
6403 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6404 #
6405 # This file is free software; the Free Software Foundation
6406 # gives unlimited permission to copy and/or distribute it,
6407 # with or without modifications, as long as this notice is preserved.
6408
6409 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6410 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6411 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6412 #
6413 # Of course, Automake must honor this variable whenever it calls a
6414 # tool from the auxiliary directory. The problem is that $srcdir (and
6415 # therefore $ac_aux_dir as well) can be either absolute or relative,
6416 # depending on how configure is run. This is pretty annoying, since
6417 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6418 # source directory, any form will work fine, but in subdirectories a
6419 # relative path needs to be adjusted first.
6420 #
6421 # $ac_aux_dir/missing
6422 # fails when called from a subdirectory if $ac_aux_dir is relative
6423 # $top_srcdir/$ac_aux_dir/missing
6424 # fails if $ac_aux_dir is absolute,
6425 # fails when called from a subdirectory in a VPATH build with
6426 # a relative $ac_aux_dir
6427 #
6428 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6429 # are both prefixed by $srcdir. In an in-source build this is usually
6430 # harmless because $srcdir is `.', but things will broke when you
6431 # start a VPATH build or use an absolute $srcdir.
6432 #
6433 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6434 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6435 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6436 # and then we would define $MISSING as
6437 # MISSING="\${SHELL} $am_aux_dir/missing"
6438 # This will work as long as MISSING is not called from configure, because
6439 # unfortunately $(top_srcdir) has no meaning in configure.
6440 # However there are other variables, like CC, which are often used in
6441 # configure, and could therefore not use this "fixed" $ac_aux_dir.
6442 #
6443 # Another solution, used here, is to always expand $ac_aux_dir to an
6444 # absolute PATH. The drawback is that using absolute paths prevent a
6445 # configured tree to be moved without reconfiguration.
6446
6447 AC_DEFUN([AM_AUX_DIR_EXPAND],
6448 [dnl Rely on autoconf to set up CDPATH properly.
6449 AC_PREREQ([2.50])dnl
6450 # expand $ac_aux_dir to an absolute path
6451 am_aux_dir=`cd $ac_aux_dir && pwd`
6452 ])
6453
6454 # AM_CONDITIONAL -*- Autoconf -*-
6455
6456 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6457 # Free Software Foundation, Inc.
6458 #
6459 # This file is free software; the Free Software Foundation
6460 # gives unlimited permission to copy and/or distribute it,
6461 # with or without modifications, as long as this notice is preserved.
6462
6463 # serial 7
6464
6465 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
6466 # -------------------------------------
6467 # Define a conditional.
6468 AC_DEFUN([AM_CONDITIONAL],
6469 [AC_PREREQ(2.52)dnl
6470 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6471 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6472 AC_SUBST([$1_TRUE])
6473 AC_SUBST([$1_FALSE])
6474 if $2; then
6475 $1_TRUE=
6476 $1_FALSE='#'
6477 else
6478 $1_TRUE='#'
6479 $1_FALSE=
6480 fi
6481 AC_CONFIG_COMMANDS_PRE(
6482 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6483 AC_MSG_ERROR([[conditional "$1" was never defined.
6484 Usually this means the macro was only invoked conditionally.]])
6485 fi])])
6486
6487
6488 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6489 # Free Software Foundation, Inc.
6490 #
6491 # This file is free software; the Free Software Foundation
6492 # gives unlimited permission to copy and/or distribute it,
6493 # with or without modifications, as long as this notice is preserved.
6494
6495 # serial 8
6496
6497 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6498 # written in clear, in which case automake, when reading aclocal.m4,
6499 # will think it sees a *use*, and therefore will trigger all it's
6500 # C support machinery. Also note that it means that autoscan, seeing
6501 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6502
6503
6504 # _AM_DEPENDENCIES(NAME)
6505 # ----------------------
6506 # See how the compiler implements dependency checking.
6507 # NAME is "CC", "CXX", "GCJ", or "OBJC".
6508 # We try a few techniques and use that to set a single cache variable.
6509 #
6510 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6511 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6512 # dependency, and given that the user is not expected to run this macro,
6513 # just rely on AC_PROG_CC.
6514 AC_DEFUN([_AM_DEPENDENCIES],
6515 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6516 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6517 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6518 AC_REQUIRE([AM_DEP_TRACK])dnl
6519
6520 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6521 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6522 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6523 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6524 [depcc="$$1" am_compiler_list=])
6525
6526 AC_CACHE_CHECK([dependency style of $depcc],
6527 [am_cv_$1_dependencies_compiler_type],
6528 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6529 # We make a subdir and do the tests there. Otherwise we can end up
6530 # making bogus files that we don't know about and never remove. For
6531 # instance it was reported that on HP-UX the gcc test will end up
6532 # making a dummy file named `D' -- because `-MD' means `put the output
6533 # in D'.
6534 mkdir conftest.dir
6535 # Copy depcomp to subdir because otherwise we won't find it if we're
6536 # using a relative directory.
6537 cp "$am_depcomp" conftest.dir
6538 cd conftest.dir
6539 # We will build objects and dependencies in a subdirectory because
6540 # it helps to detect inapplicable dependency modes. For instance
6541 # both Tru64's cc and ICC support -MD to output dependencies as a
6542 # side effect of compilation, but ICC will put the dependencies in
6543 # the current directory while Tru64 will put them in the object
6544 # directory.
6545 mkdir sub
6546
6547 am_cv_$1_dependencies_compiler_type=none
6548 if test "$am_compiler_list" = ""; then
6549 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6550 fi
6551 for depmode in $am_compiler_list; do
6552 # Setup a source with many dependencies, because some compilers
6553 # like to wrap large dependency lists on column 80 (with \), and
6554 # we should not choose a depcomp mode which is confused by this.
6555 #
6556 # We need to recreate these files for each test, as the compiler may
6557 # overwrite some of them when testing with obscure command lines.
6558 # This happens at least with the AIX C compiler.
6559 : > sub/conftest.c
6560 for i in 1 2 3 4 5 6; do
6561 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6562 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6563 # Solaris 8's {/usr,}/bin/sh.
6564 touch sub/conftst$i.h
6565 done
6566 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6567
6568 case $depmode in
6569 nosideeffect)
6570 # after this tag, mechanisms are not by side-effect, so they'll
6571 # only be used when explicitly requested
6572 if test "x$enable_dependency_tracking" = xyes; then
6573 continue
6574 else
6575 break
6576 fi
6577 ;;
6578 none) break ;;
6579 esac
6580 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6581 # mode. It turns out that the SunPro C++ compiler does not properly
6582 # handle `-M -o', and we need to detect this.
6583 if depmode=$depmode \
6584 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6585 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6586 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6587 >/dev/null 2>conftest.err &&
6588 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6589 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6590 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6591 # icc doesn't choke on unknown options, it will just issue warnings
6592 # or remarks (even with -Werror). So we grep stderr for any message
6593 # that says an option was ignored or not supported.
6594 # When given -MP, icc 7.0 and 7.1 complain thusly:
6595 # icc: Command line warning: ignoring option '-M'; no argument required
6596 # The diagnosis changed in icc 8.0:
6597 # icc: Command line remark: option '-MP' not supported
6598 if (grep 'ignoring option' conftest.err ||
6599 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6600 am_cv_$1_dependencies_compiler_type=$depmode
6601 break
6602 fi
6603 fi
6604 done
6605
6606 cd ..
6607 rm -rf conftest.dir
6608 else
6609 am_cv_$1_dependencies_compiler_type=none
6610 fi
6611 ])
6612 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6613 AM_CONDITIONAL([am__fastdep$1], [
6614 test "x$enable_dependency_tracking" != xno \
6615 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6616 ])
6617
6618
6619 # AM_SET_DEPDIR
6620 # -------------
6621 # Choose a directory name for dependency files.
6622 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
6623 AC_DEFUN([AM_SET_DEPDIR],
6624 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6625 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6626 ])
6627
6628
6629 # AM_DEP_TRACK
6630 # ------------
6631 AC_DEFUN([AM_DEP_TRACK],
6632 [AC_ARG_ENABLE(dependency-tracking,
6633 [ --disable-dependency-tracking speeds up one-time build
6634 --enable-dependency-tracking do not reject slow dependency extractors])
6635 if test "x$enable_dependency_tracking" != xno; then
6636 am_depcomp="$ac_aux_dir/depcomp"
6637 AMDEPBACKSLASH='\'
6638 fi
6639 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6640 AC_SUBST([AMDEPBACKSLASH])
6641 ])
6642
6643 # Generate code to set up dependency tracking. -*- Autoconf -*-
6644
6645 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6646 # Free Software Foundation, Inc.
6647 #
6648 # This file is free software; the Free Software Foundation
6649 # gives unlimited permission to copy and/or distribute it,
6650 # with or without modifications, as long as this notice is preserved.
6651
6652 #serial 3
6653
6654 # _AM_OUTPUT_DEPENDENCY_COMMANDS
6655 # ------------------------------
6656 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6657 [for mf in $CONFIG_FILES; do
6658 # Strip MF so we end up with the name of the file.
6659 mf=`echo "$mf" | sed -e 's/:.*$//'`
6660 # Check whether this is an Automake generated Makefile or not.
6661 # We used to match only the files named `Makefile.in', but
6662 # some people rename them; so instead we look at the file content.
6663 # Grep'ing the first line is not enough: some people post-process
6664 # each Makefile.in and add a new line on top of each file to say so.
6665 # So let's grep whole file.
6666 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6667 dirpart=`AS_DIRNAME("$mf")`
6668 else
6669 continue
6670 fi
6671 # Extract the definition of DEPDIR, am__include, and am__quote
6672 # from the Makefile without running `make'.
6673 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6674 test -z "$DEPDIR" && continue
6675 am__include=`sed -n 's/^am__include = //p' < "$mf"`
6676 test -z "am__include" && continue
6677 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6678 # When using ansi2knr, U may be empty or an underscore; expand it
6679 U=`sed -n 's/^U = //p' < "$mf"`
6680 # Find all dependency output files, they are included files with
6681 # $(DEPDIR) in their names. We invoke sed twice because it is the
6682 # simplest approach to changing $(DEPDIR) to its actual value in the
6683 # expansion.
6684 for file in `sed -n "
6685 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6686 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6687 # Make sure the directory exists.
6688 test -f "$dirpart/$file" && continue
6689 fdir=`AS_DIRNAME(["$file"])`
6690 AS_MKDIR_P([$dirpart/$fdir])
6691 # echo "creating $dirpart/$file"
6692 echo '# dummy' > "$dirpart/$file"
6693 done
6694 done
6695 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6696
6697
6698 # AM_OUTPUT_DEPENDENCY_COMMANDS
6699 # -----------------------------
6700 # This macro should only be invoked once -- use via AC_REQUIRE.
6701 #
6702 # This code is only required when automatic dependency tracking
6703 # is enabled. FIXME. This creates each `.P' file that we will
6704 # need in order to bootstrap the dependency handling code.
6705 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6706 [AC_CONFIG_COMMANDS([depfiles],
6707 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6708 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6709 ])
6710
6711 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6712 # Free Software Foundation, Inc.
6713 #
6714 # This file is free software; the Free Software Foundation
6715 # gives unlimited permission to copy and/or distribute it,
6716 # with or without modifications, as long as this notice is preserved.
6717
6718 # serial 8
6719
6720 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6721 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6722
6723 # Do all the work for Automake. -*- Autoconf -*-
6724
6725 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6726 # Free Software Foundation, Inc.
6727 #
6728 # This file is free software; the Free Software Foundation
6729 # gives unlimited permission to copy and/or distribute it,
6730 # with or without modifications, as long as this notice is preserved.
6731
6732 # serial 12
6733
6734 # This macro actually does too much. Some checks are only needed if
6735 # your package does certain things. But this isn't really a big deal.
6736
6737 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6738 # AM_INIT_AUTOMAKE([OPTIONS])
6739 # -----------------------------------------------
6740 # The call with PACKAGE and VERSION arguments is the old style
6741 # call (pre autoconf-2.50), which is being phased out. PACKAGE
6742 # and VERSION should now be passed to AC_INIT and removed from
6743 # the call to AM_INIT_AUTOMAKE.
6744 # We support both call styles for the transition. After
6745 # the next Automake release, Autoconf can make the AC_INIT
6746 # arguments mandatory, and then we can depend on a new Autoconf
6747 # release and drop the old call support.
6748 AC_DEFUN([AM_INIT_AUTOMAKE],
6749 [AC_PREREQ([2.58])dnl
6750 dnl Autoconf wants to disallow AM_ names. We explicitly allow
6751 dnl the ones we care about.
6752 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6753 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6754 AC_REQUIRE([AC_PROG_INSTALL])dnl
6755 # test to see if srcdir already configured
6756 if test "`cd $srcdir && pwd`" != "`pwd`" &&
6757 test -f $srcdir/config.status; then
6758 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6759 fi
6760
6761 # test whether we have cygpath
6762 if test -z "$CYGPATH_W"; then
6763 if (cygpath --version) >/dev/null 2>/dev/null; then
6764 CYGPATH_W='cygpath -w'
6765 else
6766 CYGPATH_W=echo
6767 fi
6768 fi
6769 AC_SUBST([CYGPATH_W])
6770
6771 # Define the identity of the package.
6772 dnl Distinguish between old-style and new-style calls.
6773 m4_ifval([$2],
6774 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6775 AC_SUBST([PACKAGE], [$1])dnl
6776 AC_SUBST([VERSION], [$2])],
6777 [_AM_SET_OPTIONS([$1])dnl
6778 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6779 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6780
6781 _AM_IF_OPTION([no-define],,
6782 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6783 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6784
6785 # Some tools Automake needs.
6786 AC_REQUIRE([AM_SANITY_CHECK])dnl
6787 AC_REQUIRE([AC_ARG_PROGRAM])dnl
6788 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6789 AM_MISSING_PROG(AUTOCONF, autoconf)
6790 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6791 AM_MISSING_PROG(AUTOHEADER, autoheader)
6792 AM_MISSING_PROG(MAKEINFO, makeinfo)
6793 AM_PROG_INSTALL_SH
6794 AM_PROG_INSTALL_STRIP
6795 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6796 # We need awk for the "check" target. The system "awk" is bad on
6797 # some platforms.
6798 AC_REQUIRE([AC_PROG_AWK])dnl
6799 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6800 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6801 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6802 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6803 [_AM_PROG_TAR([v7])])])
6804 _AM_IF_OPTION([no-dependencies],,
6805 [AC_PROVIDE_IFELSE([AC_PROG_CC],
6806 [_AM_DEPENDENCIES(CC)],
6807 [define([AC_PROG_CC],
6808 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6809 AC_PROVIDE_IFELSE([AC_PROG_CXX],
6810 [_AM_DEPENDENCIES(CXX)],
6811 [define([AC_PROG_CXX],
6812 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6813 ])
6814 ])
6815
44486816
44496817 # When config.status generates a header, we must update the stamp-h file.
44506818 # This file resides in the same directory as the config header
4451 # that is generated. We must strip everything past the first ":",
4452 # and everything past the last "/".
4453
4454 # _AM_DIRNAME(PATH)
6819 # that is generated. The stamp files are numbered to have different names.
6820
6821 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6822 # loop where config.status creates the headers, so we can generate
6823 # our stamp files there.
6824 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6825 [# Compute $1's index in $config_headers.
6826 _am_stamp_count=1
6827 for _am_header in $config_headers :; do
6828 case $_am_header in
6829 $1 | $1:* )
6830 break ;;
6831 * )
6832 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6833 esac
6834 done
6835 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6836
6837 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6838 #
6839 # This file is free software; the Free Software Foundation
6840 # gives unlimited permission to copy and/or distribute it,
6841 # with or without modifications, as long as this notice is preserved.
6842
6843 # AM_PROG_INSTALL_SH
6844 # ------------------
6845 # Define $install_sh.
6846 AC_DEFUN([AM_PROG_INSTALL_SH],
6847 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6848 install_sh=${install_sh-"$am_aux_dir/install-sh"}
6849 AC_SUBST(install_sh)])
6850
6851 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6852 #
6853 # This file is free software; the Free Software Foundation
6854 # gives unlimited permission to copy and/or distribute it,
6855 # with or without modifications, as long as this notice is preserved.
6856
6857 # serial 2
6858
6859 # Check whether the underlying file-system supports filenames
6860 # with a leading dot. For instance MS-DOS doesn't.
6861 AC_DEFUN([AM_SET_LEADING_DOT],
6862 [rm -rf .tst 2>/dev/null
6863 mkdir .tst 2>/dev/null
6864 if test -d .tst; then
6865 am__leading_dot=.
6866 else
6867 am__leading_dot=_
6868 fi
6869 rmdir .tst 2>/dev/null
6870 AC_SUBST([am__leading_dot])])
6871
6872 # Check to see how 'make' treats includes. -*- Autoconf -*-
6873
6874 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6875 #
6876 # This file is free software; the Free Software Foundation
6877 # gives unlimited permission to copy and/or distribute it,
6878 # with or without modifications, as long as this notice is preserved.
6879
6880 # serial 3
6881
6882 # AM_MAKE_INCLUDE()
44556883 # -----------------
4456 # Like AS_DIRNAME, only do it during macro expansion
4457 AC_DEFUN([_AM_DIRNAME],
4458 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
4459 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
4460 m4_if(regexp([$1], [^/.*]), -1,
4461 [.],
4462 patsubst([$1], [^\(/\).*], [\1])),
4463 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
4464 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
4465 ])# _AM_DIRNAME
4466
4467
4468 # The stamp files are numbered to have different names.
4469 # We could number them on a directory basis, but that's additional
4470 # complications, let's have a unique counter.
4471 m4_define([_AM_STAMP_Count], [0])
4472
4473
4474 # _AM_STAMP(HEADER)
4475 # -----------------
4476 # The name of the stamp file for HEADER.
4477 AC_DEFUN([_AM_STAMP],
4478 [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
4479 AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
4480 [:.*])))/stamp-h[]_AM_STAMP_Count])
4481
4482
4483 # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
4484 # ------------------------------------------------------------
4485 # We used to try to get a real timestamp in stamp-h. But the fear is that
4486 # that will cause unnecessary cvs conflicts.
4487 AC_DEFUN([_AM_CONFIG_HEADER],
4488 [# Add the stamp file to the list of files AC keeps track of,
4489 # along with our hook.
4490 AC_CONFIG_HEADERS([$1],
4491 [# update the timestamp
4492 echo 'timestamp for $1' >"_AM_STAMP([$1])"
4493 $2],
4494 [$3])
4495 ])# _AM_CONFIG_HEADER
4496
4497
4498 # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
4499 # --------------------------------------------------------------
4500 AC_DEFUN([AM_CONFIG_HEADER],
4501 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
4502 ])# AM_CONFIG_HEADER
4503
6884 # Check to see how make treats includes.
6885 AC_DEFUN([AM_MAKE_INCLUDE],
6886 [am_make=${MAKE-make}
6887 cat > confinc << 'END'
6888 am__doit:
6889 @echo done
6890 .PHONY: am__doit
6891 END
6892 # If we don't find an include directive, just comment out the code.
6893 AC_MSG_CHECKING([for style of include used by $am_make])
6894 am__include="#"
6895 am__quote=
6896 _am_result=none
6897 # First try GNU make style include.
6898 echo "include confinc" > confmf
6899 # We grep out `Entering directory' and `Leaving directory'
6900 # messages which can occur if `w' ends up in MAKEFLAGS.
6901 # In particular we don't look at `^make:' because GNU make might
6902 # be invoked under some other name (usually "gmake"), in which
6903 # case it prints its new name instead of `make'.
6904 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6905 am__include=include
6906 am__quote=
6907 _am_result=GNU
6908 fi
6909 # Now try BSD make style include.
6910 if test "$am__include" = "#"; then
6911 echo '.include "confinc"' > confmf
6912 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6913 am__include=.include
6914 am__quote="\""
6915 _am_result=BSD
6916 fi
6917 fi
6918 AC_SUBST([am__include])
6919 AC_SUBST([am__quote])
6920 AC_MSG_RESULT([$_am_result])
6921 rm -f confinc confmf
6922 ])
6923
6924 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
6925
6926 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6927 # Free Software Foundation, Inc.
6928 #
6929 # This file is free software; the Free Software Foundation
6930 # gives unlimited permission to copy and/or distribute it,
6931 # with or without modifications, as long as this notice is preserved.
6932
6933 # serial 4
6934
6935 # AM_MISSING_PROG(NAME, PROGRAM)
6936 # ------------------------------
6937 AC_DEFUN([AM_MISSING_PROG],
6938 [AC_REQUIRE([AM_MISSING_HAS_RUN])
6939 $1=${$1-"${am_missing_run}$2"}
6940 AC_SUBST($1)])
6941
6942
6943 # AM_MISSING_HAS_RUN
6944 # ------------------
6945 # Define MISSING if not defined so far and test if it supports --run.
6946 # If it does, set am_missing_run to use it, otherwise, to nothing.
6947 AC_DEFUN([AM_MISSING_HAS_RUN],
6948 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6949 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6950 # Use eval to expand $SHELL
6951 if eval "$MISSING --run true"; then
6952 am_missing_run="$MISSING --run "
6953 else
6954 am_missing_run=
6955 AC_MSG_WARN([`missing' script is too old or missing])
6956 fi
6957 ])
6958
6959 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
6960 #
6961 # This file is free software; the Free Software Foundation
6962 # gives unlimited permission to copy and/or distribute it,
6963 # with or without modifications, as long as this notice is preserved.
6964
6965 # AM_PROG_MKDIR_P
6966 # ---------------
6967 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6968 #
6969 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6970 # created by `make install' are always world readable, even if the
6971 # installer happens to have an overly restrictive umask (e.g. 077).
6972 # This was a mistake. There are at least two reasons why we must not
6973 # use `-m 0755':
6974 # - it causes special bits like SGID to be ignored,
6975 # - it may be too restrictive (some setups expect 775 directories).
6976 #
6977 # Do not use -m 0755 and let people choose whatever they expect by
6978 # setting umask.
6979 #
6980 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
6981 # Some implementations (such as Solaris 8's) are not thread-safe: if a
6982 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6983 # concurrently, both version can detect that a/ is missing, but only
6984 # one can create it and the other will error out. Consequently we
6985 # restrict ourselves to GNU make (using the --version option ensures
6986 # this.)
6987 AC_DEFUN([AM_PROG_MKDIR_P],
6988 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6989 # We used to keeping the `.' as first argument, in order to
6990 # allow $(mkdir_p) to be used without argument. As in
6991 # $(mkdir_p) $(somedir)
6992 # where $(somedir) is conditionally defined. However this is wrong
6993 # for two reasons:
6994 # 1. if the package is installed by a user who cannot write `.'
6995 # make install will fail,
6996 # 2. the above comment should most certainly read
6997 # $(mkdir_p) $(DESTDIR)$(somedir)
6998 # so it does not work when $(somedir) is undefined and
6999 # $(DESTDIR) is not.
7000 # To support the latter case, we have to write
7001 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7002 # so the `.' trick is pointless.
7003 mkdir_p='mkdir -p --'
7004 else
7005 # On NextStep and OpenStep, the `mkdir' command does not
7006 # recognize any option. It will interpret all options as
7007 # directories to create, and then abort because `.' already
7008 # exists.
7009 for d in ./-p ./--version;
7010 do
7011 test -d $d && rmdir $d
7012 done
7013 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7014 if test -f "$ac_aux_dir/mkinstalldirs"; then
7015 mkdir_p='$(mkinstalldirs)'
7016 else
7017 mkdir_p='$(install_sh) -d'
7018 fi
7019 fi
7020 AC_SUBST([mkdir_p])])
7021
7022 # Helper functions for option handling. -*- Autoconf -*-
7023
7024 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7025 #
7026 # This file is free software; the Free Software Foundation
7027 # gives unlimited permission to copy and/or distribute it,
7028 # with or without modifications, as long as this notice is preserved.
7029
7030 # serial 3
7031
7032 # _AM_MANGLE_OPTION(NAME)
7033 # -----------------------
7034 AC_DEFUN([_AM_MANGLE_OPTION],
7035 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7036
7037 # _AM_SET_OPTION(NAME)
7038 # ------------------------------
7039 # Set option NAME. Presently that only means defining a flag for this option.
7040 AC_DEFUN([_AM_SET_OPTION],
7041 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7042
7043 # _AM_SET_OPTIONS(OPTIONS)
7044 # ----------------------------------
7045 # OPTIONS is a space-separated list of Automake options.
7046 AC_DEFUN([_AM_SET_OPTIONS],
7047 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7048
7049 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7050 # -------------------------------------------
7051 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7052 AC_DEFUN([_AM_IF_OPTION],
7053 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7054
7055 # Check to make sure that the build environment is sane. -*- Autoconf -*-
7056
7057 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7058 # Free Software Foundation, Inc.
7059 #
7060 # This file is free software; the Free Software Foundation
7061 # gives unlimited permission to copy and/or distribute it,
7062 # with or without modifications, as long as this notice is preserved.
7063
7064 # serial 4
7065
7066 # AM_SANITY_CHECK
7067 # ---------------
7068 AC_DEFUN([AM_SANITY_CHECK],
7069 [AC_MSG_CHECKING([whether build environment is sane])
7070 # Just in case
7071 sleep 1
7072 echo timestamp > conftest.file
7073 # Do `set' in a subshell so we don't clobber the current shell's
7074 # arguments. Must try -L first in case configure is actually a
7075 # symlink; some systems play weird games with the mod time of symlinks
7076 # (eg FreeBSD returns the mod time of the symlink's containing
7077 # directory).
7078 if (
7079 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7080 if test "$[*]" = "X"; then
7081 # -L didn't work.
7082 set X `ls -t $srcdir/configure conftest.file`
7083 fi
7084 rm -f conftest.file
7085 if test "$[*]" != "X $srcdir/configure conftest.file" \
7086 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7087
7088 # If neither matched, then we have a broken ls. This can happen
7089 # if, for instance, CONFIG_SHELL is bash and it inherits a
7090 # broken ls alias from the environment. This has actually
7091 # happened. Such a system could not be considered "sane".
7092 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7093 alias in your environment])
7094 fi
7095
7096 test "$[2]" = conftest.file
7097 )
7098 then
7099 # Ok.
7100 :
7101 else
7102 AC_MSG_ERROR([newly created file is older than distributed files!
7103 Check your system clock])
7104 fi
7105 AC_MSG_RESULT(yes)])
7106
7107 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7108 #
7109 # This file is free software; the Free Software Foundation
7110 # gives unlimited permission to copy and/or distribute it,
7111 # with or without modifications, as long as this notice is preserved.
7112
7113 # AM_PROG_INSTALL_STRIP
7114 # ---------------------
7115 # One issue with vendor `install' (even GNU) is that you can't
7116 # specify the program used to strip binaries. This is especially
7117 # annoying in cross-compiling environments, where the build's strip
7118 # is unlikely to handle the host's binaries.
7119 # Fortunately install-sh will honor a STRIPPROG variable, so we
7120 # always use install-sh in `make install-strip', and initialize
7121 # STRIPPROG with the value of the STRIP variable (set by the user).
7122 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7123 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7124 # Installed binaries are usually stripped using `strip' when the user
7125 # run `make install-strip'. However `strip' might not be the right
7126 # tool to use in cross-compilation environments, therefore Automake
7127 # will honor the `STRIP' environment variable to overrule this program.
7128 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7129 if test "$cross_compiling" != no; then
7130 AC_CHECK_TOOL([STRIP], [strip], :)
7131 fi
7132 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7133 AC_SUBST([INSTALL_STRIP_PROGRAM])])
7134
7135 # Check how to create a tarball. -*- Autoconf -*-
7136
7137 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7138 #
7139 # This file is free software; the Free Software Foundation
7140 # gives unlimited permission to copy and/or distribute it,
7141 # with or without modifications, as long as this notice is preserved.
7142
7143 # serial 2
7144
7145 # _AM_PROG_TAR(FORMAT)
7146 # --------------------
7147 # Check how to create a tarball in format FORMAT.
7148 # FORMAT should be one of `v7', `ustar', or `pax'.
7149 #
7150 # Substitute a variable $(am__tar) that is a command
7151 # writing to stdout a FORMAT-tarball containing the directory
7152 # $tardir.
7153 # tardir=directory && $(am__tar) > result.tar
7154 #
7155 # Substitute a variable $(am__untar) that extract such
7156 # a tarball read from stdin.
7157 # $(am__untar) < result.tar
7158 AC_DEFUN([_AM_PROG_TAR],
7159 [# Always define AMTAR for backward compatibility.
7160 AM_MISSING_PROG([AMTAR], [tar])
7161 m4_if([$1], [v7],
7162 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7163 [m4_case([$1], [ustar],, [pax],,
7164 [m4_fatal([Unknown tar format])])
7165 AC_MSG_CHECKING([how to create a $1 tar archive])
7166 # Loop over all known methods to create a tar archive until one works.
7167 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7168 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
7169 # Do not fold the above two line into one, because Tru64 sh and
7170 # Solaris sh will not grok spaces in the rhs of `-'.
7171 for _am_tool in $_am_tools
7172 do
7173 case $_am_tool in
7174 gnutar)
7175 for _am_tar in tar gnutar gtar;
7176 do
7177 AM_RUN_LOG([$_am_tar --version]) && break
7178 done
7179 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7180 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7181 am__untar="$_am_tar -xf -"
7182 ;;
7183 plaintar)
7184 # Must skip GNU tar: if it does not support --format= it doesn't create
7185 # ustar tarball either.
7186 (tar --version) >/dev/null 2>&1 && continue
7187 am__tar='tar chf - "$$tardir"'
7188 am__tar_='tar chf - "$tardir"'
7189 am__untar='tar xf -'
7190 ;;
7191 pax)
7192 am__tar='pax -L -x $1 -w "$$tardir"'
7193 am__tar_='pax -L -x $1 -w "$tardir"'
7194 am__untar='pax -r'
7195 ;;
7196 cpio)
7197 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7198 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7199 am__untar='cpio -i -H $1 -d'
7200 ;;
7201 none)
7202 am__tar=false
7203 am__tar_=false
7204 am__untar=false
7205 ;;
7206 esac
7207
7208 # If the value was cached, stop now. We just wanted to have am__tar
7209 # and am__untar set.
7210 test -n "${am_cv_prog_tar_$1}" && break
7211
7212 # tar/untar a dummy directory, and stop if the command works
7213 rm -rf conftest.dir
7214 mkdir conftest.dir
7215 echo GrepMe > conftest.dir/file
7216 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7217 rm -rf conftest.dir
7218 if test -s conftest.tar; then
7219 AM_RUN_LOG([$am__untar <conftest.tar])
7220 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7221 fi
7222 done
7223 rm -rf conftest.dir
7224
7225 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7226 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7227 AC_SUBST([am__tar])
7228 AC_SUBST([am__untar])
7229 ]) # _AM_PROG_TAR
7230
00 cdck (0.5.2-2) unstable; urgency=low
11
22 * Add Tony Mancill to Uploaders.
3 * Updated ltmain.sh and aclocal.m4 (closes: #375634).
34
4 -- gregor herrmann <gregor+debian@comodo.priv.at> Fri, 16 Jun 2006 13:16:51 +0200
5 -- gregor herrmann <gregor+debian@comodo.priv.at> Tue, 27 Jun 2006 19:57:08 +0200
56
67 cdck (0.5.2-1) unstable; urgency=low
78
+2891
-1004
ltmain.sh less more
00 # ltmain.sh - Provide generalized library-building support services.
11 # NOTE: Changing this file will not affect anything until you rerun configure.
22 #
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
44 # Free Software Foundation, Inc.
55 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
66 #
1616 #
1717 # You should have received a copy of the GNU General Public License
1818 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2020 #
2121 # As a special exception to the GNU General Public License, if you
2222 # distribute this file as part of a program that contains a
2323 # configuration script generated by Autoconf, you may include it under
2424 # the same distribution terms that you use for the rest of that program.
25
26 basename="s,^.*/,,g"
27
28 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
29 # is ksh but when the shell is invoked as "sh" and the current value of
30 # the _XPG environment variable is not equal to 1 (one), the special
31 # positional parameter $0, within a function call, is the name of the
32 # function.
33 progpath="$0"
34
35 # The name of this program:
36 progname=`echo "$progpath" | $SED $basename`
37 modename="$progname"
38
39 # Global variables:
40 EXIT_SUCCESS=0
41 EXIT_FAILURE=1
42
43 PROGRAM=ltmain.sh
44 PACKAGE=libtool
45 VERSION="1.5.22 Debian 1.5.22-4"
46 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
47
48 # See if we are running on zsh, and set the options which allow our
49 # commands through without removal of \ escapes.
50 if test -n "${ZSH_VERSION+set}" ; then
51 setopt NO_GLOB_SUBST
52 fi
2553
2654 # Check that we have a working $echo.
2755 if test "X$1" = X--no-reexec; then
3563 :
3664 else
3765 # Restart under the correct shell, and then maybe $echo will work.
38 exec $SHELL "$0" --no-reexec ${1+"$@"}
66 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
3967 fi
4068
4169 if test "X$1" = X--fallback-echo; then
4472 cat <<EOF
4573 $*
4674 EOF
47 exit 0
75 exit $EXIT_SUCCESS
4876 fi
49
50 # The name of this program.
51 progname=`$echo "$0" | sed 's%^.*/%%'`
52 modename="$progname"
53
54 # Constants.
55 PROGRAM=ltmain.sh
56 PACKAGE=libtool
57 VERSION=1.4.2
58 TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
5977
6078 default_mode=
6179 help="Try \`$progname --help' for more information."
6684
6785 # Sed substitution that helps us do robust quoting. It backslashifies
6886 # metacharacters that are still active within double-quoted strings.
69 Xsed='sed -e 1s/^X//'
87 Xsed="${SED}"' -e 1s/^X//'
7088 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
71 SP2NL='tr \040 \012'
72 NL2SP='tr \015\012 \040\040'
89 # test EBCDIC or ASCII
90 case `echo X|tr X '\101'` in
91 A) # ASCII based system
92 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
93 SP2NL='tr \040 \012'
94 NL2SP='tr \015\012 \040\040'
95 ;;
96 *) # EBCDIC based system
97 SP2NL='tr \100 \n'
98 NL2SP='tr \r\n \100\100'
99 ;;
100 esac
73101
74102 # NLS nuisances.
75103 # Only set LANG and LC_ALL to C if already set.
84112 fi
85113
86114 # Make sure IFS has a sensible default
87 : ${IFS=" "}
115 lt_nl='
116 '
117 IFS=" $lt_nl"
88118
89119 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
90 echo "$modename: not configured to build any kind of library" 1>&2
91 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
92 exit 1
120 $echo "$modename: not configured to build any kind of library" 1>&2
121 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
122 exit $EXIT_FAILURE
93123 fi
94124
95125 # Global variables.
101131 show="$echo"
102132 show_help=
103133 execute_dlfiles=
134 duplicate_deps=no
135 preserve_args=
104136 lo2o="s/\\.lo\$/.${objext}/"
105137 o2lo="s/\\.${objext}\$/.lo/"
106138
139 #####################################
140 # Shell function definitions:
141 # This seems to be the best place for them
142
143 # func_mktempdir [string]
144 # Make a temporary directory that won't clash with other running
145 # libtool processes, and avoids race conditions if possible. If
146 # given, STRING is the basename for that directory.
147 func_mktempdir ()
148 {
149 my_template="${TMPDIR-/tmp}/${1-$progname}"
150
151 if test "$run" = ":"; then
152 # Return a directory name, but don't create it in dry-run mode
153 my_tmpdir="${my_template}-$$"
154 else
155
156 # If mktemp works, use that first and foremost
157 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
158
159 if test ! -d "$my_tmpdir"; then
160 # Failing that, at least try and use $RANDOM to avoid a race
161 my_tmpdir="${my_template}-${RANDOM-0}$$"
162
163 save_mktempdir_umask=`umask`
164 umask 0077
165 $mkdir "$my_tmpdir"
166 umask $save_mktempdir_umask
167 fi
168
169 # If we're not in dry-run mode, bomb out on failure
170 test -d "$my_tmpdir" || {
171 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
172 exit $EXIT_FAILURE
173 }
174 fi
175
176 $echo "X$my_tmpdir" | $Xsed
177 }
178
179
180 # func_win32_libid arg
181 # return the library type of file 'arg'
182 #
183 # Need a lot of goo to handle *both* DLLs and import libs
184 # Has to be a shell function in order to 'eat' the argument
185 # that is supplied when $file_magic_command is called.
186 func_win32_libid ()
187 {
188 win32_libid_type="unknown"
189 win32_fileres=`file -L $1 2>/dev/null`
190 case $win32_fileres in
191 *ar\ archive\ import\ library*) # definitely import
192 win32_libid_type="x86 archive import"
193 ;;
194 *ar\ archive*) # could be an import, or static
195 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
196 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
197 win32_nmres=`eval $NM -f posix -A $1 | \
198 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
199 case $win32_nmres in
200 import*) win32_libid_type="x86 archive import";;
201 *) win32_libid_type="x86 archive static";;
202 esac
203 fi
204 ;;
205 *DLL*)
206 win32_libid_type="x86 DLL"
207 ;;
208 *executable*) # but shell scripts are "executable" too...
209 case $win32_fileres in
210 *MS\ Windows\ PE\ Intel*)
211 win32_libid_type="x86 DLL"
212 ;;
213 esac
214 ;;
215 esac
216 $echo $win32_libid_type
217 }
218
219
220 # func_infer_tag arg
221 # Infer tagged configuration to use if any are available and
222 # if one wasn't chosen via the "--tag" command line option.
223 # Only attempt this if the compiler in the base compile
224 # command doesn't match the default compiler.
225 # arg is usually of the form 'gcc ...'
226 func_infer_tag ()
227 {
228 if test -n "$available_tags" && test -z "$tagname"; then
229 CC_quoted=
230 for arg in $CC; do
231 case $arg in
232 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
233 arg="\"$arg\""
234 ;;
235 esac
236 CC_quoted="$CC_quoted $arg"
237 done
238 case $@ in
239 # Blanks in the command may have been stripped by the calling shell,
240 # but not from the CC environment variable when configure was run.
241 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
242 # Blanks at the start of $base_compile will cause this to fail
243 # if we don't check for them as well.
244 *)
245 for z in $available_tags; do
246 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
247 # Evaluate the configuration.
248 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
249 CC_quoted=
250 for arg in $CC; do
251 # Double-quote args containing other shell metacharacters.
252 case $arg in
253 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
254 arg="\"$arg\""
255 ;;
256 esac
257 CC_quoted="$CC_quoted $arg"
258 done
259 case "$@ " in
260 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
261 # The compiler in the base compile command matches
262 # the one in the tagged configuration.
263 # Assume this is the tagged configuration we want.
264 tagname=$z
265 break
266 ;;
267 esac
268 fi
269 done
270 # If $tagname still isn't set, then no tagged configuration
271 # was found and let the user know that the "--tag" command
272 # line option must be used.
273 if test -z "$tagname"; then
274 $echo "$modename: unable to infer tagged configuration"
275 $echo "$modename: specify a tag with \`--tag'" 1>&2
276 exit $EXIT_FAILURE
277 # else
278 # $echo "$modename: using $tagname tagged configuration"
279 fi
280 ;;
281 esac
282 fi
283 }
284
285
286 # func_extract_an_archive dir oldlib
287 func_extract_an_archive ()
288 {
289 f_ex_an_ar_dir="$1"; shift
290 f_ex_an_ar_oldlib="$1"
291
292 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
293 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
294 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
295 :
296 else
297 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
298 exit $EXIT_FAILURE
299 fi
300 }
301
302 # func_extract_archives gentop oldlib ...
303 func_extract_archives ()
304 {
305 my_gentop="$1"; shift
306 my_oldlibs=${1+"$@"}
307 my_oldobjs=""
308 my_xlib=""
309 my_xabs=""
310 my_xdir=""
311 my_status=""
312
313 $show "${rm}r $my_gentop"
314 $run ${rm}r "$my_gentop"
315 $show "$mkdir $my_gentop"
316 $run $mkdir "$my_gentop"
317 my_status=$?
318 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
319 exit $my_status
320 fi
321
322 for my_xlib in $my_oldlibs; do
323 # Extract the objects.
324 case $my_xlib in
325 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
326 *) my_xabs=`pwd`"/$my_xlib" ;;
327 esac
328 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
329 my_xdir="$my_gentop/$my_xlib"
330
331 $show "${rm}r $my_xdir"
332 $run ${rm}r "$my_xdir"
333 $show "$mkdir $my_xdir"
334 $run $mkdir "$my_xdir"
335 exit_status=$?
336 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
337 exit $exit_status
338 fi
339 case $host in
340 *-darwin*)
341 $show "Extracting $my_xabs"
342 # Do not bother doing anything if just a dry run
343 if test -z "$run"; then
344 darwin_orig_dir=`pwd`
345 cd $my_xdir || exit $?
346 darwin_archive=$my_xabs
347 darwin_curdir=`pwd`
348 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
349 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
350 if test -n "$darwin_arches"; then
351 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
352 darwin_arch=
353 $show "$darwin_base_archive has multiple architectures $darwin_arches"
354 for darwin_arch in $darwin_arches ; do
355 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
356 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
357 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
358 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
359 cd "$darwin_curdir"
360 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
361 done # $darwin_arches
362 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
363 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
364 darwin_file=
365 darwin_files=
366 for darwin_file in $darwin_filelist; do
367 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
368 lipo -create -output "$darwin_file" $darwin_files
369 done # $darwin_filelist
370 ${rm}r unfat-$$
371 cd "$darwin_orig_dir"
372 else
373 cd "$darwin_orig_dir"
374 func_extract_an_archive "$my_xdir" "$my_xabs"
375 fi # $darwin_arches
376 fi # $run
377 ;;
378 *)
379 func_extract_an_archive "$my_xdir" "$my_xabs"
380 ;;
381 esac
382 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
383 done
384 func_extract_archives_result="$my_oldobjs"
385 }
386 # End of Shell function definitions
387 #####################################
388
389 # Darwin sucks
390 eval std_shrext=\"$shrext_cmds\"
391
392 disable_libs=no
393
107394 # Parse our command line options once, thoroughly.
108 while test $# -gt 0
395 while test "$#" -gt 0
109396 do
110397 arg="$1"
111398 shift
121408 execute_dlfiles)
122409 execute_dlfiles="$execute_dlfiles $arg"
123410 ;;
411 tag)
412 tagname="$arg"
413 preserve_args="${preserve_args}=$arg"
414
415 # Check whether tagname contains only valid characters
416 case $tagname in
417 *[!-_A-Za-z0-9,/]*)
418 $echo "$progname: invalid tag name: $tagname" 1>&2
419 exit $EXIT_FAILURE
420 ;;
421 esac
422
423 case $tagname in
424 CC)
425 # Don't test for the "default" C tag, as we know, it's there, but
426 # not specially marked.
427 ;;
428 *)
429 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
430 taglist="$taglist $tagname"
431 # Evaluate the configuration.
432 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
433 else
434 $echo "$progname: ignoring unknown tag $tagname" 1>&2
435 fi
436 ;;
437 esac
438 ;;
124439 *)
125440 eval "$prev=\$arg"
126441 ;;
138453 ;;
139454
140455 --version)
141 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
142 exit 0
456 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
457 $echo
458 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
459 $echo "This is free software; see the source for copying conditions. There is NO"
460 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
461 exit $?
143462 ;;
144463
145464 --config)
146 sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
147 exit 0
465 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
466 # Now print the configurations for the tags.
467 for tagname in $taglist; do
468 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
469 done
470 exit $?
148471 ;;
149472
150473 --debug)
151 echo "$progname: enabling shell trace mode"
474 $echo "$progname: enabling shell trace mode"
152475 set -x
476 preserve_args="$preserve_args $arg"
153477 ;;
154478
155479 --dry-run | -n)
157481 ;;
158482
159483 --features)
160 echo "host: $host"
484 $echo "host: $host"
161485 if test "$build_libtool_libs" = yes; then
162 echo "enable shared libraries"
486 $echo "enable shared libraries"
163487 else
164 echo "disable shared libraries"
488 $echo "disable shared libraries"
165489 fi
166490 if test "$build_old_libs" = yes; then
167 echo "enable static libraries"
491 $echo "enable static libraries"
168492 else
169 echo "disable static libraries"
493 $echo "disable static libraries"
170494 fi
171 exit 0
495 exit $?
172496 ;;
173497
174498 --finish) mode="finish" ;;
176500 --mode) prevopt="--mode" prev=mode ;;
177501 --mode=*) mode="$optarg" ;;
178502
503 --preserve-dup-deps) duplicate_deps="yes" ;;
504
179505 --quiet | --silent)
180506 show=:
507 preserve_args="$preserve_args $arg"
508 ;;
509
510 --tag)
511 prevopt="--tag"
512 prev=tag
513 preserve_args="$preserve_args --tag"
514 ;;
515 --tag=*)
516 set tag "$optarg" ${1+"$@"}
517 shift
518 prev=tag
519 preserve_args="$preserve_args --tag"
181520 ;;
182521
183522 -dlopen)
188527 -*)
189528 $echo "$modename: unrecognized option \`$arg'" 1>&2
190529 $echo "$help" 1>&2
191 exit 1
530 exit $EXIT_FAILURE
192531 ;;
193532
194533 *)
201540 if test -n "$prevopt"; then
202541 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
203542 $echo "$help" 1>&2
204 exit 1
543 exit $EXIT_FAILURE
205544 fi
545
546 case $disable_libs in
547 no)
548 ;;
549 shared)
550 build_libtool_libs=no
551 build_old_libs=yes
552 ;;
553 static)
554 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
555 ;;
556 esac
206557
207558 # If this variable is set in any of the actions, the command in it
208559 # will be execed at the end. This prevents here-documents from being
213564
214565 # Infer the operation mode.
215566 if test -z "$mode"; then
567 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
568 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
216569 case $nonopt in
217 *cc | *++ | gcc* | *-gcc*)
570 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
218571 mode=link
219572 for arg
220573 do
255608 if test -n "$execute_dlfiles" && test "$mode" != execute; then
256609 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
257610 $echo "$help" 1>&2
258 exit 1
611 exit $EXIT_FAILURE
259612 fi
260613
261614 # Change the help message to a mode-specific one.
269622 modename="$modename: compile"
270623 # Get the compilation command and the source file.
271624 base_compile=
272 prev=
273 lastarg=
274 srcfile="$nonopt"
625 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
626 suppress_opt=yes
275627 suppress_output=
276
277 user_target=no
628 arg_mode=normal
629 libobj=
630 later=
631
278632 for arg
279633 do
280 case $prev in
281 "") ;;
282 xcompiler)
283 # Aesthetically quote the previous argument.
284 prev=
285 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
286
634 case $arg_mode in
635 arg )
636 # do not "continue". Instead, add this to base_compile
637 lastarg="$arg"
638 arg_mode=normal
639 ;;
640
641 target )
642 libobj="$arg"
643 arg_mode=normal
644 continue
645 ;;
646
647 normal )
648 # Accept any command-line options.
287649 case $arg in
288 # Double-quote args containing other shell metacharacters.
289 # Many Bourne shells cannot handle close brackets correctly
290 # in scan sets, so we specify it separately.
291 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
292 arg="\"$arg\""
293 ;;
294 esac
295
296 # Add the previous argument to base_compile.
297 if test -z "$base_compile"; then
298 base_compile="$lastarg"
299 else
650 -o)
651 if test -n "$libobj" ; then
652 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
653 exit $EXIT_FAILURE
654 fi
655 arg_mode=target
656 continue
657 ;;
658
659 -static | -prefer-pic | -prefer-non-pic)
660 later="$later $arg"
661 continue
662 ;;
663
664 -no-suppress)
665 suppress_opt=no
666 continue
667 ;;
668
669 -Xcompiler)
670 arg_mode=arg # the next one goes into the "base_compile" arg list
671 continue # The current "srcfile" will either be retained or
672 ;; # replaced later. I would guess that would be a bug.
673
674 -Wc,*)
675 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
676 lastarg=
677 save_ifs="$IFS"; IFS=','
678 for arg in $args; do
679 IFS="$save_ifs"
680
681 # Double-quote args containing other shell metacharacters.
682 # Many Bourne shells cannot handle close brackets correctly
683 # in scan sets, so we specify it separately.
684 case $arg in
685 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
686 arg="\"$arg\""
687 ;;
688 esac
689 lastarg="$lastarg $arg"
690 done
691 IFS="$save_ifs"
692 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
693
694 # Add the arguments to base_compile.
300695 base_compile="$base_compile $lastarg"
301 fi
302 continue
303 ;;
304 esac
305
306 # Accept any command-line options.
307 case $arg in
308 -o)
309 if test "$user_target" != "no"; then
310 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
311 exit 1
312 fi
313 user_target=next
314 ;;
315
316 -static)
317 build_old_libs=yes
318 continue
319 ;;
320
321 -prefer-pic)
322 pic_mode=yes
323 continue
324 ;;
325
326 -prefer-non-pic)
327 pic_mode=no
328 continue
329 ;;
330
331 -Xcompiler)
332 prev=xcompiler
333 continue
334 ;;
335
336 -Wc,*)
337 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
338 lastarg=
339 save_ifs="$IFS"; IFS=','
340 for arg in $args; do
341 IFS="$save_ifs"
342
343 # Double-quote args containing other shell metacharacters.
344 # Many Bourne shells cannot handle close brackets correctly
345 # in scan sets, so we specify it separately.
346 case $arg in
347 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
348 arg="\"$arg\""
349 ;;
350 esac
351 lastarg="$lastarg $arg"
352 done
353 IFS="$save_ifs"
354 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
355
356 # Add the arguments to base_compile.
357 if test -z "$base_compile"; then
358 base_compile="$lastarg"
359 else
360 base_compile="$base_compile $lastarg"
361 fi
362 continue
363 ;;
364 esac
365
366 case $user_target in
367 next)
368 # The next one is the -o target name
369 user_target=yes
370 continue
371 ;;
372 yes)
373 # We got the output file
374 user_target=set
375 libobj="$arg"
376 continue
377 ;;
378 esac
379
380 # Accept the current argument as the source file.
381 lastarg="$srcfile"
382 srcfile="$arg"
696 continue
697 ;;
698
699 * )
700 # Accept the current argument as the source file.
701 # The previous "srcfile" becomes the current argument.
702 #
703 lastarg="$srcfile"
704 srcfile="$arg"
705 ;;
706 esac # case $arg
707 ;;
708 esac # case $arg_mode
383709
384710 # Aesthetically quote the previous argument.
385
386 # Backslashify any backslashes, double quotes, and dollar signs.
387 # These are the only characters that are still specially
388 # interpreted inside of double-quoted scrings.
389711 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
390712
713 case $lastarg in
391714 # Double-quote args containing other shell metacharacters.
392715 # Many Bourne shells cannot handle close brackets correctly
393 # in scan sets, so we specify it separately.
394 case $lastarg in
716 # in scan sets, and some SunOS ksh mistreat backslash-escaping
717 # in scan sets (worked around with variable expansion),
718 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
719 # at all, so we specify them separately.
395720 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
396721 lastarg="\"$lastarg\""
397722 ;;
398723 esac
399724
400 # Add the previous argument to base_compile.
401 if test -z "$base_compile"; then
402 base_compile="$lastarg"
403 else
404 base_compile="$base_compile $lastarg"
405 fi
406 done
407
408 case $user_target in
409 set)
725 base_compile="$base_compile $lastarg"
726 done # for arg
727
728 case $arg_mode in
729 arg)
730 $echo "$modename: you must specify an argument for -Xcompile"
731 exit $EXIT_FAILURE
410732 ;;
411 no)
412 # Get the name of the library object.
413 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
733 target)
734 $echo "$modename: you must specify a target with \`-o'" 1>&2
735 exit $EXIT_FAILURE
414736 ;;
415737 *)
416 $echo "$modename: you must specify a target with \`-o'" 1>&2
417 exit 1
738 # Get the name of the library object.
739 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
418740 ;;
419741 esac
420742
421743 # Recognize several different file suffixes.
422744 # If the user specifies -o file.o, it is replaced with file.lo
423 xform='[cCFSfmso]'
745 xform='[cCFSifmso]'
424746 case $libobj in
425747 *.ada) xform=ada ;;
426748 *.adb) xform=adb ;;
428750 *.asm) xform=asm ;;
429751 *.c++) xform=c++ ;;
430752 *.cc) xform=cc ;;
753 *.ii) xform=ii ;;
754 *.class) xform=class ;;
431755 *.cpp) xform=cpp ;;
432756 *.cxx) xform=cxx ;;
433757 *.f90) xform=f90 ;;
434758 *.for) xform=for ;;
759 *.java) xform=java ;;
435760 esac
436761
437762 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
440765 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
441766 *)
442767 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
443 exit 1
768 exit $EXIT_FAILURE
444769 ;;
445770 esac
771
772 func_infer_tag $base_compile
773
774 for arg in $later; do
775 case $arg in
776 -static)
777 build_old_libs=yes
778 continue
779 ;;
780
781 -prefer-pic)
782 pic_mode=yes
783 continue
784 ;;
785
786 -prefer-non-pic)
787 pic_mode=no
788 continue
789 ;;
790 esac
791 done
792
793 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
794 case $qlibobj in
795 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
796 qlibobj="\"$qlibobj\"" ;;
797 esac
798 test "X$libobj" != "X$qlibobj" \
799 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
800 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
801 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
802 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
803 if test "X$xdir" = "X$obj"; then
804 xdir=
805 else
806 xdir=$xdir/
807 fi
808 lobj=${xdir}$objdir/$objname
446809
447810 if test -z "$base_compile"; then
448811 $echo "$modename: you must specify a compilation command" 1>&2
449812 $echo "$help" 1>&2
450 exit 1
813 exit $EXIT_FAILURE
451814 fi
452815
453816 # Delete any leftover library objects.
454817 if test "$build_old_libs" = yes; then
455 removelist="$obj $libobj"
818 removelist="$obj $lobj $libobj ${libobj}T"
456819 else
457 removelist="$libobj"
820 removelist="$lobj $libobj ${libobj}T"
458821 fi
459822
460823 $run $rm $removelist
461 trap "$run $rm $removelist; exit 1" 1 2 15
824 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
462825
463826 # On Cygwin there's no "real" PIC flag so we must build both object types
464827 case $host_os in
466829 pic_mode=default
467830 ;;
468831 esac
469 if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
832 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
470833 # non-PIC code in shared libraries is not supported
471834 pic_mode=default
472835 fi
477840 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
478841 lockfile="$output_obj.lock"
479842 removelist="$removelist $output_obj $lockfile"
480 trap "$run $rm $removelist; exit 1" 1 2 15
843 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
481844 else
845 output_obj=
482846 need_locks=no
483847 lockfile=
484848 fi
486850 # Lock this critical section if it is needed
487851 # We use this script file to make the link, it avoids creating a new file
488852 if test "$need_locks" = yes; then
489 until $run ln "$0" "$lockfile" 2>/dev/null; do
853 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
490854 $show "Waiting for $lockfile to be removed"
491855 sleep 2
492856 done
493857 elif test "$need_locks" = warn; then
494858 if test -f "$lockfile"; then
495 echo "\
859 $echo "\
496860 *** ERROR, $lockfile exists and contains:
497861 `cat $lockfile 2>/dev/null`
498862
504868 compiler."
505869
506870 $run $rm $removelist
507 exit 1
508 fi
509 echo $srcfile > "$lockfile"
871 exit $EXIT_FAILURE
872 fi
873 $echo "$srcfile" > "$lockfile"
510874 fi
511875
512876 if test -n "$fix_srcfile_path"; then
513877 eval srcfile=\"$fix_srcfile_path\"
514878 fi
879 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
880 case $qsrcfile in
881 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
882 qsrcfile="\"$qsrcfile\"" ;;
883 esac
884
885 $run $rm "$libobj" "${libobj}T"
886
887 # Create a libtool object file (analogous to a ".la" file),
888 # but don't create it if we're doing a dry run.
889 test -z "$run" && cat > ${libobj}T <<EOF
890 # $libobj - a libtool object file
891 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
892 #
893 # Please DO NOT delete this file!
894 # It is necessary for linking the library.
895
896 # Name of the PIC object.
897 EOF
515898
516899 # Only build a PIC object if we are building libtool libraries.
517900 if test "$build_libtool_libs" = yes; then
519902 fbsd_hideous_sh_bug=$base_compile
520903
521904 if test "$pic_mode" != no; then
522 # All platforms use -DPIC, to notify preprocessed assembler code.
523 command="$base_compile $srcfile $pic_flag -DPIC"
905 command="$base_compile $qsrcfile $pic_flag"
524906 else
525907 # Don't build PIC code
526 command="$base_compile $srcfile"
527 fi
528 if test "$build_old_libs" = yes; then
529 lo_libobj="$libobj"
530 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
531 if test "X$dir" = "X$libobj"; then
532 dir="$objdir"
533 else
534 dir="$dir/$objdir"
535 fi
536 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
537
538 if test -d "$dir"; then
539 $show "$rm $libobj"
540 $run $rm $libobj
541 else
542 $show "$mkdir $dir"
543 $run $mkdir $dir
544 status=$?
545 if test $status -ne 0 && test ! -d $dir; then
546 exit $status
547 fi
548 fi
549 fi
550 if test "$compiler_o_lo" = yes; then
551 output_obj="$libobj"
552 command="$command -o $output_obj"
553 elif test "$compiler_c_o" = yes; then
554 output_obj="$obj"
555 command="$command -o $output_obj"
556 fi
557
558 $run $rm "$output_obj"
908 command="$base_compile $qsrcfile"
909 fi
910
911 if test ! -d "${xdir}$objdir"; then
912 $show "$mkdir ${xdir}$objdir"
913 $run $mkdir ${xdir}$objdir
914 exit_status=$?
915 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
916 exit $exit_status
917 fi
918 fi
919
920 if test -z "$output_obj"; then
921 # Place PIC objects in $objdir
922 command="$command -o $lobj"
923 fi
924
925 $run $rm "$lobj" "$output_obj"
926
559927 $show "$command"
560928 if $run eval "$command"; then :
561929 else
562930 test -n "$output_obj" && $run $rm $removelist
563 exit 1
931 exit $EXIT_FAILURE
564932 fi
565933
566934 if test "$need_locks" = warn &&
567 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
568 echo "\
935 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
936 $echo "\
569937 *** ERROR, $lockfile contains:
570938 `cat $lockfile 2>/dev/null`
571939
580948 compiler."
581949
582950 $run $rm $removelist
583 exit 1
951 exit $EXIT_FAILURE
584952 fi
585953
586954 # Just move the object if needed, then go on to compile the next one
587 if test x"$output_obj" != x"$libobj"; then
588 $show "$mv $output_obj $libobj"
589 if $run $mv $output_obj $libobj; then :
955 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
956 $show "$mv $output_obj $lobj"
957 if $run $mv $output_obj $lobj; then :
590958 else
591959 error=$?
592960 $run $rm $removelist
594962 fi
595963 fi
596964
597 # If we have no pic_flag, then copy the object into place and finish.
598 if (test -z "$pic_flag" || test "$pic_mode" != default) &&
599 test "$build_old_libs" = yes; then
600 # Rename the .lo from within objdir to obj
601 if test -f $obj; then
602 $show $rm $obj
603 $run $rm $obj
604 fi
605
606 $show "$mv $libobj $obj"
607 if $run $mv $libobj $obj; then :
608 else
609 error=$?
610 $run $rm $removelist
611 exit $error
612 fi
613
614 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
615 if test "X$xdir" = "X$obj"; then
616 xdir="."
617 else
618 xdir="$xdir"
619 fi
620 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
621 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
622 # Now arrange that obj and lo_libobj become the same file
623 $show "(cd $xdir && $LN_S $baseobj $libobj)"
624 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
625 # Unlock the critical section if it was locked
626 if test "$need_locks" != no; then
627 $run $rm "$lockfile"
628 fi
629 exit 0
630 else
631 error=$?
632 $run $rm $removelist
633 exit $error
634 fi
635 fi
965 # Append the name of the PIC object to the libtool object file.
966 test -z "$run" && cat >> ${libobj}T <<EOF
967 pic_object='$objdir/$objname'
968
969 EOF
636970
637971 # Allow error messages only from the first compilation.
638 suppress_output=' >/dev/null 2>&1'
972 if test "$suppress_opt" = yes; then
973 suppress_output=' >/dev/null 2>&1'
974 fi
975 else
976 # No PIC object so indicate it doesn't exist in the libtool
977 # object file.
978 test -z "$run" && cat >> ${libobj}T <<EOF
979 pic_object=none
980
981 EOF
639982 fi
640983
641984 # Only build a position-dependent object if we build old libraries.
642985 if test "$build_old_libs" = yes; then
643986 if test "$pic_mode" != yes; then
644987 # Don't build PIC code
645 command="$base_compile $srcfile"
988 command="$base_compile $qsrcfile"
646989 else
647 # All platforms use -DPIC, to notify preprocessed assembler code.
648 command="$base_compile $srcfile $pic_flag -DPIC"
990 command="$base_compile $qsrcfile $pic_flag"
649991 fi
650992 if test "$compiler_c_o" = yes; then
651993 command="$command -o $obj"
652 output_obj="$obj"
653994 fi
654995
655996 # Suppress compiler output if we already did a PIC compilation.
656997 command="$command$suppress_output"
657 $run $rm "$output_obj"
998 $run $rm "$obj" "$output_obj"
658999 $show "$command"
6591000 if $run eval "$command"; then :
6601001 else
6611002 $run $rm $removelist
662 exit 1
1003 exit $EXIT_FAILURE
6631004 fi
6641005
6651006 if test "$need_locks" = warn &&
666 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
667 echo "\
1007 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1008 $echo "\
6681009 *** ERROR, $lockfile contains:
6691010 `cat $lockfile 2>/dev/null`
6701011
6791020 compiler."
6801021
6811022 $run $rm $removelist
682 exit 1
1023 exit $EXIT_FAILURE
6831024 fi
6841025
6851026 # Just move the object if needed
686 if test x"$output_obj" != x"$obj"; then
1027 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
6871028 $show "$mv $output_obj $obj"
6881029 if $run $mv $output_obj $obj; then :
6891030 else
6931034 fi
6941035 fi
6951036
696 # Create an invalid libtool object if no PIC, so that we do not
697 # accidentally link it into a program.
698 if test "$build_libtool_libs" != yes; then
699 $show "echo timestamp > $libobj"
700 $run eval "echo timestamp > \$libobj" || exit $?
701 else
702 # Move the .lo from within objdir
703 $show "$mv $libobj $lo_libobj"
704 if $run $mv $libobj $lo_libobj; then :
705 else
706 error=$?
707 $run $rm $removelist
708 exit $error
709 fi
710 fi
1037 # Append the name of the non-PIC object the libtool object file.
1038 # Only append if the libtool object file exists.
1039 test -z "$run" && cat >> ${libobj}T <<EOF
1040 # Name of the non-PIC object.
1041 non_pic_object='$objname'
1042
1043 EOF
1044 else
1045 # Append the name of the non-PIC object the libtool object file.
1046 # Only append if the libtool object file exists.
1047 test -z "$run" && cat >> ${libobj}T <<EOF
1048 # Name of the non-PIC object.
1049 non_pic_object=none
1050
1051 EOF
7111052 fi
1053
1054 $run $mv "${libobj}T" "${libobj}"
7121055
7131056 # Unlock the critical section if it was locked
7141057 if test "$need_locks" != no; then
7151058 $run $rm "$lockfile"
7161059 fi
7171060
718 exit 0
1061 exit $EXIT_SUCCESS
7191062 ;;
7201063
7211064 # libtool link mode
7261069 # It is impossible to link a dll without this setting, and
7271070 # we shouldn't force the makefile maintainer to figure out
7281071 # which system we are compiling for in order to pass an extra
729 # flag for every libtool invokation.
1072 # flag for every libtool invocation.
7301073 # allow_undefined=no
7311074
7321075 # FIXME: Unfortunately, there are problems with the above when trying
7411084 ;;
7421085 esac
7431086 libtool_args="$nonopt"
1087 base_compile="$nonopt $@"
7441088 compile_command="$nonopt"
7451089 finalize_command="$nonopt"
7461090
7561100 linker_flags=
7571101 dllsearchpath=
7581102 lib_search_path=`pwd`
1103 inst_prefix_dir=
7591104
7601105 avoid_version=no
7611106 dlfiles=
7701115 module=no
7711116 no_install=no
7721117 objs=
1118 non_pic_objects=
1119 notinst_path= # paths that contain not-installed libtool libraries
1120 precious_files_regex=
7731121 prefer_static_libs=no
7741122 preload=no
7751123 prev=
7811129 temp_rpath=
7821130 thread_safe=no
7831131 vinfo=
1132 vinfo_number=no
1133
1134 func_infer_tag $base_compile
7841135
7851136 # We need to know -static, to get the right output filenames.
7861137 for arg
7941145 if test -n "$link_static_flag"; then
7951146 dlopen_self=$dlopen_self_static
7961147 fi
1148 prefer_static_libs=yes
7971149 else
7981150 if test -z "$pic_flag" && test -n "$link_static_flag"; then
7991151 dlopen_self=$dlopen_self_static
8001152 fi
1153 prefer_static_libs=built
8011154 fi
8021155 build_libtool_libs=no
8031156 build_old_libs=yes
804 prefer_static_libs=yes
8051157 break
8061158 ;;
8071159 esac
8111163 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
8121164
8131165 # Go through the arguments, transforming them on the way.
814 while test $# -gt 0; do
1166 while test "$#" -gt 0; do
8151167 arg="$1"
8161168 shift
8171169 case $arg in
8761228 export_symbols="$arg"
8771229 if test ! -f "$arg"; then
8781230 $echo "$modename: symbol file \`$arg' does not exist"
879 exit 1
1231 exit $EXIT_FAILURE
8801232 fi
8811233 prev=
8821234 continue
8861238 prev=
8871239 continue
8881240 ;;
1241 inst_prefix)
1242 inst_prefix_dir="$arg"
1243 prev=
1244 continue
1245 ;;
1246 precious_regex)
1247 precious_files_regex="$arg"
1248 prev=
1249 continue
1250 ;;
8891251 release)
8901252 release="-$arg"
1253 prev=
1254 continue
1255 ;;
1256 objectlist)
1257 if test -f "$arg"; then
1258 save_arg=$arg
1259 moreargs=
1260 for fil in `cat $save_arg`
1261 do
1262 # moreargs="$moreargs $fil"
1263 arg=$fil
1264 # A libtool-controlled object.
1265
1266 # Check to see that this really is a libtool object.
1267 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1268 pic_object=
1269 non_pic_object=
1270
1271 # Read the .lo file
1272 # If there is no directory component, then add one.
1273 case $arg in
1274 */* | *\\*) . $arg ;;
1275 *) . ./$arg ;;
1276 esac
1277
1278 if test -z "$pic_object" || \
1279 test -z "$non_pic_object" ||
1280 test "$pic_object" = none && \
1281 test "$non_pic_object" = none; then
1282 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1283 exit $EXIT_FAILURE
1284 fi
1285
1286 # Extract subdirectory from the argument.
1287 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1288 if test "X$xdir" = "X$arg"; then
1289 xdir=
1290 else
1291 xdir="$xdir/"
1292 fi
1293
1294 if test "$pic_object" != none; then
1295 # Prepend the subdirectory the object is found in.
1296 pic_object="$xdir$pic_object"
1297
1298 if test "$prev" = dlfiles; then
1299 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1300 dlfiles="$dlfiles $pic_object"
1301 prev=
1302 continue
1303 else
1304 # If libtool objects are unsupported, then we need to preload.
1305 prev=dlprefiles
1306 fi
1307 fi
1308
1309 # CHECK ME: I think I busted this. -Ossama
1310 if test "$prev" = dlprefiles; then
1311 # Preload the old-style object.
1312 dlprefiles="$dlprefiles $pic_object"
1313 prev=
1314 fi
1315
1316 # A PIC object.
1317 libobjs="$libobjs $pic_object"
1318 arg="$pic_object"
1319 fi
1320
1321 # Non-PIC object.
1322 if test "$non_pic_object" != none; then
1323 # Prepend the subdirectory the object is found in.
1324 non_pic_object="$xdir$non_pic_object"
1325
1326 # A standard non-PIC object
1327 non_pic_objects="$non_pic_objects $non_pic_object"
1328 if test -z "$pic_object" || test "$pic_object" = none ; then
1329 arg="$non_pic_object"
1330 fi
1331 else
1332 # If the PIC object exists, use it instead.
1333 # $xdir was prepended to $pic_object above.
1334 non_pic_object="$pic_object"
1335 non_pic_objects="$non_pic_objects $non_pic_object"
1336 fi
1337 else
1338 # Only an error if not doing a dry-run.
1339 if test -z "$run"; then
1340 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1341 exit $EXIT_FAILURE
1342 else
1343 # Dry-run case.
1344
1345 # Extract subdirectory from the argument.
1346 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1347 if test "X$xdir" = "X$arg"; then
1348 xdir=
1349 else
1350 xdir="$xdir/"
1351 fi
1352
1353 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1354 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1355 libobjs="$libobjs $pic_object"
1356 non_pic_objects="$non_pic_objects $non_pic_object"
1357 fi
1358 fi
1359 done
1360 else
1361 $echo "$modename: link input file \`$save_arg' does not exist"
1362 exit $EXIT_FAILURE
1363 fi
1364 arg=$save_arg
8911365 prev=
8921366 continue
8931367 ;;
8971371 [\\/]* | [A-Za-z]:[\\/]*) ;;
8981372 *)
8991373 $echo "$modename: only absolute run-paths are allowed" 1>&2
900 exit 1
1374 exit $EXIT_FAILURE
9011375 ;;
9021376 esac
9031377 if test "$prev" = rpath; then
9291403 finalize_command="$finalize_command $wl$qarg"
9301404 continue
9311405 ;;
1406 xcclinker)
1407 linker_flags="$linker_flags $qarg"
1408 compiler_flags="$compiler_flags $qarg"
1409 prev=
1410 compile_command="$compile_command $qarg"
1411 finalize_command="$finalize_command $qarg"
1412 continue
1413 ;;
1414 shrext)
1415 shrext_cmds="$arg"
1416 prev=
1417 continue
1418 ;;
1419 darwin_framework|darwin_framework_skip)
1420 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1421 compile_command="$compile_command $arg"
1422 finalize_command="$finalize_command $arg"
1423 prev=
1424 continue
1425 ;;
9321426 *)
9331427 eval "$prev=\"\$arg\""
9341428 prev=
9351429 continue
9361430 ;;
9371431 esac
938 fi # test -n $prev
1432 fi # test -n "$prev"
9391433
9401434 prevarg="$arg"
9411435
9771471 -export-symbols | -export-symbols-regex)
9781472 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
9791473 $echo "$modename: more than one -exported-symbols argument is not allowed"
980 exit 1
1474 exit $EXIT_FAILURE
9811475 fi
9821476 if test "X$arg" = "X-export-symbols"; then
9831477 prev=expsyms
9871481 continue
9881482 ;;
9891483
1484 -framework|-arch|-isysroot)
1485 case " $CC " in
1486 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1487 prev=darwin_framework_skip ;;
1488 *) compiler_flags="$compiler_flags $arg"
1489 prev=darwin_framework ;;
1490 esac
1491 compile_command="$compile_command $arg"
1492 finalize_command="$finalize_command $arg"
1493 continue
1494 ;;
1495
1496 -inst-prefix-dir)
1497 prev=inst_prefix
1498 continue
1499 ;;
1500
9901501 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
9911502 # so, if we see these flags be careful not to treat them like -L
9921503 -L[A-Z][A-Z]*:*)
9931504 case $with_gcc/$host in
994 no/*-*-irix*)
1505 no/*-*-irix* | /*-*-irix*)
9951506 compile_command="$compile_command $arg"
9961507 finalize_command="$finalize_command $arg"
9971508 ;;
10081519 absdir=`cd "$dir" && pwd`
10091520 if test -z "$absdir"; then
10101521 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1011 exit 1
1522 absdir="$dir"
1523 notinst_path="$notinst_path $dir"
10121524 fi
10131525 dir="$absdir"
10141526 ;;
10221534 esac
10231535 case $host in
10241536 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1537 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
10251538 case :$dllsearchpath: in
10261539 *":$dir:"*) ;;
10271540 *) dllsearchpath="$dllsearchpath:$dir";;
10281541 esac
1542 case :$dllsearchpath: in
1543 *":$testbindir:"*) ;;
1544 *) dllsearchpath="$dllsearchpath:$testbindir";;
1545 esac
10291546 ;;
10301547 esac
10311548 continue
10341551 -l*)
10351552 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
10361553 case $host in
1037 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1554 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
10381555 # These systems don't actually have a C or math library (as such)
10391556 continue
10401557 ;;
1041 *-*-mingw* | *-*-os2*)
1558 *-*-os2*)
10421559 # These systems don't actually have a C library (as such)
10431560 test "X$arg" = "X-lc" && continue
10441561 ;;
1045 *-*-openbsd*)
1562 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
10461563 # Do not include libc due to us having libc/libc_r.
10471564 test "X$arg" = "X-lc" && continue
10481565 ;;
1049 esac
1050 elif test "X$arg" = "X-lc_r"; then
1051 case $host in
1052 *-*-openbsd*)
1053 # Do not include libc_r directly, use -pthread flag.
1566 *-*-rhapsody* | *-*-darwin1.[012])
1567 # Rhapsody C and math libraries are in the System framework
1568 deplibs="$deplibs -framework System"
10541569 continue
10551570 ;;
1571 *-*-sco3.2v5* | *-*-sco5v6*)
1572 # Causes problems with __ctype
1573 test "X$arg" = "X-lc" && continue
1574 ;;
1575 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1576 # Compiler inserts libc in the correct place for threads to work
1577 test "X$arg" = "X-lc" && continue
1578 ;;
10561579 esac
1580 elif test "X$arg" = "X-lc_r"; then
1581 case $host in
1582 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1583 # Do not include libc_r directly, use -pthread flag.
1584 continue
1585 ;;
1586 esac
10571587 fi
10581588 deplibs="$deplibs $arg"
10591589 continue
10601590 ;;
10611591
1592 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1593 # classes, name mangling, and exception handling.
1594 -model)
1595 compile_command="$compile_command $arg"
1596 compiler_flags="$compiler_flags $arg"
1597 finalize_command="$finalize_command $arg"
1598 prev=xcompiler
1599 continue
1600 ;;
1601
1602 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1603 compiler_flags="$compiler_flags $arg"
1604 compile_command="$compile_command $arg"
1605 finalize_command="$finalize_command $arg"
1606 continue
1607 ;;
1608
10621609 -module)
10631610 module=yes
1611 continue
1612 ;;
1613
1614 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1615 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1616 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1617 # +DA*, +DD* enable 64-bit mode on the HP compiler
1618 # -q* pass through compiler args for the IBM compiler
1619 # -m* pass through architecture-specific compiler args for GCC
1620 # -m*, -t[45]*, -txscale* pass through architecture-specific
1621 # compiler args for GCC
1622 # -pg pass through profiling flag for GCC
1623 # @file GCC response files
1624 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1625 -t[45]*|-txscale*|@*)
1626
1627 # Unknown arguments in both finalize_command and compile_command need
1628 # to be aesthetically quoted because they are evaled later.
1629 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1630 case $arg in
1631 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1632 arg="\"$arg\""
1633 ;;
1634 esac
1635 compile_command="$compile_command $arg"
1636 finalize_command="$finalize_command $arg"
1637 compiler_flags="$compiler_flags $arg"
1638 continue
1639 ;;
1640
1641 -shrext)
1642 prev=shrext
10641643 continue
10651644 ;;
10661645
10881667 continue
10891668 ;;
10901669
1670 -objectlist)
1671 prev=objectlist
1672 continue
1673 ;;
1674
10911675 -o) prev=output ;;
1676
1677 -precious-files-regex)
1678 prev=precious_regex
1679 continue
1680 ;;
10921681
10931682 -release)
10941683 prev=release
11121701 [\\/]* | [A-Za-z]:[\\/]*) ;;
11131702 *)
11141703 $echo "$modename: only absolute run-paths are allowed" 1>&2
1115 exit 1
1704 exit $EXIT_FAILURE
11161705 ;;
11171706 esac
11181707 case "$xrpath " in
11381727
11391728 -version-info)
11401729 prev=vinfo
1730 continue
1731 ;;
1732 -version-number)
1733 prev=vinfo
1734 vinfo_number=yes
11411735 continue
11421736 ;;
11431737
11881782 continue
11891783 ;;
11901784
1785 -XCClinker)
1786 prev=xcclinker
1787 continue
1788 ;;
1789
11911790 # Some other compiler flag.
11921791 -* | +*)
11931792 # Unknown arguments in both finalize_command and compile_command need
12001799 esac
12011800 ;;
12021801
1203 *.lo | *.$objext)
1204 # A library or standard object.
1205 if test "$prev" = dlfiles; then
1206 # This file was specified with -dlopen.
1207 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1208 dlfiles="$dlfiles $arg"
1209 prev=
1210 continue
1802 *.$objext)
1803 # A standard object.
1804 objs="$objs $arg"
1805 ;;
1806
1807 *.lo)
1808 # A libtool-controlled object.
1809
1810 # Check to see that this really is a libtool object.
1811 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1812 pic_object=
1813 non_pic_object=
1814
1815 # Read the .lo file
1816 # If there is no directory component, then add one.
1817 case $arg in
1818 */* | *\\*) . $arg ;;
1819 *) . ./$arg ;;
1820 esac
1821
1822 if test -z "$pic_object" || \
1823 test -z "$non_pic_object" ||
1824 test "$pic_object" = none && \
1825 test "$non_pic_object" = none; then
1826 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1827 exit $EXIT_FAILURE
1828 fi
1829
1830 # Extract subdirectory from the argument.
1831 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1832 if test "X$xdir" = "X$arg"; then
1833 xdir=
1834 else
1835 xdir="$xdir/"
1836 fi
1837
1838 if test "$pic_object" != none; then
1839 # Prepend the subdirectory the object is found in.
1840 pic_object="$xdir$pic_object"
1841
1842 if test "$prev" = dlfiles; then
1843 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1844 dlfiles="$dlfiles $pic_object"
1845 prev=
1846 continue
1847 else
1848 # If libtool objects are unsupported, then we need to preload.
1849 prev=dlprefiles
1850 fi
1851 fi
1852
1853 # CHECK ME: I think I busted this. -Ossama
1854 if test "$prev" = dlprefiles; then
1855 # Preload the old-style object.
1856 dlprefiles="$dlprefiles $pic_object"
1857 prev=
1858 fi
1859
1860 # A PIC object.
1861 libobjs="$libobjs $pic_object"
1862 arg="$pic_object"
1863 fi
1864
1865 # Non-PIC object.
1866 if test "$non_pic_object" != none; then
1867 # Prepend the subdirectory the object is found in.
1868 non_pic_object="$xdir$non_pic_object"
1869
1870 # A standard non-PIC object
1871 non_pic_objects="$non_pic_objects $non_pic_object"
1872 if test -z "$pic_object" || test "$pic_object" = none ; then
1873 arg="$non_pic_object"
1874 fi
12111875 else
1212 # If libtool objects are unsupported, then we need to preload.
1213 prev=dlprefiles
1214 fi
1215 fi
1216
1217 if test "$prev" = dlprefiles; then
1218 # Preload the old-style object.
1219 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1220 prev=
1876 # If the PIC object exists, use it instead.
1877 # $xdir was prepended to $pic_object above.
1878 non_pic_object="$pic_object"
1879 non_pic_objects="$non_pic_objects $non_pic_object"
1880 fi
12211881 else
1222 case $arg in
1223 *.lo) libobjs="$libobjs $arg" ;;
1224 *) objs="$objs $arg" ;;
1225 esac
1882 # Only an error if not doing a dry-run.
1883 if test -z "$run"; then
1884 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1885 exit $EXIT_FAILURE
1886 else
1887 # Dry-run case.
1888
1889 # Extract subdirectory from the argument.
1890 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1891 if test "X$xdir" = "X$arg"; then
1892 xdir=
1893 else
1894 xdir="$xdir/"
1895 fi
1896
1897 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1898 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1899 libobjs="$libobjs $pic_object"
1900 non_pic_objects="$non_pic_objects $non_pic_object"
1901 fi
12261902 fi
12271903 ;;
12281904
12731949 if test -n "$prev"; then
12741950 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
12751951 $echo "$help" 1>&2
1276 exit 1
1952 exit $EXIT_FAILURE
12771953 fi
12781954
12791955 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
12821958 finalize_command="$finalize_command $arg"
12831959 fi
12841960
1961 oldlibs=
12851962 # calculate the name of the file, without its directory
12861963 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
12871964 libobjs_save="$libobjs"
13021979 output_objdir="$output_objdir/$objdir"
13031980 fi
13041981 # Create the object directory.
1305 if test ! -d $output_objdir; then
1982 if test ! -d "$output_objdir"; then
13061983 $show "$mkdir $output_objdir"
13071984 $run $mkdir $output_objdir
1308 status=$?
1309 if test $status -ne 0 && test ! -d $output_objdir; then
1310 exit $status
1985 exit_status=$?
1986 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1987 exit $exit_status
13111988 fi
13121989 fi
13131990
13161993 "")
13171994 $echo "$modename: you must specify an output file" 1>&2
13181995 $echo "$help" 1>&2
1319 exit 1
1996 exit $EXIT_FAILURE
13201997 ;;
13211998 *.$libext) linkmode=oldlib ;;
13221999 *.lo | *.$objext) linkmode=obj ;;
13242001 *) linkmode=prog ;; # Anything else should be a program.
13252002 esac
13262003
2004 case $host in
2005 *cygwin* | *mingw* | *pw32*)
2006 # don't eliminate duplications in $postdeps and $predeps
2007 duplicate_compiler_generated_deps=yes
2008 ;;
2009 *)
2010 duplicate_compiler_generated_deps=$duplicate_deps
2011 ;;
2012 esac
13272013 specialdeplibs=
2014
13282015 libs=
13292016 # Find all interdependent deplibs by searching for libraries
13302017 # that are linked more than once (e.g. -la -lb -la)
13312018 for deplib in $deplibs; do
1332 case "$libs " in
1333 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1334 esac
2019 if test "X$duplicate_deps" = "Xyes" ; then
2020 case "$libs " in
2021 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2022 esac
2023 fi
13352024 libs="$libs $deplib"
13362025 done
2026
2027 if test "$linkmode" = lib; then
2028 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2029
2030 # Compute libraries that are listed more than once in $predeps
2031 # $postdeps and mark them as special (i.e., whose duplicates are
2032 # not to be eliminated).
2033 pre_post_deps=
2034 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2035 for pre_post_dep in $predeps $postdeps; do
2036 case "$pre_post_deps " in
2037 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2038 esac
2039 pre_post_deps="$pre_post_deps $pre_post_dep"
2040 done
2041 fi
2042 pre_post_deps=
2043 fi
2044
13372045 deplibs=
13382046 newdependency_libs=
13392047 newlib_search_path=
13402048 need_relink=no # whether we're linking any uninstalled libtool libraries
13412049 notinst_deplibs= # not-installed libtool libraries
1342 notinst_path= # paths that contain not-installed libtool libraries
13432050 case $linkmode in
13442051 lib)
13452052 passes="conv link"
13482055 *.la) ;;
13492056 *)
13502057 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1351 exit 1
2058 exit $EXIT_FAILURE
13522059 ;;
13532060 esac
13542061 done
13652072 ;;
13662073 esac
13672074 for pass in $passes; do
1368 if test $linkmode = prog; then
1369 # Determine which files to process
2075 if test "$linkmode,$pass" = "lib,link" ||
2076 test "$linkmode,$pass" = "prog,scan"; then
2077 libs="$deplibs"
2078 deplibs=
2079 fi
2080 if test "$linkmode" = prog; then
13702081 case $pass in
1371 dlopen)
1372 libs="$dlfiles"
1373 save_deplibs="$deplibs" # Collect dlpreopened libraries
1374 deplibs=
1375 ;;
2082 dlopen) libs="$dlfiles" ;;
13762083 dlpreopen) libs="$dlprefiles" ;;
1377 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2084 link)
2085 libs="$deplibs %DEPLIBS%"
2086 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2087 ;;
13782088 esac
2089 fi
2090 if test "$pass" = dlopen; then
2091 # Collect dlpreopened libraries
2092 save_deplibs="$deplibs"
2093 deplibs=
13792094 fi
13802095 for deplib in $libs; do
13812096 lib=
13822097 found=no
13832098 case $deplib in
2099 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2100 if test "$linkmode,$pass" = "prog,link"; then
2101 compile_deplibs="$deplib $compile_deplibs"
2102 finalize_deplibs="$deplib $finalize_deplibs"
2103 else
2104 compiler_flags="$compiler_flags $deplib"
2105 fi
2106 continue
2107 ;;
13842108 -l*)
1385 if test $linkmode = oldlib && test $linkmode = obj; then
1386 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
1387 continue
1388 fi
1389 if test $pass = conv; then
1390 deplibs="$deplib $deplibs"
2109 if test "$linkmode" != lib && test "$linkmode" != prog; then
2110 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
13912111 continue
13922112 fi
13932113 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
13942114 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1395 # Search the libtool library
1396 lib="$searchdir/lib${name}.la"
1397 if test -f "$lib"; then
1398 found=yes
1399 break
1400 fi
2115 for search_ext in .la $std_shrext .so .a; do
2116 # Search the libtool library
2117 lib="$searchdir/lib${name}${search_ext}"
2118 if test -f "$lib"; then
2119 if test "$search_ext" = ".la"; then
2120 found=yes
2121 else
2122 found=no
2123 fi
2124 break 2
2125 fi
2126 done
14012127 done
14022128 if test "$found" != yes; then
14032129 # deplib doesn't seem to be a libtool library
14062132 finalize_deplibs="$deplib $finalize_deplibs"
14072133 else
14082134 deplibs="$deplib $deplibs"
1409 test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
2135 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
14102136 fi
14112137 continue
2138 else # deplib is a libtool library
2139 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2140 # We need to do some special things here, and not later.
2141 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2142 case " $predeps $postdeps " in
2143 *" $deplib "*)
2144 if (${SED} -e '2q' $lib |
2145 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2146 library_names=
2147 old_library=
2148 case $lib in
2149 */* | *\\*) . $lib ;;
2150 *) . ./$lib ;;
2151 esac
2152 for l in $old_library $library_names; do
2153 ll="$l"
2154 done
2155 if test "X$ll" = "X$old_library" ; then # only static version available
2156 found=no
2157 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2158 test "X$ladir" = "X$lib" && ladir="."
2159 lib=$ladir/$old_library
2160 if test "$linkmode,$pass" = "prog,link"; then
2161 compile_deplibs="$deplib $compile_deplibs"
2162 finalize_deplibs="$deplib $finalize_deplibs"
2163 else
2164 deplibs="$deplib $deplibs"
2165 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2166 fi
2167 continue
2168 fi
2169 fi
2170 ;;
2171 *) ;;
2172 esac
2173 fi
14122174 fi
14132175 ;; # -l
14142176 -L*)
14152177 case $linkmode in
14162178 lib)
14172179 deplibs="$deplib $deplibs"
1418 test $pass = conv && continue
2180 test "$pass" = conv && continue
14192181 newdependency_libs="$deplib $newdependency_libs"
14202182 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
14212183 ;;
14222184 prog)
1423 if test $pass = conv; then
2185 if test "$pass" = conv; then
14242186 deplibs="$deplib $deplibs"
14252187 continue
14262188 fi
1427 if test $pass = scan; then
2189 if test "$pass" = scan; then
14282190 deplibs="$deplib $deplibs"
1429 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
14302191 else
14312192 compile_deplibs="$deplib $compile_deplibs"
14322193 finalize_deplibs="$deplib $finalize_deplibs"
14332194 fi
2195 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
14342196 ;;
14352197 *)
1436 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
2198 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
14372199 ;;
14382200 esac # linkmode
14392201 continue
14402202 ;; # -L
14412203 -R*)
1442 if test $pass = link; then
2204 if test "$pass" = link; then
14432205 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
14442206 # Make sure the xrpath contains only unique directories.
14452207 case "$xrpath " in
14522214 ;;
14532215 *.la) lib="$deplib" ;;
14542216 *.$libext)
1455 if test $pass = conv; then
2217 if test "$pass" = conv; then
14562218 deplibs="$deplib $deplibs"
14572219 continue
14582220 fi
14592221 case $linkmode in
14602222 lib)
1461 if test "$deplibs_check_method" != pass_all; then
1462 echo
1463 echo "*** Warning: This library needs some functionality provided by $deplib."
1464 echo "*** I have the capability to make that library automatically link in when"
1465 echo "*** you link to this library. But I can only do this if you have a"
1466 echo "*** shared version of the library, which you do not appear to have."
2223 valid_a_lib=no
2224 case $deplibs_check_method in
2225 match_pattern*)
2226 set dummy $deplibs_check_method
2227 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2228 if eval $echo \"$deplib\" 2>/dev/null \
2229 | $SED 10q \
2230 | $EGREP "$match_pattern_regex" > /dev/null; then
2231 valid_a_lib=yes
2232 fi
2233 ;;
2234 pass_all)
2235 valid_a_lib=yes
2236 ;;
2237 esac
2238 if test "$valid_a_lib" != yes; then
2239 $echo
2240 $echo "*** Warning: Trying to link with static lib archive $deplib."
2241 $echo "*** I have the capability to make that library automatically link in when"
2242 $echo "*** you link to this library. But I can only do this if you have a"
2243 $echo "*** shared version of the library, which you do not appear to have"
2244 $echo "*** because the file extensions .$libext of this argument makes me believe"
2245 $echo "*** that it is just a static archive that I should not used here."
14672246 else
1468 echo
1469 echo "*** Warning: Linking the shared library $output against the"
1470 echo "*** static library $deplib is not portable!"
2247 $echo
2248 $echo "*** Warning: Linking the shared library $output against the"
2249 $echo "*** static library $deplib is not portable!"
14712250 deplibs="$deplib $deplibs"
14722251 fi
14732252 continue
14742253 ;;
14752254 prog)
1476 if test $pass != link; then
2255 if test "$pass" != link; then
14772256 deplibs="$deplib $deplibs"
14782257 else
14792258 compile_deplibs="$deplib $compile_deplibs"
14842263 esac # linkmode
14852264 ;; # *.$libext
14862265 *.lo | *.$objext)
1487 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1488 # If there is no dlopen support or we're linking statically,
1489 # we need to preload.
1490 newdlprefiles="$newdlprefiles $deplib"
1491 compile_deplibs="$deplib $compile_deplibs"
1492 finalize_deplibs="$deplib $finalize_deplibs"
1493 else
1494 newdlfiles="$newdlfiles $deplib"
2266 if test "$pass" = conv; then
2267 deplibs="$deplib $deplibs"
2268 elif test "$linkmode" = prog; then
2269 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2270 # If there is no dlopen support or we're linking statically,
2271 # we need to preload.
2272 newdlprefiles="$newdlprefiles $deplib"
2273 compile_deplibs="$deplib $compile_deplibs"
2274 finalize_deplibs="$deplib $finalize_deplibs"
2275 else
2276 newdlfiles="$newdlfiles $deplib"
2277 fi
14952278 fi
14962279 continue
14972280 ;;
15002283 continue
15012284 ;;
15022285 esac # case $deplib
1503 if test $found = yes || test -f "$lib"; then :
2286 if test "$found" = yes || test -f "$lib"; then :
15042287 else
1505 $echo "$modename: cannot find the library \`$lib'" 1>&2
1506 exit 1
2288 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2289 exit $EXIT_FAILURE
15072290 fi
15082291
15092292 # Check to see that this really is a libtool archive.
1510 if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2293 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
15112294 else
15122295 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1513 exit 1
2296 exit $EXIT_FAILURE
15142297 fi
15152298
15162299 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
15232306 library_names=
15242307 old_library=
15252308 # If the library was installed with an old release of libtool,
1526 # it will not redefine variable installed.
2309 # it will not redefine variables installed, or shouldnotlink
15272310 installed=yes
2311 shouldnotlink=no
2312 avoidtemprpath=
2313
15282314
15292315 # Read the .la file
15302316 case $lib in
15342320
15352321 if test "$linkmode,$pass" = "lib,link" ||
15362322 test "$linkmode,$pass" = "prog,scan" ||
1537 { test $linkmode = oldlib && test $linkmode = obj; }; then
1538 # Add dl[pre]opened files of deplib
2323 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
15392324 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
15402325 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
15412326 fi
15422327
1543 if test $pass = conv; then
2328 if test "$pass" = conv; then
15442329 # Only check for convenience libraries
15452330 deplibs="$lib $deplibs"
15462331 if test -z "$libdir"; then
15472332 if test -z "$old_library"; then
15482333 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1549 exit 1
2334 exit $EXIT_FAILURE
15502335 fi
15512336 # It is a libtool convenience library, so add in its objects.
15522337 convenience="$convenience $ladir/$objdir/$old_library"
15542339 tmp_libs=
15552340 for deplib in $dependency_libs; do
15562341 deplibs="$deplib $deplibs"
1557 case "$tmp_libs " in
1558 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1559 esac
2342 if test "X$duplicate_deps" = "Xyes" ; then
2343 case "$tmp_libs " in
2344 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2345 esac
2346 fi
15602347 tmp_libs="$tmp_libs $deplib"
15612348 done
1562 elif test $linkmode != prog && test $linkmode != lib; then
2349 elif test "$linkmode" != prog && test "$linkmode" != lib; then
15632350 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1564 exit 1
2351 exit $EXIT_FAILURE
15652352 fi
15662353 continue
15672354 fi # $pass = conv
2355
15682356
15692357 # Get the name of the library we link against.
15702358 linklib=
15732361 done
15742362 if test -z "$linklib"; then
15752363 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1576 exit 1
2364 exit $EXIT_FAILURE
15772365 fi
15782366
15792367 # This library was specified with -dlopen.
1580 if test $pass = dlopen; then
2368 if test "$pass" = dlopen; then
15812369 if test -z "$libdir"; then
15822370 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1583 exit 1
1584 fi
1585 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2371 exit $EXIT_FAILURE
2372 fi
2373 if test -z "$dlname" ||
2374 test "$dlopen_support" != yes ||
2375 test "$build_libtool_libs" = no; then
15862376 # If there is no dlname, no dlopen support or we're linking
1587 # statically, we need to preload.
1588 dlprefiles="$dlprefiles $lib"
2377 # statically, we need to preload. We also need to preload any
2378 # dependent libraries so libltdl's deplib preloader doesn't
2379 # bomb out in the load deplibs phase.
2380 dlprefiles="$dlprefiles $lib $dependency_libs"
15892381 else
15902382 newdlfiles="$newdlfiles $lib"
15912383 fi
16172409 dir="$libdir"
16182410 absdir="$libdir"
16192411 fi
2412 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
16202413 else
1621 dir="$ladir/$objdir"
1622 absdir="$abs_ladir/$objdir"
1623 # Remove this search path later
1624 notinst_path="$notinst_path $abs_ladir"
2414 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2415 dir="$ladir"
2416 absdir="$abs_ladir"
2417 # Remove this search path later
2418 notinst_path="$notinst_path $abs_ladir"
2419 else
2420 dir="$ladir/$objdir"
2421 absdir="$abs_ladir/$objdir"
2422 # Remove this search path later
2423 notinst_path="$notinst_path $abs_ladir"
2424 fi
16252425 fi # $installed = yes
16262426 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
16272427
16282428 # This library was specified with -dlpreopen.
1629 if test $pass = dlpreopen; then
2429 if test "$pass" = dlpreopen; then
16302430 if test -z "$libdir"; then
16312431 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1632 exit 1
2432 exit $EXIT_FAILURE
16332433 fi
16342434 # Prefer using a static library (so that no silly _DYNAMIC symbols
16352435 # are required to link).
16452445
16462446 if test -z "$libdir"; then
16472447 # Link the convenience library
1648 if test $linkmode = lib; then
2448 if test "$linkmode" = lib; then
16492449 deplibs="$dir/$old_library $deplibs"
16502450 elif test "$linkmode,$pass" = "prog,link"; then
16512451 compile_deplibs="$dir/$old_library $compile_deplibs"
16522452 finalize_deplibs="$dir/$old_library $finalize_deplibs"
16532453 else
1654 deplibs="$lib $deplibs"
2454 deplibs="$lib $deplibs" # used for prog,scan pass
16552455 fi
16562456 continue
16572457 fi
16582458
1659 if test $linkmode = prog && test $pass != link; then
2459
2460 if test "$linkmode" = prog && test "$pass" != link; then
16602461 newlib_search_path="$newlib_search_path $ladir"
16612462 deplibs="$lib $deplibs"
16622463
16722473 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
16732474 esac
16742475 # Need to link against all dependency_libs?
1675 if test $linkalldeplibs = yes; then
2476 if test "$linkalldeplibs" = yes; then
16762477 deplibs="$deplib $deplibs"
16772478 else
16782479 # Need to hardcode shared library paths
16792480 # or/and link against static libraries
16802481 newdependency_libs="$deplib $newdependency_libs"
16812482 fi
1682 case "$tmp_libs " in
1683 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1684 esac
2483 if test "X$duplicate_deps" = "Xyes" ; then
2484 case "$tmp_libs " in
2485 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2486 esac
2487 fi
16852488 tmp_libs="$tmp_libs $deplib"
16862489 done # for deplib
16872490 continue
16882491 fi # $linkmode = prog...
16892492
1690 link_static=no # Whether the deplib will be linked statically
1691 if test -n "$library_names" &&
1692 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1693 # Link against this shared library
1694
1695 if test "$linkmode,$pass" = "prog,link" ||
1696 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
2493 if test "$linkmode,$pass" = "prog,link"; then
2494 if test -n "$library_names" &&
2495 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2496 # We need to hardcode the library path
2497 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2498 # Make sure the rpath contains only unique directories.
2499 case "$temp_rpath " in
2500 *" $dir "*) ;;
2501 *" $absdir "*) ;;
2502 *) temp_rpath="$temp_rpath $absdir" ;;
2503 esac
2504 fi
2505
16972506 # Hardcode the library path.
16982507 # Skip directories that are in the system default run-time
16992508 # search path.
17152524 esac
17162525 ;;
17172526 esac
1718 if test $linkmode = prog; then
1719 # We need to hardcode the library path
1720 if test -n "$shlibpath_var"; then
1721 # Make sure the rpath contains only unique directories.
1722 case "$temp_rpath " in
1723 *" $dir "*) ;;
1724 *" $absdir "*) ;;
1725 *) temp_rpath="$temp_rpath $dir" ;;
1726 esac
1727 fi
1728 fi
17292527 fi # $linkmode,$pass = prog,link...
17302528
17312529 if test "$alldeplibs" = yes &&
17352533 # We only need to search for static libraries
17362534 continue
17372535 fi
1738
2536 fi
2537
2538 link_static=no # Whether the deplib will be linked statically
2539 use_static_libs=$prefer_static_libs
2540 if test "$use_static_libs" = built && test "$installed" = yes ; then
2541 use_static_libs=no
2542 fi
2543 if test -n "$library_names" &&
2544 { test "$use_static_libs" = no || test -z "$old_library"; }; then
17392545 if test "$installed" = no; then
17402546 notinst_deplibs="$notinst_deplibs $lib"
17412547 need_relink=yes
2548 fi
2549 # This is a shared library
2550
2551 # Warn about portability, can't link against -module's on
2552 # some systems (darwin)
2553 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2554 $echo
2555 if test "$linkmode" = prog; then
2556 $echo "*** Warning: Linking the executable $output against the loadable module"
2557 else
2558 $echo "*** Warning: Linking the shared library $output against the loadable module"
2559 fi
2560 $echo "*** $linklib is not portable!"
2561 fi
2562 if test "$linkmode" = lib &&
2563 test "$hardcode_into_libs" = yes; then
2564 # Hardcode the library path.
2565 # Skip directories that are in the system default run-time
2566 # search path.
2567 case " $sys_lib_dlsearch_path " in
2568 *" $absdir "*) ;;
2569 *)
2570 case "$compile_rpath " in
2571 *" $absdir "*) ;;
2572 *) compile_rpath="$compile_rpath $absdir"
2573 esac
2574 ;;
2575 esac
2576 case " $sys_lib_dlsearch_path " in
2577 *" $libdir "*) ;;
2578 *)
2579 case "$finalize_rpath " in
2580 *" $libdir "*) ;;
2581 *) finalize_rpath="$finalize_rpath $libdir"
2582 esac
2583 ;;
2584 esac
17422585 fi
17432586
17442587 if test -n "$old_archive_from_expsyms_cmds"; then
17532596 elif test -n "$soname_spec"; then
17542597 # bleh windows
17552598 case $host in
1756 *cygwin*)
2599 *cygwin* | mingw*)
17572600 major=`expr $current - $age`
17582601 versuffix="-$major"
17592602 ;;
17652608
17662609 # Make a new name for the extract_expsyms_cmds to use
17672610 soroot="$soname"
1768 soname=`echo $soroot | sed -e 's/^.*\///'`
1769 newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2611 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2612 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
17702613
17712614 # If the library has no export list, then create one now
17722615 if test -f "$output_objdir/$soname-def"; then :
17732616 else
17742617 $show "extracting exported symbol list from \`$soname'"
17752618 save_ifs="$IFS"; IFS='~'
1776 eval cmds=\"$extract_expsyms_cmds\"
2619 cmds=$extract_expsyms_cmds
17772620 for cmd in $cmds; do
17782621 IFS="$save_ifs"
2622 eval cmd=\"$cmd\"
17792623 $show "$cmd"
17802624 $run eval "$cmd" || exit $?
17812625 done
17862630 if test -f "$output_objdir/$newlib"; then :; else
17872631 $show "generating import library for \`$soname'"
17882632 save_ifs="$IFS"; IFS='~'
1789 eval cmds=\"$old_archive_from_expsyms_cmds\"
2633 cmds=$old_archive_from_expsyms_cmds
17902634 for cmd in $cmds; do
17912635 IFS="$save_ifs"
2636 eval cmd=\"$cmd\"
17922637 $show "$cmd"
17932638 $run eval "$cmd" || exit $?
17942639 done
17972642 # make sure the library variables are pointing to the new library
17982643 dir=$output_objdir
17992644 linklib=$newlib
1800 fi # test -n $old_archive_from_expsyms_cmds
1801
1802 if test $linkmode = prog || test "$mode" != relink; then
2645 fi # test -n "$old_archive_from_expsyms_cmds"
2646
2647 if test "$linkmode" = prog || test "$mode" != relink; then
18032648 add_shlibpath=
18042649 add_dir=
18052650 add=
18082653 immediate | unsupported)
18092654 if test "$hardcode_direct" = no; then
18102655 add="$dir/$linklib"
2656 case $host in
2657 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2658 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2659 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2660 *-*-unixware7*) add_dir="-L$dir" ;;
2661 *-*-darwin* )
2662 # if the lib is a module then we can not link against
2663 # it, someone is ignoring the new warnings I added
2664 if /usr/bin/file -L $add 2> /dev/null |
2665 $EGREP ": [^:]* bundle" >/dev/null ; then
2666 $echo "** Warning, lib $linklib is a module, not a shared library"
2667 if test -z "$old_library" ; then
2668 $echo
2669 $echo "** And there doesn't seem to be a static archive available"
2670 $echo "** The link will probably fail, sorry"
2671 else
2672 add="$dir/$old_library"
2673 fi
2674 fi
2675 esac
18112676 elif test "$hardcode_minus_L" = no; then
18122677 case $host in
18132678 *-*-sunos*) add_shlibpath="$dir" ;;
18262691 add="$dir/$linklib"
18272692 elif test "$hardcode_minus_L" = yes; then
18282693 add_dir="-L$dir"
2694 # Try looking first in the location we're being installed to.
2695 if test -n "$inst_prefix_dir"; then
2696 case $libdir in
2697 [\\/]*)
2698 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2699 ;;
2700 esac
2701 fi
18292702 add="-l$name"
18302703 elif test "$hardcode_shlibpath_var" = yes; then
18312704 add_shlibpath="$dir"
18392712
18402713 if test "$lib_linked" != yes; then
18412714 $echo "$modename: configuration error: unsupported hardcode properties"
1842 exit 1
2715 exit $EXIT_FAILURE
18432716 fi
18442717
18452718 if test -n "$add_shlibpath"; then
18482721 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
18492722 esac
18502723 fi
1851 if test $linkmode = prog; then
2724 if test "$linkmode" = prog; then
18522725 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
18532726 test -n "$add" && compile_deplibs="$add $compile_deplibs"
18542727 else
18652738 fi
18662739 fi
18672740
1868 if test $linkmode = prog || test "$mode" = relink; then
2741 if test "$linkmode" = prog || test "$mode" = relink; then
18692742 add_shlibpath=
18702743 add_dir=
18712744 add=
18812754 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
18822755 esac
18832756 add="-l$name"
2757 elif test "$hardcode_automatic" = yes; then
2758 if test -n "$inst_prefix_dir" &&
2759 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2760 add="$inst_prefix_dir$libdir/$linklib"
2761 else
2762 add="$libdir/$linklib"
2763 fi
18842764 else
18852765 # We cannot seem to hardcode it, guess we'll fake it.
18862766 add_dir="-L$libdir"
2767 # Try looking first in the location we're being installed to.
2768 if test -n "$inst_prefix_dir"; then
2769 case $libdir in
2770 [\\/]*)
2771 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2772 ;;
2773 esac
2774 fi
18872775 add="-l$name"
18882776 fi
18892777
1890 if test $linkmode = prog; then
2778 if test "$linkmode" = prog; then
18912779 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
18922780 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
18932781 else
18952783 test -n "$add" && deplibs="$add $deplibs"
18962784 fi
18972785 fi
1898 elif test $linkmode = prog; then
1899 if test "$alldeplibs" = yes &&
1900 { test "$deplibs_check_method" = pass_all ||
1901 { test "$build_libtool_libs" = yes &&
1902 test -n "$library_names"; }; }; then
1903 # We only need to search for static libraries
1904 continue
1905 fi
1906
1907 # Try to link the static library
2786 elif test "$linkmode" = prog; then
19082787 # Here we assume that one of hardcode_direct or hardcode_minus_L
19092788 # is not unsupported. This is valid on all known static and
19102789 # shared platforms.
19242803
19252804 # Just print a warning and add the library to dependency_libs so
19262805 # that the program can be linked against the static library.
1927 echo
1928 echo "*** Warning: This library needs some functionality provided by $lib."
1929 echo "*** I have the capability to make that library automatically link in when"
1930 echo "*** you link to this library. But I can only do this if you have a"
1931 echo "*** shared version of the library, which you do not appear to have."
2806 $echo
2807 $echo "*** Warning: This system can not link to static lib archive $lib."
2808 $echo "*** I have the capability to make that library automatically link in when"
2809 $echo "*** you link to this library. But I can only do this if you have a"
2810 $echo "*** shared version of the library, which you do not appear to have."
19322811 if test "$module" = yes; then
1933 echo "*** Therefore, libtool will create a static module, that should work "
1934 echo "*** as long as the dlopening application is linked with the -dlopen flag."
2812 $echo "*** But as you try to build a module library, libtool will still create "
2813 $echo "*** a static module, that should work as long as the dlopening application"
2814 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
19352815 if test -z "$global_symbol_pipe"; then
1936 echo
1937 echo "*** However, this would only work if libtool was able to extract symbol"
1938 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
1939 echo "*** not find such a program. So, this module is probably useless."
1940 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2816 $echo
2817 $echo "*** However, this would only work if libtool was able to extract symbol"
2818 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2819 $echo "*** not find such a program. So, this module is probably useless."
2820 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
19412821 fi
19422822 if test "$build_old_libs" = no; then
19432823 build_libtool_libs=module
19472827 fi
19482828 fi
19492829 else
1950 convenience="$convenience $dir/$old_library"
1951 old_convenience="$old_convenience $dir/$old_library"
19522830 deplibs="$dir/$old_library $deplibs"
19532831 link_static=yes
19542832 fi
19552833 fi # link shared/static library?
19562834
1957 if test $linkmode = lib; then
2835 if test "$linkmode" = lib; then
19582836 if test -n "$dependency_libs" &&
1959 { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
1960 test $link_static = yes; }; then
2837 { test "$hardcode_into_libs" != yes ||
2838 test "$build_old_libs" = yes ||
2839 test "$link_static" = yes; }; then
19612840 # Extract -R from dependency_libs
19622841 temp_deplibs=
19632842 for libdir in $dependency_libs; do
19802859 tmp_libs=
19812860 for deplib in $dependency_libs; do
19822861 newdependency_libs="$deplib $newdependency_libs"
1983 case "$tmp_libs " in
1984 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1985 esac
2862 if test "X$duplicate_deps" = "Xyes" ; then
2863 case "$tmp_libs " in
2864 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2865 esac
2866 fi
19862867 tmp_libs="$tmp_libs $deplib"
19872868 done
19882869
1989 if test $link_all_deplibs != no; then
2870 if test "$link_all_deplibs" != no; then
19902871 # Add the search paths of all dependency libraries
19912872 for deplib in $dependency_libs; do
19922873 case $deplib in
20062887 ;;
20072888 esac
20082889 if grep "^installed=no" $deplib > /dev/null; then
2009 path="-L$absdir/$objdir"
2890 path="$absdir/$objdir"
20102891 else
2011 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2892 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
20122893 if test -z "$libdir"; then
20132894 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2014 exit 1
2895 exit $EXIT_FAILURE
20152896 fi
20162897 if test "$absdir" != "$libdir"; then
20172898 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
20182899 fi
2019 path="-L$absdir"
2900 path="$absdir"
20202901 fi
2902 depdepl=
2903 case $host in
2904 *-*-darwin*)
2905 # we do not want to link against static libs,
2906 # but need to link against shared
2907 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2908 if test -n "$deplibrary_names" ; then
2909 for tmp in $deplibrary_names ; do
2910 depdepl=$tmp
2911 done
2912 if test -f "$path/$depdepl" ; then
2913 depdepl="$path/$depdepl"
2914 fi
2915 # do not add paths which are already there
2916 case " $newlib_search_path " in
2917 *" $path "*) ;;
2918 *) newlib_search_path="$newlib_search_path $path";;
2919 esac
2920 fi
2921 path=""
2922 ;;
2923 *)
2924 path="-L$path"
2925 ;;
2926 esac
2927 ;;
2928 -l*)
2929 case $host in
2930 *-*-darwin*)
2931 # Again, we only want to link against shared libraries
2932 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2933 for tmp in $newlib_search_path ; do
2934 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2935 eval depdepl="$tmp/lib$tmp_libs.dylib"
2936 break
2937 fi
2938 done
2939 path=""
2940 ;;
2941 *) continue ;;
2942 esac
20212943 ;;
20222944 *) continue ;;
20232945 esac
20242946 case " $deplibs " in
20252947 *" $path "*) ;;
2026 *) deplibs="$deplibs $path" ;;
2948 *) deplibs="$path $deplibs" ;;
2949 esac
2950 case " $deplibs " in
2951 *" $depdepl "*) ;;
2952 *) deplibs="$depdepl $deplibs" ;;
20272953 esac
20282954 done
20292955 fi # link_all_deplibs != no
20302956 fi # linkmode = lib
20312957 done # for deplib in $libs
2032 if test $pass = dlpreopen; then
2958 dependency_libs="$newdependency_libs"
2959 if test "$pass" = dlpreopen; then
20332960 # Link the dlpreopened libraries before other libraries
20342961 for deplib in $save_deplibs; do
20352962 deplibs="$deplib $deplibs"
20362963 done
20372964 fi
2038 if test $pass != dlopen; then
2039 test $pass != scan && dependency_libs="$newdependency_libs"
2040 if test $pass != conv; then
2965 if test "$pass" != dlopen; then
2966 if test "$pass" != conv; then
20412967 # Make sure lib_search_path contains only unique directories.
20422968 lib_search_path=
20432969 for dir in $newlib_search_path; do
20592985 eval tmp_libs=\"\$$var\"
20602986 new_libs=
20612987 for deplib in $tmp_libs; do
2988 # FIXME: Pedantically, this is the right thing to do, so
2989 # that some nasty dependency loop isn't accidentally
2990 # broken:
2991 #new_libs="$deplib $new_libs"
2992 # Pragmatically, this seems to cause very few problems in
2993 # practice:
20622994 case $deplib in
20632995 -L*) new_libs="$deplib $new_libs" ;;
2996 -R*) ;;
20642997 *)
2998 # And here is the reason: when a library appears more
2999 # than once as an explicit dependence of a library, or
3000 # is implicitly linked in more than once by the
3001 # compiler, it is considered special, and multiple
3002 # occurrences thereof are not removed. Compare this
3003 # with having the same library being listed as a
3004 # dependency of multiple other libraries: in this case,
3005 # we know (pedantically, we assume) the library does not
3006 # need to be listed more than once, so we keep only the
3007 # last copy. This is not always right, but it is rare
3008 # enough that we require users that really mean to play
3009 # such unportable linking tricks to link the library
3010 # using -Wl,-lname, so that libtool does not consider it
3011 # for duplicate removal.
20653012 case " $specialdeplibs " in
20663013 *" $deplib "*) new_libs="$deplib $new_libs" ;;
20673014 *)
20893036 eval $var=\"$tmp_libs\"
20903037 done # for var
20913038 fi
2092 if test "$pass" = "conv" &&
2093 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
2094 libs="$deplibs" # reset libs
2095 deplibs=
2096 fi
3039 # Last step: remove runtime libs from dependency_libs
3040 # (they stay in deplibs)
3041 tmp_libs=
3042 for i in $dependency_libs ; do
3043 case " $predeps $postdeps $compiler_lib_search_path " in
3044 *" $i "*)
3045 i=""
3046 ;;
3047 esac
3048 if test -n "$i" ; then
3049 tmp_libs="$tmp_libs $i"
3050 fi
3051 done
3052 dependency_libs=$tmp_libs
20973053 done # for pass
2098 if test $linkmode = prog; then
3054 if test "$linkmode" = prog; then
20993055 dlfiles="$newdlfiles"
21003056 dlprefiles="$newdlprefiles"
21013057 fi
21023058
21033059 case $linkmode in
21043060 oldlib)
3061 if test -n "$deplibs"; then
3062 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3063 fi
3064
21053065 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
21063066 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
21073067 fi
21153075 fi
21163076
21173077 if test -n "$vinfo"; then
2118 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
3078 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
21193079 fi
21203080
21213081 if test -n "$release"; then
21373097 case $outputname in
21383098 lib*)
21393099 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3100 eval shared_ext=\"$shrext_cmds\"
21403101 eval libname=\"$libname_spec\"
21413102 ;;
21423103 *)
21433104 if test "$module" = no; then
21443105 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
21453106 $echo "$help" 1>&2
2146 exit 1
3107 exit $EXIT_FAILURE
21473108 fi
21483109 if test "$need_lib_prefix" != no; then
21493110 # Add the "lib" prefix for modules if required
21503111 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3112 eval shared_ext=\"$shrext_cmds\"
21513113 eval libname=\"$libname_spec\"
21523114 else
21533115 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
21583120 if test -n "$objs"; then
21593121 if test "$deplibs_check_method" != pass_all; then
21603122 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2161 exit 1
3123 exit $EXIT_FAILURE
21623124 else
2163 echo
2164 echo "*** Warning: Linking the shared library $output against the non-libtool"
2165 echo "*** objects $objs is not portable!"
3125 $echo
3126 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3127 $echo "*** objects $objs is not portable!"
21663128 libobjs="$libobjs $objs"
21673129 fi
21683130 fi
21723134 fi
21733135
21743136 set dummy $rpath
2175 if test $# -gt 2; then
3137 if test "$#" -gt 2; then
21763138 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
21773139 fi
21783140 install_libdir="$2"
21813143 if test -z "$rpath"; then
21823144 if test "$build_libtool_libs" = yes; then
21833145 # Building a libtool convenience library.
2184 libext=al
3146 # Some compilers have problems with a `.al' extension so
3147 # convenience libraries should have the same extension an
3148 # archive normally would.
21853149 oldlibs="$output_objdir/$libname.$libext $oldlibs"
21863150 build_libtool_libs=convenience
21873151 build_old_libs=yes
21883152 fi
21893153
21903154 if test -n "$vinfo"; then
2191 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
3155 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
21923156 fi
21933157
21943158 if test -n "$release"; then
22043168 if test -n "$8"; then
22053169 $echo "$modename: too many parameters to \`-version-info'" 1>&2
22063170 $echo "$help" 1>&2
2207 exit 1
2208 fi
2209
2210 current="$2"
2211 revision="$3"
2212 age="$4"
3171 exit $EXIT_FAILURE
3172 fi
3173
3174 # convert absolute version numbers to libtool ages
3175 # this retains compatibility with .la files and attempts
3176 # to make the code below a bit more comprehensible
3177
3178 case $vinfo_number in
3179 yes)
3180 number_major="$2"
3181 number_minor="$3"
3182 number_revision="$4"
3183 #
3184 # There are really only two kinds -- those that
3185 # use the current revision as the major version
3186 # and those that subtract age and use age as
3187 # a minor version. But, then there is irix
3188 # which has an extra 1 added just for fun
3189 #
3190 case $version_type in
3191 darwin|linux|osf|windows)
3192 current=`expr $number_major + $number_minor`
3193 age="$number_minor"
3194 revision="$number_revision"
3195 ;;
3196 freebsd-aout|freebsd-elf|sunos)
3197 current="$number_major"
3198 revision="$number_minor"
3199 age="0"
3200 ;;
3201 irix|nonstopux)
3202 current=`expr $number_major + $number_minor - 1`
3203 age="$number_minor"
3204 revision="$number_minor"
3205 ;;
3206 *)
3207 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3208 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3209 exit $EXIT_FAILURE
3210 ;;
3211 esac
3212 ;;
3213 no)
3214 current="$2"
3215 revision="$3"
3216 age="$4"
3217 ;;
3218 esac
22133219
22143220 # Check that each of the things are valid numbers.
22153221 case $current in
2216 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3222 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
22173223 *)
2218 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3224 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
22193225 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2220 exit 1
3226 exit $EXIT_FAILURE
22213227 ;;
22223228 esac
22233229
22243230 case $revision in
2225 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3231 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
22263232 *)
2227 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3233 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
22283234 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2229 exit 1
3235 exit $EXIT_FAILURE
22303236 ;;
22313237 esac
22323238
22333239 case $age in
2234 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3240 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
22353241 *)
2236 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3242 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
22373243 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2238 exit 1
3244 exit $EXIT_FAILURE
22393245 ;;
22403246 esac
22413247
2242 if test $age -gt $current; then
3248 if test "$age" -gt "$current"; then
22433249 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
22443250 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2245 exit 1
3251 exit $EXIT_FAILURE
22463252 fi
22473253
22483254 # Calculate the version variables.
22593265 versuffix="$major.$age.$revision"
22603266 # Darwin ld doesn't like 0 for these options...
22613267 minor_current=`expr $current + 1`
2262 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3268 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
22633269 ;;
22643270
22653271 freebsd-aout)
22723278 versuffix=".$current";
22733279 ;;
22743280
2275 irix)
3281 irix | nonstopux)
22763282 major=`expr $current - $age + 1`
2277 verstring="sgi$major.$revision"
3283
3284 case $version_type in
3285 nonstopux) verstring_prefix=nonstopux ;;
3286 *) verstring_prefix=sgi ;;
3287 esac
3288 verstring="$verstring_prefix$major.$revision"
22783289
22793290 # Add in all the interfaces that we are compatible with.
22803291 loop=$revision
2281 while test $loop != 0; do
3292 while test "$loop" -ne 0; do
22823293 iface=`expr $revision - $loop`
22833294 loop=`expr $loop - 1`
2284 verstring="sgi$major.$iface:$verstring"
3295 verstring="$verstring_prefix$major.$iface:$verstring"
22853296 done
22863297
22873298 # Before this point, $major must not contain `.'.
22953306 ;;
22963307
22973308 osf)
2298 major=`expr $current - $age`
3309 major=.`expr $current - $age`
22993310 versuffix=".$current.$age.$revision"
23003311 verstring="$current.$age.$revision"
23013312
23023313 # Add in all the interfaces that we are compatible with.
23033314 loop=$age
2304 while test $loop != 0; do
3315 while test "$loop" -ne 0; do
23053316 iface=`expr $current - $loop`
23063317 loop=`expr $loop - 1`
23073318 verstring="$verstring:${iface}.0"
23253336
23263337 *)
23273338 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2328 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2329 exit 1
3339 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3340 exit $EXIT_FAILURE
23303341 ;;
23313342 esac
23323343
23333344 # Clear the version info if we defaulted, and they specified a release.
23343345 if test -z "$vinfo" && test -n "$release"; then
23353346 major=
2336 verstring="0.0"
23373347 case $version_type in
23383348 darwin)
23393349 # we can't check for "0.0" in archive_cmds due to quoting
23403350 # problems, so we reset it completely
2341 verstring=""
3351 verstring=
23423352 ;;
23433353 *)
23443354 verstring="0.0"
23723382 fi
23733383
23743384 if test "$mode" != relink; then
2375 # Remove our outputs.
2376 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2377 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
3385 # Remove our outputs, but don't remove object files since they
3386 # may have been created when compiling PIC objects.
3387 removelist=
3388 tempremovelist=`$echo "$output_objdir/*"`
3389 for p in $tempremovelist; do
3390 case $p in
3391 *.$objext)
3392 ;;
3393 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3394 if test "X$precious_files_regex" != "X"; then
3395 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3396 then
3397 continue
3398 fi
3399 fi
3400 removelist="$removelist $p"
3401 ;;
3402 *) ;;
3403 esac
3404 done
3405 if test -n "$removelist"; then
3406 $show "${rm}r $removelist"
3407 $run ${rm}r $removelist
3408 fi
23783409 fi
23793410
23803411 # Now set the variables for building old libraries.
23873418
23883419 # Eliminate all temporary directories.
23893420 for path in $notinst_path; do
2390 lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2391 deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2392 dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
3421 lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3422 deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3423 dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
23933424 done
23943425
23953426 if test -n "$xrpath"; then
24023433 *) finalize_rpath="$finalize_rpath $libdir" ;;
24033434 esac
24043435 done
2405 if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
3436 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
24063437 dependency_libs="$temp_xrpath $dependency_libs"
24073438 fi
24083439 fi
24403471 *-*-netbsd*)
24413472 # Don't link with libc until the a.out ld.so is fixed.
24423473 ;;
2443 *-*-openbsd*)
3474 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
24443475 # Do not include libc due to us having libc/libc_r.
24453476 ;;
2446 *)
3477 *-*-sco3.2v5* | *-*-sco5v6*)
3478 # Causes problems with __ctype
3479 ;;
3480 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3481 # Compiler inserts libc in the correct place for threads to work
3482 ;;
3483 *)
24473484 # Add libc to deplibs on all other systems if necessary.
2448 if test $build_libtool_need_lc = "yes"; then
3485 if test "$build_libtool_need_lc" = "yes"; then
24493486 deplibs="$deplibs -lc"
24503487 fi
24513488 ;;
24723509 # This might be a little naive. We might want to check
24733510 # whether the library exists or not. But this is on
24743511 # osf3 & osf4 and I'm not really sure... Just
2475 # implementing what was already the behaviour.
3512 # implementing what was already the behavior.
24763513 newdeplibs=$deplibs
24773514 ;;
24783515 test_compile)
24853522 int main() { return 0; }
24863523 EOF
24873524 $rm conftest
2488 $CC -o conftest conftest.c $deplibs
2489 if test $? -eq 0 ; then
3525 $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3526 if test "$?" -eq 0 ; then
24903527 ldd_output=`ldd conftest`
24913528 for i in $deplibs; do
2492 name="`expr $i : '-l\(.*\)'`"
3529 name=`expr $i : '-l\(.*\)'`
24933530 # If $name is empty we are operating on a -L argument.
2494 if test -n "$name" && test "$name" != "0"; then
2495 libname=`eval \\$echo \"$libname_spec\"`
2496 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2497 set dummy $deplib_matches
2498 deplib_match=$2
2499 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2500 newdeplibs="$newdeplibs $i"
2501 else
2502 droppeddeps=yes
2503 echo
2504 echo "*** Warning: This library needs some functionality provided by $i."
2505 echo "*** I have the capability to make that library automatically link in when"
2506 echo "*** you link to this library. But I can only do this if you have a"
2507 echo "*** shared version of the library, which you do not appear to have."
2508 fi
2509 else
2510 newdeplibs="$newdeplibs $i"
2511 fi
2512 done
2513 else
2514 # Error occured in the first compile. Let's try to salvage the situation:
2515 # Compile a seperate program for each library.
2516 for i in $deplibs; do
2517 name="`expr $i : '-l\(.*\)'`"
2518 # If $name is empty we are operating on a -L argument.
2519 if test -n "$name" && test "$name" != "0"; then
2520 $rm conftest
2521 $CC -o conftest conftest.c $i
2522 # Did it work?
2523 if test $? -eq 0 ; then
2524 ldd_output=`ldd conftest`
3531 if test "$name" != "" && test "$name" -ne "0"; then
3532 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3533 case " $predeps $postdeps " in
3534 *" $i "*)
3535 newdeplibs="$newdeplibs $i"
3536 i=""
3537 ;;
3538 esac
3539 fi
3540 if test -n "$i" ; then
25253541 libname=`eval \\$echo \"$libname_spec\"`
25263542 deplib_matches=`eval \\$echo \"$library_names_spec\"`
25273543 set dummy $deplib_matches
25303546 newdeplibs="$newdeplibs $i"
25313547 else
25323548 droppeddeps=yes
2533 echo
2534 echo "*** Warning: This library needs some functionality provided by $i."
2535 echo "*** I have the capability to make that library automatically link in when"
2536 echo "*** you link to this library. But I can only do this if you have a"
2537 echo "*** shared version of the library, which you do not appear to have."
3549 $echo
3550 $echo "*** Warning: dynamic linker does not accept needed library $i."
3551 $echo "*** I have the capability to make that library automatically link in when"
3552 $echo "*** you link to this library. But I can only do this if you have a"
3553 $echo "*** shared version of the library, which I believe you do not have"
3554 $echo "*** because a test_compile did reveal that the linker did not use it for"
3555 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
25383556 fi
2539 else
2540 droppeddeps=yes
2541 echo
2542 echo "*** Warning! Library $i is needed by this library but I was not able to"
2543 echo "*** make it link in! You will probably need to install it or some"
2544 echo "*** library that it depends on before this library will be fully"
2545 echo "*** functional. Installing it before continuing would be even better."
25463557 fi
25473558 else
25483559 newdeplibs="$newdeplibs $i"
25493560 fi
25503561 done
3562 else
3563 # Error occurred in the first compile. Let's try to salvage
3564 # the situation: Compile a separate program for each library.
3565 for i in $deplibs; do
3566 name=`expr $i : '-l\(.*\)'`
3567 # If $name is empty we are operating on a -L argument.
3568 if test "$name" != "" && test "$name" != "0"; then
3569 $rm conftest
3570 $LTCC $LTCFLAGS -o conftest conftest.c $i
3571 # Did it work?
3572 if test "$?" -eq 0 ; then
3573 ldd_output=`ldd conftest`
3574 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3575 case " $predeps $postdeps " in
3576 *" $i "*)
3577 newdeplibs="$newdeplibs $i"
3578 i=""
3579 ;;
3580 esac
3581 fi
3582 if test -n "$i" ; then
3583 libname=`eval \\$echo \"$libname_spec\"`
3584 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3585 set dummy $deplib_matches
3586 deplib_match=$2
3587 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3588 newdeplibs="$newdeplibs $i"
3589 else
3590 droppeddeps=yes
3591 $echo
3592 $echo "*** Warning: dynamic linker does not accept needed library $i."
3593 $echo "*** I have the capability to make that library automatically link in when"
3594 $echo "*** you link to this library. But I can only do this if you have a"
3595 $echo "*** shared version of the library, which you do not appear to have"
3596 $echo "*** because a test_compile did reveal that the linker did not use this one"
3597 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3598 fi
3599 fi
3600 else
3601 droppeddeps=yes
3602 $echo
3603 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3604 $echo "*** make it link in! You will probably need to install it or some"
3605 $echo "*** library that it depends on before this library will be fully"
3606 $echo "*** functional. Installing it before continuing would be even better."
3607 fi
3608 else
3609 newdeplibs="$newdeplibs $i"
3610 fi
3611 done
25513612 fi
25523613 ;;
25533614 file_magic*)
25543615 set dummy $deplibs_check_method
25553616 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
25563617 for a_deplib in $deplibs; do
2557 name="`expr $a_deplib : '-l\(.*\)'`"
3618 name=`expr $a_deplib : '-l\(.*\)'`
25583619 # If $name is empty we are operating on a -L argument.
2559 if test -n "$name" && test "$name" != "0"; then
2560 libname=`eval \\$echo \"$libname_spec\"`
2561 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2562 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2563 for potent_lib in $potential_libs; do
3620 if test "$name" != "" && test "$name" != "0"; then
3621 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3622 case " $predeps $postdeps " in
3623 *" $a_deplib "*)
3624 newdeplibs="$newdeplibs $a_deplib"
3625 a_deplib=""
3626 ;;
3627 esac
3628 fi
3629 if test -n "$a_deplib" ; then
3630 libname=`eval \\$echo \"$libname_spec\"`
3631 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3632 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3633 for potent_lib in $potential_libs; do
25643634 # Follow soft links.
25653635 if ls -lLd "$potent_lib" 2>/dev/null \
25663636 | grep " -> " >/dev/null; then
25733643 # but so what?
25743644 potlib="$potent_lib"
25753645 while test -h "$potlib" 2>/dev/null; do
2576 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
3646 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
25773647 case $potliblink in
25783648 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
25793649 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
25803650 esac
25813651 done
25823652 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2583 | sed 10q \
2584 | egrep "$file_magic_regex" > /dev/null; then
3653 | ${SED} 10q \
3654 | $EGREP "$file_magic_regex" > /dev/null; then
25853655 newdeplibs="$newdeplibs $a_deplib"
25863656 a_deplib=""
25873657 break 2
25883658 fi
2589 done
2590 done
3659 done
3660 done
3661 fi
25913662 if test -n "$a_deplib" ; then
25923663 droppeddeps=yes
2593 echo
2594 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2595 echo "*** I have the capability to make that library automatically link in when"
2596 echo "*** you link to this library. But I can only do this if you have a"
2597 echo "*** shared version of the library, which you do not appear to have."
3664 $echo
3665 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3666 $echo "*** I have the capability to make that library automatically link in when"
3667 $echo "*** you link to this library. But I can only do this if you have a"
3668 $echo "*** shared version of the library, which you do not appear to have"
3669 $echo "*** because I did check the linker path looking for a file starting"
3670 if test -z "$potlib" ; then
3671 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3672 else
3673 $echo "*** with $libname and none of the candidates passed a file format test"
3674 $echo "*** using a file magic. Last file checked: $potlib"
3675 fi
25983676 fi
25993677 else
26003678 # Add a -L argument.
26063684 set dummy $deplibs_check_method
26073685 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
26083686 for a_deplib in $deplibs; do
2609 name="`expr $a_deplib : '-l\(.*\)'`"
3687 name=`expr $a_deplib : '-l\(.*\)'`
26103688 # If $name is empty we are operating on a -L argument.
26113689 if test -n "$name" && test "$name" != "0"; then
2612 libname=`eval \\$echo \"$libname_spec\"`
2613 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2614 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2615 for potent_lib in $potential_libs; do
2616 if eval echo \"$potent_lib\" 2>/dev/null \
2617 | sed 10q \
2618 | egrep "$match_pattern_regex" > /dev/null; then
2619 newdeplibs="$newdeplibs $a_deplib"
2620 a_deplib=""
2621 break 2
2622 fi
3690 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3691 case " $predeps $postdeps " in
3692 *" $a_deplib "*)
3693 newdeplibs="$newdeplibs $a_deplib"
3694 a_deplib=""
3695 ;;
3696 esac
3697 fi
3698 if test -n "$a_deplib" ; then
3699 libname=`eval \\$echo \"$libname_spec\"`
3700 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3701 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3702 for potent_lib in $potential_libs; do
3703 potlib="$potent_lib" # see symlink-check above in file_magic test
3704 if eval $echo \"$potent_lib\" 2>/dev/null \
3705 | ${SED} 10q \
3706 | $EGREP "$match_pattern_regex" > /dev/null; then
3707 newdeplibs="$newdeplibs $a_deplib"
3708 a_deplib=""
3709 break 2
3710 fi
3711 done
26233712 done
2624 done
3713 fi
26253714 if test -n "$a_deplib" ; then
26263715 droppeddeps=yes
2627 echo
2628 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2629 echo "*** I have the capability to make that library automatically link in when"
2630 echo "*** you link to this library. But I can only do this if you have a"
2631 echo "*** shared version of the library, which you do not appear to have."
3716 $echo
3717 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3718 $echo "*** I have the capability to make that library automatically link in when"
3719 $echo "*** you link to this library. But I can only do this if you have a"
3720 $echo "*** shared version of the library, which you do not appear to have"
3721 $echo "*** because I did check the linker path looking for a file starting"
3722 if test -z "$potlib" ; then
3723 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3724 else
3725 $echo "*** with $libname and none of the candidates passed a file format test"
3726 $echo "*** using a regex pattern. Last file checked: $potlib"
3727 fi
26323728 fi
26333729 else
26343730 # Add a -L argument.
26383734 ;;
26393735 none | unknown | *)
26403736 newdeplibs=""
2641 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2642 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2643 grep . >/dev/null; then
2644 echo
3737 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3738 -e 's/ -[LR][^ ]*//g'`
3739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3740 for i in $predeps $postdeps ; do
3741 # can't use Xsed below, because $i might contain '/'
3742 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3743 done
3744 fi
3745 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3746 | grep . >/dev/null; then
3747 $echo
26453748 if test "X$deplibs_check_method" = "Xnone"; then
2646 echo "*** Warning: inter-library dependencies are not supported in this platform."
3749 $echo "*** Warning: inter-library dependencies are not supported in this platform."
26473750 else
2648 echo "*** Warning: inter-library dependencies are not known to be supported."
3751 $echo "*** Warning: inter-library dependencies are not known to be supported."
26493752 fi
2650 echo "*** All declared inter-library dependencies are being dropped."
3753 $echo "*** All declared inter-library dependencies are being dropped."
26513754 droppeddeps=yes
26523755 fi
26533756 ;;
26673770
26683771 if test "$droppeddeps" = yes; then
26693772 if test "$module" = yes; then
2670 echo
2671 echo "*** Warning: libtool could not satisfy all declared inter-library"
2672 echo "*** dependencies of module $libname. Therefore, libtool will create"
2673 echo "*** a static module, that should work as long as the dlopening"
2674 echo "*** application is linked with the -dlopen flag."
3773 $echo
3774 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3775 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3776 $echo "*** a static module, that should work as long as the dlopening"
3777 $echo "*** application is linked with the -dlopen flag."
26753778 if test -z "$global_symbol_pipe"; then
2676 echo
2677 echo "*** However, this would only work if libtool was able to extract symbol"
2678 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2679 echo "*** not find such a program. So, this module is probably useless."
2680 echo "*** \`nm' from GNU binutils and a full rebuild may help."
3779 $echo
3780 $echo "*** However, this would only work if libtool was able to extract symbol"
3781 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3782 $echo "*** not find such a program. So, this module is probably useless."
3783 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
26813784 fi
26823785 if test "$build_old_libs" = no; then
26833786 oldlibs="$output_objdir/$libname.$libext"
26873790 build_libtool_libs=no
26883791 fi
26893792 else
2690 echo "*** The inter-library dependencies that have been dropped here will be"
2691 echo "*** automatically added whenever a program is linked with this library"
2692 echo "*** or is declared to -dlopen it."
2693
2694 if test $allow_undefined = no; then
2695 echo
2696 echo "*** Since this library must not contain undefined symbols,"
2697 echo "*** because either the platform does not support them or"
2698 echo "*** it was explicitly requested with -no-undefined,"
2699 echo "*** libtool will only create a static version of it."
3793 $echo "*** The inter-library dependencies that have been dropped here will be"
3794 $echo "*** automatically added whenever a program is linked with this library"
3795 $echo "*** or is declared to -dlopen it."
3796
3797 if test "$allow_undefined" = no; then
3798 $echo
3799 $echo "*** Since this library must not contain undefined symbols,"
3800 $echo "*** because either the platform does not support them or"
3801 $echo "*** it was explicitly requested with -no-undefined,"
3802 $echo "*** libtool will only create a static version of it."
27003803 if test "$build_old_libs" = no; then
27013804 oldlibs="$output_objdir/$libname.$libext"
27023805 build_libtool_libs=module
27113814 deplibs=$newdeplibs
27123815 fi
27133816
3817
3818 # move library search paths that coincide with paths to not yet
3819 # installed libraries to the beginning of the library search list
3820 new_libs=
3821 for path in $notinst_path; do
3822 case " $new_libs " in
3823 *" -L$path/$objdir "*) ;;
3824 *)
3825 case " $deplibs " in
3826 *" -L$path/$objdir "*)
3827 new_libs="$new_libs -L$path/$objdir" ;;
3828 esac
3829 ;;
3830 esac
3831 done
3832 for deplib in $deplibs; do
3833 case $deplib in
3834 -L*)
3835 case " $new_libs " in
3836 *" $deplib "*) ;;
3837 *) new_libs="$new_libs $deplib" ;;
3838 esac
3839 ;;
3840 *) new_libs="$new_libs $deplib" ;;
3841 esac
3842 done
3843 deplibs="$new_libs"
3844
3845
27143846 # All the library-specific variables (install_libdir is set above).
27153847 library_names=
27163848 old_library=
27183850
27193851 # Test again, we may have decided not to build it any more
27203852 if test "$build_libtool_libs" = yes; then
2721 if test $hardcode_into_libs = yes; then
3853 if test "$hardcode_into_libs" = yes; then
27223854 # Hardcode the library paths
27233855 hardcode_libdirs=
27243856 dep_rpath=
27543886 if test -n "$hardcode_libdir_separator" &&
27553887 test -n "$hardcode_libdirs"; then
27563888 libdir="$hardcode_libdirs"
2757 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3889 if test -n "$hardcode_libdir_flag_spec_ld"; then
3890 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3891 else
3892 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3893 fi
27583894 fi
27593895 if test -n "$runpath_var" && test -n "$perm_rpath"; then
27603896 # We should set the runpath_var.
27743910 fi
27753911
27763912 # Get the real and link names of the library.
3913 eval shared_ext=\"$shrext_cmds\"
27773914 eval library_names=\"$library_names_spec\"
27783915 set dummy $library_names
27793916 realname="$2"
27843921 else
27853922 soname="$realname"
27863923 fi
2787 test -z "$dlname" && dlname=$soname
3924 if test -z "$dlname"; then
3925 dlname=$soname
3926 fi
27883927
27893928 lib="$output_objdir/$realname"
3929 linknames=
27903930 for link
27913931 do
27923932 linknames="$linknames $link"
2793 done
2794
2795 # Ensure that we have .o objects for linkers which dislike .lo
2796 # (e.g. aix) in case we are running --disable-static
2797 for obj in $libobjs; do
2798 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
2799 if test "X$xdir" = "X$obj"; then
2800 xdir="."
2801 else
2802 xdir="$xdir"
2803 fi
2804 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
2805 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2806 if test ! -f $xdir/$oldobj; then
2807 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
2808 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
2809 fi
28103933 done
28113934
28123935 # Use standard objects if they are pic
28183941 $show "generating symbol list for \`$libname.la'"
28193942 export_symbols="$output_objdir/$libname.exp"
28203943 $run $rm $export_symbols
2821 eval cmds=\"$export_symbols_cmds\"
3944 cmds=$export_symbols_cmds
28223945 save_ifs="$IFS"; IFS='~'
28233946 for cmd in $cmds; do
28243947 IFS="$save_ifs"
2825 $show "$cmd"
2826 $run eval "$cmd" || exit $?
3948 eval cmd=\"$cmd\"
3949 if len=`expr "X$cmd" : ".*"` &&
3950 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3951 $show "$cmd"
3952 $run eval "$cmd" || exit $?
3953 skipped_export=false
3954 else
3955 # The command line is too long to execute in one step.
3956 $show "using reloadable object file for export list..."
3957 skipped_export=:
3958 # Break out early, otherwise skipped_export may be
3959 # set to false by a later but shorter cmd.
3960 break
3961 fi
28273962 done
28283963 IFS="$save_ifs"
28293964 if test -n "$export_symbols_regex"; then
2830 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2831 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3965 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3966 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
28323967 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
28333968 $run eval '$mv "${export_symbols}T" "$export_symbols"'
28343969 fi
28393974 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
28403975 fi
28413976
3977 tmp_deplibs=
3978 for test_deplib in $deplibs; do
3979 case " $convenience " in
3980 *" $test_deplib "*) ;;
3981 *)
3982 tmp_deplibs="$tmp_deplibs $test_deplib"
3983 ;;
3984 esac
3985 done
3986 deplibs="$tmp_deplibs"
3987
28423988 if test -n "$convenience"; then
28433989 if test -n "$whole_archive_flag_spec"; then
3990 save_libobjs=$libobjs
28443991 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
28453992 else
28463993 gentop="$output_objdir/${outputname}x"
2847 $show "${rm}r $gentop"
2848 $run ${rm}r "$gentop"
2849 $show "mkdir $gentop"
2850 $run mkdir "$gentop"
2851 status=$?
2852 if test $status -ne 0 && test ! -d "$gentop"; then
2853 exit $status
2854 fi
28553994 generated="$generated $gentop"
28563995
2857 for xlib in $convenience; do
2858 # Extract the objects.
2859 case $xlib in
2860 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2861 *) xabs=`pwd`"/$xlib" ;;
2862 esac
2863 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2864 xdir="$gentop/$xlib"
2865
2866 $show "${rm}r $xdir"
2867 $run ${rm}r "$xdir"
2868 $show "mkdir $xdir"
2869 $run mkdir "$xdir"
2870 status=$?
2871 if test $status -ne 0 && test ! -d "$xdir"; then
2872 exit $status
2873 fi
2874 $show "(cd $xdir && $AR x $xabs)"
2875 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2876
2877 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2878 done
2879 fi
2880 fi
2881
3996 func_extract_archives $gentop $convenience
3997 libobjs="$libobjs $func_extract_archives_result"
3998 fi
3999 fi
4000
28824001 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
28834002 eval flag=\"$thread_safe_flag_spec\"
28844003 linker_flags="$linker_flags $flag"
28904009 fi
28914010
28924011 # Do each of the archive commands.
4012 if test "$module" = yes && test -n "$module_cmds" ; then
4013 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4014 eval test_cmds=\"$module_expsym_cmds\"
4015 cmds=$module_expsym_cmds
4016 else
4017 eval test_cmds=\"$module_cmds\"
4018 cmds=$module_cmds
4019 fi
4020 else
28934021 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2894 eval cmds=\"$archive_expsym_cmds\"
4022 eval test_cmds=\"$archive_expsym_cmds\"
4023 cmds=$archive_expsym_cmds
28954024 else
2896 eval cmds=\"$archive_cmds\"
4025 eval test_cmds=\"$archive_cmds\"
4026 cmds=$archive_cmds
4027 fi
4028 fi
4029
4030 if test "X$skipped_export" != "X:" &&
4031 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4032 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4033 :
4034 else
4035 # The command line is too long to link in one step, link piecewise.
4036 $echo "creating reloadable object files..."
4037
4038 # Save the value of $output and $libobjs because we want to
4039 # use them later. If we have whole_archive_flag_spec, we
4040 # want to use save_libobjs as it was before
4041 # whole_archive_flag_spec was expanded, because we can't
4042 # assume the linker understands whole_archive_flag_spec.
4043 # This may have to be revisited, in case too many
4044 # convenience libraries get linked in and end up exceeding
4045 # the spec.
4046 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4047 save_libobjs=$libobjs
4048 fi
4049 save_output=$output
4050 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4051
4052 # Clear the reloadable object creation command queue and
4053 # initialize k to one.
4054 test_cmds=
4055 concat_cmds=
4056 objlist=
4057 delfiles=
4058 last_robj=
4059 k=1
4060 output=$output_objdir/$output_la-${k}.$objext
4061 # Loop over the list of objects to be linked.
4062 for obj in $save_libobjs
4063 do
4064 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4065 if test "X$objlist" = X ||
4066 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4067 test "$len" -le "$max_cmd_len"; }; then
4068 objlist="$objlist $obj"
4069 else
4070 # The command $test_cmds is almost too long, add a
4071 # command to the queue.
4072 if test "$k" -eq 1 ; then
4073 # The first file doesn't have a previous command to add.
4074 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4075 else
4076 # All subsequent reloadable object files will link in
4077 # the last one created.
4078 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4079 fi
4080 last_robj=$output_objdir/$output_la-${k}.$objext
4081 k=`expr $k + 1`
4082 output=$output_objdir/$output_la-${k}.$objext
4083 objlist=$obj
4084 len=1
4085 fi
4086 done
4087 # Handle the remaining objects by creating one last
4088 # reloadable object file. All subsequent reloadable object
4089 # files will link in the last one created.
4090 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4091 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4092
4093 if ${skipped_export-false}; then
4094 $show "generating symbol list for \`$libname.la'"
4095 export_symbols="$output_objdir/$libname.exp"
4096 $run $rm $export_symbols
4097 libobjs=$output
4098 # Append the command to create the export file.
4099 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4100 fi
4101
4102 # Set up a command to remove the reloadable object files
4103 # after they are used.
4104 i=0
4105 while test "$i" -lt "$k"
4106 do
4107 i=`expr $i + 1`
4108 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4109 done
4110
4111 $echo "creating a temporary reloadable object file: $output"
4112
4113 # Loop through the commands generated above and execute them.
4114 save_ifs="$IFS"; IFS='~'
4115 for cmd in $concat_cmds; do
4116 IFS="$save_ifs"
4117 $show "$cmd"
4118 $run eval "$cmd" || exit $?
4119 done
4120 IFS="$save_ifs"
4121
4122 libobjs=$output
4123 # Restore the value of output.
4124 output=$save_output
4125
4126 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4127 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4128 fi
4129 # Expand the library linking commands again to reset the
4130 # value of $libobjs for piecewise linking.
4131
4132 # Do each of the archive commands.
4133 if test "$module" = yes && test -n "$module_cmds" ; then
4134 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4135 cmds=$module_expsym_cmds
4136 else
4137 cmds=$module_cmds
4138 fi
4139 else
4140 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4141 cmds=$archive_expsym_cmds
4142 else
4143 cmds=$archive_cmds
4144 fi
4145 fi
4146
4147 # Append the command to remove the reloadable object files
4148 # to the just-reset $cmds.
4149 eval cmds=\"\$cmds~\$rm $delfiles\"
28974150 fi
28984151 save_ifs="$IFS"; IFS='~'
28994152 for cmd in $cmds; do
29004153 IFS="$save_ifs"
4154 eval cmd=\"$cmd\"
29014155 $show "$cmd"
2902 $run eval "$cmd" || exit $?
4156 $run eval "$cmd" || {
4157 lt_exit=$?
4158
4159 # Restore the uninstalled library and exit
4160 if test "$mode" = relink; then
4161 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4162 fi
4163
4164 exit $lt_exit
4165 }
29034166 done
29044167 IFS="$save_ifs"
29054168
29064169 # Restore the uninstalled library and exit
29074170 if test "$mode" = relink; then
29084171 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
2909 exit 0
4172
4173 if test -n "$convenience"; then
4174 if test -z "$whole_archive_flag_spec"; then
4175 $show "${rm}r $gentop"
4176 $run ${rm}r "$gentop"
4177 fi
4178 fi
4179
4180 exit $EXIT_SUCCESS
29104181 fi
29114182
29124183 # Create links to the real library.
29544225 *.lo)
29554226 if test -n "$objs$old_deplibs"; then
29564227 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2957 exit 1
4228 exit $EXIT_FAILURE
29584229 fi
29594230 libobj="$output"
29604231 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
29834254 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
29844255 else
29854256 gentop="$output_objdir/${obj}x"
2986 $show "${rm}r $gentop"
2987 $run ${rm}r "$gentop"
2988 $show "mkdir $gentop"
2989 $run mkdir "$gentop"
2990 status=$?
2991 if test $status -ne 0 && test ! -d "$gentop"; then
2992 exit $status
2993 fi
29944257 generated="$generated $gentop"
29954258
2996 for xlib in $convenience; do
2997 # Extract the objects.
2998 case $xlib in
2999 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3000 *) xabs=`pwd`"/$xlib" ;;
3001 esac
3002 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3003 xdir="$gentop/$xlib"
3004
3005 $show "${rm}r $xdir"
3006 $run ${rm}r "$xdir"
3007 $show "mkdir $xdir"
3008 $run mkdir "$xdir"
3009 status=$?
3010 if test $status -ne 0 && test ! -d "$xdir"; then
3011 exit $status
3012 fi
3013 $show "(cd $xdir && $AR x $xabs)"
3014 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3015
3016 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3017 done
4259 func_extract_archives $gentop $convenience
4260 reload_conv_objs="$reload_objs $func_extract_archives_result"
30184261 fi
30194262 fi
30204263
30224265 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
30234266
30244267 output="$obj"
3025 eval cmds=\"$reload_cmds\"
4268 cmds=$reload_cmds
30264269 save_ifs="$IFS"; IFS='~'
30274270 for cmd in $cmds; do
30284271 IFS="$save_ifs"
4272 eval cmd=\"$cmd\"
30294273 $show "$cmd"
30304274 $run eval "$cmd" || exit $?
30314275 done
30384282 $run ${rm}r $gentop
30394283 fi
30404284
3041 exit 0
4285 exit $EXIT_SUCCESS
30424286 fi
30434287
30444288 if test "$build_libtool_libs" != yes; then
30494293
30504294 # Create an invalid libtool object if no PIC, so that we don't
30514295 # accidentally link it into a program.
3052 $show "echo timestamp > $libobj"
3053 $run eval "echo timestamp > $libobj" || exit $?
3054 exit 0
4296 # $show "echo timestamp > $libobj"
4297 # $run eval "echo timestamp > $libobj" || exit $?
4298 exit $EXIT_SUCCESS
30554299 fi
30564300
30574301 if test -n "$pic_flag" || test "$pic_mode" != default; then
30584302 # Only do commands if we really have different PIC objects.
30594303 reload_objs="$libobjs $reload_conv_objs"
30604304 output="$libobj"
3061 eval cmds=\"$reload_cmds\"
4305 cmds=$reload_cmds
30624306 save_ifs="$IFS"; IFS='~'
30634307 for cmd in $cmds; do
30644308 IFS="$save_ifs"
4309 eval cmd=\"$cmd\"
30654310 $show "$cmd"
30664311 $run eval "$cmd" || exit $?
30674312 done
30684313 IFS="$save_ifs"
3069 else
3070 # Just create a symlink.
3071 $show $rm $libobj
3072 $run $rm $libobj
3073 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3074 if test "X$xdir" = "X$libobj"; then
3075 xdir="."
3076 else
3077 xdir="$xdir"
3078 fi
3079 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3080 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3081 $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3082 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
30834314 fi
30844315
30854316 if test -n "$gentop"; then
30874318 $run ${rm}r $gentop
30884319 fi
30894320
3090 exit 0
4321 exit $EXIT_SUCCESS
30914322 ;;
30924323
30934324 prog)
30944325 case $host in
3095 *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
4326 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
30964327 esac
30974328 if test -n "$vinfo"; then
30984329 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
31164347 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
31174348 ;;
31184349 esac
4350
4351 case $host in
4352 *darwin*)
4353 # Don't allow lazy linking, it breaks C++ global constructors
4354 if test "$tagname" = CXX ; then
4355 compile_command="$compile_command ${wl}-bind_at_load"
4356 finalize_command="$finalize_command ${wl}-bind_at_load"
4357 fi
4358 ;;
4359 esac
4360
4361
4362 # move library search paths that coincide with paths to not yet
4363 # installed libraries to the beginning of the library search list
4364 new_libs=
4365 for path in $notinst_path; do
4366 case " $new_libs " in
4367 *" -L$path/$objdir "*) ;;
4368 *)
4369 case " $compile_deplibs " in
4370 *" -L$path/$objdir "*)
4371 new_libs="$new_libs -L$path/$objdir" ;;
4372 esac
4373 ;;
4374 esac
4375 done
4376 for deplib in $compile_deplibs; do
4377 case $deplib in
4378 -L*)
4379 case " $new_libs " in
4380 *" $deplib "*) ;;
4381 *) new_libs="$new_libs $deplib" ;;
4382 esac
4383 ;;
4384 *) new_libs="$new_libs $deplib" ;;
4385 esac
4386 done
4387 compile_deplibs="$new_libs"
4388
31194389
31204390 compile_command="$compile_command $compile_deplibs"
31214391 finalize_command="$finalize_command $finalize_deplibs"
31614431 fi
31624432 case $host in
31634433 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4434 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
31644435 case :$dllsearchpath: in
31654436 *":$libdir:"*) ;;
31664437 *) dllsearchpath="$dllsearchpath:$libdir";;
4438 esac
4439 case :$dllsearchpath: in
4440 *":$testbindir:"*) ;;
4441 *) dllsearchpath="$dllsearchpath:$testbindir";;
31674442 esac
31684443 ;;
31694444 esac
32674542 done
32684543
32694544 if test -n "$exclude_expsyms"; then
3270 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4545 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
32714546 $run eval '$mv "$nlist"T "$nlist"'
32724547 fi
32734548
32744549 if test -n "$export_symbols_regex"; then
3275 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4550 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
32764551 $run eval '$mv "$nlist"T "$nlist"'
32774552 fi
32784553
32794554 # Prepare the list of exported symbols
32804555 if test -z "$export_symbols"; then
3281 export_symbols="$output_objdir/$output.exp"
4556 export_symbols="$output_objdir/$outputname.exp"
32824557 $run $rm $export_symbols
3283 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4558 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4559 case $host in
4560 *cygwin* | *mingw* )
4561 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4562 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4563 ;;
4564 esac
32844565 else
3285 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3286 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4566 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4567 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
32874568 $run eval 'mv "$nlist"T "$nlist"'
4569 case $host in
4570 *cygwin* | *mingw* )
4571 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4572 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4573 ;;
4574 esac
32884575 fi
32894576 fi
32904577
32914578 for arg in $dlprefiles; do
32924579 $show "extracting global C symbols from \`$arg'"
3293 name=`echo "$arg" | sed -e 's%^.*/%%'`
3294 $run eval 'echo ": $name " >> "$nlist"'
4580 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4581 $run eval '$echo ": $name " >> "$nlist"'
32954582 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
32964583 done
32974584
33004587 test -f "$nlist" || : > "$nlist"
33014588
33024589 if test -n "$exclude_expsyms"; then
3303 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4590 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
33044591 $mv "$nlist"T "$nlist"
33054592 fi
33064593
33074594 # Try sorting and uniquifying the output.
3308 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
4595 if grep -v "^: " < "$nlist" |
4596 if sort -k 3 </dev/null >/dev/null 2>&1; then
4597 sort -k 3
4598 else
4599 sort +2
4600 fi |
4601 uniq > "$nlist"S; then
33094602 :
33104603 else
33114604 grep -v "^: " < "$nlist" > "$nlist"S
33144607 if test -f "$nlist"S; then
33154608 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
33164609 else
3317 echo '/* NONE */' >> "$output_objdir/$dlsyms"
4610 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
33184611 fi
33194612
33204613 $echo >> "$output_objdir/$dlsyms" "\
33294622 #endif
33304623
33314624 /* The mapping between symbol names and symbols. */
4625 "
4626
4627 case $host in
4628 *cygwin* | *mingw* )
4629 $echo >> "$output_objdir/$dlsyms" "\
4630 /* DATA imports from DLLs on WIN32 can't be const, because
4631 runtime relocations are performed -- see ld's documentation
4632 on pseudo-relocs */
4633 struct {
4634 "
4635 ;;
4636 * )
4637 $echo >> "$output_objdir/$dlsyms" "\
33324638 const struct {
4639 "
4640 ;;
4641 esac
4642
4643
4644 $echo >> "$output_objdir/$dlsyms" "\
33334645 const char *name;
33344646 lt_ptr address;
33354647 }
33664678 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
33674679 case "$compile_command " in
33684680 *" -static "*) ;;
3369 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
4681 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
33704682 esac;;
33714683 *-*-hpux*)
33724684 case "$compile_command " in
33734685 *" -static "*) ;;
3374 *) pic_flag_for_symtable=" $pic_flag -DPIC";;
4686 *) pic_flag_for_symtable=" $pic_flag";;
33754687 esac
33764688 esac
33774689
33784690 # Now compile the dynamic symbol file.
3379 $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3380 $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4691 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4692 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
33814693
33824694 # Clean up the generated files.
33834695 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
33844696 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
33854697
33864698 # Transform the symbol file into the correct name.
3387 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3388 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4699 case $host in
4700 *cygwin* | *mingw* )
4701 if test -f "$output_objdir/${outputname}.def" ; then
4702 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4703 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4704 else
4705 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4706 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4707 fi
4708 ;;
4709 * )
4710 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4711 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4712 ;;
4713 esac
33894714 ;;
33904715 *)
33914716 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3392 exit 1
4717 exit $EXIT_FAILURE
33934718 ;;
33944719 esac
33954720 else
34024727 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
34034728 fi
34044729
3405 if test $need_relink = no || test "$build_libtool_libs" != yes; then
4730 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
34064731 # Replace the output file specification.
34074732 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
34084733 link_command="$compile_command$compile_rpath"
34104735 # We have no uninstalled library dependencies, so finalize right now.
34114736 $show "$link_command"
34124737 $run eval "$link_command"
3413 status=$?
4738 exit_status=$?
34144739
34154740 # Delete the generated files.
34164741 if test -n "$dlsyms"; then
34184743 $run $rm "$output_objdir/${outputname}S.${objext}"
34194744 fi
34204745
3421 exit $status
4746 exit $exit_status
34224747 fi
34234748
34244749 if test -n "$shlibpath_var"; then
34774802 # Link the executable and exit
34784803 $show "$link_command"
34794804 $run eval "$link_command" || exit $?
3480 exit 0
4805 exit $EXIT_SUCCESS
34814806 fi
34824807
34834808 if test "$hardcode_action" = relink; then
35274852 relink_command="$var=\"$var_value\"; export $var; $relink_command"
35284853 fi
35294854 done
3530 relink_command="cd `pwd`; $relink_command"
4855 relink_command="(cd `pwd`; $relink_command)"
35314856 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
35324857 fi
35334858
35344859 # Quote $echo for shipping.
3535 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3536 case $0 in
3537 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3538 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
4860 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4861 case $progpath in
4862 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4863 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
35394864 esac
35404865 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
35414866 else
35474872 # win32 will think the script is a binary if it has
35484873 # a .exe suffix, so we strip it off here.
35494874 case $output in
3550 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
4875 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
35514876 esac
35524877 # test for cygwin because mv fails w/o .exe extensions
35534878 case $host in
3554 *cygwin*) exeext=.exe ;;
4879 *cygwin*)
4880 exeext=.exe
4881 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
35554882 *) exeext= ;;
35564883 esac
3557 $rm $output
3558 trap "$rm $output; exit 1" 1 2 15
4884 case $host in
4885 *cygwin* | *mingw* )
4886 output_name=`basename $output`
4887 output_path=`dirname $output`
4888 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4889 cwrapper="$output_path/$output_name.exe"
4890 $rm $cwrappersource $cwrapper
4891 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4892
4893 cat > $cwrappersource <<EOF
4894
4895 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4896 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4897
4898 The $output program cannot be directly executed until all the libtool
4899 libraries that it depends on are installed.
4900
4901 This wrapper executable should never be moved out of the build directory.
4902 If it is, it will not operate correctly.
4903
4904 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4905 but could eventually absorb all of the scripts functionality and
4906 exec $objdir/$outputname directly.
4907 */
4908 EOF
4909 cat >> $cwrappersource<<"EOF"
4910 #include <stdio.h>
4911 #include <stdlib.h>
4912 #include <unistd.h>
4913 #include <malloc.h>
4914 #include <stdarg.h>
4915 #include <assert.h>
4916 #include <string.h>
4917 #include <ctype.h>
4918 #include <sys/stat.h>
4919
4920 #if defined(PATH_MAX)
4921 # define LT_PATHMAX PATH_MAX
4922 #elif defined(MAXPATHLEN)
4923 # define LT_PATHMAX MAXPATHLEN
4924 #else
4925 # define LT_PATHMAX 1024
4926 #endif
4927
4928 #ifndef DIR_SEPARATOR
4929 # define DIR_SEPARATOR '/'
4930 # define PATH_SEPARATOR ':'
4931 #endif
4932
4933 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4934 defined (__OS2__)
4935 # define HAVE_DOS_BASED_FILE_SYSTEM
4936 # ifndef DIR_SEPARATOR_2
4937 # define DIR_SEPARATOR_2 '\\'
4938 # endif
4939 # ifndef PATH_SEPARATOR_2
4940 # define PATH_SEPARATOR_2 ';'
4941 # endif
4942 #endif
4943
4944 #ifndef DIR_SEPARATOR_2
4945 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4946 #else /* DIR_SEPARATOR_2 */
4947 # define IS_DIR_SEPARATOR(ch) \
4948 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4949 #endif /* DIR_SEPARATOR_2 */
4950
4951 #ifndef PATH_SEPARATOR_2
4952 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4953 #else /* PATH_SEPARATOR_2 */
4954 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4955 #endif /* PATH_SEPARATOR_2 */
4956
4957 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4958 #define XFREE(stale) do { \
4959 if (stale) { free ((void *) stale); stale = 0; } \
4960 } while (0)
4961
4962 /* -DDEBUG is fairly common in CFLAGS. */
4963 #undef DEBUG
4964 #if defined DEBUGWRAPPER
4965 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
4966 #else
4967 # define DEBUG(format, ...)
4968 #endif
4969
4970 const char *program_name = NULL;
4971
4972 void * xmalloc (size_t num);
4973 char * xstrdup (const char *string);
4974 const char * base_name (const char *name);
4975 char * find_executable(const char *wrapper);
4976 int check_executable(const char *path);
4977 char * strendzap(char *str, const char *pat);
4978 void lt_fatal (const char *message, ...);
4979
4980 int
4981 main (int argc, char *argv[])
4982 {
4983 char **newargz;
4984 int i;
4985
4986 program_name = (char *) xstrdup (base_name (argv[0]));
4987 DEBUG("(main) argv[0] : %s\n",argv[0]);
4988 DEBUG("(main) program_name : %s\n",program_name);
4989 newargz = XMALLOC(char *, argc+2);
4990 EOF
4991
4992 cat >> $cwrappersource <<EOF
4993 newargz[0] = (char *) xstrdup("$SHELL");
4994 EOF
4995
4996 cat >> $cwrappersource <<"EOF"
4997 newargz[1] = find_executable(argv[0]);
4998 if (newargz[1] == NULL)
4999 lt_fatal("Couldn't find %s", argv[0]);
5000 DEBUG("(main) found exe at : %s\n",newargz[1]);
5001 /* we know the script has the same name, without the .exe */
5002 /* so make sure newargz[1] doesn't end in .exe */
5003 strendzap(newargz[1],".exe");
5004 for (i = 1; i < argc; i++)
5005 newargz[i+1] = xstrdup(argv[i]);
5006 newargz[argc+1] = NULL;
5007
5008 for (i=0; i<argc+1; i++)
5009 {
5010 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5011 ;
5012 }
5013
5014 EOF
5015
5016 case $host_os in
5017 mingw*)
5018 cat >> $cwrappersource <<EOF
5019 execv("$SHELL",(char const **)newargz);
5020 EOF
5021 ;;
5022 *)
5023 cat >> $cwrappersource <<EOF
5024 execv("$SHELL",newargz);
5025 EOF
5026 ;;
5027 esac
5028
5029 cat >> $cwrappersource <<"EOF"
5030 return 127;
5031 }
5032
5033 void *
5034 xmalloc (size_t num)
5035 {
5036 void * p = (void *) malloc (num);
5037 if (!p)
5038 lt_fatal ("Memory exhausted");
5039
5040 return p;
5041 }
5042
5043 char *
5044 xstrdup (const char *string)
5045 {
5046 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5047 ;
5048 }
5049
5050 const char *
5051 base_name (const char *name)
5052 {
5053 const char *base;
5054
5055 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5056 /* Skip over the disk name in MSDOS pathnames. */
5057 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5058 name += 2;
5059 #endif
5060
5061 for (base = name; *name; name++)
5062 if (IS_DIR_SEPARATOR (*name))
5063 base = name + 1;
5064 return base;
5065 }
5066
5067 int
5068 check_executable(const char * path)
5069 {
5070 struct stat st;
5071
5072 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5073 if ((!path) || (!*path))
5074 return 0;
5075
5076 if ((stat (path, &st) >= 0) &&
5077 (
5078 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5079 #if defined (S_IXOTH)
5080 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5081 #endif
5082 #if defined (S_IXGRP)
5083 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5084 #endif
5085 ((st.st_mode & S_IXUSR) == S_IXUSR))
5086 )
5087 return 1;
5088 else
5089 return 0;
5090 }
5091
5092 /* Searches for the full path of the wrapper. Returns
5093 newly allocated full path name if found, NULL otherwise */
5094 char *
5095 find_executable (const char* wrapper)
5096 {
5097 int has_slash = 0;
5098 const char* p;
5099 const char* p_next;
5100 /* static buffer for getcwd */
5101 char tmp[LT_PATHMAX + 1];
5102 int tmp_len;
5103 char* concat_name;
5104
5105 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5106
5107 if ((wrapper == NULL) || (*wrapper == '\0'))
5108 return NULL;
5109
5110 /* Absolute path? */
5111 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5112 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5113 {
5114 concat_name = xstrdup (wrapper);
5115 if (check_executable(concat_name))
5116 return concat_name;
5117 XFREE(concat_name);
5118 }
5119 else
5120 {
5121 #endif
5122 if (IS_DIR_SEPARATOR (wrapper[0]))
5123 {
5124 concat_name = xstrdup (wrapper);
5125 if (check_executable(concat_name))
5126 return concat_name;
5127 XFREE(concat_name);
5128 }
5129 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5130 }
5131 #endif
5132
5133 for (p = wrapper; *p; p++)
5134 if (*p == '/')
5135 {
5136 has_slash = 1;
5137 break;
5138 }
5139 if (!has_slash)
5140 {
5141 /* no slashes; search PATH */
5142 const char* path = getenv ("PATH");
5143 if (path != NULL)
5144 {
5145 for (p = path; *p; p = p_next)
5146 {
5147 const char* q;
5148 size_t p_len;
5149 for (q = p; *q; q++)
5150 if (IS_PATH_SEPARATOR(*q))
5151 break;
5152 p_len = q - p;
5153 p_next = (*q == '\0' ? q : q + 1);
5154 if (p_len == 0)
5155 {
5156 /* empty path: current directory */
5157 if (getcwd (tmp, LT_PATHMAX) == NULL)
5158 lt_fatal ("getcwd failed");
5159 tmp_len = strlen(tmp);
5160 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5161 memcpy (concat_name, tmp, tmp_len);
5162 concat_name[tmp_len] = '/';
5163 strcpy (concat_name + tmp_len + 1, wrapper);
5164 }
5165 else
5166 {
5167 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5168 memcpy (concat_name, p, p_len);
5169 concat_name[p_len] = '/';
5170 strcpy (concat_name + p_len + 1, wrapper);
5171 }
5172 if (check_executable(concat_name))
5173 return concat_name;
5174 XFREE(concat_name);
5175 }
5176 }
5177 /* not found in PATH; assume curdir */
5178 }
5179 /* Relative path | not found in path: prepend cwd */
5180 if (getcwd (tmp, LT_PATHMAX) == NULL)
5181 lt_fatal ("getcwd failed");
5182 tmp_len = strlen(tmp);
5183 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5184 memcpy (concat_name, tmp, tmp_len);
5185 concat_name[tmp_len] = '/';
5186 strcpy (concat_name + tmp_len + 1, wrapper);
5187
5188 if (check_executable(concat_name))
5189 return concat_name;
5190 XFREE(concat_name);
5191 return NULL;
5192 }
5193
5194 char *
5195 strendzap(char *str, const char *pat)
5196 {
5197 size_t len, patlen;
5198
5199 assert(str != NULL);
5200 assert(pat != NULL);
5201
5202 len = strlen(str);
5203 patlen = strlen(pat);
5204
5205 if (patlen <= len)
5206 {
5207 str += len - patlen;
5208 if (strcmp(str, pat) == 0)
5209 *str = '\0';
5210 }
5211 return str;
5212 }
5213
5214 static void
5215 lt_error_core (int exit_status, const char * mode,
5216 const char * message, va_list ap)
5217 {
5218 fprintf (stderr, "%s: %s: ", program_name, mode);
5219 vfprintf (stderr, message, ap);
5220 fprintf (stderr, ".\n");
5221
5222 if (exit_status >= 0)
5223 exit (exit_status);
5224 }
5225
5226 void
5227 lt_fatal (const char *message, ...)
5228 {
5229 va_list ap;
5230 va_start (ap, message);
5231 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5232 va_end (ap);
5233 }
5234 EOF
5235 # we should really use a build-platform specific compiler
5236 # here, but OTOH, the wrappers (shell script and this C one)
5237 # are only useful if you want to execute the "real" binary.
5238 # Since the "real" binary is built for $host, then this
5239 # wrapper might as well be built for $host, too.
5240 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5241 ;;
5242 esac
5243 $rm $output
5244 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
35595245
35605246 $echo > $output "\
35615247 #! $SHELL
35715257
35725258 # Sed substitution that helps us do robust quoting. It backslashifies
35735259 # metacharacters that are still active within double-quoted strings.
3574 Xsed='sed -e 1s/^X//'
5260 Xsed='${SED} -e 1s/^X//'
35755261 sed_quote_subst='$sed_quote_subst'
35765262
35775263 # The HP-UX ksh and POSIX shell print the target directory to stdout
35785264 # if CDPATH is set.
3579 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5265 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
35805266
35815267 relink_command=\"$relink_command\"
35825268
36095295 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
36105296
36115297 # Follow symbolic links until we get to the real thisdir.
3612 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
5298 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
36135299 while test -n \"\$file\"; do
36145300 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
36155301
36225308 fi
36235309
36245310 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3625 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
5311 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
36265312 done
36275313
36285314 # Try to get the absolute directory name.
36315317 "
36325318
36335319 if test "$fast_install" = yes; then
3634 echo >> $output "\
5320 $echo >> $output "\
36355321 program=lt-'$outputname'$exeext
36365322 progdir=\"\$thisdir/$objdir\"
36375323
36385324 if test ! -f \"\$progdir/\$program\" || \\
3639 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
5325 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
36405326 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
36415327
36425328 file=\"\$\$-\$program\"
36475333 $rm \"\$progdir/\$file\"
36485334 fi"
36495335
3650 echo >> $output "\
5336 $echo >> $output "\
36515337
36525338 # relink executable if necessary
36535339 if test -n \"\$relink_command\"; then
36555341 else
36565342 $echo \"\$relink_command_output\" >&2
36575343 $rm \"\$progdir/\$file\"
3658 exit 1
5344 exit $EXIT_FAILURE
36595345 fi
36605346 fi
36615347
36655351 $rm \"\$progdir/\$file\"
36665352 fi"
36675353 else
3668 echo >> $output "\
5354 $echo >> $output "\
36695355 program='$outputname'
36705356 progdir=\"\$thisdir/$objdir\"
36715357 "
36725358 fi
36735359
3674 echo >> $output "\
5360 $echo >> $output "\
36755361
36765362 if test -f \"\$progdir/\$program\"; then"
36775363
37025388 # Run the actual program with our arguments.
37035389 "
37045390 case $host in
3705 # win32 systems need to use the prog path for dll
3706 # lookup to work
3707 *-*-cygwin* | *-*-pw32*)
3708 $echo >> $output "\
3709 exec \$progdir/\$program \${1+\"\$@\"}
3710 "
3711 ;;
3712
37135391 # Backslashes separate directories on plain windows
37145392 *-*-mingw | *-*-os2*)
37155393 $echo >> $output "\
3716 exec \$progdir\\\\\$program \${1+\"\$@\"}
5394 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
37175395 "
37185396 ;;
37195397
37205398 *)
37215399 $echo >> $output "\
3722 # Export the path to the program.
3723 PATH=\"\$progdir:\$PATH\"
3724 export PATH
3725
3726 exec \$program \${1+\"\$@\"}
5400 exec \"\$progdir/\$program\" \${1+\"\$@\"}
37275401 "
37285402 ;;
37295403 esac
37305404 $echo >> $output "\
37315405 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
3732 exit 1
5406 exit $EXIT_FAILURE
37335407 fi
37345408 else
37355409 # The program doesn't exist.
3736 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5410 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
37375411 \$echo \"This script is just a wrapper for \$program.\" 1>&2
3738 echo \"See the $PACKAGE documentation for more information.\" 1>&2
3739 exit 1
5412 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5413 exit $EXIT_FAILURE
37405414 fi
37415415 fi\
37425416 "
37435417 chmod +x $output
37445418 fi
3745 exit 0
5419 exit $EXIT_SUCCESS
37465420 ;;
37475421 esac
37485422
37585432 oldobjs="$libobjs_save"
37595433 build_libtool_libs=no
37605434 else
3761 oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
5435 oldobjs="$old_deplibs $non_pic_objects"
37625436 fi
37635437 addlibs="$old_convenience"
37645438 fi
37655439
37665440 if test -n "$addlibs"; then
37675441 gentop="$output_objdir/${outputname}x"
3768 $show "${rm}r $gentop"
3769 $run ${rm}r "$gentop"
3770 $show "mkdir $gentop"
3771 $run mkdir "$gentop"
3772 status=$?
3773 if test $status -ne 0 && test ! -d "$gentop"; then
3774 exit $status
3775 fi
37765442 generated="$generated $gentop"
37775443
3778 # Add in members from convenience archives.
3779 for xlib in $addlibs; do
3780 # Extract the objects.
3781 case $xlib in
3782 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3783 *) xabs=`pwd`"/$xlib" ;;
3784 esac
3785 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3786 xdir="$gentop/$xlib"
3787
3788 $show "${rm}r $xdir"
3789 $run ${rm}r "$xdir"
3790 $show "mkdir $xdir"
3791 $run mkdir "$xdir"
3792 status=$?
3793 if test $status -ne 0 && test ! -d "$xdir"; then
3794 exit $status
3795 fi
3796 $show "(cd $xdir && $AR x $xabs)"
3797 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3798
3799 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
3800 done
5444 func_extract_archives $gentop $addlibs
5445 oldobjs="$oldobjs $func_extract_archives_result"
38015446 fi
38025447
38035448 # Do each command in the archive commands.
38045449 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
3805 eval cmds=\"$old_archive_from_new_cmds\"
5450 cmds=$old_archive_from_new_cmds
38065451 else
3807 # Ensure that we have .o objects in place in case we decided
3808 # not to build a shared library, and have fallen back to building
3809 # static libs even though --disable-static was passed!
3810 for oldobj in $oldobjs; do
3811 if test ! -f $oldobj; then
3812 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
3813 if test "X$xdir" = "X$oldobj"; then
3814 xdir="."
5452 # POSIX demands no paths to be encoded in archives. We have
5453 # to avoid creating archives with duplicate basenames if we
5454 # might have to extract them afterwards, e.g., when creating a
5455 # static archive out of a convenience library, or when linking
5456 # the entirety of a libtool archive into another (currently
5457 # not supported by libtool).
5458 if (for obj in $oldobjs
5459 do
5460 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5461 done | sort | sort -uc >/dev/null 2>&1); then
5462 :
5463 else
5464 $echo "copying selected object files to avoid basename conflicts..."
5465
5466 if test -z "$gentop"; then
5467 gentop="$output_objdir/${outputname}x"
5468 generated="$generated $gentop"
5469
5470 $show "${rm}r $gentop"
5471 $run ${rm}r "$gentop"
5472 $show "$mkdir $gentop"
5473 $run $mkdir "$gentop"
5474 exit_status=$?
5475 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5476 exit $exit_status
5477 fi
5478 fi
5479
5480 save_oldobjs=$oldobjs
5481 oldobjs=
5482 counter=1
5483 for obj in $save_oldobjs
5484 do
5485 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5486 case " $oldobjs " in
5487 " ") oldobjs=$obj ;;
5488 *[\ /]"$objbase "*)
5489 while :; do
5490 # Make sure we don't pick an alternate name that also
5491 # overlaps.
5492 newobj=lt$counter-$objbase
5493 counter=`expr $counter + 1`
5494 case " $oldobjs " in
5495 *[\ /]"$newobj "*) ;;
5496 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5497 esac
5498 done
5499 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5500 $run ln "$obj" "$gentop/$newobj" ||
5501 $run cp "$obj" "$gentop/$newobj"
5502 oldobjs="$oldobjs $gentop/$newobj"
5503 ;;
5504 *) oldobjs="$oldobjs $obj" ;;
5505 esac
5506 done
5507 fi
5508
5509 eval cmds=\"$old_archive_cmds\"
5510
5511 if len=`expr "X$cmds" : ".*"` &&
5512 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5513 cmds=$old_archive_cmds
5514 else
5515 # the command line is too long to link in one step, link in parts
5516 $echo "using piecewise archive linking..."
5517 save_RANLIB=$RANLIB
5518 RANLIB=:
5519 objlist=
5520 concat_cmds=
5521 save_oldobjs=$oldobjs
5522
5523 # Is there a better way of finding the last object in the list?
5524 for obj in $save_oldobjs
5525 do
5526 last_oldobj=$obj
5527 done
5528 for obj in $save_oldobjs
5529 do
5530 oldobjs="$objlist $obj"
5531 objlist="$objlist $obj"
5532 eval test_cmds=\"$old_archive_cmds\"
5533 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5534 test "$len" -le "$max_cmd_len"; then
5535 :
38155536 else
3816 xdir="$xdir"
5537 # the above command should be used before it gets too long
5538 oldobjs=$objlist
5539 if test "$obj" = "$last_oldobj" ; then
5540 RANLIB=$save_RANLIB
5541 fi
5542 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5543 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5544 objlist=
38175545 fi
3818 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
3819 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3820 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
3821 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3822 fi
3823 done
3824
3825 eval cmds=\"$old_archive_cmds\"
5546 done
5547 RANLIB=$save_RANLIB
5548 oldobjs=$objlist
5549 if test "X$oldobjs" = "X" ; then
5550 eval cmds=\"\$concat_cmds\"
5551 else
5552 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5553 fi
5554 fi
38265555 fi
38275556 save_ifs="$IFS"; IFS='~'
38285557 for cmd in $cmds; do
5558 eval cmd=\"$cmd\"
38295559 IFS="$save_ifs"
38305560 $show "$cmd"
38315561 $run eval "$cmd" || exit $?
38575587 fi
38585588 done
38595589 # Quote the link command for shipping.
3860 relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
5590 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
38615591 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5592 if test "$hardcode_automatic" = yes ; then
5593 relink_command=
5594 fi
5595
38625596
38635597 # Only create the output if not a dry run.
38645598 if test -z "$run"; then
38745608 case $deplib in
38755609 *.la)
38765610 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3877 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5611 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
38785612 if test -z "$libdir"; then
38795613 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3880 exit 1
5614 exit $EXIT_FAILURE
38815615 fi
38825616 newdependency_libs="$newdependency_libs $libdir/$name"
38835617 ;;
38885622 newdlfiles=
38895623 for lib in $dlfiles; do
38905624 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3891 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5625 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
38925626 if test -z "$libdir"; then
38935627 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3894 exit 1
5628 exit $EXIT_FAILURE
38955629 fi
38965630 newdlfiles="$newdlfiles $libdir/$name"
38975631 done
38995633 newdlprefiles=
39005634 for lib in $dlprefiles; do
39015635 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3902 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5636 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
39035637 if test -z "$libdir"; then
39045638 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3905 exit 1
5639 exit $EXIT_FAILURE
39065640 fi
39075641 newdlprefiles="$newdlprefiles $libdir/$name"
39085642 done
39095643 dlprefiles="$newdlprefiles"
5644 else
5645 newdlfiles=
5646 for lib in $dlfiles; do
5647 case $lib in
5648 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5649 *) abs=`pwd`"/$lib" ;;
5650 esac
5651 newdlfiles="$newdlfiles $abs"
5652 done
5653 dlfiles="$newdlfiles"
5654 newdlprefiles=
5655 for lib in $dlprefiles; do
5656 case $lib in
5657 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5658 *) abs=`pwd`"/$lib" ;;
5659 esac
5660 newdlprefiles="$newdlprefiles $abs"
5661 done
5662 dlprefiles="$newdlprefiles"
39105663 fi
39115664 $rm $output
39125665 # place dlname in correct position for cygwin
39135666 tdlname=$dlname
39145667 case $host,$output,$installed,$module,$dlname in
3915 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5668 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
39165669 esac
39175670 $echo > $output "\
39185671 # $outputname - a libtool library file
39415694 # Is this an already installed library?
39425695 installed=$installed
39435696
5697 # Should we warn about portability when linking against -modules?
5698 shouldnotlink=$module
5699
39445700 # Files to dlopen/dlpreopen
39455701 dlopen='$dlfiles'
39465702 dlpreopen='$dlprefiles'
39475703
39485704 # Directory that this library needs to be installed in:
39495705 libdir='$install_libdir'"
3950 if test "$installed" = no && test $need_relink = yes; then
5706 if test "$installed" = no && test "$need_relink" = yes; then
39515707 $echo >> $output "\
39525708 relink_command=\"$relink_command\""
39535709 fi
39605716 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
39615717 ;;
39625718 esac
3963 exit 0
5719 exit $EXIT_SUCCESS
39645720 ;;
39655721
39665722 # libtool install mode
39715727 # install_prog (especially on Windows NT).
39725728 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
39735729 # Allow the use of GNU shtool's install command.
3974 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5730 $echo "X$nonopt" | grep shtool > /dev/null; then
39755731 # Aesthetically quote it.
39765732 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
39775733 case $arg in
3978 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5734 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
39795735 arg="\"$arg\""
39805736 ;;
39815737 esac
39845740 shift
39855741 else
39865742 install_prog=
3987 arg="$nonopt"
5743 arg=$nonopt
39885744 fi
39895745
39905746 # The real first argument should be the name of the installation program.
39915747 # Aesthetically quote it.
39925748 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
39935749 case $arg in
3994 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5750 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
39955751 arg="\"$arg\""
39965752 ;;
39975753 esac
40095765 do
40105766 if test -n "$dest"; then
40115767 files="$files $dest"
4012 dest="$arg"
5768 dest=$arg
40135769 continue
40145770 fi
40155771
40165772 case $arg in
40175773 -d) isdir=yes ;;
4018 -f) prev="-f" ;;
4019 -g) prev="-g" ;;
4020 -m) prev="-m" ;;
4021 -o) prev="-o" ;;
5774 -f)
5775 case " $install_prog " in
5776 *[\\\ /]cp\ *) ;;
5777 *) prev=$arg ;;
5778 esac
5779 ;;
5780 -g | -m | -o) prev=$arg ;;
40225781 -s)
40235782 stripme=" -s"
40245783 continue
40255784 ;;
4026 -*) ;;
4027
5785 -*)
5786 ;;
40285787 *)
40295788 # If the previous option needed an argument, then skip it.
40305789 if test -n "$prev"; then
40315790 prev=
40325791 else
4033 dest="$arg"
5792 dest=$arg
40345793 continue
40355794 fi
40365795 ;;
40395798 # Aesthetically quote the argument.
40405799 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
40415800 case $arg in
4042 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5801 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
40435802 arg="\"$arg\""
40445803 ;;
40455804 esac
40495808 if test -z "$install_prog"; then
40505809 $echo "$modename: you must specify an install program" 1>&2
40515810 $echo "$help" 1>&2
4052 exit 1
5811 exit $EXIT_FAILURE
40535812 fi
40545813
40555814 if test -n "$prev"; then
40565815 $echo "$modename: the \`$prev' option requires an argument" 1>&2
40575816 $echo "$help" 1>&2
4058 exit 1
5817 exit $EXIT_FAILURE
40595818 fi
40605819
40615820 if test -z "$files"; then
40655824 $echo "$modename: you must specify a destination" 1>&2
40665825 fi
40675826 $echo "$help" 1>&2
4068 exit 1
5827 exit $EXIT_FAILURE
40695828 fi
40705829
40715830 # Strip any trailing slash from the destination.
40835842
40845843 # Not a directory, so check to see that there is only one file specified.
40855844 set dummy $files
4086 if test $# -gt 2; then
5845 if test "$#" -gt 2; then
40875846 $echo "$modename: \`$dest' is not a directory" 1>&2
40885847 $echo "$help" 1>&2
4089 exit 1
5848 exit $EXIT_FAILURE
40905849 fi
40915850 fi
40925851 case $destdir in
40985857 *)
40995858 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
41005859 $echo "$help" 1>&2
4101 exit 1
5860 exit $EXIT_FAILURE
41025861 ;;
41035862 esac
41045863 done
41235882
41245883 *.la)
41255884 # Check to see that this really is a libtool archive.
4126 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5885 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
41275886 else
41285887 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
41295888 $echo "$help" 1>&2
4130 exit 1
5889 exit $EXIT_FAILURE
41315890 fi
41325891
41335892 library_names=
41585917 dir="$dir$objdir"
41595918
41605919 if test -n "$relink_command"; then
5920 # Determine the prefix the user has applied to our future dir.
5921 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5922
5923 # Don't allow the user to place us outside of our expected
5924 # location b/c this prevents finding dependent libraries that
5925 # are installed to the same prefix.
5926 # At present, this check doesn't affect windows .dll's that
5927 # are installed into $libdir/../bin (currently, that works fine)
5928 # but it's something to keep an eye on.
5929 if test "$inst_prefix_dir" = "$destdir"; then
5930 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5931 exit $EXIT_FAILURE
5932 fi
5933
5934 if test -n "$inst_prefix_dir"; then
5935 # Stick the inst_prefix_dir data into the link command.
5936 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5937 else
5938 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5939 fi
5940
41615941 $echo "$modename: warning: relinking \`$file'" 1>&2
41625942 $show "$relink_command"
41635943 if $run eval "$relink_command"; then :
41645944 else
41655945 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4166 continue
5946 exit $EXIT_FAILURE
41675947 fi
41685948 fi
41695949
41855965 $run eval "$striplib $destdir/$realname" || exit $?
41865966 fi
41875967
4188 if test $# -gt 0; then
5968 if test "$#" -gt 0; then
41895969 # Delete the old symlinks, and create new ones.
5970 # Try `ln -sf' first, because the `ln' binary might depend on
5971 # the symlink we replace! Solaris /bin/ln does not understand -f,
5972 # so we also need to try rm && ln -s.
41905973 for linkname
41915974 do
41925975 if test "$linkname" != "$realname"; then
4193 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4194 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5976 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5977 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
41955978 fi
41965979 done
41975980 fi
41985981
41995982 # Do each command in the postinstall commands.
42005983 lib="$destdir/$realname"
4201 eval cmds=\"$postinstall_cmds\"
5984 cmds=$postinstall_cmds
42025985 save_ifs="$IFS"; IFS='~'
42035986 for cmd in $cmds; do
42045987 IFS="$save_ifs"
5988 eval cmd=\"$cmd\"
42055989 $show "$cmd"
4206 $run eval "$cmd" || exit $?
5990 $run eval "$cmd" || {
5991 lt_exit=$?
5992
5993 # Restore the uninstalled library and exit
5994 if test "$mode" = relink; then
5995 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5996 fi
5997
5998 exit $lt_exit
5999 }
42076000 done
42086001 IFS="$save_ifs"
42096002 fi
42416034 *)
42426035 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
42436036 $echo "$help" 1>&2
4244 exit 1
6037 exit $EXIT_FAILURE
42456038 ;;
42466039 esac
42476040
42596052 $show "$install_prog $staticobj $staticdest"
42606053 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
42616054 fi
4262 exit 0
6055 exit $EXIT_SUCCESS
42636056 ;;
42646057
42656058 *)
42716064 destfile="$destdir/$destfile"
42726065 fi
42736066
6067 # If the file is missing, and there is a .exe on the end, strip it
6068 # because it is most likely a libtool script we actually want to
6069 # install
6070 stripped_ext=""
6071 case $file in
6072 *.exe)
6073 if test ! -f "$file"; then
6074 file=`$echo $file|${SED} 's,.exe$,,'`
6075 stripped_ext=".exe"
6076 fi
6077 ;;
6078 esac
6079
42746080 # Do a test to see if this is really a libtool program.
4275 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6081 case $host in
6082 *cygwin*|*mingw*)
6083 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6084 ;;
6085 *)
6086 wrapper=$file
6087 ;;
6088 esac
6089 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
42766090 notinst_deplibs=
42776091 relink_command=
42786092
6093 # Note that it is not necessary on cygwin/mingw to append a dot to
6094 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6095 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6096 # `FILE.' does not work on cygwin managed mounts.
6097 #
42796098 # If there is no directory component, then add one.
4280 case $file in
4281 */* | *\\*) . $file ;;
4282 *) . ./$file ;;
6099 case $wrapper in
6100 */* | *\\*) . ${wrapper} ;;
6101 *) . ./${wrapper} ;;
42836102 esac
42846103
42856104 # Check the variables that should have been set.
42866105 if test -z "$notinst_deplibs"; then
4287 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4288 exit 1
6106 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6107 exit $EXIT_FAILURE
42896108 fi
42906109
42916110 finalize=yes
43076126 done
43086127
43096128 relink_command=
6129 # Note that it is not necessary on cygwin/mingw to append a dot to
6130 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6131 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6132 # `FILE.' does not work on cygwin managed mounts.
6133 #
43106134 # If there is no directory component, then add one.
4311 case $file in
4312 */* | *\\*) . $file ;;
4313 *) . ./$file ;;
6135 case $wrapper in
6136 */* | *\\*) . ${wrapper} ;;
6137 *) . ./${wrapper} ;;
43146138 esac
43156139
43166140 outputname=
43176141 if test "$fast_install" = no && test -n "$relink_command"; then
43186142 if test "$finalize" = yes && test -z "$run"; then
4319 tmpdir="/tmp"
4320 test -n "$TMPDIR" && tmpdir="$TMPDIR"
4321 tmpdir="$tmpdir/libtool-$$"
4322 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4323 else
4324 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4325 continue
4326 fi
4327 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6143 tmpdir=`func_mktempdir`
6144 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
43286145 outputname="$tmpdir/$file"
43296146 # Replace the output file specification.
43306147 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
43426159 fi
43436160 else
43446161 # Install the binary that we compiled earlier.
4345 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6162 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
43466163 fi
43476164 fi
43486165
43496166 # remove .exe since cygwin /usr/bin/install will append another
4350 # one anyways
6167 # one anyway
43516168 case $install_prog,$host in
4352 /usr/bin/install*,*cygwin*)
6169 */usr/bin/install*,*cygwin*)
43536170 case $file:$destfile in
43546171 *.exe:*.exe)
43556172 # this is ok
43586175 destfile=$destfile.exe
43596176 ;;
43606177 *:*.exe)
4361 destfile=`echo $destfile | sed -e 's,.exe$,,'`
6178 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
43626179 ;;
43636180 esac
43646181 ;;
43796196 $show "$install_prog $file $oldlib"
43806197 $run eval "$install_prog \$file \$oldlib" || exit $?
43816198
4382 if test -n "$stripme" && test -n "$striplib"; then
6199 if test -n "$stripme" && test -n "$old_striplib"; then
43836200 $show "$old_striplib $oldlib"
43846201 $run eval "$old_striplib $oldlib" || exit $?
43856202 fi
43866203
43876204 # Do each command in the postinstall commands.
4388 eval cmds=\"$old_postinstall_cmds\"
6205 cmds=$old_postinstall_cmds
43896206 save_ifs="$IFS"; IFS='~'
43906207 for cmd in $cmds; do
43916208 IFS="$save_ifs"
6209 eval cmd=\"$cmd\"
43926210 $show "$cmd"
43936211 $run eval "$cmd" || exit $?
43946212 done
44026220 if test -n "$current_libdirs"; then
44036221 # Maybe just do a dry run.
44046222 test -n "$run" && current_libdirs=" -n$current_libdirs"
4405 exec_cmd='$SHELL $0 --finish$current_libdirs'
6223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
44066224 else
4407 exit 0
6225 exit $EXIT_SUCCESS
44086226 fi
44096227 ;;
44106228
44236241 for libdir in $libdirs; do
44246242 if test -n "$finish_cmds"; then
44256243 # Do each command in the finish commands.
4426 eval cmds=\"$finish_cmds\"
6244 cmds=$finish_cmds
44276245 save_ifs="$IFS"; IFS='~'
44286246 for cmd in $cmds; do
44296247 IFS="$save_ifs"
6248 eval cmd=\"$cmd\"
44306249 $show "$cmd"
44316250 $run eval "$cmd" || admincmds="$admincmds
44326251 $cmd"
44436262 fi
44446263
44456264 # Exit here if they wanted silent mode.
4446 test "$show" = ":" && exit 0
4447
4448 echo "----------------------------------------------------------------------"
4449 echo "Libraries have been installed in:"
6265 test "$show" = : && exit $EXIT_SUCCESS
6266
6267 $echo "X----------------------------------------------------------------------" | $Xsed
6268 $echo "Libraries have been installed in:"
44506269 for libdir in $libdirs; do
4451 echo " $libdir"
6270 $echo " $libdir"
44526271 done
4453 echo
4454 echo "If you ever happen to want to link against installed libraries"
4455 echo "in a given directory, LIBDIR, you must either use libtool, and"
4456 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4457 echo "flag during linking and do at least one of the following:"
6272 $echo
6273 $echo "If you ever happen to want to link against installed libraries"
6274 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6275 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6276 $echo "flag during linking and do at least one of the following:"
44586277 if test -n "$shlibpath_var"; then
4459 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4460 echo " during execution"
6278 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6279 $echo " during execution"
44616280 fi
44626281 if test -n "$runpath_var"; then
4463 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4464 echo " during linking"
6282 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6283 $echo " during linking"
44656284 fi
44666285 if test -n "$hardcode_libdir_flag_spec"; then
44676286 libdir=LIBDIR
44686287 eval flag=\"$hardcode_libdir_flag_spec\"
44696288
4470 echo " - use the \`$flag' linker flag"
6289 $echo " - use the \`$flag' linker flag"
44716290 fi
44726291 if test -n "$admincmds"; then
4473 echo " - have your system administrator run these commands:$admincmds"
6292 $echo " - have your system administrator run these commands:$admincmds"
44746293 fi
44756294 if test -f /etc/ld.so.conf; then
4476 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6295 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
44776296 fi
4478 echo
4479 echo "See any operating system documentation about shared libraries for"
4480 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4481 echo "----------------------------------------------------------------------"
4482 exit 0
6297 $echo
6298 $echo "See any operating system documentation about shared libraries for"
6299 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6300 $echo "X----------------------------------------------------------------------" | $Xsed
6301 exit $EXIT_SUCCESS
44836302 ;;
44846303
44856304 # libtool execute mode
44916310 if test -z "$cmd"; then
44926311 $echo "$modename: you must specify a COMMAND" 1>&2
44936312 $echo "$help"
4494 exit 1
6313 exit $EXIT_FAILURE
44956314 fi
44966315
44976316 # Handle -dlopen flags immediately.
44996318 if test ! -f "$file"; then
45006319 $echo "$modename: \`$file' is not a file" 1>&2
45016320 $echo "$help" 1>&2
4502 exit 1
6321 exit $EXIT_FAILURE
45036322 fi
45046323
45056324 dir=
45066325 case $file in
45076326 *.la)
45086327 # Check to see that this really is a libtool archive.
4509 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6328 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
45106329 else
45116330 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
45126331 $echo "$help" 1>&2
4513 exit 1
6332 exit $EXIT_FAILURE
45146333 fi
45156334
45166335 # Read the libtool library.
45376356 dir="$dir/$objdir"
45386357 else
45396358 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4540 exit 1
6359 exit $EXIT_FAILURE
45416360 fi
45426361 ;;
45436362
45776396 -*) ;;
45786397 *)
45796398 # Do a test to see if this is really a libtool program.
4580 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6399 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
45816400 # If there is no directory component, then add one.
45826401 case $file in
45836402 */* | *\\*) . $file ;;
46006419 eval "export $shlibpath_var"
46016420 fi
46026421
4603 # Restore saved enviroment variables
6422 # Restore saved environment variables
46046423 if test "${save_LC_ALL+set}" = set; then
46056424 LC_ALL="$save_LC_ALL"; export LC_ALL
46066425 fi
46096428 fi
46106429
46116430 # Now prepare to actually exec the command.
4612 exec_cmd='"$cmd"$args'
6431 exec_cmd="\$cmd$args"
46136432 else
46146433 # Display what would be done.
46156434 if test -n "$shlibpath_var"; then
46176436 $echo "export $shlibpath_var"
46186437 fi
46196438 $echo "$cmd$args"
4620 exit 0
6439 exit $EXIT_SUCCESS
46216440 fi
46226441 ;;
46236442
46456464 if test -z "$rm"; then
46466465 $echo "$modename: you must specify an RM program" 1>&2
46476466 $echo "$help" 1>&2
4648 exit 1
6467 exit $EXIT_FAILURE
46496468 fi
46506469
46516470 rmdirs=
46526471
6472 origobjdir="$objdir"
46536473 for file in $files; do
46546474 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
46556475 if test "X$dir" = "X$file"; then
46566476 dir=.
4657 objdir="$objdir"
6477 objdir="$origobjdir"
46586478 else
4659 objdir="$dir/$objdir"
6479 objdir="$dir/$origobjdir"
46606480 fi
46616481 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4662 test $mode = uninstall && objdir="$dir"
6482 test "$mode" = uninstall && objdir="$dir"
46636483
46646484 # Remember objdir for removal later, being careful to avoid duplicates
4665 if test $mode = clean; then
6485 if test "$mode" = clean; then
46666486 case " $rmdirs " in
46676487 *" $objdir "*) ;;
46686488 *) rmdirs="$rmdirs $objdir" ;;
46866506 case $name in
46876507 *.la)
46886508 # Possibly a libtool archive, so verify it.
4689 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6509 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
46906510 . $dir/$name
46916511
46926512 # Delete the libtool libraries and symlinks.
46946514 rmfiles="$rmfiles $objdir/$n"
46956515 done
46966516 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
4697 test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
4698
4699 if test $mode = uninstall; then
6517
6518 case "$mode" in
6519 clean)
6520 case " $library_names " in
6521 # " " in the beginning catches empty $dlname
6522 *" $dlname "*) ;;
6523 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6524 esac
6525 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6526 ;;
6527 uninstall)
47006528 if test -n "$library_names"; then
47016529 # Do each command in the postuninstall commands.
4702 eval cmds=\"$postuninstall_cmds\"
6530 cmds=$postuninstall_cmds
47036531 save_ifs="$IFS"; IFS='~'
47046532 for cmd in $cmds; do
47056533 IFS="$save_ifs"
6534 eval cmd=\"$cmd\"
47066535 $show "$cmd"
47076536 $run eval "$cmd"
4708 if test $? != 0 && test "$rmforce" != yes; then
6537 if test "$?" -ne 0 && test "$rmforce" != yes; then
47096538 exit_status=1
47106539 fi
47116540 done
47146543
47156544 if test -n "$old_library"; then
47166545 # Do each command in the old_postuninstall commands.
4717 eval cmds=\"$old_postuninstall_cmds\"
6546 cmds=$old_postuninstall_cmds
47186547 save_ifs="$IFS"; IFS='~'
47196548 for cmd in $cmds; do
47206549 IFS="$save_ifs"
6550 eval cmd=\"$cmd\"
47216551 $show "$cmd"
47226552 $run eval "$cmd"
4723 if test $? != 0 && test "$rmforce" != yes; then
6553 if test "$?" -ne 0 && test "$rmforce" != yes; then
47246554 exit_status=1
47256555 fi
47266556 done
47276557 IFS="$save_ifs"
47286558 fi
47296559 # FIXME: should reinstall the best remaining shared library.
4730 fi
6560 ;;
6561 esac
47316562 fi
47326563 ;;
47336564
47346565 *.lo)
4735 if test "$build_old_libs" = yes; then
4736 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
4737 rmfiles="$rmfiles $dir/$oldobj"
6566 # Possibly a libtool object, so verify it.
6567 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6568
6569 # Read the .lo file
6570 . $dir/$name
6571
6572 # Add PIC object to the list of files to remove.
6573 if test -n "$pic_object" \
6574 && test "$pic_object" != none; then
6575 rmfiles="$rmfiles $dir/$pic_object"
6576 fi
6577
6578 # Add non-PIC object to the list of files to remove.
6579 if test -n "$non_pic_object" \
6580 && test "$non_pic_object" != none; then
6581 rmfiles="$rmfiles $dir/$non_pic_object"
6582 fi
47386583 fi
47396584 ;;
47406585
47416586 *)
4742 # Do a test to see if this is a libtool program.
4743 if test $mode = clean &&
4744 (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4745 relink_command=
4746 . $dir/$file
4747
4748 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
4749 if test "$fast_install" = yes && test -n "$relink_command"; then
4750 rmfiles="$rmfiles $objdir/lt-$name"
6587 if test "$mode" = clean ; then
6588 noexename=$name
6589 case $file in
6590 *.exe)
6591 file=`$echo $file|${SED} 's,.exe$,,'`
6592 noexename=`$echo $name|${SED} 's,.exe$,,'`
6593 # $file with .exe has already been added to rmfiles,
6594 # add $file without .exe
6595 rmfiles="$rmfiles $file"
6596 ;;
6597 esac
6598 # Do a test to see if this is a libtool program.
6599 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6600 relink_command=
6601 . $dir/$noexename
6602
6603 # note $name still contains .exe if it was in $file originally
6604 # as does the version of $file that was added into $rmfiles
6605 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6606 if test "$fast_install" = yes && test -n "$relink_command"; then
6607 rmfiles="$rmfiles $objdir/lt-$name"
6608 fi
6609 if test "X$noexename" != "X$name" ; then
6610 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6611 fi
47516612 fi
47526613 fi
47536614 ;;
47556616 $show "$rm $rmfiles"
47566617 $run $rm $rmfiles || exit_status=1
47576618 done
6619 objdir="$origobjdir"
47586620
47596621 # Try to remove the ${objdir}s in the directories where we deleted files
47606622 for dir in $rmdirs; do
47706632 "")
47716633 $echo "$modename: you must specify a MODE" 1>&2
47726634 $echo "$generic_help" 1>&2
4773 exit 1
6635 exit $EXIT_FAILURE
47746636 ;;
47756637 esac
47766638
47776639 if test -z "$exec_cmd"; then
47786640 $echo "$modename: invalid operation mode \`$mode'" 1>&2
47796641 $echo "$generic_help" 1>&2
4780 exit 1
6642 exit $EXIT_FAILURE
47816643 fi
47826644 fi # test -z "$show_help"
47836645
47846646 if test -n "$exec_cmd"; then
47856647 eval exec $exec_cmd
4786 exit 1
6648 exit $EXIT_FAILURE
47876649 fi
47886650
47896651 # We need to display help for each of the modes.
48026664 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
48036665 --quiet same as \`--silent'
48046666 --silent don't print informational messages
6667 --tag=TAG use configuration variables from tag TAG
48056668 --version print version information
48066669
48076670 MODE must be one of the following:
48156678 uninstall remove libraries from an installed directory
48166679
48176680 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
4818 a more detailed description of MODE."
4819 exit 0
6681 a more detailed description of MODE.
6682
6683 Report bugs to <bug-libtool@gnu.org>."
6684 exit $EXIT_SUCCESS
48206685 ;;
48216686
48226687 clean)
49276792 -no-install link a not-installable executable
49286793 -no-undefined declare that a library does not refer to external symbols
49296794 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6795 -objectlist FILE Use a list of object files found in FILE to specify objects
6796 -precious-files-regex REGEX
6797 don't remove output files matching REGEX
49306798 -release RELEASE specify package release information
49316799 -rpath LIBDIR the created library will eventually be installed in LIBDIR
49326800 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
49686836 *)
49696837 $echo "$modename: invalid operation mode \`$mode'" 1>&2
49706838 $echo "$help" 1>&2
4971 exit 1
6839 exit $EXIT_FAILURE
49726840 ;;
49736841 esac
49746842
4975 echo
6843 $echo
49766844 $echo "Try \`$modename --help' for more information about other modes."
49776845
4978 exit 0
6846 exit $?
6847
6848 # The TAGs below are defined such that we never get into a situation
6849 # in which we disable both kinds of libraries. Given conflicting
6850 # choices, we go for a static library, that is the most portable,
6851 # since we can't tell whether shared libraries were disabled because
6852 # the user asked for that or because the platform doesn't support
6853 # them. This is particularly important on AIX, because we don't
6854 # support having both static and shared libraries enabled at the same
6855 # time on that platform, so we default to a shared-only configuration.
6856 # If a disable-shared tag is given, we'll fallback to a static-only
6857 # configuration. But we'll never go from static-only to shared-only.
6858
6859 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6860 disable_libs=shared
6861 # ### END LIBTOOL TAG CONFIG: disable-shared
6862
6863 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6864 disable_libs=static
6865 # ### END LIBTOOL TAG CONFIG: disable-static
49796866
49806867 # Local Variables:
49816868 # mode:shell-script