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