ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libspf/aclocal.m4
Revision: 1.1
Committed: Tue Nov 13 00:51:23 2007 UTC (16 years, 6 months ago) by root
Branch: MAIN
Log Message:
initial import of libspf-1.0.0-p5 from freebsd ports

File Contents

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