1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 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.
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
14 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16 # This file is free software; the Free Software Foundation
17 # gives unlimited permission to copy and/or distribute it,
18 # with or without modifications, as long as this notice is preserved.
20 # AM_AUTOMAKE_VERSION(VERSION)
21 # ----------------------------
22 # Automake X.Y traces this macro to ensure aclocal.m4 has been
23 # generated from the m4 files accompanying Automake X.Y.
24 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
26 # AM_SET_CURRENT_AUTOMAKE_VERSION
27 # -------------------------------
28 # Call AM_AUTOMAKE_VERSION so it can be traced.
29 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31 [AM_AUTOMAKE_VERSION([1.9.6])])
33 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
35 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37 # This file is free software; the Free Software Foundation
38 # gives unlimited permission to copy and/or distribute it,
39 # with or without modifications, as long as this notice is preserved.
41 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
43 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
45 # Of course, Automake must honor this variable whenever it calls a
46 # tool from the auxiliary directory. The problem is that $srcdir (and
47 # therefore $ac_aux_dir as well) can be either absolute or relative,
48 # depending on how configure is run. This is pretty annoying, since
49 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
50 # source directory, any form will work fine, but in subdirectories a
51 # relative path needs to be adjusted first.
54 # fails when called from a subdirectory if $ac_aux_dir is relative
55 # $top_srcdir/$ac_aux_dir/missing
56 # fails if $ac_aux_dir is absolute,
57 # fails when called from a subdirectory in a VPATH build with
58 # a relative $ac_aux_dir
60 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61 # are both prefixed by $srcdir. In an in-source build this is usually
62 # harmless because $srcdir is `.', but things will broke when you
63 # start a VPATH build or use an absolute $srcdir.
65 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
67 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68 # and then we would define $MISSING as
69 # MISSING="\${SHELL} $am_aux_dir/missing"
70 # This will work as long as MISSING is not called from configure, because
71 # unfortunately $(top_srcdir) has no meaning in configure.
72 # However there are other variables, like CC, which are often used in
73 # configure, and could therefore not use this "fixed" $ac_aux_dir.
75 # Another solution, used here, is to always expand $ac_aux_dir to an
76 # absolute PATH. The drawback is that using absolute paths prevent a
77 # configured tree to be moved without reconfiguration.
79 AC_DEFUN([AM_AUX_DIR_EXPAND],
80 [dnl Rely on autoconf to set up CDPATH properly.
82 # expand $ac_aux_dir to an absolute path
83 am_aux_dir=`cd $ac_aux_dir && pwd`
87 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
88 # Free Software Foundation, Inc.
90 # This file is free software; the Free Software Foundation
91 # gives unlimited permission to copy and/or distribute it,
92 # with or without modifications, as long as this notice is preserved.
96 # This was merged into AC_PROG_CC in Autoconf.
98 AU_DEFUN([AM_PROG_CC_STDC],
100 AC_DIAGNOSE([obsolete], [$0:
101 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
102 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
103 you adjust the code. You can also remove the above call to
104 AC_PROG_CC if you already called it elsewhere.])
105 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
107 AU_DEFUN([fp_PROG_CC_STDC])
109 # AM_CONDITIONAL -*- Autoconf -*-
111 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
112 # Free Software Foundation, Inc.
114 # This file is free software; the Free Software Foundation
115 # gives unlimited permission to copy and/or distribute it,
116 # with or without modifications, as long as this notice is preserved.
120 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
121 # -------------------------------------
122 # Define a conditional.
123 AC_DEFUN([AM_CONDITIONAL],
125 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
136 AC_CONFIG_COMMANDS_PRE(
137 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
138 AC_MSG_ERROR([[conditional "$1" was never defined.
139 Usually this means the macro was only invoked conditionally.]])
143 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
144 # Free Software Foundation, Inc.
146 # This file is free software; the Free Software Foundation
147 # gives unlimited permission to copy and/or distribute it,
148 # with or without modifications, as long as this notice is preserved.
152 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
153 # written in clear, in which case automake, when reading aclocal.m4,
154 # will think it sees a *use*, and therefore will trigger all it's
155 # C support machinery. Also note that it means that autoscan, seeing
156 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
159 # _AM_DEPENDENCIES(NAME)
160 # ----------------------
161 # See how the compiler implements dependency checking.
162 # NAME is "CC", "CXX", "GCJ", or "OBJC".
163 # We try a few techniques and use that to set a single cache variable.
165 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167 # dependency, and given that the user is not expected to run this macro,
168 # just rely on AC_PROG_CC.
169 AC_DEFUN([_AM_DEPENDENCIES],
170 [AC_REQUIRE([AM_SET_DEPDIR])dnl
171 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173 AC_REQUIRE([AM_DEP_TRACK])dnl
175 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
176 [$1], CXX, [depcc="$CXX" am_compiler_list=],
177 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
179 [depcc="$$1" am_compiler_list=])
181 AC_CACHE_CHECK([dependency style of $depcc],
182 [am_cv_$1_dependencies_compiler_type],
183 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
184 # We make a subdir and do the tests there. Otherwise we can end up
185 # making bogus files that we don't know about and never remove. For
186 # instance it was reported that on HP-UX the gcc test will end up
187 # making a dummy file named `D' -- because `-MD' means `put the output
190 # Copy depcomp to subdir because otherwise we won't find it if we're
191 # using a relative directory.
192 cp "$am_depcomp" conftest.dir
194 # We will build objects and dependencies in a subdirectory because
195 # it helps to detect inapplicable dependency modes. For instance
196 # both Tru64's cc and ICC support -MD to output dependencies as a
197 # side effect of compilation, but ICC will put the dependencies in
198 # the current directory while Tru64 will put them in the object
202 am_cv_$1_dependencies_compiler_type=none
203 if test "$am_compiler_list" = ""; then
204 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
206 for depmode in $am_compiler_list; do
207 # Setup a source with many dependencies, because some compilers
208 # like to wrap large dependency lists on column 80 (with \), and
209 # we should not choose a depcomp mode which is confused by this.
211 # We need to recreate these files for each test, as the compiler may
212 # overwrite some of them when testing with obscure command lines.
213 # This happens at least with the AIX C compiler.
215 for i in 1 2 3 4 5 6; do
216 echo '#include "conftst'$i'.h"' >> sub/conftest.c
217 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
218 # Solaris 8's {/usr,}/bin/sh.
219 touch sub/conftst$i.h
221 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
225 # after this tag, mechanisms are not by side-effect, so they'll
226 # only be used when explicitly requested
227 if test "x$enable_dependency_tracking" = xyes; then
235 # We check with `-c' and `-o' for the sake of the "dashmstdout"
236 # mode. It turns out that the SunPro C++ compiler does not properly
237 # handle `-M -o', and we need to detect this.
238 if depmode=$depmode \
239 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
240 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
241 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
242 >/dev/null 2>conftest.err &&
243 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
245 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246 # icc doesn't choke on unknown options, it will just issue warnings
247 # or remarks (even with -Werror). So we grep stderr for any message
248 # that says an option was ignored or not supported.
249 # When given -MP, icc 7.0 and 7.1 complain thusly:
250 # icc: Command line warning: ignoring option '-M'; no argument required
251 # The diagnosis changed in icc 8.0:
252 # icc: Command line remark: option '-MP' not supported
253 if (grep 'ignoring option' conftest.err ||
254 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
255 am_cv_$1_dependencies_compiler_type=$depmode
264 am_cv_$1_dependencies_compiler_type=none
267 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
268 AM_CONDITIONAL([am__fastdep$1], [
269 test "x$enable_dependency_tracking" != xno \
270 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
276 # Choose a directory name for dependency files.
277 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
278 AC_DEFUN([AM_SET_DEPDIR],
279 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
286 AC_DEFUN([AM_DEP_TRACK],
287 [AC_ARG_ENABLE(dependency-tracking,
288 [ --disable-dependency-tracking speeds up one-time build
289 --enable-dependency-tracking do not reject slow dependency extractors])
290 if test "x$enable_dependency_tracking" != xno; then
291 am_depcomp="$ac_aux_dir/depcomp"
294 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295 AC_SUBST([AMDEPBACKSLASH])
298 # Generate code to set up dependency tracking. -*- Autoconf -*-
300 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
301 # Free Software Foundation, Inc.
303 # This file is free software; the Free Software Foundation
304 # gives unlimited permission to copy and/or distribute it,
305 # with or without modifications, as long as this notice is preserved.
309 # _AM_OUTPUT_DEPENDENCY_COMMANDS
310 # ------------------------------
311 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
312 [for mf in $CONFIG_FILES; do
313 # Strip MF so we end up with the name of the file.
314 mf=`echo "$mf" | sed -e 's/:.*$//'`
315 # Check whether this is an Automake generated Makefile or not.
316 # We used to match only the files named `Makefile.in', but
317 # some people rename them; so instead we look at the file content.
318 # Grep'ing the first line is not enough: some people post-process
319 # each Makefile.in and add a new line on top of each file to say so.
320 # So let's grep whole file.
321 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
322 dirpart=`AS_DIRNAME("$mf")`
326 # Extract the definition of DEPDIR, am__include, and am__quote
327 # from the Makefile without running `make'.
328 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
329 test -z "$DEPDIR" && continue
330 am__include=`sed -n 's/^am__include = //p' < "$mf"`
331 test -z "am__include" && continue
332 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
333 # When using ansi2knr, U may be empty or an underscore; expand it
334 U=`sed -n 's/^U = //p' < "$mf"`
335 # Find all dependency output files, they are included files with
336 # $(DEPDIR) in their names. We invoke sed twice because it is the
337 # simplest approach to changing $(DEPDIR) to its actual value in the
339 for file in `sed -n "
340 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
341 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
342 # Make sure the directory exists.
343 test -f "$dirpart/$file" && continue
344 fdir=`AS_DIRNAME(["$file"])`
345 AS_MKDIR_P([$dirpart/$fdir])
346 # echo "creating $dirpart/$file"
347 echo '# dummy' > "$dirpart/$file"
350 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353 # AM_OUTPUT_DEPENDENCY_COMMANDS
354 # -----------------------------
355 # This macro should only be invoked once -- use via AC_REQUIRE.
357 # This code is only required when automatic dependency tracking
358 # is enabled. FIXME. This creates each `.P' file that we will
359 # need in order to bootstrap the dependency handling code.
360 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
361 [AC_CONFIG_COMMANDS([depfiles],
362 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
363 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
366 # Do all the work for Automake. -*- Autoconf -*-
368 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
369 # Free Software Foundation, Inc.
371 # This file is free software; the Free Software Foundation
372 # gives unlimited permission to copy and/or distribute it,
373 # with or without modifications, as long as this notice is preserved.
377 # This macro actually does too much. Some checks are only needed if
378 # your package does certain things. But this isn't really a big deal.
380 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
381 # AM_INIT_AUTOMAKE([OPTIONS])
382 # -----------------------------------------------
383 # The call with PACKAGE and VERSION arguments is the old style
384 # call (pre autoconf-2.50), which is being phased out. PACKAGE
385 # and VERSION should now be passed to AC_INIT and removed from
386 # the call to AM_INIT_AUTOMAKE.
387 # We support both call styles for the transition. After
388 # the next Automake release, Autoconf can make the AC_INIT
389 # arguments mandatory, and then we can depend on a new Autoconf
390 # release and drop the old call support.
391 AC_DEFUN([AM_INIT_AUTOMAKE],
392 [AC_PREREQ([2.58])dnl
393 dnl Autoconf wants to disallow AM_ names. We explicitly allow
394 dnl the ones we care about.
395 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
396 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
397 AC_REQUIRE([AC_PROG_INSTALL])dnl
398 # test to see if srcdir already configured
399 if test "`cd $srcdir && pwd`" != "`pwd`" &&
400 test -f $srcdir/config.status; then
401 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
404 # test whether we have cygpath
405 if test -z "$CYGPATH_W"; then
406 if (cygpath --version) >/dev/null 2>/dev/null; then
407 CYGPATH_W='cygpath -w'
412 AC_SUBST([CYGPATH_W])
414 # Define the identity of the package.
415 dnl Distinguish between old-style and new-style calls.
417 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
418 AC_SUBST([PACKAGE], [$1])dnl
419 AC_SUBST([VERSION], [$2])],
420 [_AM_SET_OPTIONS([$1])dnl
421 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
422 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
424 _AM_IF_OPTION([no-define],,
425 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
426 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
428 # Some tools Automake needs.
429 AC_REQUIRE([AM_SANITY_CHECK])dnl
430 AC_REQUIRE([AC_ARG_PROGRAM])dnl
431 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
432 AM_MISSING_PROG(AUTOCONF, autoconf)
433 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
434 AM_MISSING_PROG(AUTOHEADER, autoheader)
435 AM_MISSING_PROG(MAKEINFO, makeinfo)
437 AM_PROG_INSTALL_STRIP
438 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
439 # We need awk for the "check" target. The system "awk" is bad on
441 AC_REQUIRE([AC_PROG_AWK])dnl
442 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
443 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
444 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
445 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
446 [_AM_PROG_TAR([v7])])])
447 _AM_IF_OPTION([no-dependencies],,
448 [AC_PROVIDE_IFELSE([AC_PROG_CC],
449 [_AM_DEPENDENCIES(CC)],
450 [define([AC_PROG_CC],
451 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
452 AC_PROVIDE_IFELSE([AC_PROG_CXX],
453 [_AM_DEPENDENCIES(CXX)],
454 [define([AC_PROG_CXX],
455 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
460 # When config.status generates a header, we must update the stamp-h file.
461 # This file resides in the same directory as the config header
462 # that is generated. The stamp files are numbered to have different names.
464 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
465 # loop where config.status creates the headers, so we can generate
466 # our stamp files there.
467 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
468 [# Compute $1's index in $config_headers.
470 for _am_header in $config_headers :; do
475 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
478 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
480 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
482 # This file is free software; the Free Software Foundation
483 # gives unlimited permission to copy and/or distribute it,
484 # with or without modifications, as long as this notice is preserved.
488 # Define $install_sh.
489 AC_DEFUN([AM_PROG_INSTALL_SH],
490 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
491 install_sh=${install_sh-"$am_aux_dir/install-sh"}
492 AC_SUBST(install_sh)])
494 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
496 # This file is free software; the Free Software Foundation
497 # gives unlimited permission to copy and/or distribute it,
498 # with or without modifications, as long as this notice is preserved.
502 # Check whether the underlying file-system supports filenames
503 # with a leading dot. For instance MS-DOS doesn't.
504 AC_DEFUN([AM_SET_LEADING_DOT],
505 [rm -rf .tst 2>/dev/null
506 mkdir .tst 2>/dev/null
507 if test -d .tst; then
512 rmdir .tst 2>/dev/null
513 AC_SUBST([am__leading_dot])])
515 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
517 # serial 47 AC_PROG_LIBTOOL
520 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
521 # -----------------------------------------------------------
522 # If this macro is not defined by Autoconf, define it here.
523 m4_ifdef([AC_PROVIDE_IFELSE],
525 [m4_define([AC_PROVIDE_IFELSE],
526 [m4_ifdef([AC_PROVIDE_$1],
532 AC_DEFUN([AC_PROG_LIBTOOL],
533 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
534 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
535 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
536 AC_PROVIDE_IFELSE([AC_PROG_CXX],
538 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
540 dnl And a similar setup for Fortran 77 support
541 AC_PROVIDE_IFELSE([AC_PROG_F77],
543 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
546 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
547 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
548 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
549 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
551 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
553 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
555 [ifdef([AC_PROG_GCJ],
556 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
557 ifdef([A][M_PROG_GCJ],
558 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
559 ifdef([LT_AC_PROG_GCJ],
560 [define([LT_AC_PROG_GCJ],
561 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
562 ])])# AC_PROG_LIBTOOL
567 AC_DEFUN([_AC_PROG_LIBTOOL],
568 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
569 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
570 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
571 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
573 # This can be used to rebuild libtool when needed
574 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
576 # Always use our own libtool.
577 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
580 # Prevent multiple expansion
581 define([AC_PROG_LIBTOOL], [])
587 AC_DEFUN([AC_LIBTOOL_SETUP],
589 AC_REQUIRE([AC_ENABLE_SHARED])dnl
590 AC_REQUIRE([AC_ENABLE_STATIC])dnl
591 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
592 AC_REQUIRE([AC_CANONICAL_HOST])dnl
593 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
594 AC_REQUIRE([AC_PROG_CC])dnl
595 AC_REQUIRE([AC_PROG_LD])dnl
596 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
597 AC_REQUIRE([AC_PROG_NM])dnl
599 AC_REQUIRE([AC_PROG_LN_S])dnl
600 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
601 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
602 AC_REQUIRE([AC_OBJEXT])dnl
603 AC_REQUIRE([AC_EXEEXT])dnl
606 AC_LIBTOOL_SYS_MAX_CMD_LEN
607 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
610 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
611 _LT_AC_PROG_ECHO_BACKSLASH
615 # AIX sometimes has problems with the GCC collect2 program. For some
616 # reason, if we set the COLLECT_NAMES environment variable, the problems
617 # vanish in a puff of smoke.
618 if test "X${COLLECT_NAMES+set}" != Xset; then
625 # Sed substitution that helps us do robust quoting. It backslashifies
626 # metacharacters that are still active within double-quoted strings.
627 Xsed='sed -e 1s/^X//'
628 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
630 # Same as above, but do not quote variable references.
631 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
633 # Sed substitution to delay expansion of an escaped shell variable in a
634 # double_quote_subst'ed string.
635 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
637 # Sed substitution to avoid accidental globbing in evaled expressions
638 no_glob_subst='s/\*/\\\*/g'
644 default_ofile=libtool
647 # All known linkers require a `.a' archive for static linking (except M$VC,
648 # which needs '.lib').
650 ltmain="$ac_aux_dir/ltmain.sh"
651 ofile="$default_ofile"
652 with_gnu_ld="$lt_cv_prog_gnu_ld"
654 AC_CHECK_TOOL(AR, ar, false)
655 AC_CHECK_TOOL(RANLIB, ranlib, :)
656 AC_CHECK_TOOL(STRIP, strip, :)
661 # Set sane defaults for various variables
662 test -z "$AR" && AR=ar
663 test -z "$AR_FLAGS" && AR_FLAGS=cru
664 test -z "$AS" && AS=as
665 test -z "$CC" && CC=cc
666 test -z "$LTCC" && LTCC=$CC
667 test -z "$DLLTOOL" && DLLTOOL=dlltool
668 test -z "$LD" && LD=ld
669 test -z "$LN_S" && LN_S="ln -s"
670 test -z "$MAGIC_CMD" && MAGIC_CMD=file
671 test -z "$NM" && NM=nm
672 test -z "$SED" && SED=sed
673 test -z "$OBJDUMP" && OBJDUMP=objdump
674 test -z "$RANLIB" && RANLIB=:
675 test -z "$STRIP" && STRIP=:
676 test -z "$ac_objext" && ac_objext=o
678 # Determine commands to create old-style static archives.
679 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
680 old_postinstall_cmds='chmod 644 $oldlib'
681 old_postuninstall_cmds=
683 if test -n "$RANLIB"; then
686 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
689 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
692 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
695 _LT_CC_BASENAME([$compiler])
697 # Only perform the check for file, if the check method requires it
698 case $deplibs_check_method in
700 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
706 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
707 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
708 enable_win32_dll=yes, enable_win32_dll=no)
710 AC_ARG_ENABLE([libtool-lock],
711 [AC_HELP_STRING([--disable-libtool-lock],
712 [avoid locking (might break parallel builds)])])
713 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
716 [AC_HELP_STRING([--with-pic],
717 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
718 [pic_mode="$withval"],
720 test -z "$pic_mode" && pic_mode=default
722 # Use C for the default configuration in the libtool script
724 AC_LIBTOOL_LANG_C_CONFIG
729 # _LT_AC_SYS_COMPILER
730 # -------------------
731 AC_DEFUN([_LT_AC_SYS_COMPILER],
732 [AC_REQUIRE([AC_PROG_CC])dnl
734 # If no C compiler was specified, use CC.
737 # Allow CC to be a program name with arguments.
739 ])# _LT_AC_SYS_COMPILER
742 # _LT_CC_BASENAME(CC)
743 # -------------------
744 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
745 AC_DEFUN([_LT_CC_BASENAME],
746 [for cc_temp in $1""; do
748 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
749 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
754 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
758 # _LT_COMPILER_BOILERPLATE
759 # ------------------------
760 # Check for compiler boilerplate output or warnings with
761 # the simple compiler test code.
762 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
763 [ac_outfile=conftest.$ac_objext
764 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
765 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
766 _lt_compiler_boilerplate=`cat conftest.err`
768 ])# _LT_COMPILER_BOILERPLATE
771 # _LT_LINKER_BOILERPLATE
772 # ----------------------
773 # Check for linker boilerplate output or warnings with
774 # the simple link test code.
775 AC_DEFUN([_LT_LINKER_BOILERPLATE],
776 [ac_outfile=conftest.$ac_objext
777 printf "$lt_simple_link_test_code" >conftest.$ac_ext
778 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
779 _lt_linker_boilerplate=`cat conftest.err`
781 ])# _LT_LINKER_BOILERPLATE
784 # _LT_AC_SYS_LIBPATH_AIX
785 # ----------------------
786 # Links a minimal program and checks the executable
787 # for the system default hardcoded library path. In most cases,
788 # this is /usr/lib:/lib, but when the MPI compilers are used
789 # the location of the communication and MPI libs are included too.
790 # If we don't find anything, use the default library path according
791 # to the aix ld manual.
792 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
793 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
794 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
796 # Check for a 64-bit object if we didn't find anything.
797 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; }
799 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
800 ])# _LT_AC_SYS_LIBPATH_AIX
803 # _LT_AC_SHELL_INIT(ARG)
804 # ----------------------
805 AC_DEFUN([_LT_AC_SHELL_INIT],
806 [ifdef([AC_DIVERSION_NOTICE],
807 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
808 [AC_DIVERT_PUSH(NOTICE)])
811 ])# _LT_AC_SHELL_INIT
814 # _LT_AC_PROG_ECHO_BACKSLASH
815 # --------------------------
816 # Add some code to the start of the generated configure script which
817 # will find an echo command which doesn't interpret backslashes.
818 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
820 # Check that we are running under the correct shell.
821 SHELL=${CONFIG_SHELL-/bin/sh}
825 # Remove one level of quotation (which was required for Make).
826 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
831 if test "X[$]1" = X--no-reexec; then
832 # Discard the --no-reexec flag, and continue.
834 elif test "X[$]1" = X--fallback-echo; then
835 # Avoid inline document here, it may be left over
837 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
838 # Yippee, $echo works!
841 # Restart under the correct shell.
842 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
845 if test "X[$]1" = X--fallback-echo; then
846 # used as fallback echo
854 # The HP-UX ksh and POSIX shell print the target directory to stdout
856 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
858 if test -z "$ECHO"; then
859 if test "X${echo_test_string+set}" != Xset; then
860 # find a string as large as possible, as long as the shell can cope with it
861 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
862 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
863 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
864 echo_test_string="`eval $cmd`" &&
865 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
872 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
873 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
874 test "X$echo_testing_string" = "X$echo_test_string"; then
877 # The Solaris, AIX, and Digital Unix default echo programs unquote
878 # backslashes. This makes it impossible to quote backslashes using
879 # echo "$something" | sed 's/\\/\\\\/g'
881 # So, first we look for a working echo in the user's PATH.
883 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
884 for dir in $PATH /usr/ucb; do
886 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
887 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
888 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
889 test "X$echo_testing_string" = "X$echo_test_string"; then
896 if test "X$echo" = Xecho; then
897 # We didn't find a better echo, so look for alternatives.
898 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
899 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
900 test "X$echo_testing_string" = "X$echo_test_string"; then
901 # This shell has a builtin print -r that does the trick.
903 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
904 test "X$CONFIG_SHELL" != X/bin/ksh; then
905 # If we have ksh, try running configure again with it.
906 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
907 export ORIGINAL_CONFIG_SHELL
908 CONFIG_SHELL=/bin/ksh
910 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
914 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
915 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
916 test "X$echo_testing_string" = "X$echo_test_string"; then
919 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
920 test "X$echo_testing_string" = 'X\t' &&
921 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
922 test "X$echo_testing_string" = "X$echo_test_string"; then
923 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
925 SHELL="$CONFIG_SHELL"
927 echo="$CONFIG_SHELL [$]0 --fallback-echo"
928 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
929 test "X$echo_testing_string" = 'X\t' &&
930 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
931 test "X$echo_testing_string" = "X$echo_test_string"; then
932 echo="$CONFIG_SHELL [$]0 --fallback-echo"
934 # maybe with a smaller string...
937 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
938 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
945 if test "$prev" != 'sed 50q "[$]0"'; then
946 echo_test_string=`eval $prev`
947 export echo_test_string
948 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
950 # Oops. We lost completely, so just stick with echo.
959 # Copy echo and quote the copy suitably for passing to libtool from
960 # the Makefile, instead of quoting the original, which is used later.
962 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
963 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
967 ])])# _LT_AC_PROG_ECHO_BACKSLASH
972 AC_DEFUN([_LT_AC_LOCK],
973 [AC_ARG_ENABLE([libtool-lock],
974 [AC_HELP_STRING([--disable-libtool-lock],
975 [avoid locking (might break parallel builds)])])
976 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
978 # Some flags need to be propagated to the compiler or linker for good
982 # Find out which ABI we are using.
983 echo 'int i;' > conftest.$ac_ext
984 if AC_TRY_EVAL(ac_compile); then
985 case `/usr/bin/file conftest.$ac_objext` in
997 # Find out which ABI we are using.
998 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
999 if AC_TRY_EVAL(ac_compile); then
1000 if test "$lt_cv_prog_gnu_ld" = yes; then
1001 case `/usr/bin/file conftest.$ac_objext` in
1003 LD="${LD-ld} -melf32bsmip"
1006 LD="${LD-ld} -melf32bmipn32"
1009 LD="${LD-ld} -melf64bmip"
1013 case `/usr/bin/file conftest.$ac_objext` in
1029 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1030 # Find out which ABI we are using.
1031 echo 'int i;' > conftest.$ac_ext
1032 if AC_TRY_EVAL(ac_compile); then
1033 case "`/usr/bin/file conftest.o`" in
1037 LD="${LD-ld} -m elf_i386"
1039 ppc64-*linux*|powerpc64-*linux*)
1040 LD="${LD-ld} -m elf32ppclinux"
1043 LD="${LD-ld} -m elf_s390"
1046 LD="${LD-ld} -m elf32_sparc"
1053 LD="${LD-ld} -m elf_x86_64"
1055 ppc*-*linux*|powerpc*-*linux*)
1056 LD="${LD-ld} -m elf64ppc"
1059 LD="${LD-ld} -m elf64_s390"
1062 LD="${LD-ld} -m elf64_sparc"
1072 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1073 SAVE_CFLAGS="$CFLAGS"
1074 CFLAGS="$CFLAGS -belf"
1075 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1077 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1079 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1080 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1081 CFLAGS="$SAVE_CFLAGS"
1084 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1085 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1086 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1087 AC_CHECK_TOOL(AS, as, false)
1088 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1093 need_locks="$enable_libtool_lock"
1098 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1099 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1100 # ----------------------------------------------------------------
1101 # Check whether the given compiler option works
1102 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1103 [AC_REQUIRE([LT_AC_PROG_SED])
1104 AC_CACHE_CHECK([$1], [$2],
1106 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1107 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1108 lt_compiler_flag="$3"
1109 # Insert the option either (1) after the last *FLAGS variable, or
1110 # (2) before a word containing "conftest.", or (3) at the end.
1111 # Note that $ac_compile itself does not contain backslashes and begins
1112 # with a dollar sign (not a hyphen), so the echo should work correctly.
1113 # The option is referenced via a variable to avoid confusing sed.
1114 lt_compile=`echo "$ac_compile" | $SED \
1115 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1116 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1117 -e 's:$: $lt_compiler_flag:'`
1118 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1119 (eval "$lt_compile" 2>conftest.err)
1121 cat conftest.err >&AS_MESSAGE_LOG_FD
1122 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1123 if (exit $ac_status) && test -s "$ac_outfile"; then
1124 # The compiler can only warn and ignore the option if not recognized
1125 # So say no if there are warnings other than the usual output.
1126 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1127 $SED '/^$/d' conftest.err >conftest.er2
1128 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1135 if test x"[$]$2" = xyes; then
1136 ifelse([$5], , :, [$5])
1138 ifelse([$6], , :, [$6])
1140 ])# AC_LIBTOOL_COMPILER_OPTION
1143 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1144 # [ACTION-SUCCESS], [ACTION-FAILURE])
1145 # ------------------------------------------------------------
1146 # Check whether the given compiler option works
1147 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1148 [AC_CACHE_CHECK([$1], [$2],
1150 save_LDFLAGS="$LDFLAGS"
1151 LDFLAGS="$LDFLAGS $3"
1152 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1153 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1154 # The compiler can only warn and ignore the option if not recognized
1155 # So say no if there are warnings
1156 if test -s conftest.err; then
1157 # Append any errors to the config.log.
1158 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1159 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1160 $SED '/^$/d' conftest.err >conftest.er2
1161 if diff conftest.exp conftest.er2 >/dev/null; then
1169 LDFLAGS="$save_LDFLAGS"
1172 if test x"[$]$2" = xyes; then
1173 ifelse([$4], , :, [$4])
1175 ifelse([$5], , :, [$5])
1177 ])# AC_LIBTOOL_LINKER_OPTION
1180 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1181 # --------------------------
1182 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1183 [# find the maximum length of command line arguments
1184 AC_MSG_CHECKING([the maximum length of command line arguments])
1185 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1191 # On DJGPP, this test can blow up pretty badly due to problems in libc
1192 # (any single argument exceeding 2000 bytes causes a buffer overrun
1193 # during glob expansion). Even if it were fixed, the result of this
1194 # check would be larger than it should be.
1195 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1199 # Under GNU Hurd, this test is not required because there is
1200 # no limit to the length of command line arguments.
1201 # Libtool will interpret -1 as no limit whatsoever
1202 lt_cv_sys_max_cmd_len=-1;
1206 # On Win9x/ME, this test blows up -- it succeeds, but takes
1207 # about 5 minutes as the teststring grows exponentially.
1208 # Worse, since 9x/ME are not pre-emptively multitasking,
1209 # you end up with a "frozen" computer, even though with patience
1210 # the test eventually succeeds (with a max line length of 256k).
1211 # Instead, let's just punt: use the minimum linelength reported by
1212 # all of the supported platforms: 8192 (on NT/2K/XP).
1213 lt_cv_sys_max_cmd_len=8192;
1217 # On AmigaOS with pdksh, this test takes hours, literally.
1218 # So we just punt and use a minimum line length of 8192.
1219 lt_cv_sys_max_cmd_len=8192;
1222 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1223 # This has been around since 386BSD, at least. Likely further.
1224 if test -x /sbin/sysctl; then
1225 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1226 elif test -x /usr/sbin/sysctl; then
1227 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1229 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
1231 # And add a safety zone
1232 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1233 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1236 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1237 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1238 # nice to cause kernel panics so lets avoid the loop below.
1239 # First set a reasonable default.
1240 lt_cv_sys_max_cmd_len=16384
1242 if test -x /sbin/sysconfig; then
1243 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1244 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1249 # If test is not a shell built-in, we'll probably end up computing a
1250 # maximum length that is only half of the actual maximum length, but
1252 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1253 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1254 = "XX$teststring") >/dev/null 2>&1 &&
1255 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1256 lt_cv_sys_max_cmd_len=$new_result &&
1257 test $i != 17 # 1/2 MB should be enough
1260 teststring=$teststring$teststring
1263 # Add a significant safety factor because C++ compilers can tack on massive
1264 # amounts of additional arguments before passing them to the linker.
1265 # It appears as though 1/2 is a usable value.
1266 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1270 if test -n $lt_cv_sys_max_cmd_len ; then
1271 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1275 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1278 # _LT_AC_CHECK_DLFCN
1279 # --------------------
1280 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1281 [AC_CHECK_HEADERS(dlfcn.h)dnl
1282 ])# _LT_AC_CHECK_DLFCN
1285 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1286 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1287 # ------------------------------------------------------------------
1288 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1289 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1290 if test "$cross_compiling" = yes; then :
1293 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1294 lt_status=$lt_dlunknown
1295 cat > conftest.$ac_ext <<EOF
1296 [#line __oline__ "configure"
1297 #include "confdefs.h"
1306 # define LT_DLGLOBAL RTLD_GLOBAL
1309 # define LT_DLGLOBAL DL_GLOBAL
1311 # define LT_DLGLOBAL 0
1315 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1316 find out it does not work in some platform. */
1317 #ifndef LT_DLLAZY_OR_NOW
1319 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1322 # define LT_DLLAZY_OR_NOW DL_LAZY
1325 # define LT_DLLAZY_OR_NOW RTLD_NOW
1328 # define LT_DLLAZY_OR_NOW DL_NOW
1330 # define LT_DLLAZY_OR_NOW 0
1338 extern "C" void exit (int);
1341 void fnord() { int i=42;}
1344 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1345 int status = $lt_dlunknown;
1349 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1350 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1351 /* dlclose (self); */
1357 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1358 (./conftest; exit; ) 2>/dev/null
1361 x$lt_dlno_uscore) $1 ;;
1362 x$lt_dlneed_uscore) $2 ;;
1363 x$lt_unknown|x*) $3 ;;
1366 # compilation failed
1371 ])# _LT_AC_TRY_DLOPEN_SELF
1374 # AC_LIBTOOL_DLOPEN_SELF
1375 # -------------------
1376 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1377 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1378 if test "x$enable_dlopen" != xyes; then
1379 enable_dlopen=unknown
1380 enable_dlopen_self=unknown
1381 enable_dlopen_self_static=unknown
1388 lt_cv_dlopen="load_add_on"
1390 lt_cv_dlopen_self=yes
1394 lt_cv_dlopen="LoadLibrary"
1399 lt_cv_dlopen="dlopen"
1404 # if libdl is installed we need to link against it
1405 AC_CHECK_LIB([dl], [dlopen],
1406 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1409 lt_cv_dlopen_self=yes
1414 AC_CHECK_FUNC([shl_load],
1415 [lt_cv_dlopen="shl_load"],
1416 [AC_CHECK_LIB([dld], [shl_load],
1417 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1418 [AC_CHECK_FUNC([dlopen],
1419 [lt_cv_dlopen="dlopen"],
1420 [AC_CHECK_LIB([dl], [dlopen],
1421 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1422 [AC_CHECK_LIB([svld], [dlopen],
1423 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1424 [AC_CHECK_LIB([dld], [dld_link],
1425 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1434 if test "x$lt_cv_dlopen" != xno; then
1440 case $lt_cv_dlopen in
1442 save_CPPFLAGS="$CPPFLAGS"
1443 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1445 save_LDFLAGS="$LDFLAGS"
1446 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1449 LIBS="$lt_cv_dlopen_libs $LIBS"
1451 AC_CACHE_CHECK([whether a program can dlopen itself],
1452 lt_cv_dlopen_self, [dnl
1453 _LT_AC_TRY_DLOPEN_SELF(
1454 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1455 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1458 if test "x$lt_cv_dlopen_self" = xyes; then
1459 LDFLAGS="$LDFLAGS $link_static_flag"
1460 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1461 lt_cv_dlopen_self_static, [dnl
1462 _LT_AC_TRY_DLOPEN_SELF(
1463 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1464 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1468 CPPFLAGS="$save_CPPFLAGS"
1469 LDFLAGS="$save_LDFLAGS"
1474 case $lt_cv_dlopen_self in
1475 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1476 *) enable_dlopen_self=unknown ;;
1479 case $lt_cv_dlopen_self_static in
1480 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1481 *) enable_dlopen_self_static=unknown ;;
1484 ])# AC_LIBTOOL_DLOPEN_SELF
1487 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1488 # ---------------------------------
1489 # Check to see if options -c and -o are simultaneously supported by compiler
1490 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1491 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1492 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1493 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1494 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1495 $rm -r conftest 2>/dev/null
1499 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1501 lt_compiler_flag="-o out/conftest2.$ac_objext"
1502 # Insert the option either (1) after the last *FLAGS variable, or
1503 # (2) before a word containing "conftest.", or (3) at the end.
1504 # Note that $ac_compile itself does not contain backslashes and begins
1505 # with a dollar sign (not a hyphen), so the echo should work correctly.
1506 lt_compile=`echo "$ac_compile" | $SED \
1507 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1508 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1509 -e 's:$: $lt_compiler_flag:'`
1510 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1511 (eval "$lt_compile" 2>out/conftest.err)
1513 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1514 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1515 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1517 # The compiler can only warn and ignore the option if not recognized
1518 # So say no if there are warnings
1519 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1520 $SED '/^$/d' out/conftest.err >out/conftest.er2
1521 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1522 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1527 # SGI C++ compiler will create directory out/ii_files/ for
1528 # template instantiation
1529 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1530 $rm out/* && rmdir out
1535 ])# AC_LIBTOOL_PROG_CC_C_O
1538 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1539 # -----------------------------------------
1540 # Check to see if we can do hard links to lock some files if needed
1541 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1542 [AC_REQUIRE([_LT_AC_LOCK])dnl
1544 hard_links="nottested"
1545 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1546 # do not overwrite the value of need_locks provided by the user
1547 AC_MSG_CHECKING([if we can lock with hard links])
1550 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1552 ln conftest.a conftest.b 2>&5 || hard_links=no
1553 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1554 AC_MSG_RESULT([$hard_links])
1555 if test "$hard_links" = no; then
1556 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1562 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1567 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1568 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1569 [rm -f .libs 2>/dev/null
1570 mkdir .libs 2>/dev/null
1571 if test -d .libs; then
1574 # MS-DOS does not allow filenames that begin with a dot.
1577 rmdir .libs 2>/dev/null])
1578 objdir=$lt_cv_objdir
1579 ])# AC_LIBTOOL_OBJDIR
1582 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1583 # ----------------------------------------------
1584 # Check hardcoding attributes.
1585 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1586 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1587 _LT_AC_TAGVAR(hardcode_action, $1)=
1588 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1589 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1590 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1592 # We can hardcode non-existant directories.
1593 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1594 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1595 # have to relink, otherwise we might link with an installed library
1596 # when we should be linking with a yet-to-be-installed one
1597 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1598 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1599 # Linking always hardcodes the temporary library directory.
1600 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1602 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1603 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1606 # We cannot hardcode anything, or else we can only hardcode existing
1608 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1610 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1612 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1613 # Fast installation is not supported
1614 enable_fast_install=no
1615 elif test "$shlibpath_overrides_runpath" = yes ||
1616 test "$enable_shared" = no; then
1617 # Fast installation is not necessary
1618 enable_fast_install=needless
1620 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1623 # AC_LIBTOOL_SYS_LIB_STRIP
1624 # ------------------------
1625 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1628 AC_MSG_CHECKING([whether stripping libraries is possible])
1629 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1630 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1631 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1632 AC_MSG_RESULT([yes])
1634 # FIXME - insert some real tests, host_os isn't really good enough
1637 if test -n "$STRIP" ; then
1638 striplib="$STRIP -x"
1639 AC_MSG_RESULT([yes])
1649 ])# AC_LIBTOOL_SYS_LIB_STRIP
1652 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1653 # -----------------------------
1654 # PORTME Fill in your ld.so characteristics
1655 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1656 [AC_MSG_CHECKING([dynamic linker characteristics])
1658 libname_spec='lib$name'
1666 shlibpath_overrides_runpath=unknown
1668 dynamic_linker="$host_os ld.so"
1669 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1670 if test "$GCC" = yes; then
1671 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1672 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1673 # if the path contains ";" then we assume it to be the separator
1674 # otherwise default to the standard path separator (i.e. ":") - it is
1675 # assumed that no part of a normal pathname contains ";" but that should
1676 # okay in the real world where ";" in dirpaths is itself problematic.
1677 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1679 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1682 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1684 need_lib_prefix=unknown
1685 hardcode_into_libs=no
1687 # when you set need_version to no, make sure it does not cause -set_version
1688 # flags to be left without arguments
1689 need_version=unknown
1694 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1695 shlibpath_var=LIBPATH
1697 # AIX 3 has no versioning support, so we append a major version to the name.
1698 soname_spec='${libname}${release}${shared_ext}$major'
1705 hardcode_into_libs=yes
1706 if test "$host_cpu" = ia64; then
1707 # AIX 5 supports IA64
1708 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1709 shlibpath_var=LD_LIBRARY_PATH
1711 # With GCC up to 2.95.x, collect2 would create an import file
1712 # for dependence libraries. The import file would start with
1713 # the line `#! .'. This would cause the generated library to
1714 # depend on `.', always an invalid library. This was fixed in
1715 # development snapshots of GCC prior to 3.0.
1717 aix4 | aix4.[[01]] | aix4.[[01]].*)
1718 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1720 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1727 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1728 # soname into executable. Probably we can add versioning support to
1729 # collect2, so additional links can be useful in future.
1730 if test "$aix_use_runtimelinking" = yes; then
1731 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1732 # instead of lib<name>.a to let people know that these are not
1733 # typical AIX shared libraries.
1734 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1736 # We preserve .a as extension for shared libraries through AIX4.2
1737 # and later when we are not doing run time linking.
1738 library_names_spec='${libname}${release}.a $libname.a'
1739 soname_spec='${libname}${release}${shared_ext}$major'
1741 shlibpath_var=LIBPATH
1746 library_names_spec='$libname.ixlibrary $libname.a'
1747 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1748 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'
1752 library_names_spec='${libname}${shared_ext}'
1753 dynamic_linker="$host_os ld.so"
1754 shlibpath_var=LIBRARY_PATH
1760 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1761 soname_spec='${libname}${release}${shared_ext}$major'
1762 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1763 shlibpath_var=LD_LIBRARY_PATH
1764 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1765 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1766 # the default ld.so.conf also contains /usr/contrib/lib and
1767 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1768 # libtool to hard-code these into programs
1771 cygwin* | mingw* | pw32*)
1772 version_type=windows
1777 case $GCC,$host_os in
1778 yes,cygwin* | yes,mingw* | yes,pw32*)
1779 library_names_spec='$libname.dll.a'
1780 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1781 postinstall_cmds='base_file=`basename \${file}`~
1782 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1783 dldir=$destdir/`dirname \$dlpath`~
1784 test -d \$dldir || mkdir -p \$dldir~
1785 $install_prog $dir/$dlname \$dldir/$dlname'
1786 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1787 dlpath=$dir/\$dldll~
1789 shlibpath_overrides_runpath=yes
1793 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1794 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1795 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1798 # MinGW DLLs use traditional 'lib' prefix
1799 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1800 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1801 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1802 # It is most probably a Windows format PATH printed by
1803 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1804 # path with ; separators, and with drive letters. We can handle the
1805 # drive letters (cygwin fileutils understands them), so leave them,
1806 # especially as we might pass files found there to a mingw objdump,
1807 # which wouldn't understand a cygwinified path. Ahh.
1808 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1810 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1814 # pw32 DLLs use 'pw' prefix rather than 'lib'
1815 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1821 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1824 dynamic_linker='Win32 ld.exe'
1825 # FIXME: first we should search . and the directory the executable is in
1829 darwin* | rhapsody*)
1830 dynamic_linker="$host_os dyld"
1834 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1835 soname_spec='${libname}${release}${major}$shared_ext'
1836 shlibpath_overrides_runpath=yes
1837 shlibpath_var=DYLD_LIBRARY_PATH
1838 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1839 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1840 if test "$GCC" = yes; then
1841 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"`
1843 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1845 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1853 soname_spec='${libname}${release}${shared_ext}$major'
1854 shlibpath_var=LD_LIBRARY_PATH
1865 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1866 soname_spec='${libname}${release}${shared_ext}$major'
1867 shlibpath_var=LD_LIBRARY_PATH
1868 shlibpath_overrides_runpath=no
1869 hardcode_into_libs=yes
1870 dynamic_linker='GNU ld.so'
1873 freebsd* | dragonfly*)
1874 # DragonFly does not have aout. When/if they implement a new
1875 # versioning mechanism, adjust this.
1876 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1877 version_type=freebsd-$objformat
1878 case $version_type in
1880 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1885 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1889 shlibpath_var=LD_LIBRARY_PATH
1892 shlibpath_overrides_runpath=yes
1894 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1895 shlibpath_overrides_runpath=yes
1896 hardcode_into_libs=yes
1899 shlibpath_overrides_runpath=no
1900 hardcode_into_libs=yes
1909 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1910 soname_spec='${libname}${release}${shared_ext}$major'
1911 shlibpath_var=LD_LIBRARY_PATH
1912 hardcode_into_libs=yes
1915 hpux9* | hpux10* | hpux11*)
1916 # Give a soname corresponding to the major version so that dld.sl refuses to
1917 # link against other versions.
1924 hardcode_into_libs=yes
1925 dynamic_linker="$host_os dld.so"
1926 shlibpath_var=LD_LIBRARY_PATH
1927 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1928 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1929 soname_spec='${libname}${release}${shared_ext}$major'
1930 if test "X$HPUX_IA64_MODE" = X32; then
1931 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1933 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1935 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1939 hardcode_into_libs=yes
1940 dynamic_linker="$host_os dld.sl"
1941 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1942 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1944 soname_spec='${libname}${release}${shared_ext}$major'
1945 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1946 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1950 dynamic_linker="$host_os dld.sl"
1951 shlibpath_var=SHLIB_PATH
1952 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1953 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1954 soname_spec='${libname}${release}${shared_ext}$major'
1957 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1958 postinstall_cmds='chmod 555 $lib'
1961 irix5* | irix6* | nonstopux*)
1963 nonstopux*) version_type=nonstopux ;;
1965 if test "$lt_cv_prog_gnu_ld" = yes; then
1973 soname_spec='${libname}${release}${shared_ext}$major'
1974 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1976 irix5* | nonstopux*)
1980 case $LD in # libtool.m4 will add one of these switches to LD
1981 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1982 libsuff= shlibsuff= libmagic=32-bit;;
1983 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1984 libsuff=32 shlibsuff=N32 libmagic=N32;;
1985 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1986 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1987 *) libsuff= shlibsuff= libmagic=never-match;;
1991 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1992 shlibpath_overrides_runpath=no
1993 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1994 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1995 hardcode_into_libs=yes
1998 # No shared lib support for Linux oldld, aout, or coff.
1999 linux*oldld* | linux*aout* | linux*coff*)
2003 # This must be Linux ELF.
2008 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2009 soname_spec='${libname}${release}${shared_ext}$major'
2010 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2011 shlibpath_var=LD_LIBRARY_PATH
2012 shlibpath_overrides_runpath=no
2013 # This implies no fast_install, which is unacceptable.
2014 # Some rework will be needed to allow for fast_install
2015 # before this can be enabled.
2016 hardcode_into_libs=yes
2018 # Append ld.so.conf contents to the search path
2019 if test -f /etc/ld.so.conf; then
2020 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2021 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2024 # We used to test for /lib/ld.so.1 and disable shared libraries on
2025 # powerpc, because MkLinux only supported shared libraries with the
2026 # GNU dynamic linker. Since this was broken with cross compilers,
2027 # most powerpc-linux boxes support dynamic linking these days and
2028 # people can always --disable-shared, the test was removed, and we
2029 # assume the GNU/Linux dynamic linker is in use.
2030 dynamic_linker='GNU/Linux ld.so'
2037 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2038 soname_spec='${libname}${release}${shared_ext}$major'
2039 shlibpath_var=LD_LIBRARY_PATH
2040 shlibpath_overrides_runpath=no
2041 hardcode_into_libs=yes
2042 dynamic_linker='GNU ld.so'
2049 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2050 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2051 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2052 dynamic_linker='NetBSD (a.out) ld.so'
2054 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2055 soname_spec='${libname}${release}${shared_ext}$major'
2056 dynamic_linker='NetBSD ld.elf_so'
2058 shlibpath_var=LD_LIBRARY_PATH
2059 shlibpath_overrides_runpath=yes
2060 hardcode_into_libs=yes
2065 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2066 shlibpath_var=LD_LIBRARY_PATH
2067 shlibpath_overrides_runpath=yes
2074 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2075 soname_spec='${libname}${release}${shared_ext}$major'
2076 shlibpath_var=LD_LIBRARY_PATH
2077 shlibpath_overrides_runpath=yes
2083 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2085 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2086 *) need_version=no ;;
2088 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2089 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2090 shlibpath_var=LD_LIBRARY_PATH
2091 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2093 openbsd2.[[89]] | openbsd2.[[89]].*)
2094 shlibpath_overrides_runpath=no
2097 shlibpath_overrides_runpath=yes
2101 shlibpath_overrides_runpath=yes
2106 libname_spec='$name'
2109 library_names_spec='$libname${shared_ext} $libname.a'
2110 dynamic_linker='OS/2 ld.exe'
2111 shlibpath_var=LIBPATH
2114 osf3* | osf4* | osf5*)
2118 soname_spec='${libname}${release}${shared_ext}$major'
2119 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2120 shlibpath_var=LD_LIBRARY_PATH
2121 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2122 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2127 soname_spec='${libname}${release}${shared_ext}$major'
2128 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2129 shlibpath_var=LD_LIBRARY_PATH
2136 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2137 soname_spec='${libname}${release}${shared_ext}$major'
2138 shlibpath_var=LD_LIBRARY_PATH
2139 shlibpath_overrides_runpath=yes
2140 hardcode_into_libs=yes
2141 # ldd complains unless libraries are executable
2142 postinstall_cmds='chmod +x $lib'
2147 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2148 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2149 shlibpath_var=LD_LIBRARY_PATH
2150 shlibpath_overrides_runpath=yes
2151 if test "$with_gnu_ld" = yes; then
2157 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2159 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2160 soname_spec='${libname}${release}${shared_ext}$major'
2161 shlibpath_var=LD_LIBRARY_PATH
2162 case $host_vendor in
2164 shlibpath_overrides_runpath=no
2166 export_dynamic_flag_spec='${wl}-Blargedynsym'
2167 runpath_var=LD_RUN_PATH
2175 shlibpath_overrides_runpath=no
2176 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2182 if test -d /usr/nec ;then
2184 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2185 soname_spec='$libname${shared_ext}.$major'
2186 shlibpath_var=LD_LIBRARY_PATH
2192 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2193 soname_spec='${libname}${release}${shared_ext}$major'
2194 shlibpath_var=LD_LIBRARY_PATH
2201 AC_MSG_RESULT([$dynamic_linker])
2202 test "$dynamic_linker" = no && can_build_shared=no
2203 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2208 AC_DEFUN([_LT_AC_TAGCONFIG],
2209 [AC_ARG_WITH([tags],
2210 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2211 [include additional configurations @<:@automatic@:>@])],
2212 [tagnames="$withval"])
2214 if test -f "$ltmain" && test -n "$tagnames"; then
2215 if test ! -f "${ofile}"; then
2216 AC_MSG_WARN([output file `$ofile' does not exist])
2219 if test -z "$LTCC"; then
2220 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2221 if test -z "$LTCC"; then
2222 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2224 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2228 # Extract list of available tagged configurations in $ofile.
2229 # Note that this assumes the entire list is on one line.
2230 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2232 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2233 for tagname in $tagnames; do
2235 # Check whether tagname contains only valid characters
2236 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2238 *) AC_MSG_ERROR([invalid tag name: $tagname])
2242 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2244 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2247 # Update the list of available tags.
2248 if test -n "$tagname"; then
2249 echo appending configuration tag \"$tagname\" to $ofile
2253 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2254 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2255 (test "X$CXX" != "Xg++"))) ; then
2256 AC_LIBTOOL_LANG_CXX_CONFIG
2263 if test -n "$F77" && test "X$F77" != "Xno"; then
2264 AC_LIBTOOL_LANG_F77_CONFIG
2271 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2272 AC_LIBTOOL_LANG_GCJ_CONFIG
2279 AC_LIBTOOL_LANG_RC_CONFIG
2283 AC_MSG_ERROR([Unsupported tag name: $tagname])
2287 # Append the new tag name to the list of available tags.
2288 if test -n "$tagname" ; then
2289 available_tags="$available_tags $tagname"
2295 # Now substitute the updated list of available tags.
2296 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2297 mv "${ofile}T" "$ofile"
2301 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2304 ])# _LT_AC_TAGCONFIG
2309 # enable checks for dlopen support
2310 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2311 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2312 ])# AC_LIBTOOL_DLOPEN
2315 # AC_LIBTOOL_WIN32_DLL
2316 # --------------------
2317 # declare package support for building win32 dll's
2318 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2319 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2320 ])# AC_LIBTOOL_WIN32_DLL
2323 # AC_ENABLE_SHARED([DEFAULT])
2324 # ---------------------------
2325 # implement the --enable-shared flag
2326 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2327 AC_DEFUN([AC_ENABLE_SHARED],
2328 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2329 AC_ARG_ENABLE([shared],
2330 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2331 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2332 [p=${PACKAGE-default}
2334 yes) enable_shared=yes ;;
2335 no) enable_shared=no ;;
2338 # Look at the argument we got. We use all the common list separators.
2339 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2340 for pkg in $enableval; do
2342 if test "X$pkg" = "X$p"; then
2349 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2350 ])# AC_ENABLE_SHARED
2355 #- set the default shared flag to --disable-shared
2356 AC_DEFUN([AC_DISABLE_SHARED],
2357 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2358 AC_ENABLE_SHARED(no)
2359 ])# AC_DISABLE_SHARED
2362 # AC_ENABLE_STATIC([DEFAULT])
2363 # ---------------------------
2364 # implement the --enable-static flag
2365 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2366 AC_DEFUN([AC_ENABLE_STATIC],
2367 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2368 AC_ARG_ENABLE([static],
2369 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2370 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2371 [p=${PACKAGE-default}
2373 yes) enable_static=yes ;;
2374 no) enable_static=no ;;
2377 # Look at the argument we got. We use all the common list separators.
2378 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2379 for pkg in $enableval; do
2381 if test "X$pkg" = "X$p"; then
2388 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2389 ])# AC_ENABLE_STATIC
2394 # set the default static flag to --disable-static
2395 AC_DEFUN([AC_DISABLE_STATIC],
2396 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2397 AC_ENABLE_STATIC(no)
2398 ])# AC_DISABLE_STATIC
2401 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2402 # ---------------------------------
2403 # implement the --enable-fast-install flag
2404 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2405 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2406 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2407 AC_ARG_ENABLE([fast-install],
2408 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2409 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2410 [p=${PACKAGE-default}
2412 yes) enable_fast_install=yes ;;
2413 no) enable_fast_install=no ;;
2415 enable_fast_install=no
2416 # Look at the argument we got. We use all the common list separators.
2417 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2418 for pkg in $enableval; do
2420 if test "X$pkg" = "X$p"; then
2421 enable_fast_install=yes
2427 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2428 ])# AC_ENABLE_FAST_INSTALL
2431 # AC_DISABLE_FAST_INSTALL
2432 # -----------------------
2433 # set the default to --disable-fast-install
2434 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2435 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2436 AC_ENABLE_FAST_INSTALL(no)
2437 ])# AC_DISABLE_FAST_INSTALL
2440 # AC_LIBTOOL_PICMODE([MODE])
2441 # --------------------------
2442 # implement the --with-pic flag
2443 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2444 AC_DEFUN([AC_LIBTOOL_PICMODE],
2445 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2446 pic_mode=ifelse($#,1,$1,default)
2447 ])# AC_LIBTOOL_PICMODE
2452 # This is predefined starting with Autoconf 2.54, so this conditional
2453 # definition can be removed once we require Autoconf 2.54 or later.
2454 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2455 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2456 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2457 then ac_cv_prog_egrep='grep -E'
2458 else ac_cv_prog_egrep='egrep'
2460 EGREP=$ac_cv_prog_egrep
2465 # AC_PATH_TOOL_PREFIX
2466 # -------------------
2467 # find a file program which can recognise shared library
2468 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2469 [AC_REQUIRE([AC_PROG_EGREP])dnl
2470 AC_MSG_CHECKING([for $1])
2471 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2473 [[\\/*] | ?:[\\/]*])
2474 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2477 lt_save_MAGIC_CMD="$MAGIC_CMD"
2478 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2479 dnl $ac_dummy forces splitting on constant user-supplied paths.
2480 dnl POSIX.2 word splitting is done only on the output of word expansions,
2481 dnl not every word. This closes a longstanding sh security hole.
2482 ac_dummy="ifelse([$2], , $PATH, [$2])"
2483 for ac_dir in $ac_dummy; do
2485 test -z "$ac_dir" && ac_dir=.
2486 if test -f $ac_dir/$1; then
2487 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2488 if test -n "$file_magic_test_file"; then
2489 case $deplibs_check_method in
2491 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2492 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2493 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2494 $EGREP "$file_magic_regex" > /dev/null; then
2499 *** Warning: the command libtool uses to detect shared libraries,
2500 *** $file_magic_cmd, produces output that libtool cannot recognize.
2501 *** The result is that libtool may fail to recognize shared libraries
2502 *** as such. This will affect the creation of libtool libraries that
2503 *** depend on shared libraries, but programs linked with such libtool
2504 *** libraries will work regardless of this problem. Nevertheless, you
2505 *** may want to report the problem to your system manager and/or to
2506 *** bug-libtool@gnu.org
2516 MAGIC_CMD="$lt_save_MAGIC_CMD"
2519 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2520 if test -n "$MAGIC_CMD"; then
2521 AC_MSG_RESULT($MAGIC_CMD)
2525 ])# AC_PATH_TOOL_PREFIX
2530 # find a file program which can recognise a shared library
2531 AC_DEFUN([AC_PATH_MAGIC],
2532 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2533 if test -z "$lt_cv_path_MAGIC_CMD"; then
2534 if test -n "$ac_tool_prefix"; then
2535 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2545 # find the pathname to the GNU or non-GNU linker
2546 AC_DEFUN([AC_PROG_LD],
2547 [AC_ARG_WITH([gnu-ld],
2548 [AC_HELP_STRING([--with-gnu-ld],
2549 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2550 [test "$withval" = no || with_gnu_ld=yes],
2552 AC_REQUIRE([LT_AC_PROG_SED])dnl
2553 AC_REQUIRE([AC_PROG_CC])dnl
2554 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2555 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2557 if test "$GCC" = yes; then
2558 # Check if gcc -print-prog-name=ld gives a path.
2559 AC_MSG_CHECKING([for ld used by $CC])
2562 # gcc leaves a trailing carriage return which upsets mingw
2563 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2565 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2568 # Accept absolute paths.
2569 [[\\/]]* | ?:[[\\/]]*)
2570 re_direlt='/[[^/]][[^/]]*/\.\./'
2571 # Canonicalize the pathname of ld
2572 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2573 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2574 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2576 test -z "$LD" && LD="$ac_prog"
2579 # If it fails, then pretend we aren't using GCC.
2583 # If it is relative, then search for the first ld in PATH.
2587 elif test "$with_gnu_ld" = yes; then
2588 AC_MSG_CHECKING([for GNU ld])
2590 AC_MSG_CHECKING([for non-GNU ld])
2592 AC_CACHE_VAL(lt_cv_path_LD,
2593 [if test -z "$LD"; then
2594 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2595 for ac_dir in $PATH; do
2597 test -z "$ac_dir" && ac_dir=.
2598 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2599 lt_cv_path_LD="$ac_dir/$ac_prog"
2600 # Check to see if the program is GNU ld. I'd rather use --version,
2601 # but apparently some GNU ld's only accept -v.
2602 # Break only if it was the GNU/non-GNU ld that we prefer.
2603 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2604 *GNU* | *'with BFD'*)
2605 test "$with_gnu_ld" != no && break
2608 test "$with_gnu_ld" != yes && break
2615 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2618 if test -n "$LD"; then
2623 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2630 AC_DEFUN([AC_PROG_LD_GNU],
2631 [AC_REQUIRE([AC_PROG_EGREP])dnl
2632 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2633 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2634 case `$LD -v 2>&1 </dev/null` in
2635 *GNU* | *'with BFD'*)
2636 lt_cv_prog_gnu_ld=yes
2639 lt_cv_prog_gnu_ld=no
2642 with_gnu_ld=$lt_cv_prog_gnu_ld
2646 # AC_PROG_LD_RELOAD_FLAG
2647 # ----------------------
2648 # find reload flag for linker
2649 # -- PORTME Some linkers may need a different reload flag.
2650 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2651 [AC_CACHE_CHECK([for $LD option to reload object files],
2652 lt_cv_ld_reload_flag,
2653 [lt_cv_ld_reload_flag='-r'])
2654 reload_flag=$lt_cv_ld_reload_flag
2655 case $reload_flag in
2657 *) reload_flag=" $reload_flag" ;;
2659 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2662 if test "$GCC" = yes; then
2663 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2665 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2669 ])# AC_PROG_LD_RELOAD_FLAG
2672 # AC_DEPLIBS_CHECK_METHOD
2673 # -----------------------
2674 # how to check for library dependencies
2675 # -- PORTME fill in with the dynamic library characteristics
2676 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2677 [AC_CACHE_CHECK([how to recognise dependent libraries],
2678 lt_cv_deplibs_check_method,
2679 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2680 lt_cv_file_magic_test_file=
2681 lt_cv_deplibs_check_method='unknown'
2682 # Need to set the preceding variable on all platforms that support
2683 # interlibrary dependencies.
2684 # 'none' -- dependencies not supported.
2685 # `unknown' -- same as none, but documents that we really don't know.
2686 # 'pass_all' -- all dependencies passed with no checks.
2687 # 'test_compile' -- check by making test program.
2688 # 'file_magic [[regex]]' -- check by looking for files in library path
2689 # which responds to the $file_magic_cmd with a given extended regex.
2690 # If you have `file' or equivalent on your system and you're not sure
2691 # whether `pass_all' will *always* work, you probably want this one.
2695 lt_cv_deplibs_check_method=pass_all
2699 lt_cv_deplibs_check_method=pass_all
2703 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2704 lt_cv_file_magic_cmd='/usr/bin/file -L'
2705 lt_cv_file_magic_test_file=/shlib/libc.so
2709 # func_win32_libid is a shell function defined in ltmain.sh
2710 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2711 lt_cv_file_magic_cmd='func_win32_libid'
2715 # Base MSYS/MinGW do not provide the 'file' command needed by
2716 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2717 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2718 lt_cv_file_magic_cmd='$OBJDUMP -f'
2721 darwin* | rhapsody*)
2722 lt_cv_deplibs_check_method=pass_all
2725 freebsd* | kfreebsd*-gnu | dragonfly*)
2726 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2729 # Not sure whether the presence of OpenBSD here was a mistake.
2730 # Let's accept both of them until this is cleared up.
2731 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2732 lt_cv_file_magic_cmd=/usr/bin/file
2733 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2737 lt_cv_deplibs_check_method=pass_all
2742 lt_cv_deplibs_check_method=pass_all
2745 hpux10.20* | hpux11*)
2746 lt_cv_file_magic_cmd=/usr/bin/file
2749 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2750 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2753 [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]']
2754 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2757 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2758 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2763 irix5* | irix6* | nonstopux*)
2765 *-32|*"-32 ") libmagic=32-bit;;
2766 *-n32|*"-n32 ") libmagic=N32;;
2767 *-64|*"-64 ") libmagic=64-bit;;
2768 *) libmagic=never-match;;
2770 lt_cv_deplibs_check_method=pass_all
2773 # This must be Linux ELF.
2775 lt_cv_deplibs_check_method=pass_all
2779 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2780 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2782 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2787 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2788 lt_cv_file_magic_cmd=/usr/bin/file
2789 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2793 lt_cv_deplibs_check_method=unknown
2797 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2798 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2800 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2804 osf3* | osf4* | osf5*)
2805 lt_cv_deplibs_check_method=pass_all
2809 lt_cv_deplibs_check_method=pass_all
2813 lt_cv_deplibs_check_method=pass_all
2816 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2817 case $host_vendor in
2819 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]]'
2820 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2823 lt_cv_deplibs_check_method=pass_all
2826 lt_cv_file_magic_cmd='/bin/file'
2827 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2830 lt_cv_file_magic_cmd='/bin/file'
2831 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2832 lt_cv_file_magic_test_file=/lib/libc.so
2835 lt_cv_deplibs_check_method=pass_all
2840 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2841 lt_cv_deplibs_check_method=pass_all
2845 file_magic_cmd=$lt_cv_file_magic_cmd
2846 deplibs_check_method=$lt_cv_deplibs_check_method
2847 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2848 ])# AC_DEPLIBS_CHECK_METHOD
2853 # find the pathname to a BSD-compatible name lister
2854 AC_DEFUN([AC_PROG_NM],
2855 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2856 [if test -n "$NM"; then
2857 # Let the user override the test.
2860 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2861 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2863 test -z "$ac_dir" && ac_dir=.
2864 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2865 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2866 # Check to see if the nm accepts a BSD-compat flag.
2867 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2868 # nm: unknown option "B" ignored
2869 # Tru64's nm complains that /dev/null is an invalid object file
2870 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2871 */dev/null* | *'Invalid file or object type'*)
2872 lt_cv_path_NM="$tmp_nm -B"
2876 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2878 lt_cv_path_NM="$tmp_nm -p"
2882 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2883 continue # so that we can try to find one that supports BSD flags
2890 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2898 # check for math library
2899 AC_DEFUN([AC_CHECK_LIBM],
2900 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2903 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2904 # These system don't have libm, or don't need it
2907 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2908 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2911 AC_CHECK_LIB(m, cos, LIBM="-lm")
2917 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2918 # -----------------------------------
2919 # sets LIBLTDL to the link flags for the libltdl convenience library and
2920 # LTDLINCL to the include flags for the libltdl header and adds
2921 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2922 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2923 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2924 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2925 # '${top_srcdir}/' (note the single quotes!). If your package is not
2926 # flat and you're not using automake, define top_builddir and
2927 # top_srcdir appropriately in the Makefiles.
2928 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2929 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2930 case $enable_ltdl_convenience in
2931 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2932 "") enable_ltdl_convenience=yes
2933 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2935 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2936 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2937 # For backwards non-gettext consistent compatibility...
2939 ])# AC_LIBLTDL_CONVENIENCE
2942 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2943 # -----------------------------------
2944 # sets LIBLTDL to the link flags for the libltdl installable library and
2945 # LTDLINCL to the include flags for the libltdl header and adds
2946 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2947 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2948 # DIRECTORY is not provided and an installed libltdl is not found, it is
2949 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2950 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2951 # quotes!). If your package is not flat and you're not using automake,
2952 # define top_builddir and top_srcdir appropriately in the Makefiles.
2953 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2954 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2955 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2956 AC_CHECK_LIB(ltdl, lt_dlinit,
2957 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2958 [if test x"$enable_ltdl_install" = xno; then
2959 AC_MSG_WARN([libltdl not installed, but installation disabled])
2961 enable_ltdl_install=yes
2964 if test x"$enable_ltdl_install" = x"yes"; then
2965 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2966 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2967 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2969 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2973 # For backwards non-gettext consistent compatibility...
2975 ])# AC_LIBLTDL_INSTALLABLE
2980 # enable support for C++ libraries
2981 AC_DEFUN([AC_LIBTOOL_CXX],
2982 [AC_REQUIRE([_LT_AC_LANG_CXX])
2988 AC_DEFUN([_LT_AC_LANG_CXX],
2989 [AC_REQUIRE([AC_PROG_CXX])
2990 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2991 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2994 # _LT_AC_PROG_CXXCPP
2996 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2998 AC_REQUIRE([AC_PROG_CXX])
2999 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3000 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3001 (test "X$CXX" != "Xg++"))) ; then
3004 ])# _LT_AC_PROG_CXXCPP
3008 # enable support for Fortran 77 libraries
3009 AC_DEFUN([AC_LIBTOOL_F77],
3010 [AC_REQUIRE([_LT_AC_LANG_F77])
3016 AC_DEFUN([_LT_AC_LANG_F77],
3017 [AC_REQUIRE([AC_PROG_F77])
3018 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3024 # enable support for GCJ libraries
3025 AC_DEFUN([AC_LIBTOOL_GCJ],
3026 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3032 AC_DEFUN([_LT_AC_LANG_GCJ],
3033 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3034 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3035 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3036 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3037 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3038 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3039 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3045 # enable support for Windows resource files
3046 AC_DEFUN([AC_LIBTOOL_RC],
3047 [AC_REQUIRE([LT_AC_PROG_RC])
3048 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3052 # AC_LIBTOOL_LANG_C_CONFIG
3053 # ------------------------
3054 # Ensure that the configuration vars for the C compiler are
3055 # suitably defined. Those variables are subsequently used by
3056 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3057 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3058 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3062 # Source file extension for C test sources.
3065 # Object file extension for compiled C test sources.
3067 _LT_AC_TAGVAR(objext, $1)=$objext
3069 # Code to be used in simple compile tests
3070 lt_simple_compile_test_code="int some_variable = 0;\n"
3072 # Code to be used in simple link tests
3073 lt_simple_link_test_code='int main(){return(0);}\n'
3077 # save warnings/boilerplate of simple test code
3078 _LT_COMPILER_BOILERPLATE
3079 _LT_LINKER_BOILERPLATE
3082 # Check for any special shared library compilation flags.
3084 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3085 if test "$GCC" = no; then
3088 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3092 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3093 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3094 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3096 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3097 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3103 # Check to make sure the static flag actually works.
3105 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3106 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3107 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3109 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3112 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3113 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3114 AC_LIBTOOL_PROG_CC_C_O($1)
3115 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3116 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3117 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3118 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3119 AC_LIBTOOL_SYS_LIB_STRIP
3120 AC_LIBTOOL_DLOPEN_SELF($1)
3122 # Report which librarie types wil actually be built
3123 AC_MSG_CHECKING([if libtool supports shared libraries])
3124 AC_MSG_RESULT([$can_build_shared])
3126 AC_MSG_CHECKING([whether to build shared libraries])
3127 test "$can_build_shared" = "no" && enable_shared=no
3129 # On AIX, shared libraries and static libraries use the same namespace, and
3130 # are all built from PIC.
3133 test "$enable_shared" = yes && enable_static=no
3134 if test -n "$RANLIB"; then
3135 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3136 postinstall_cmds='$RANLIB $lib'
3141 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3142 test "$enable_shared" = yes && enable_static=no
3146 AC_MSG_RESULT([$enable_shared])
3148 AC_MSG_CHECKING([whether to build static libraries])
3149 # Make sure either enable_shared or enable_static is yes.
3150 test "$enable_shared" = yes || enable_static=yes
3151 AC_MSG_RESULT([$enable_static])
3153 AC_LIBTOOL_CONFIG($1)
3157 ])# AC_LIBTOOL_LANG_C_CONFIG
3160 # AC_LIBTOOL_LANG_CXX_CONFIG
3161 # --------------------------
3162 # Ensure that the configuration vars for the C compiler are
3163 # suitably defined. Those variables are subsequently used by
3164 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3165 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3166 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3168 AC_REQUIRE([AC_PROG_CXX])
3169 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3171 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3172 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3173 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3174 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3175 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3176 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3177 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3179 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3180 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3181 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3182 _LT_AC_TAGVAR(module_cmds, $1)=
3183 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3184 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3185 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3186 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3187 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3188 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3190 # Dependencies to place before and after the object being linked:
3191 _LT_AC_TAGVAR(predep_objects, $1)=
3192 _LT_AC_TAGVAR(postdep_objects, $1)=
3193 _LT_AC_TAGVAR(predeps, $1)=
3194 _LT_AC_TAGVAR(postdeps, $1)=
3195 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3197 # Source file extension for C++ test sources.
3200 # Object file extension for compiled C++ test sources.
3202 _LT_AC_TAGVAR(objext, $1)=$objext
3204 # Code to be used in simple compile tests
3205 lt_simple_compile_test_code="int some_variable = 0;\n"
3207 # Code to be used in simple link tests
3208 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3210 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3213 # save warnings/boilerplate of simple test code
3214 _LT_COMPILER_BOILERPLATE
3215 _LT_LINKER_BOILERPLATE
3217 # Allow CC to be a program name with arguments.
3222 lt_save_with_gnu_ld=$with_gnu_ld
3223 lt_save_path_LD=$lt_cv_path_LD
3224 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3225 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3227 unset lt_cv_prog_gnu_ld
3229 if test -n "${lt_cv_path_LDCXX+set}"; then
3230 lt_cv_path_LD=$lt_cv_path_LDCXX
3234 test -z "${LDCXX+set}" || LD=$LDCXX
3237 _LT_AC_TAGVAR(compiler, $1)=$CC
3238 _LT_CC_BASENAME([$compiler])
3240 # We don't want -fno-exception wen compiling C++ code, so set the
3241 # no_builtin_flag separately
3242 if test "$GXX" = yes; then
3243 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3245 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3248 if test "$GXX" = yes; then
3249 # Set up default GNU C++ configuration
3253 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3254 # archiving commands below assume that GNU ld is being used.
3255 if test "$with_gnu_ld" = yes; then
3256 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3257 _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'
3259 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3260 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3262 # If archive_cmds runs LD, not CC, wlarc should be empty
3263 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3264 # investigate it a little bit more. (MM)
3267 # ancient GNU ld didn't support --whole-archive et. al.
3268 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3269 grep 'no-whole-archive' > /dev/null; then
3270 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3272 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3278 # A generic and very simple default shared library creation
3279 # command for GNU C++ for the case where it uses the native
3280 # linker, instead of GNU ld. If possible, this setting should
3281 # overridden to take advantage of the native linker features on
3282 # the platform it is being used on.
3283 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3286 # Commands to make compiler produce verbose output that lists
3287 # what "hidden" libraries, object files and flags are used when
3288 # linking a shared library.
3289 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3297 # PORTME: fill in a description of your system's C++ link characteristics
3298 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3299 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3302 # FIXME: insert proper C++ library support
3303 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3306 if test "$host_cpu" = ia64; then
3307 # On IA64, the linker does run time linking by default, so we don't
3308 # have to do anything special.
3309 aix_use_runtimelinking=no
3310 exp_sym_flag='-Bexport'
3313 aix_use_runtimelinking=no
3315 # Test if we are trying to use run time linking or normal
3316 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3317 # need to do runtime linking.
3318 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3319 for ld_flag in $LDFLAGS; do
3322 aix_use_runtimelinking=yes
3329 exp_sym_flag='-bexport'
3330 no_entry_flag='-bnoentry'
3333 # When large executables or shared objects are built, AIX ld can
3334 # have problems creating the table of contents. If linking a library
3335 # or program results in "error TOC overflow" add -mminimal-toc to
3336 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3337 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3339 _LT_AC_TAGVAR(archive_cmds, $1)=''
3340 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3341 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3342 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3344 if test "$GXX" = yes; then
3345 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3346 # We only want to do this on AIX 4.2 and lower, the check
3347 # below for broken collect2 doesn't work under 4.3+
3348 collect2name=`${CC} -print-prog-name=collect2`
3349 if test -f "$collect2name" && \
3350 strings "$collect2name" | grep resolve_lib_name >/dev/null
3352 # We have reworked collect2
3353 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3355 # We have old collect2
3356 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3357 # It fails to find uninstalled libraries when the uninstalled
3358 # path is not listed in the libpath. Setting hardcode_minus_L
3359 # to unsupported forces relinking
3360 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3361 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3362 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3365 shared_flag='-shared'
3366 if test "$aix_use_runtimelinking" = yes; then
3367 shared_flag="$shared_flag "'${wl}-G'
3371 if test "$host_cpu" = ia64; then
3372 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3373 # chokes on -Wl,-G. The following line is correct:
3376 if test "$aix_use_runtimelinking" = yes; then
3377 shared_flag='${wl}-G'
3379 shared_flag='${wl}-bM:SRE'
3384 # It seems that -bexpall does not export symbols beginning with
3385 # underscore (_), so it is better to generate a list of symbols to export.
3386 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3387 if test "$aix_use_runtimelinking" = yes; then
3388 # Warning - without using the other runtime loading flags (-brtl),
3389 # -berok will link without error, but may produce a broken library.
3390 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3391 # Determine the default libpath from the value encoded in an empty executable.
3392 _LT_AC_SYS_LIBPATH_AIX
3393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3395 _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"
3397 if test "$host_cpu" = ia64; then
3398 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3399 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3400 _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"
3402 # Determine the default libpath from the value encoded in an empty executable.
3403 _LT_AC_SYS_LIBPATH_AIX
3404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3405 # Warning - without using the other run time loading flags,
3406 # -berok will link without error, but may produce a broken library.
3407 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3408 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3409 # -bexpall does not export symbols beginning with underscore (_)
3410 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3411 # Exported symbols can be pulled into shared objects from archives
3412 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3413 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3414 # This is similar to how AIX traditionally builds it's shared libraries.
3415 _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'
3420 case $cc_basename in
3422 # FIXME: insert proper C++ library support
3423 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3429 cygwin* | mingw* | pw32*)
3430 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3431 # as there is no search path for DLLs.
3432 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3433 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3434 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3435 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3437 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3438 _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'
3439 # If the export-symbols file already is a .def file (1st line
3440 # is EXPORTS), use it as is; otherwise, prepend...
3441 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3442 cp $export_symbols $output_objdir/$soname.def;
3444 echo EXPORTS > $output_objdir/$soname.def;
3445 cat $export_symbols >> $output_objdir/$soname.def;
3447 $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'
3449 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3452 darwin* | rhapsody*)
3454 rhapsody* | darwin1.[[012]])
3455 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3458 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3459 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3461 case ${MACOSX_DEPLOYMENT_TARGET} in
3463 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3466 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3472 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3473 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3474 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3475 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3476 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3477 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3479 if test "$GXX" = yes ; then
3480 lt_int_apple_cc_single_mod=no
3481 output_verbose_link_cmd='echo'
3482 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3483 lt_int_apple_cc_single_mod=yes
3485 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3486 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3488 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3490 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3491 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3492 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3493 _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}'
3495 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3497 _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}'
3499 case $cc_basename in
3501 output_verbose_link_cmd='echo'
3502 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3503 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3504 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3505 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3506 _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}'
3509 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3516 case $cc_basename in
3518 # FIXME: insert proper C++ library support
3519 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3522 # Green Hills C++ Compiler
3523 # FIXME: insert proper C++ library support
3524 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3527 # FIXME: insert proper C++ library support
3528 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3533 # C++ shared libraries reported to be fairly broken before switch to ELF
3534 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3537 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3539 freebsd* | kfreebsd*-gnu | dragonfly*)
3540 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3542 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3547 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3548 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3549 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3550 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3551 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3552 # but as the default
3553 # location of the library.
3555 case $cc_basename in
3557 # FIXME: insert proper C++ library support
3558 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3561 _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'
3562 # Commands to make compiler produce verbose output that lists
3563 # what "hidden" libraries, object files and flags are used when
3564 # linking a shared library.
3566 # There doesn't appear to be a way to prevent this compiler from
3567 # explicitly linking system object files so we need to strip them
3568 # from the output so that they don't get included in the library
3570 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'
3573 if test "$GXX" = yes; then
3574 _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'
3576 # FIXME: insert proper C++ library support
3577 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3583 if test $with_gnu_ld = no; then
3586 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3587 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3588 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3591 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3594 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3595 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3596 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3602 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3603 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3606 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3607 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3608 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3609 # but as the default
3610 # location of the library.
3613 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3614 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3615 # but as the default
3616 # location of the library.
3620 case $cc_basename in
3622 # FIXME: insert proper C++ library support
3623 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3628 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3631 _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'
3634 # Commands to make compiler produce verbose output that lists
3635 # what "hidden" libraries, object files and flags are used when
3636 # linking a shared library.
3638 # There doesn't appear to be a way to prevent this compiler from
3639 # explicitly linking system object files so we need to strip them
3640 # from the output so that they don't get included in the library
3642 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'
3645 if test "$GXX" = yes; then
3646 if test $with_gnu_ld = no; then
3649 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3652 _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'
3657 # FIXME: insert proper C++ library support
3658 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3664 case $cc_basename in
3667 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3669 # Archives containing C++ object files must be created using
3670 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3671 # necessary to make sure instantiated templates are included
3673 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3676 if test "$GXX" = yes; then
3677 if test "$with_gnu_ld" = no; then
3678 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3680 _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'
3683 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3686 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3687 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3690 case $cc_basename in
3692 # Kuck and Associates, Inc. (KAI) C++ Compiler
3694 # KCC will only create a shared library if the output file
3695 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3696 # to its proper name (with version) after linking.
3697 _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'
3698 _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'
3699 # Commands to make compiler produce verbose output that lists
3700 # what "hidden" libraries, object files and flags are used when
3701 # linking a shared library.
3703 # There doesn't appear to be a way to prevent this compiler from
3704 # explicitly linking system object files so we need to strip them
3705 # from the output so that they don't get included in the library
3707 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'
3709 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3710 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3712 # Archives containing C++ object files must be created using
3713 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3714 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3719 # version 8.0 and above of icpc choke on multiply defined symbols
3720 # if we add $predep_objects and $postdep_objects, however 7.1 and
3721 # earlier do not add the objects themselves.
3722 case `$CC -V 2>&1` in
3724 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3725 _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'
3727 *) # Version 8.0 or newer
3730 ia64*) tmp_idyn=' -i_dynamic';;
3732 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3733 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3736 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3737 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3738 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3739 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3742 # Portland Group C++ compiler
3743 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3744 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3746 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3747 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3748 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3752 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3753 _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'
3755 runpath_var=LD_RUN_PATH
3756 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3757 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3759 # Commands to make compiler produce verbose output that lists
3760 # what "hidden" libraries, object files and flags are used when
3761 # linking a shared library.
3763 # There doesn't appear to be a way to prevent this compiler from
3764 # explicitly linking system object files so we need to strip them
3765 # from the output so that they don't get included in the library
3767 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'
3772 # FIXME: insert proper C++ library support
3773 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3776 # FIXME: insert proper C++ library support
3777 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3780 case $cc_basename in
3782 # FIXME: insert proper C++ library support
3783 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3786 # FIXME: insert proper C++ library support
3787 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3792 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3793 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3795 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3796 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3797 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3799 # Workaround some broken pre-1.5 toolchains
3800 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3803 # C++ shared libraries are fairly broken
3804 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3807 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3808 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3809 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3811 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3812 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3813 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3814 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3816 output_verbose_link_cmd='echo'
3819 case $cc_basename in
3821 # Kuck and Associates, Inc. (KAI) C++ Compiler
3823 # KCC will only create a shared library if the output file
3824 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3825 # to its proper name (with version) after linking.
3826 _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'
3828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3829 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3831 # Archives containing C++ object files must be created using
3832 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3833 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3837 # Rational C++ 2.4.1
3838 # FIXME: insert proper C++ library support
3839 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3842 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3843 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3845 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3846 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3848 # Commands to make compiler produce verbose output that lists
3849 # what "hidden" libraries, object files and flags are used when
3850 # linking a shared library.
3852 # There doesn't appear to be a way to prevent this compiler from
3853 # explicitly linking system object files so we need to strip them
3854 # from the output so that they don't get included in the library
3856 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'
3859 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3860 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3861 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3863 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3864 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3866 # Commands to make compiler produce verbose output that lists
3867 # what "hidden" libraries, object files and flags are used when
3868 # linking a shared library.
3869 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3872 # FIXME: insert proper C++ library support
3873 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3879 case $cc_basename in
3881 # Kuck and Associates, Inc. (KAI) C++ Compiler
3883 # KCC will only create a shared library if the output file
3884 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3885 # to its proper name (with version) after linking.
3886 _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'
3888 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3889 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3891 # Archives containing C++ object files must be created using
3892 # the KAI C++ compiler.
3893 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3896 # Rational C++ 2.4.1
3897 # FIXME: insert proper C++ library support
3898 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3901 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3902 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3903 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3904 echo "-hidden">> $lib.exp~
3905 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3908 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3909 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3911 # Commands to make compiler produce verbose output that lists
3912 # what "hidden" libraries, object files and flags are used when
3913 # linking a shared library.
3915 # There doesn't appear to be a way to prevent this compiler from
3916 # explicitly linking system object files so we need to strip them
3917 # from the output so that they don't get included in the library
3919 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'
3922 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3923 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3924 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3927 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3929 # Commands to make compiler produce verbose output that lists
3930 # what "hidden" libraries, object files and flags are used when
3931 # linking a shared library.
3932 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3935 # FIXME: insert proper C++ library support
3936 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3942 # FIXME: insert proper C++ library support
3943 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3946 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3947 case $cc_basename in
3949 # FIXME: insert proper C++ library support
3950 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3953 # FIXME: insert proper C++ library support
3954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3959 case $cc_basename in
3962 # FIXME: insert proper C++ library support
3963 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3967 # FIXME: insert proper C++ library support
3968 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3971 # FIXME: insert proper C++ library support
3972 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3977 case $cc_basename in
3979 # Sun C++ 4.2, 5.x and Centerline C++
3980 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3982 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3983 $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'
3985 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3986 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3988 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3990 # The C++ compiler is used as linker so we must use $wl
3991 # flag to pass the commands to the underlying system
3992 # linker. We must also pass each convience library through
3993 # to the system linker between allextract/defaultextract.
3994 # The C++ compiler will combine linker options so we
3995 # cannot just pass the convience library names through
3997 # Supported since Solaris 2.6 (maybe 2.5.1?)
3998 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4001 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4003 # Commands to make compiler produce verbose output that lists
4004 # what "hidden" libraries, object files and flags are used when
4005 # linking a shared library.
4007 # There doesn't appear to be a way to prevent this compiler from
4008 # explicitly linking system object files so we need to strip them
4009 # from the output so that they don't get included in the library
4011 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'
4013 # Archives containing C++ object files must be created using
4014 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4015 # necessary to make sure instantiated templates are included
4017 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4020 # Green Hills C++ Compiler
4021 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4023 # The C++ compiler must be used to create the archive.
4024 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4027 # GNU C++ compiler with Solaris linker
4028 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4029 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4030 if $CC --version | grep -v '^2\.7' > /dev/null; then
4031 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4033 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4035 # Commands to make compiler produce verbose output that lists
4036 # what "hidden" libraries, object files and flags are used when
4037 # linking a shared library.
4038 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4040 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4042 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4043 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4044 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4046 # Commands to make compiler produce verbose output that lists
4047 # what "hidden" libraries, object files and flags are used when
4048 # linking a shared library.
4049 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4052 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4057 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4058 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4061 case $cc_basename in
4063 # NonStop-UX NCC 3.20
4064 # FIXME: insert proper C++ library support
4065 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4068 # FIXME: insert proper C++ library support
4069 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4074 # FIXME: insert proper C++ library support
4075 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4078 # FIXME: insert proper C++ library support
4079 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4082 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4083 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4085 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4086 _LT_AC_TAGVAR(LD, $1)="$LD"
4088 AC_LIBTOOL_POSTDEP_PREDEP($1)
4089 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4090 AC_LIBTOOL_PROG_CC_C_O($1)
4091 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4092 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4093 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4094 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4095 AC_LIBTOOL_SYS_LIB_STRIP
4096 AC_LIBTOOL_DLOPEN_SELF($1)
4098 AC_LIBTOOL_CONFIG($1)
4105 with_gnu_ldcxx=$with_gnu_ld
4106 with_gnu_ld=$lt_save_with_gnu_ld
4107 lt_cv_path_LDCXX=$lt_cv_path_LD
4108 lt_cv_path_LD=$lt_save_path_LD
4109 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4110 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4111 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4113 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4114 # ------------------------
4115 # Figure out "hidden" library dependencies from verbose
4116 # compiler output when linking a shared library.
4117 # Parse the compiler output and extract the necessary
4118 # objects, libraries and library flags.
4119 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4120 dnl we can't use the lt_simple_compile_test_code here,
4121 dnl because it contains code intended for an executable,
4122 dnl not a library. It's possible we should let each
4123 dnl tag define a new lt_????_link_test_code variable,
4124 dnl but it's only used here...
4125 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4127 void foo (void) { a = 0; }
4129 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4133 Foo (void) { a = 0; }
4138 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4146 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4149 public void bar (void) {
4155 dnl Parse the compiler output and extract the necessary
4156 dnl objects, libraries and library flags.
4157 if AC_TRY_EVAL(ac_compile); then
4158 # Parse the compiler output and extract the necessary
4159 # objects, libraries and library flags.
4161 # Sentinel used to keep track of whether or not we are before
4162 # the conftest object file.
4163 pre_test_object_deps_done=no
4165 # The `*' in the case matches for architectures that use `case' in
4166 # $output_verbose_cmd can trigger glob expansion during the loop
4167 # eval without this substitution.
4168 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4170 for p in `eval $output_verbose_link_cmd`; do
4174 # Some compilers place space between "-{L,R}" and the path.
4177 || test $p = "-R"; then
4184 if test "$pre_test_object_deps_done" = no; then
4187 # Internal compiler library paths should come after those
4188 # provided the user. The postdeps already come after the
4189 # user supplied libs so there is no need to process them.
4190 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4191 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4193 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4196 # The "-l" case would never come before the object being
4197 # linked, so don't bother handling this case.
4200 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4201 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4203 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4209 # This assumes that the test object file only shows up
4210 # once in the compiler output.
4211 if test "$p" = "conftest.$objext"; then
4212 pre_test_object_deps_done=yes
4216 if test "$pre_test_object_deps_done" = no; then
4217 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4218 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4220 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4223 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4224 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4226 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4231 *) ;; # Ignore the rest.
4239 echo "libtool.m4: error: problem compiling $1 test program"
4242 $rm -f confest.$objext
4244 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4245 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4247 ])# AC_LIBTOOL_POSTDEP_PREDEP
4249 # AC_LIBTOOL_LANG_F77_CONFIG
4250 # ------------------------
4251 # Ensure that the configuration vars for the C compiler are
4252 # suitably defined. Those variables are subsequently used by
4253 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4254 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4255 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4256 [AC_REQUIRE([AC_PROG_F77])
4257 AC_LANG_PUSH(Fortran 77)
4259 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4260 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4261 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4262 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4263 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4264 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4265 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4266 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4267 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4268 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4269 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4270 _LT_AC_TAGVAR(module_cmds, $1)=
4271 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4272 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4273 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4274 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4275 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4276 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4278 # Source file extension for f77 test sources.
4281 # Object file extension for compiled f77 test sources.
4283 _LT_AC_TAGVAR(objext, $1)=$objext
4285 # Code to be used in simple compile tests
4286 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4288 # Code to be used in simple link tests
4289 lt_simple_link_test_code=" program t\n end\n"
4291 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4294 # save warnings/boilerplate of simple test code
4295 _LT_COMPILER_BOILERPLATE
4296 _LT_LINKER_BOILERPLATE
4298 # Allow CC to be a program name with arguments.
4302 _LT_AC_TAGVAR(compiler, $1)=$CC
4303 _LT_CC_BASENAME([$compiler])
4305 AC_MSG_CHECKING([if libtool supports shared libraries])
4306 AC_MSG_RESULT([$can_build_shared])
4308 AC_MSG_CHECKING([whether to build shared libraries])
4309 test "$can_build_shared" = "no" && enable_shared=no
4311 # On AIX, shared libraries and static libraries use the same namespace, and
4312 # are all built from PIC.
4315 test "$enable_shared" = yes && enable_static=no
4316 if test -n "$RANLIB"; then
4317 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4318 postinstall_cmds='$RANLIB $lib'
4322 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4323 test "$enable_shared" = yes && enable_static=no
4327 AC_MSG_RESULT([$enable_shared])
4329 AC_MSG_CHECKING([whether to build static libraries])
4330 # Make sure either enable_shared or enable_static is yes.
4331 test "$enable_shared" = yes || enable_static=yes
4332 AC_MSG_RESULT([$enable_static])
4334 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4336 _LT_AC_TAGVAR(GCC, $1)="$G77"
4337 _LT_AC_TAGVAR(LD, $1)="$LD"
4339 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4340 AC_LIBTOOL_PROG_CC_C_O($1)
4341 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4342 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4343 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4344 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4345 AC_LIBTOOL_SYS_LIB_STRIP
4348 AC_LIBTOOL_CONFIG($1)
4352 ])# AC_LIBTOOL_LANG_F77_CONFIG
4355 # AC_LIBTOOL_LANG_GCJ_CONFIG
4356 # --------------------------
4357 # Ensure that the configuration vars for the C compiler are
4358 # suitably defined. Those variables are subsequently used by
4359 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4360 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4361 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4364 # Source file extension for Java test sources.
4367 # Object file extension for compiled Java test sources.
4369 _LT_AC_TAGVAR(objext, $1)=$objext
4371 # Code to be used in simple compile tests
4372 lt_simple_compile_test_code="class foo {}\n"
4374 # Code to be used in simple link tests
4375 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4377 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4380 # save warnings/boilerplate of simple test code
4381 _LT_COMPILER_BOILERPLATE
4382 _LT_LINKER_BOILERPLATE
4384 # Allow CC to be a program name with arguments.
4388 _LT_AC_TAGVAR(compiler, $1)=$CC
4389 _LT_CC_BASENAME([$compiler])
4391 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4392 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4394 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4396 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4397 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4398 AC_LIBTOOL_PROG_CC_C_O($1)
4399 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4400 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4401 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4402 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4403 AC_LIBTOOL_SYS_LIB_STRIP
4404 AC_LIBTOOL_DLOPEN_SELF($1)
4406 AC_LIBTOOL_CONFIG($1)
4410 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4413 # AC_LIBTOOL_LANG_RC_CONFIG
4414 # --------------------------
4415 # Ensure that the configuration vars for the Windows resource compiler are
4416 # suitably defined. Those variables are subsequently used by
4417 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4418 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4419 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4422 # Source file extension for RC test sources.
4425 # Object file extension for compiled RC test sources.
4427 _LT_AC_TAGVAR(objext, $1)=$objext
4429 # Code to be used in simple compile tests
4430 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4432 # Code to be used in simple link tests
4433 lt_simple_link_test_code="$lt_simple_compile_test_code"
4435 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4438 # save warnings/boilerplate of simple test code
4439 _LT_COMPILER_BOILERPLATE
4440 _LT_LINKER_BOILERPLATE
4442 # Allow CC to be a program name with arguments.
4446 _LT_AC_TAGVAR(compiler, $1)=$CC
4447 _LT_CC_BASENAME([$compiler])
4448 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4450 AC_LIBTOOL_CONFIG($1)
4454 ])# AC_LIBTOOL_LANG_RC_CONFIG
4457 # AC_LIBTOOL_CONFIG([TAGNAME])
4458 # ----------------------------
4459 # If TAGNAME is not passed, then create an initial libtool script
4460 # with a default configuration from the untagged config vars. Otherwise
4461 # add code to config.status for appending the configuration named by
4462 # TAGNAME from the matching tagged config vars.
4463 AC_DEFUN([AC_LIBTOOL_CONFIG],
4464 [# The else clause should only fire when bootstrapping the
4465 # libtool distribution, otherwise you forgot to ship ltmain.sh
4466 # with your package, and you will get complaints that there are
4467 # no rules to generate ltmain.sh.
4468 if test -f "$ltmain"; then
4469 # See if we are running on zsh, and set the options which allow our commands through
4470 # without removal of \ escapes.
4471 if test -n "${ZSH_VERSION+set}" ; then
4472 setopt NO_GLOB_SUBST
4474 # Now quote all the things that may contain metacharacters while being
4475 # careful not to overquote the AC_SUBSTed values. We take copies of the
4476 # variables and quote the copies for generation of the libtool script.
4477 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4479 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4480 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4481 deplibs_check_method reload_flag reload_cmds need_locks \
4482 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4483 lt_cv_sys_global_symbol_to_c_name_address \
4484 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4485 old_postinstall_cmds old_postuninstall_cmds \
4486 _LT_AC_TAGVAR(compiler, $1) \
4487 _LT_AC_TAGVAR(CC, $1) \
4488 _LT_AC_TAGVAR(LD, $1) \
4489 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4490 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4491 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4492 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4493 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4494 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4495 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4496 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4497 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4498 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4499 _LT_AC_TAGVAR(predep_objects, $1) \
4500 _LT_AC_TAGVAR(postdep_objects, $1) \
4501 _LT_AC_TAGVAR(predeps, $1) \
4502 _LT_AC_TAGVAR(postdeps, $1) \
4503 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4504 _LT_AC_TAGVAR(archive_cmds, $1) \
4505 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4506 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4507 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4508 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4509 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4510 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4511 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4512 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4513 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4514 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4515 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4516 _LT_AC_TAGVAR(module_cmds, $1) \
4517 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4518 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4519 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4520 _LT_AC_TAGVAR(include_expsyms, $1); do
4523 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4524 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4525 _LT_AC_TAGVAR(archive_cmds, $1) | \
4526 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4527 _LT_AC_TAGVAR(module_cmds, $1) | \
4528 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4529 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4530 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4531 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4532 postinstall_cmds | postuninstall_cmds | \
4533 old_postinstall_cmds | old_postuninstall_cmds | \
4534 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4535 # Double-quote double-evaled strings.
4536 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4539 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4545 *'\[$]0 --fallback-echo"')
4546 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4551 [cfgfile="${ofile}T"
4552 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4554 AC_MSG_NOTICE([creating $ofile])],
4557 cat <<__EOF__ >> "$cfgfile"
4561 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4562 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4563 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4565 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4566 # Free Software Foundation, Inc.
4568 # This file is part of GNU Libtool:
4569 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4571 # This program is free software; you can redistribute it and/or modify
4572 # it under the terms of the GNU General Public License as published by
4573 # the Free Software Foundation; either version 2 of the License, or
4574 # (at your option) any later version.
4576 # This program is distributed in the hope that it will be useful, but
4577 # WITHOUT ANY WARRANTY; without even the implied warranty of
4578 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4579 # General Public License for more details.
4581 # You should have received a copy of the GNU General Public License
4582 # along with this program; if not, write to the Free Software
4583 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4585 # As a special exception to the GNU General Public License, if you
4586 # distribute this file as part of a program that contains a
4587 # configuration script generated by Autoconf, you may include it under
4588 # the same distribution terms that you use for the rest of that program.
4590 # A sed program that does not truncate output.
4593 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4594 Xsed="$SED -e 1s/^X//"
4596 # The HP-UX ksh and POSIX shell print the target directory to stdout
4598 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4600 # The names of the tagged configurations supported by this script.
4603 # ### BEGIN LIBTOOL CONFIG],
4604 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4606 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4608 # Shell to use when invoking shell scripts.
4611 # Whether or not to build shared libraries.
4612 build_libtool_libs=$enable_shared
4614 # Whether or not to build static libraries.
4615 build_old_libs=$enable_static
4617 # Whether or not to add -lc for building shared libraries.
4618 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4620 # Whether or not to disallow shared libs when runtime libs are static
4621 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4623 # Whether or not to optimize for fast installation.
4624 fast_install=$enable_fast_install
4627 host_alias=$host_alias
4632 build_alias=$build_alias
4636 # An echo program that does not interpret backslashes.
4641 AR_FLAGS=$lt_AR_FLAGS
4646 # A language-specific compiler.
4647 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4649 # Is the compiler the GNU C compiler?
4650 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4655 # The linker used to build libraries.
4656 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4658 # Whether we need hard or soft links.
4661 # A BSD-compatible nm program.
4664 # A symbol stripping program
4667 # Used to examine libraries when file_magic_cmd begins "file"
4668 MAGIC_CMD=$MAGIC_CMD
4670 # Used on cygwin: DLL creation program.
4673 # Used on cygwin: object dumper.
4676 # Used on cygwin: assembler.
4679 # The name of the directory that contains temporary libtool files.
4682 # How to create reloadable object files.
4683 reload_flag=$lt_reload_flag
4684 reload_cmds=$lt_reload_cmds
4686 # How to pass a linker flag through the compiler.
4687 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4689 # Object file suffix (normally "o").
4692 # Old archive suffix (normally "a").
4695 # Shared library suffix (normally ".so").
4696 shrext_cmds='$shrext_cmds'
4698 # Executable file suffix (normally "").
4701 # Additional compiler flags for building library objects.
4702 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4705 # What is the maximum length of a command?
4706 max_cmd_len=$lt_cv_sys_max_cmd_len
4708 # Does compiler simultaneously support -c and -o options?
4709 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4711 # Must we lock files when doing compilation?
4712 need_locks=$lt_need_locks
4714 # Do we need the lib prefix for modules?
4715 need_lib_prefix=$need_lib_prefix
4717 # Do we need a version for libraries?
4718 need_version=$need_version
4720 # Whether dlopen is supported.
4721 dlopen_support=$enable_dlopen
4723 # Whether dlopen of programs is supported.
4724 dlopen_self=$enable_dlopen_self
4726 # Whether dlopen of statically linked programs is supported.
4727 dlopen_self_static=$enable_dlopen_self_static
4729 # Compiler flag to prevent dynamic linking.
4730 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4732 # Compiler flag to turn off builtin functions.
4733 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4735 # Compiler flag to allow reflexive dlopens.
4736 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4738 # Compiler flag to generate shared objects directly from archives.
4739 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4741 # Compiler flag to generate thread-safe objects.
4742 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4744 # Library versioning type.
4745 version_type=$version_type
4747 # Format of library name prefix.
4748 libname_spec=$lt_libname_spec
4750 # List of archive names. First name is the real one, the rest are links.
4751 # The last name is the one that the linker finds with -lNAME.
4752 library_names_spec=$lt_library_names_spec
4754 # The coded name of the library, if different from the real name.
4755 soname_spec=$lt_soname_spec
4757 # Commands used to build and install an old-style archive.
4759 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4760 old_postinstall_cmds=$lt_old_postinstall_cmds
4761 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4763 # Create an old-style archive from a shared archive.
4764 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4766 # Create a temporary old-style archive to link instead of a shared archive.
4767 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4769 # Commands used to build and install a shared archive.
4770 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4771 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4772 postinstall_cmds=$lt_postinstall_cmds
4773 postuninstall_cmds=$lt_postuninstall_cmds
4775 # Commands used to build a loadable module (assumed same as above if empty)
4776 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4777 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4779 # Commands to strip libraries.
4780 old_striplib=$lt_old_striplib
4781 striplib=$lt_striplib
4783 # Dependencies to place before the objects being linked to create a
4785 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4787 # Dependencies to place after the objects being linked to create a
4789 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4791 # Dependencies to place before the objects being linked to create a
4793 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4795 # Dependencies to place after the objects being linked to create a
4797 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4799 # The library search path used internally by the compiler when linking
4801 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4803 # Method to check whether dependent libraries are shared objects.
4804 deplibs_check_method=$lt_deplibs_check_method
4806 # Command to use when deplibs_check_method == file_magic.
4807 file_magic_cmd=$lt_file_magic_cmd
4809 # Flag that allows shared libraries with undefined symbols to be built.
4810 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4812 # Flag that forces no undefined symbols.
4813 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4815 # Commands used to finish a libtool library installation in a directory.
4816 finish_cmds=$lt_finish_cmds
4818 # Same as above, but a single script fragment to be evaled but not shown.
4819 finish_eval=$lt_finish_eval
4821 # Take the output of nm and produce a listing of raw symbols and C names.
4822 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4824 # Transform the output of nm in a proper C declaration
4825 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4827 # Transform the output of nm in a C name address pair
4828 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4830 # This is the shared library runtime path variable.
4831 runpath_var=$runpath_var
4833 # This is the shared library path variable.
4834 shlibpath_var=$shlibpath_var
4836 # Is shlibpath searched before the hard-coded library search path?
4837 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4839 # How to hardcode a shared library path into an executable.
4840 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4842 # Whether we should hardcode library paths into libraries.
4843 hardcode_into_libs=$hardcode_into_libs
4845 # Flag to hardcode \$libdir into a binary during linking.
4846 # This must work even if \$libdir does not exist.
4847 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4849 # If ld is used when linking, flag to hardcode \$libdir into
4850 # a binary during linking. This must work even if \$libdir does
4852 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4854 # Whether we need a single -rpath flag with a separated argument.
4855 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4857 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4859 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4861 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4863 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4865 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4866 # the resulting binary.
4867 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4869 # Set to yes if building a shared library automatically hardcodes DIR into the library
4870 # and all subsequent libraries and executables linked against it.
4871 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4873 # Variables whose values should be saved in libtool wrapper scripts and
4874 # restored at relink time.
4875 variables_saved_for_relink="$variables_saved_for_relink"
4877 # Whether libtool must link a program against all its dependency libraries.
4878 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4880 # Compile-time system search path for libraries
4881 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4883 # Run-time system search path for libraries
4884 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4886 # Fix the shell variable \$srcfile for the compiler.
4887 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4889 # Set to yes if exported symbols are required.
4890 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4892 # The commands to list exported symbols.
4893 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4895 # The commands to extract the exported symbol list from a shared archive.
4896 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4898 # Symbols that should not be listed in the preloaded symbols.
4899 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4901 # Symbols that must always be exported.
4902 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4905 [# ### END LIBTOOL CONFIG],
4906 [# ### END LIBTOOL TAG CONFIG: $tagname])
4913 cat <<\EOF >> "$cfgfile"
4915 # AIX sometimes has problems with the GCC collect2 program. For some
4916 # reason, if we set the COLLECT_NAMES environment variable, the problems
4917 # vanish in a puff of smoke.
4918 if test "X${COLLECT_NAMES+set}" != Xset; then
4920 export COLLECT_NAMES
4926 # We use sed instead of cat because bash on DJGPP gets confused if
4927 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4928 # text mode, it properly converts lines to CR/LF. This bash problem
4929 # is reportedly fixed, but why not run on old versions too?
4930 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4932 mv -f "$cfgfile" "$ofile" || \
4933 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4937 # If there is no Makefile yet, we rely on a make rule to execute
4938 # `config.status --recheck' to rerun these tests and create the
4939 # libtool script then.
4940 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4941 if test -f "$ltmain_in"; then
4942 test -f Makefile && make "$ltmain"
4945 ])# AC_LIBTOOL_CONFIG
4948 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4949 # -------------------------------------------
4950 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4951 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4953 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4955 if test "$GCC" = yes; then
4956 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4958 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4959 lt_cv_prog_compiler_rtti_exceptions,
4960 [-fno-rtti -fno-exceptions], [],
4961 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4963 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4966 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4967 # ---------------------------------
4968 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4969 [AC_REQUIRE([AC_CANONICAL_HOST])
4970 AC_REQUIRE([AC_PROG_NM])
4971 AC_REQUIRE([AC_OBJEXT])
4972 # Check for command to grab the raw symbol name followed by C symbol from nm.
4973 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4974 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4976 # These are sane defaults that work on at least a few old systems.
4977 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4979 # Character class describing NM global symbol codes.
4980 symcode='[[BCDEGRST]]'
4982 # Regexp to match symbols that can be accessed directly from C.
4983 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4985 # Transform an extracted symbol line into a proper C declaration
4986 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4988 # Transform an extracted symbol line into symbol name and symbol address
4989 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'"
4991 # Define system-specific variables.
4996 cygwin* | mingw* | pw32*)
4997 symcode='[[ABCDGISTW]]'
4999 hpux*) # Its linker distinguishes data from code symbols
5000 if test "$host_cpu" = ia64; then
5001 symcode='[[ABCDEGRST]]'
5003 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5004 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'"
5007 if test "$host_cpu" = ia64; then
5008 symcode='[[ABCDGIRSTW]]'
5009 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5010 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'"
5014 symcode='[[BCDEGRST]]'
5017 symcode='[[BCDEGQRST]]'
5023 symcode='[[DFNSTU]]'
5027 # Handle CRLF in mingw tool chain
5031 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5035 # If we're using GNU nm, then use its standard symbol codes.
5036 case `$NM -V 2>&1` in
5037 *GNU* | *'with BFD'*)
5038 symcode='[[ABCDGIRSTW]]' ;;
5041 # Try without a prefix undercore, then with it.
5042 for ac_symprfx in "" "_"; do
5044 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5045 symxfrm="\\1 $ac_symprfx\\2 \\2"
5047 # Write the raw and C identifiers.
5048 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5050 # Check to see that the pipe works correctly.
5054 cat > conftest.$ac_ext <<EOF
5059 void nm_test_func(){}
5063 int main(){nm_test_var='a';nm_test_func();return(0);}
5066 if AC_TRY_EVAL(ac_compile); then
5067 # Now try to grab the symbols.
5069 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5070 # Try sorting and uniquifying the output.
5071 if sort "$nlist" | uniq > "$nlist"T; then
5072 mv -f "$nlist"T "$nlist"
5077 # Make sure that we snagged all the symbols we need.
5078 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5079 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5080 cat <<EOF > conftest.$ac_ext
5086 # Now generate the symbol file.
5087 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5089 cat <<EOF >> conftest.$ac_ext
5090 #if defined (__STDC__) && __STDC__
5091 # define lt_ptr_t void *
5093 # define lt_ptr_t char *
5097 /* The mapping between symbol names and symbols. */
5102 lt_preloaded_symbols[[]] =
5105 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5106 cat <<\EOF >> conftest.$ac_ext
5114 # Now try linking the two files.
5115 mv conftest.$ac_objext conftstm.$ac_objext
5116 lt_save_LIBS="$LIBS"
5117 lt_save_CFLAGS="$CFLAGS"
5118 LIBS="conftstm.$ac_objext"
5119 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5120 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5123 LIBS="$lt_save_LIBS"
5124 CFLAGS="$lt_save_CFLAGS"
5126 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5129 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5132 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5135 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5136 cat conftest.$ac_ext >&5
5138 rm -f conftest* conftst*
5140 # Do not use the global_symbol_pipe unless it works.
5141 if test "$pipe_works" = yes; then
5144 lt_cv_sys_global_symbol_pipe=
5148 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5149 lt_cv_sys_global_symbol_to_cdecl=
5151 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5152 AC_MSG_RESULT(failed)
5156 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5159 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5160 # ---------------------------------------
5161 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5162 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5163 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5164 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5166 AC_MSG_CHECKING([for $compiler option to produce PIC])
5168 # C++ specific cases for pic, static, wl, etc.
5169 if test "$GXX" = yes; then
5170 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5171 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5175 # All AIX code is PIC.
5176 if test "$host_cpu" = ia64; then
5177 # AIX 5 now supports IA64 processor
5178 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5182 # FIXME: we need at least 68020 code to build shared libraries, but
5183 # adding the `-m68020' flag to GCC prevents building anything better,
5185 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5187 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5188 # PIC is the default for these OSes.
5190 mingw* | os2* | pw32*)
5191 # This hack is so that the source file can tell whether it is being
5192 # built for inclusion in a dll (and should export symbols for example).
5193 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5195 darwin* | rhapsody*)
5196 # PIC is the default on this platform
5197 # Common symbols not allowed in MH_DYLIB files
5198 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5201 # DJGPP does not support shared libraries at all
5202 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5205 if test -d /usr/nec; then
5206 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5210 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5216 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5221 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5227 # All AIX code is PIC.
5228 if test "$host_cpu" = ia64; then
5229 # AIX 5 now supports IA64 processor
5230 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5232 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5236 case $cc_basename in
5238 # Green Hills C++ Compiler
5239 # _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"
5244 # PIC is the default on this platform
5245 # Common symbols not allowed in MH_DYLIB files
5246 case $cc_basename in
5248 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5249 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5254 case $cc_basename in
5256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5259 # Green Hills C++ Compiler
5260 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5266 freebsd* | kfreebsd*-gnu | dragonfly*)
5267 # FreeBSD uses GNU C++
5269 hpux9* | hpux10* | hpux11*)
5270 case $cc_basename in
5272 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5273 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5274 if test "$host_cpu" != ia64; then
5275 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5279 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5280 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5286 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5294 irix5* | irix6* | nonstopux*)
5295 case $cc_basename in
5297 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5298 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5299 # CC pic flag -KPIC is the default.
5306 case $cc_basename in
5309 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5310 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5314 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5315 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5316 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5319 # Portland Group C++ compiler.
5320 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5321 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5322 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5326 # Make sure the PIC flag is empty. It appears that all Alpha
5327 # Linux and Compaq Tru64 Unix objects are PIC.
5328 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5329 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5340 case $cc_basename in
5342 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5350 osf3* | osf4* | osf5*)
5351 case $cc_basename in
5353 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5356 # Rational C++ 2.4.1
5357 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5360 # Digital/Compaq C++
5361 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5362 # Make sure the PIC flag is empty. It appears that all Alpha
5363 # Linux and Compaq Tru64 Unix objects are PIC.
5364 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5365 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5374 case $cc_basename in
5376 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5383 case $cc_basename in
5385 # Sun C++ 4.2, 5.x and Centerline C++
5386 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5387 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5388 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5391 # Green Hills C++ Compiler
5392 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5399 case $cc_basename in
5402 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5403 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5407 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5414 case $cc_basename in
5416 # NonStop-UX NCC 3.20
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5428 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5434 if test "$GCC" = yes; then
5435 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5440 # All AIX code is PIC.
5441 if test "$host_cpu" = ia64; then
5442 # AIX 5 now supports IA64 processor
5443 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5448 # FIXME: we need at least 68020 code to build shared libraries, but
5449 # adding the `-m68020' flag to GCC prevents building anything better,
5451 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5454 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5455 # PIC is the default for these OSes.
5458 mingw* | pw32* | os2*)
5459 # This hack is so that the source file can tell whether it is being
5460 # built for inclusion in a dll (and should export symbols for example).
5461 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5464 darwin* | rhapsody*)
5465 # PIC is the default on this platform
5466 # Common symbols not allowed in MH_DYLIB files
5467 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5471 # Just because we use GCC doesn't mean we suddenly get shared libraries
5472 # on systems that don't support them.
5473 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5478 if test -d /usr/nec; then
5479 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5484 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5491 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5497 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5501 # PORTME Check for flag to pass linker flags through the system compiler.
5504 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5505 if test "$host_cpu" = ia64; then
5506 # AIX 5 now supports IA64 processor
5507 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5509 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5513 # PIC is the default on this platform
5514 # Common symbols not allowed in MH_DYLIB files
5515 case $cc_basename in
5517 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5518 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5523 mingw* | pw32* | os2*)
5524 # This hack is so that the source file can tell whether it is being
5525 # built for inclusion in a dll (and should export symbols for example).
5526 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5529 hpux9* | hpux10* | hpux11*)
5530 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5531 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5538 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5541 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5542 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5545 irix5* | irix6* | nonstopux*)
5546 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5547 # PIC (with -KPIC) is the default.
5548 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5552 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5553 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5557 case $cc_basename in
5559 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5560 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5561 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5563 pgcc* | pgf77* | pgf90*)
5564 # Portland Group compilers (*not* the Pentium gcc compiler,
5565 # which looks to be a dead project)
5566 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5567 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5568 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5571 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5572 # All Alpha code is PIC.
5573 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5578 osf3* | osf4* | osf5*)
5579 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5580 # All OSF/1 code is PIC.
5581 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5585 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5586 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5590 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5591 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5592 case $cc_basename in
5594 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5596 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5601 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5602 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5603 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5606 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5607 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5608 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5609 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5613 if test -d /usr/nec ;then
5614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5615 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5620 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5621 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5625 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5626 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5630 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5635 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5638 # Check to make sure the PIC flag actually works.
5640 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5641 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5642 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5643 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5644 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5646 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5648 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5649 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5652 # For platforms which do not support PIC, -DPIC is meaningless:
5654 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5657 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5663 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5664 # ------------------------------------
5665 # See if the linker supports building shared libraries.
5666 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5667 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5669 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5672 # If we're using GNU nm, then we don't want the "-C" option.
5673 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5674 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5675 _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'
5677 _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'
5681 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5684 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5687 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5692 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5693 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5694 _LT_AC_TAGVAR(archive_cmds, $1)=
5695 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5696 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5697 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5698 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5699 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5700 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5703 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5704 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5705 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5706 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5707 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5708 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5709 _LT_AC_TAGVAR(module_cmds, $1)=
5710 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5711 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5712 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5713 # include_expsyms should be a list of space-separated symbols to be *always*
5714 # included in the symbol list
5715 _LT_AC_TAGVAR(include_expsyms, $1)=
5716 # exclude_expsyms can be an extended regexp of symbols to exclude
5717 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5718 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5719 # as well as any symbol that contains `d'.
5720 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5721 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5722 # platforms (ab)use it in PIC code, but their linkers get confused if
5723 # the symbol is explicitly referenced. Since portable code cannot
5724 # rely on this symbol name, it's probably fine to never include it in
5725 # preloaded symbol tables.
5726 extract_expsyms_cmds=
5727 # Just being paranoid about ensuring that cc_basename is set.
5728 _LT_CC_BASENAME([$compiler])
5730 cygwin* | mingw* | pw32*)
5731 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5732 # When not using gcc, we currently assume that we are using
5733 # Microsoft Visual C++.
5734 if test "$GCC" != yes; then
5743 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5744 if test "$with_gnu_ld" = yes; then
5745 # If archive_cmds runs LD, not CC, wlarc should be empty
5748 # Set some defaults for GNU ld with shared library support. These
5749 # are reset later if shared libraries are not supported. Putting them
5750 # here allows them to be overridden if necessary.
5751 runpath_var=LD_RUN_PATH
5752 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5753 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5754 # ancient GNU ld didn't support --whole-archive et. al.
5755 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5756 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5758 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5760 supports_anon_versioning=no
5761 case `$LD -v 2>/dev/null` in
5762 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5763 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5764 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5765 *\ 2.11.*) ;; # other 2.11 versions
5766 *) supports_anon_versioning=yes ;;
5769 # See if GNU ld supports shared libraries.
5771 aix3* | aix4* | aix5*)
5772 # On AIX/PPC, the GNU linker is very broken
5773 if test "$host_cpu" != ia64; then
5774 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5777 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5778 *** to be unable to reliably create shared libraries on AIX.
5779 *** Therefore, libtool is disabling shared libraries support. If you
5780 *** really care for shared libraries, you may want to modify your PATH
5781 *** so that a non-GNU linker is found, and then restart.
5788 _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)'
5789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5790 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5792 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5793 # that the semantics of dynamic libraries on AmigaOS, at least up
5794 # to version 4, is to share data among multiple programs linked
5795 # with the same dynamic library. Since this doesn't match the
5796 # behavior of shared libraries on other platforms, we can't use
5798 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5802 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5803 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5804 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5805 # support --undefined. This deserves some investigation. FIXME
5806 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5812 cygwin* | mingw* | pw32*)
5813 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5814 # as there is no search path for DLLs.
5815 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5816 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5817 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5818 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5819 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5821 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5822 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5823 # If the export-symbols file already is a .def file (1st line
5824 # is EXPORTS), use it as is; otherwise, prepend...
5825 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5826 cp $export_symbols $output_objdir/$soname.def;
5828 echo EXPORTS > $output_objdir/$soname.def;
5829 cat $export_symbols >> $output_objdir/$soname.def;
5831 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5833 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5838 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5840 case $cc_basename,$host_cpu in
5841 pgcc*) # Portland Group C compiler
5842 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5843 tmp_addflag=' $pic_flag'
5845 pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
5846 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5847 tmp_addflag=' $pic_flag -Mnomain' ;;
5848 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5849 tmp_addflag=' -i_dynamic' ;;
5850 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5851 tmp_addflag=' -i_dynamic -nofor_main' ;;
5852 ifc* | ifort*) # Intel Fortran compiler
5853 tmp_addflag=' -nofor_main' ;;
5855 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5857 if test $supports_anon_versioning = yes; then
5858 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5859 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5860 $echo "local: *; };" >> $output_objdir/$libname.ver~
5861 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5864 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5869 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5870 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5873 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5874 _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'
5879 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5880 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5883 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5884 *** create shared libraries on Solaris systems. Therefore, libtool
5885 *** is disabling shared libraries support. We urge you to upgrade GNU
5886 *** binutils to release 2.9.1 or newer. Another option is to modify
5887 *** your PATH or compiler configuration so that the native linker is
5888 *** used, and then restart.
5891 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5892 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5893 _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'
5895 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5900 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5902 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5903 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5907 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5908 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5909 _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'
5911 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5916 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5918 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5919 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5920 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5923 # PORTME fill in a description of your system's linker (not GNU ld)
5926 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5927 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5928 _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'
5929 # Note: this linker hardcodes the directories in LIBPATH if there
5930 # are no directories specified by -L.
5931 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5932 if test "$GCC" = yes && test -z "$link_static_flag"; then
5933 # Neither direct hardcoding nor static linking is supported with a
5935 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5940 if test "$host_cpu" = ia64; then
5941 # On IA64, the linker does run time linking by default, so we don't
5942 # have to do anything special.
5943 aix_use_runtimelinking=no
5944 exp_sym_flag='-Bexport'
5947 # If we're using GNU nm, then we don't want the "-C" option.
5948 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5949 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5950 _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'
5952 _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'
5954 aix_use_runtimelinking=no
5956 # Test if we are trying to use run time linking or normal
5957 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5958 # need to do runtime linking.
5959 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5960 for ld_flag in $LDFLAGS; do
5961 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5962 aix_use_runtimelinking=yes
5968 exp_sym_flag='-bexport'
5969 no_entry_flag='-bnoentry'
5972 # When large executables or shared objects are built, AIX ld can
5973 # have problems creating the table of contents. If linking a library
5974 # or program results in "error TOC overflow" add -mminimal-toc to
5975 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5976 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5978 _LT_AC_TAGVAR(archive_cmds, $1)=''
5979 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5980 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5981 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5983 if test "$GCC" = yes; then
5984 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5985 # We only want to do this on AIX 4.2 and lower, the check
5986 # below for broken collect2 doesn't work under 4.3+
5987 collect2name=`${CC} -print-prog-name=collect2`
5988 if test -f "$collect2name" && \
5989 strings "$collect2name" | grep resolve_lib_name >/dev/null
5991 # We have reworked collect2
5992 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5994 # We have old collect2
5995 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5996 # It fails to find uninstalled libraries when the uninstalled
5997 # path is not listed in the libpath. Setting hardcode_minus_L
5998 # to unsupported forces relinking
5999 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6000 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6001 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6004 shared_flag='-shared'
6005 if test "$aix_use_runtimelinking" = yes; then
6006 shared_flag="$shared_flag "'${wl}-G'
6010 if test "$host_cpu" = ia64; then
6011 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6012 # chokes on -Wl,-G. The following line is correct:
6015 if test "$aix_use_runtimelinking" = yes; then
6016 shared_flag='${wl}-G'
6018 shared_flag='${wl}-bM:SRE'
6023 # It seems that -bexpall does not export symbols beginning with
6024 # underscore (_), so it is better to generate a list of symbols to export.
6025 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6026 if test "$aix_use_runtimelinking" = yes; then
6027 # Warning - without using the other runtime loading flags (-brtl),
6028 # -berok will link without error, but may produce a broken library.
6029 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6030 # Determine the default libpath from the value encoded in an empty executable.
6031 _LT_AC_SYS_LIBPATH_AIX
6032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6033 _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"
6035 if test "$host_cpu" = ia64; then
6036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6037 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6038 _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"
6040 # Determine the default libpath from the value encoded in an empty executable.
6041 _LT_AC_SYS_LIBPATH_AIX
6042 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6043 # Warning - without using the other run time loading flags,
6044 # -berok will link without error, but may produce a broken library.
6045 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6046 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6047 # -bexpall does not export symbols beginning with underscore (_)
6048 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6049 # Exported symbols can be pulled into shared objects from archives
6050 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6051 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6052 # This is similar to how AIX traditionally builds it's shared libraries.
6053 _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'
6059 _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)'
6060 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6061 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6062 # see comment about different semantics on the GNU ld section
6063 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6067 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6070 cygwin* | mingw* | pw32*)
6071 # When not using gcc, we currently assume that we are using
6072 # Microsoft Visual C++.
6073 # hardcode_libdir_flag_spec is actually meaningless, as there is
6074 # no search path for DLLs.
6075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6076 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6077 # Tell ltmain to make .lib files, not .a files.
6079 # Tell ltmain to make .dll files, not .so files.
6081 # FIXME: Setting linknames here is a bad hack.
6082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6083 # The linker will automatically build a .lib file if we build a DLL.
6084 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6085 # FIXME: Should let the user specify the lib program.
6086 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6087 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6088 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6091 darwin* | rhapsody*)
6093 rhapsody* | darwin1.[[012]])
6094 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6097 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6098 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6100 case ${MACOSX_DEPLOYMENT_TARGET} in
6102 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6105 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6111 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6112 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6113 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6114 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6115 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6116 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6117 if test "$GCC" = yes ; then
6118 output_verbose_link_cmd='echo'
6119 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6120 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6121 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6122 _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}'
6123 _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}'
6125 case $cc_basename in
6127 output_verbose_link_cmd='echo'
6128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6129 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6130 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6131 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6132 _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}'
6135 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6142 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6143 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6144 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6148 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6151 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6152 # support. Future versions do this automatically, but an explicit c++rt0.o
6153 # does not break anything, and helps significantly (at the cost of a little
6156 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6158 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6159 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6162 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6164 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6165 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6166 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6167 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6170 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6171 freebsd* | kfreebsd*-gnu | dragonfly*)
6172 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6174 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6175 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6179 if test "$GCC" = yes; then
6180 _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'
6182 _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'
6184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6185 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6186 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6188 # hardcode_minus_L: Not really in the search PATH,
6189 # but as the default location of the library.
6190 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6191 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6195 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6198 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6201 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6207 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6210 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6214 if test "$with_gnu_ld" = no; then
6217 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6220 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6221 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6224 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6225 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6226 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6228 # hardcode_minus_L: Not really in the search PATH,
6229 # but as the default location of the library.
6230 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6234 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6235 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6236 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6238 # hardcode_minus_L: Not really in the search PATH,
6239 # but as the default location of the library.
6240 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6246 irix5* | irix6* | nonstopux*)
6247 if test "$GCC" = yes; then
6248 _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'
6250 _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'
6251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6254 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6255 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6259 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6260 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6262 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6264 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6265 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6266 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6270 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6271 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6272 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6273 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6274 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6278 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6279 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6280 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6281 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6282 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6283 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6284 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6287 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6288 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6289 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6292 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6293 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6301 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6302 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6303 _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'
6304 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6308 if test "$GCC" = yes; then
6309 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6310 _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'
6312 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6313 _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'
6315 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6316 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6319 osf4* | osf5*) # as osf3* with the addition of -msym flag
6320 if test "$GCC" = yes; then
6321 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6322 _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'
6323 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6325 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6326 _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'
6327 _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~
6328 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6330 # Both c and cxx compiler support -rpath directly
6331 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6333 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6337 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6338 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6339 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6340 runpath_var=LD_RUN_PATH
6341 hardcode_runpath_var=yes
6345 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6346 if test "$GCC" = yes; then
6348 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6349 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6350 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6354 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6355 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6357 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6358 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6360 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6362 # The compiler driver will combine linker options so we
6363 # cannot just pass the convience library names through
6364 # without $wl, iff we do not link with $LD.
6365 # Luckily, gcc supports the same syntax we need for Sun Studio.
6366 # Supported since Solaris 2.6 (maybe 2.5.1?)
6369 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6371 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6374 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6378 if test "x$host_vendor" = xsequent; then
6379 # Use $CC to link under sequent, because it throws in some extra .o
6380 # files that make .init and .fini sections work.
6381 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6383 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6385 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6386 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6387 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6388 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6392 case $host_vendor in
6394 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6395 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6398 ## LD is ld it makes a PLAMLIB
6399 ## CC just makes a GrossModule.
6400 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6401 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6402 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6405 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6406 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6409 runpath_var='LD_RUN_PATH'
6410 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6414 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6415 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6416 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6420 if test -d /usr/nec; then
6421 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6422 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6423 runpath_var=LD_RUN_PATH
6424 hardcode_runpath_var=yes
6425 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6430 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6431 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6432 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6433 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6434 hardcode_runpath_var=yes
6435 runpath_var=LD_RUN_PATH
6438 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6439 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}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'
6443 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6445 runpath_var='LD_RUN_PATH'
6446 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6450 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6451 # $CC -shared without GNU ld will not create a library from C++
6452 # object files and a static libstdc++, better avoid it by now
6453 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6454 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6455 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6457 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6458 runpath_var='LD_RUN_PATH'
6462 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6463 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6464 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6468 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6473 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6474 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6476 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6477 if test "$GCC" = yes; then
6478 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6482 # Do we need to explicitly link libc?
6484 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6486 # Assume -lc should be added
6487 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6489 if test "$enable_shared" = yes && test "$GCC" = yes; then
6490 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6492 # FIXME: we may have to deal with multi-command sequences.
6495 # Test whether the compiler implicitly links with -lc since on some
6496 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6497 # to ld, don't add -lc before -lgcc.
6498 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6500 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6502 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6505 libobjs=conftest.$ac_objext
6507 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6513 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6514 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6515 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6517 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6519 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6521 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6523 cat conftest.err 1>&5
6526 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6532 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6535 # _LT_AC_FILE_LTDLL_C
6536 # -------------------
6537 # Be careful that the start marker always follows a newline.
6538 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6539 # /* ltdll.c starts here */
6540 # #define WIN32_LEAN_AND_MEAN
6541 # #include <windows.h>
6542 # #undef WIN32_LEAN_AND_MEAN
6543 # #include <stdio.h>
6545 # #ifndef __CYGWIN__
6546 # # ifdef __CYGWIN32__
6547 # # define __CYGWIN__ __CYGWIN32__
6551 # #ifdef __cplusplus
6554 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6555 # #ifdef __cplusplus
6560 # #include <cygwin/cygwin_dll.h>
6561 # DECLARE_CYGWIN_DLL( DllMain );
6563 # HINSTANCE __hDllInstance_base;
6566 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6568 # __hDllInstance_base = hInst;
6571 # /* ltdll.c ends here */
6572 ])# _LT_AC_FILE_LTDLL_C
6575 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6576 # ---------------------------------
6577 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6581 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6582 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6583 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6584 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6585 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6586 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6587 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6589 # This is just to silence aclocal about the macro not being used
6590 ifelse([AC_DISABLE_FAST_INSTALL])
6592 AC_DEFUN([LT_AC_PROG_GCJ],
6593 [AC_CHECK_TOOL(GCJ, gcj, no)
6594 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6598 AC_DEFUN([LT_AC_PROG_RC],
6599 [AC_CHECK_TOOL(RC, windres, no)
6602 # NOTE: This macro has been submitted for inclusion into #
6603 # GNU Autoconf as AC_PROG_SED. When it is available in #
6604 # a released version of Autoconf we should remove this #
6605 # macro and use it instead. #
6608 # Check for a fully-functional sed program, that truncates
6609 # as few characters as possible. Prefer GNU sed if found.
6610 AC_DEFUN([LT_AC_PROG_SED],
6611 [AC_MSG_CHECKING([for a sed that does not truncate output])
6612 AC_CACHE_VAL(lt_cv_path_SED,
6613 [# Loop through the user's path and test for sed and gsed.
6614 # Then use that list of sed's as ones to test for truncation.
6615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619 test -z "$as_dir" && as_dir=.
6620 for lt_ac_prog in sed gsed; do
6621 for ac_exec_ext in '' $ac_executable_extensions; do
6622 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6623 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6630 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6631 # along with /bin/sed that truncates output.
6632 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6633 test ! -f $lt_ac_sed && continue
6634 cat /dev/null > conftest.in
6636 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6637 # Check for GNU sed and select it if it is found.
6638 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6639 lt_cv_path_SED=$lt_ac_sed
6643 cat conftest.in conftest.in >conftest.tmp
6644 mv conftest.tmp conftest.in
6645 cp conftest.in conftest.nl
6647 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6648 cmp -s conftest.out conftest.nl || break
6649 # 10000 chars as input seems more than enough
6650 test $lt_ac_count -gt 10 && break
6651 lt_ac_count=`expr $lt_ac_count + 1`
6652 if test $lt_ac_count -gt $lt_ac_max; then
6653 lt_ac_max=$lt_ac_count
6654 lt_cv_path_SED=$lt_ac_sed
6660 AC_MSG_RESULT([$SED])
6663 # Check to see how 'make' treats includes. -*- Autoconf -*-
6665 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6667 # This file is free software; the Free Software Foundation
6668 # gives unlimited permission to copy and/or distribute it,
6669 # with or without modifications, as long as this notice is preserved.
6675 # Check to see how make treats includes.
6676 AC_DEFUN([AM_MAKE_INCLUDE],
6677 [am_make=${MAKE-make}
6678 cat > confinc << 'END'
6683 # If we don't find an include directive, just comment out the code.
6684 AC_MSG_CHECKING([for style of include used by $am_make])
6688 # First try GNU make style include.
6689 echo "include confinc" > confmf
6690 # We grep out `Entering directory' and `Leaving directory'
6691 # messages which can occur if `w' ends up in MAKEFLAGS.
6692 # In particular we don't look at `^make:' because GNU make might
6693 # be invoked under some other name (usually "gmake"), in which
6694 # case it prints its new name instead of `make'.
6695 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6700 # Now try BSD make style include.
6701 if test "$am__include" = "#"; then
6702 echo '.include "confinc"' > confmf
6703 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6704 am__include=.include
6709 AC_SUBST([am__include])
6710 AC_SUBST([am__quote])
6711 AC_MSG_RESULT([$_am_result])
6712 rm -f confinc confmf
6715 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
6717 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6718 # Free Software Foundation, Inc.
6720 # This file is free software; the Free Software Foundation
6721 # gives unlimited permission to copy and/or distribute it,
6722 # with or without modifications, as long as this notice is preserved.
6726 # AM_MISSING_PROG(NAME, PROGRAM)
6727 # ------------------------------
6728 AC_DEFUN([AM_MISSING_PROG],
6729 [AC_REQUIRE([AM_MISSING_HAS_RUN])
6730 $1=${$1-"${am_missing_run}$2"}
6734 # AM_MISSING_HAS_RUN
6735 # ------------------
6736 # Define MISSING if not defined so far and test if it supports --run.
6737 # If it does, set am_missing_run to use it, otherwise, to nothing.
6738 AC_DEFUN([AM_MISSING_HAS_RUN],
6739 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6740 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6741 # Use eval to expand $SHELL
6742 if eval "$MISSING --run true"; then
6743 am_missing_run="$MISSING --run "
6746 AC_MSG_WARN([`missing' script is too old or missing])
6750 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
6752 # This file is free software; the Free Software Foundation
6753 # gives unlimited permission to copy and/or distribute it,
6754 # with or without modifications, as long as this notice is preserved.
6758 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6760 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6761 # created by `make install' are always world readable, even if the
6762 # installer happens to have an overly restrictive umask (e.g. 077).
6763 # This was a mistake. There are at least two reasons why we must not
6765 # - it causes special bits like SGID to be ignored,
6766 # - it may be too restrictive (some setups expect 775 directories).
6768 # Do not use -m 0755 and let people choose whatever they expect by
6771 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
6772 # Some implementations (such as Solaris 8's) are not thread-safe: if a
6773 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6774 # concurrently, both version can detect that a/ is missing, but only
6775 # one can create it and the other will error out. Consequently we
6776 # restrict ourselves to GNU make (using the --version option ensures
6778 AC_DEFUN([AM_PROG_MKDIR_P],
6779 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6780 # We used to keeping the `.' as first argument, in order to
6781 # allow $(mkdir_p) to be used without argument. As in
6782 # $(mkdir_p) $(somedir)
6783 # where $(somedir) is conditionally defined. However this is wrong
6785 # 1. if the package is installed by a user who cannot write `.'
6786 # make install will fail,
6787 # 2. the above comment should most certainly read
6788 # $(mkdir_p) $(DESTDIR)$(somedir)
6789 # so it does not work when $(somedir) is undefined and
6790 # $(DESTDIR) is not.
6791 # To support the latter case, we have to write
6792 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6793 # so the `.' trick is pointless.
6794 mkdir_p='mkdir -p --'
6796 # On NextStep and OpenStep, the `mkdir' command does not
6797 # recognize any option. It will interpret all options as
6798 # directories to create, and then abort because `.' already
6800 for d in ./-p ./--version;
6802 test -d $d && rmdir $d
6804 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6805 if test -f "$ac_aux_dir/mkinstalldirs"; then
6806 mkdir_p='$(mkinstalldirs)'
6808 mkdir_p='$(install_sh) -d'
6811 AC_SUBST([mkdir_p])])
6813 # Helper functions for option handling. -*- Autoconf -*-
6815 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6817 # This file is free software; the Free Software Foundation
6818 # gives unlimited permission to copy and/or distribute it,
6819 # with or without modifications, as long as this notice is preserved.
6823 # _AM_MANGLE_OPTION(NAME)
6824 # -----------------------
6825 AC_DEFUN([_AM_MANGLE_OPTION],
6826 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6828 # _AM_SET_OPTION(NAME)
6829 # ------------------------------
6830 # Set option NAME. Presently that only means defining a flag for this option.
6831 AC_DEFUN([_AM_SET_OPTION],
6832 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6834 # _AM_SET_OPTIONS(OPTIONS)
6835 # ----------------------------------
6836 # OPTIONS is a space-separated list of Automake options.
6837 AC_DEFUN([_AM_SET_OPTIONS],
6838 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6840 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6841 # -------------------------------------------
6842 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6843 AC_DEFUN([_AM_IF_OPTION],
6844 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6846 # Check to make sure that the build environment is sane. -*- Autoconf -*-
6848 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6849 # Free Software Foundation, Inc.
6851 # This file is free software; the Free Software Foundation
6852 # gives unlimited permission to copy and/or distribute it,
6853 # with or without modifications, as long as this notice is preserved.
6859 AC_DEFUN([AM_SANITY_CHECK],
6860 [AC_MSG_CHECKING([whether build environment is sane])
6863 echo timestamp > conftest.file
6864 # Do `set' in a subshell so we don't clobber the current shell's
6865 # arguments. Must try -L first in case configure is actually a
6866 # symlink; some systems play weird games with the mod time of symlinks
6867 # (eg FreeBSD returns the mod time of the symlink's containing
6870 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6871 if test "$[*]" = "X"; then
6873 set X `ls -t $srcdir/configure conftest.file`
6876 if test "$[*]" != "X $srcdir/configure conftest.file" \
6877 && test "$[*]" != "X conftest.file $srcdir/configure"; then
6879 # If neither matched, then we have a broken ls. This can happen
6880 # if, for instance, CONFIG_SHELL is bash and it inherits a
6881 # broken ls alias from the environment. This has actually
6882 # happened. Such a system could not be considered "sane".
6883 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
6884 alias in your environment])
6887 test "$[2]" = conftest.file
6893 AC_MSG_ERROR([newly created file is older than distributed files!
6894 Check your system clock])
6896 AC_MSG_RESULT(yes)])
6898 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6900 # This file is free software; the Free Software Foundation
6901 # gives unlimited permission to copy and/or distribute it,
6902 # with or without modifications, as long as this notice is preserved.
6904 # AM_PROG_INSTALL_STRIP
6905 # ---------------------
6906 # One issue with vendor `install' (even GNU) is that you can't
6907 # specify the program used to strip binaries. This is especially
6908 # annoying in cross-compiling environments, where the build's strip
6909 # is unlikely to handle the host's binaries.
6910 # Fortunately install-sh will honor a STRIPPROG variable, so we
6911 # always use install-sh in `make install-strip', and initialize
6912 # STRIPPROG with the value of the STRIP variable (set by the user).
6913 AC_DEFUN([AM_PROG_INSTALL_STRIP],
6914 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6915 # Installed binaries are usually stripped using `strip' when the user
6916 # run `make install-strip'. However `strip' might not be the right
6917 # tool to use in cross-compilation environments, therefore Automake
6918 # will honor the `STRIP' environment variable to overrule this program.
6919 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
6920 if test "$cross_compiling" != no; then
6921 AC_CHECK_TOOL([STRIP], [strip], :)
6923 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6924 AC_SUBST([INSTALL_STRIP_PROGRAM])])
6926 # Check how to create a tarball. -*- Autoconf -*-
6928 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
6930 # This file is free software; the Free Software Foundation
6931 # gives unlimited permission to copy and/or distribute it,
6932 # with or without modifications, as long as this notice is preserved.
6936 # _AM_PROG_TAR(FORMAT)
6937 # --------------------
6938 # Check how to create a tarball in format FORMAT.
6939 # FORMAT should be one of `v7', `ustar', or `pax'.
6941 # Substitute a variable $(am__tar) that is a command
6942 # writing to stdout a FORMAT-tarball containing the directory
6944 # tardir=directory && $(am__tar) > result.tar
6946 # Substitute a variable $(am__untar) that extract such
6947 # a tarball read from stdin.
6948 # $(am__untar) < result.tar
6949 AC_DEFUN([_AM_PROG_TAR],
6950 [# Always define AMTAR for backward compatibility.
6951 AM_MISSING_PROG([AMTAR], [tar])
6953 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
6954 [m4_case([$1], [ustar],, [pax],,
6955 [m4_fatal([Unknown tar format])])
6956 AC_MSG_CHECKING([how to create a $1 tar archive])
6957 # Loop over all known methods to create a tar archive until one works.
6958 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6959 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
6960 # Do not fold the above two line into one, because Tru64 sh and
6961 # Solaris sh will not grok spaces in the rhs of `-'.
6962 for _am_tool in $_am_tools
6966 for _am_tar in tar gnutar gtar;
6968 AM_RUN_LOG([$_am_tar --version]) && break
6970 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
6971 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
6972 am__untar="$_am_tar -xf -"
6975 # Must skip GNU tar: if it does not support --format= it doesn't create
6976 # ustar tarball either.
6977 (tar --version) >/dev/null 2>&1 && continue
6978 am__tar='tar chf - "$$tardir"'
6979 am__tar_='tar chf - "$tardir"'
6980 am__untar='tar xf -'
6983 am__tar='pax -L -x $1 -w "$$tardir"'
6984 am__tar_='pax -L -x $1 -w "$tardir"'
6988 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
6989 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
6990 am__untar='cpio -i -H $1 -d'
6999 # If the value was cached, stop now. We just wanted to have am__tar
7000 # and am__untar set.
7001 test -n "${am_cv_prog_tar_$1}" && break
7003 # tar/untar a dummy directory, and stop if the command works
7006 echo GrepMe > conftest.dir/file
7007 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7009 if test -s conftest.tar; then
7010 AM_RUN_LOG([$am__untar <conftest.tar])
7011 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7016 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7017 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7019 AC_SUBST([am__untar])