ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libspf/aclocal.m4
Revision: 1.2
Committed: Thu Oct 30 03:09:36 2008 UTC (15 years, 6 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1066 -605 lines
Log Message:
hell

File Contents

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