1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
26 # This file is free software; the Free Software Foundation
27 # gives unlimited permission to copy and/or distribute it,
28 # with or without modifications, as long as this notice is preserved.
32 # AM_AUTOMAKE_VERSION(VERSION)
33 # ----------------------------
34 # Automake X.Y traces this macro to ensure aclocal.m4 has been
35 # generated from the m4 files accompanying Automake X.Y.
36 # (This private macro should not be called outside this file.)
37 AC_DEFUN([AM_AUTOMAKE_VERSION],
38 [am__api_version='1.11'
39 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
40 dnl require some minimum version. Point them to the right macro.
41 m4_if([$1], [1.11.3], [],
42 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
45 # _AM_AUTOCONF_VERSION(VERSION)
46 # -----------------------------
47 # aclocal traces this macro to find the Autoconf version.
48 # This is a private macro too. Using m4_define simplifies
49 # the logic in aclocal, which can simply ignore this definition.
50 m4_define([_AM_AUTOCONF_VERSION], [])
52 # AM_SET_CURRENT_AUTOMAKE_VERSION
53 # -------------------------------
54 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
55 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
56 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57 [AM_AUTOMAKE_VERSION([1.11.3])dnl
58 m4_ifndef([AC_AUTOCONF_VERSION],
59 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
60 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
62 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
64 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
66 # This file is free software; the Free Software Foundation
67 # gives unlimited permission to copy and/or distribute it,
68 # with or without modifications, as long as this notice is preserved.
72 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
74 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
76 # Of course, Automake must honor this variable whenever it calls a
77 # tool from the auxiliary directory. The problem is that $srcdir (and
78 # therefore $ac_aux_dir as well) can be either absolute or relative,
79 # depending on how configure is run. This is pretty annoying, since
80 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
81 # source directory, any form will work fine, but in subdirectories a
82 # relative path needs to be adjusted first.
85 # fails when called from a subdirectory if $ac_aux_dir is relative
86 # $top_srcdir/$ac_aux_dir/missing
87 # fails if $ac_aux_dir is absolute,
88 # fails when called from a subdirectory in a VPATH build with
89 # a relative $ac_aux_dir
91 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
92 # are both prefixed by $srcdir. In an in-source build this is usually
93 # harmless because $srcdir is `.', but things will broke when you
94 # start a VPATH build or use an absolute $srcdir.
96 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
97 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
98 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
99 # and then we would define $MISSING as
100 # MISSING="\${SHELL} $am_aux_dir/missing"
101 # This will work as long as MISSING is not called from configure, because
102 # unfortunately $(top_srcdir) has no meaning in configure.
103 # However there are other variables, like CC, which are often used in
104 # configure, and could therefore not use this "fixed" $ac_aux_dir.
106 # Another solution, used here, is to always expand $ac_aux_dir to an
107 # absolute PATH. The drawback is that using absolute paths prevent a
108 # configured tree to be moved without reconfiguration.
110 AC_DEFUN([AM_AUX_DIR_EXPAND],
111 [dnl Rely on autoconf to set up CDPATH properly.
113 # expand $ac_aux_dir to an absolute path
114 am_aux_dir=`cd $ac_aux_dir && pwd`
117 # AM_CONDITIONAL -*- Autoconf -*-
119 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
120 # Free Software Foundation, Inc.
122 # This file is free software; the Free Software Foundation
123 # gives unlimited permission to copy and/or distribute it,
124 # with or without modifications, as long as this notice is preserved.
128 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
129 # -------------------------------------
130 # Define a conditional.
131 AC_DEFUN([AM_CONDITIONAL],
133 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
134 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
135 AC_SUBST([$1_TRUE])dnl
136 AC_SUBST([$1_FALSE])dnl
137 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
138 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
139 m4_define([_AM_COND_VALUE_$1], [$2])dnl
147 AC_CONFIG_COMMANDS_PRE(
148 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
149 AC_MSG_ERROR([[conditional "$1" was never defined.
150 Usually this means the macro was only invoked conditionally.]])
153 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
154 # 2010, 2011 Free Software Foundation, Inc.
156 # This file is free software; the Free Software Foundation
157 # gives unlimited permission to copy and/or distribute it,
158 # with or without modifications, as long as this notice is preserved.
162 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
163 # written in clear, in which case automake, when reading aclocal.m4,
164 # will think it sees a *use*, and therefore will trigger all it's
165 # C support machinery. Also note that it means that autoscan, seeing
166 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
169 # _AM_DEPENDENCIES(NAME)
170 # ----------------------
171 # See how the compiler implements dependency checking.
172 # NAME is "CC", "CXX", "GCJ", or "OBJC".
173 # We try a few techniques and use that to set a single cache variable.
175 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
176 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
177 # dependency, and given that the user is not expected to run this macro,
178 # just rely on AC_PROG_CC.
179 AC_DEFUN([_AM_DEPENDENCIES],
180 [AC_REQUIRE([AM_SET_DEPDIR])dnl
181 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
182 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
183 AC_REQUIRE([AM_DEP_TRACK])dnl
185 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
186 [$1], CXX, [depcc="$CXX" am_compiler_list=],
187 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
188 [$1], UPC, [depcc="$UPC" am_compiler_list=],
189 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
190 [depcc="$$1" am_compiler_list=])
192 AC_CACHE_CHECK([dependency style of $depcc],
193 [am_cv_$1_dependencies_compiler_type],
194 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
195 # We make a subdir and do the tests there. Otherwise we can end up
196 # making bogus files that we don't know about and never remove. For
197 # instance it was reported that on HP-UX the gcc test will end up
198 # making a dummy file named `D' -- because `-MD' means `put the output
202 # Copy depcomp to subdir because otherwise we won't find it if we're
203 # using a relative directory.
204 cp "$am_depcomp" conftest.dir
206 # We will build objects and dependencies in a subdirectory because
207 # it helps to detect inapplicable dependency modes. For instance
208 # both Tru64's cc and ICC support -MD to output dependencies as a
209 # side effect of compilation, but ICC will put the dependencies in
210 # the current directory while Tru64 will put them in the object
214 am_cv_$1_dependencies_compiler_type=none
215 if test "$am_compiler_list" = ""; then
216 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
220 [case " $depcc " in #(
221 *\ -arch\ *\ -arch\ *) am__universal=true ;;
224 [case " $depcc " in #(
225 *\ -arch\ *\ -arch\ *) am__universal=true ;;
228 for depmode in $am_compiler_list; do
229 # Setup a source with many dependencies, because some compilers
230 # like to wrap large dependency lists on column 80 (with \), and
231 # we should not choose a depcomp mode which is confused by this.
233 # We need to recreate these files for each test, as the compiler may
234 # overwrite some of them when testing with obscure command lines.
235 # This happens at least with the AIX C compiler.
237 for i in 1 2 3 4 5 6; do
238 echo '#include "conftst'$i'.h"' >> sub/conftest.c
239 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240 # Solaris 8's {/usr,}/bin/sh.
241 touch sub/conftst$i.h
243 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
245 # We check with `-c' and `-o' for the sake of the "dashmstdout"
246 # mode. It turns out that the SunPro C++ compiler does not properly
247 # handle `-M -o', and we need to detect this. Also, some Intel
248 # versions had trouble with output in subdirs
249 am__obj=sub/conftest.${OBJEXT-o}
250 am__minus_obj="-o $am__obj"
253 # This depmode causes a compiler race in universal mode.
254 test "$am__universal" = false || continue
257 # after this tag, mechanisms are not by side-effect, so they'll
258 # only be used when explicitly requested
259 if test "x$enable_dependency_tracking" = xyes; then
265 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
266 # This compiler won't grok `-c -o', but also, the minuso test has
267 # not run yet. These depmodes are late enough in the game, and
268 # so weak that their functioning should not be impacted.
269 am__obj=conftest.${OBJEXT-o}
274 if depmode=$depmode \
275 source=sub/conftest.c object=$am__obj \
276 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
277 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
278 >/dev/null 2>conftest.err &&
279 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
280 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
281 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
282 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
283 # icc doesn't choke on unknown options, it will just issue warnings
284 # or remarks (even with -Werror). So we grep stderr for any message
285 # that says an option was ignored or not supported.
286 # When given -MP, icc 7.0 and 7.1 complain thusly:
287 # icc: Command line warning: ignoring option '-M'; no argument required
288 # The diagnosis changed in icc 8.0:
289 # icc: Command line remark: option '-MP' not supported
290 if (grep 'ignoring option' conftest.err ||
291 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
292 am_cv_$1_dependencies_compiler_type=$depmode
301 am_cv_$1_dependencies_compiler_type=none
304 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
305 AM_CONDITIONAL([am__fastdep$1], [
306 test "x$enable_dependency_tracking" != xno \
307 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
313 # Choose a directory name for dependency files.
314 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
315 AC_DEFUN([AM_SET_DEPDIR],
316 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
317 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
323 AC_DEFUN([AM_DEP_TRACK],
324 [AC_ARG_ENABLE(dependency-tracking,
325 [ --disable-dependency-tracking speeds up one-time build
326 --enable-dependency-tracking do not reject slow dependency extractors])
327 if test "x$enable_dependency_tracking" != xno; then
328 am_depcomp="$ac_aux_dir/depcomp"
332 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
333 AC_SUBST([AMDEPBACKSLASH])dnl
334 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
335 AC_SUBST([am__nodep])dnl
336 _AM_SUBST_NOTMAKE([am__nodep])dnl
339 # Generate code to set up dependency tracking. -*- Autoconf -*-
341 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
342 # Free Software Foundation, Inc.
344 # This file is free software; the Free Software Foundation
345 # gives unlimited permission to copy and/or distribute it,
346 # with or without modifications, as long as this notice is preserved.
350 # _AM_OUTPUT_DEPENDENCY_COMMANDS
351 # ------------------------------
352 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
354 # Autoconf 2.62 quotes --file arguments for eval, but not when files
355 # are listed without --file. Let's play safe and only enable the eval
356 # if we detect the quoting.
357 case $CONFIG_FILES in
358 *\'*) eval set x "$CONFIG_FILES" ;;
359 *) set x $CONFIG_FILES ;;
364 # Strip MF so we end up with the name of the file.
365 mf=`echo "$mf" | sed -e 's/:.*$//'`
366 # Check whether this is an Automake generated Makefile or not.
367 # We used to match only the files named `Makefile.in', but
368 # some people rename them; so instead we look at the file content.
369 # Grep'ing the first line is not enough: some people post-process
370 # each Makefile.in and add a new line on top of each file to say so.
371 # Grep'ing the whole file is not good either: AIX grep has a line
372 # limit of 2048, but all sed's we know have understand at least 4000.
373 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
374 dirpart=`AS_DIRNAME("$mf")`
378 # Extract the definition of DEPDIR, am__include, and am__quote
379 # from the Makefile without running `make'.
380 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
381 test -z "$DEPDIR" && continue
382 am__include=`sed -n 's/^am__include = //p' < "$mf"`
383 test -z "am__include" && continue
384 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
385 # When using ansi2knr, U may be empty or an underscore; expand it
386 U=`sed -n 's/^U = //p' < "$mf"`
387 # Find all dependency output files, they are included files with
388 # $(DEPDIR) in their names. We invoke sed twice because it is the
389 # simplest approach to changing $(DEPDIR) to its actual value in the
391 for file in `sed -n "
392 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
393 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
394 # Make sure the directory exists.
395 test -f "$dirpart/$file" && continue
396 fdir=`AS_DIRNAME(["$file"])`
397 AS_MKDIR_P([$dirpart/$fdir])
398 # echo "creating $dirpart/$file"
399 echo '# dummy' > "$dirpart/$file"
403 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
406 # AM_OUTPUT_DEPENDENCY_COMMANDS
407 # -----------------------------
408 # This macro should only be invoked once -- use via AC_REQUIRE.
410 # This code is only required when automatic dependency tracking
411 # is enabled. FIXME. This creates each `.P' file that we will
412 # need in order to bootstrap the dependency handling code.
413 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
414 [AC_CONFIG_COMMANDS([depfiles],
415 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
416 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
419 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
420 # Free Software Foundation, Inc.
422 # This file is free software; the Free Software Foundation
423 # gives unlimited permission to copy and/or distribute it,
424 # with or without modifications, as long as this notice is preserved.
428 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
429 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
431 # Do all the work for Automake. -*- Autoconf -*-
433 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
434 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
436 # This file is free software; the Free Software Foundation
437 # gives unlimited permission to copy and/or distribute it,
438 # with or without modifications, as long as this notice is preserved.
442 # This macro actually does too much. Some checks are only needed if
443 # your package does certain things. But this isn't really a big deal.
445 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
446 # AM_INIT_AUTOMAKE([OPTIONS])
447 # -----------------------------------------------
448 # The call with PACKAGE and VERSION arguments is the old style
449 # call (pre autoconf-2.50), which is being phased out. PACKAGE
450 # and VERSION should now be passed to AC_INIT and removed from
451 # the call to AM_INIT_AUTOMAKE.
452 # We support both call styles for the transition. After
453 # the next Automake release, Autoconf can make the AC_INIT
454 # arguments mandatory, and then we can depend on a new Autoconf
455 # release and drop the old call support.
456 AC_DEFUN([AM_INIT_AUTOMAKE],
457 [AC_PREREQ([2.62])dnl
458 dnl Autoconf wants to disallow AM_ names. We explicitly allow
459 dnl the ones we care about.
460 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
461 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
462 AC_REQUIRE([AC_PROG_INSTALL])dnl
463 if test "`cd $srcdir && pwd`" != "`pwd`"; then
464 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
465 # is not polluted with repeated "-I."
466 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
467 # test to see if srcdir already configured
468 if test -f $srcdir/config.status; then
469 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
473 # test whether we have cygpath
474 if test -z "$CYGPATH_W"; then
475 if (cygpath --version) >/dev/null 2>/dev/null; then
476 CYGPATH_W='cygpath -w'
481 AC_SUBST([CYGPATH_W])
483 # Define the identity of the package.
484 dnl Distinguish between old-style and new-style calls.
486 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
487 AC_SUBST([PACKAGE], [$1])dnl
488 AC_SUBST([VERSION], [$2])],
489 [_AM_SET_OPTIONS([$1])dnl
490 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
491 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
492 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
493 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
494 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
496 _AM_IF_OPTION([no-define],,
497 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
498 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
500 # Some tools Automake needs.
501 AC_REQUIRE([AM_SANITY_CHECK])dnl
502 AC_REQUIRE([AC_ARG_PROGRAM])dnl
503 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
504 AM_MISSING_PROG(AUTOCONF, autoconf)
505 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
506 AM_MISSING_PROG(AUTOHEADER, autoheader)
507 AM_MISSING_PROG(MAKEINFO, makeinfo)
508 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
509 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
510 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
511 # We need awk for the "check" target. The system "awk" is bad on
513 AC_REQUIRE([AC_PROG_AWK])dnl
514 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
515 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
516 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
517 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
518 [_AM_PROG_TAR([v7])])])
519 _AM_IF_OPTION([no-dependencies],,
520 [AC_PROVIDE_IFELSE([AC_PROG_CC],
521 [_AM_DEPENDENCIES(CC)],
522 [define([AC_PROG_CC],
523 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
524 AC_PROVIDE_IFELSE([AC_PROG_CXX],
525 [_AM_DEPENDENCIES(CXX)],
526 [define([AC_PROG_CXX],
527 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
528 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
529 [_AM_DEPENDENCIES(OBJC)],
530 [define([AC_PROG_OBJC],
531 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
533 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
534 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
535 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
536 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
537 AC_CONFIG_COMMANDS_PRE(dnl
538 [m4_provide_if([_AM_COMPILER_EXEEXT],
539 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
542 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
543 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
544 dnl mangled by Autoconf and run in a shell conditional statement.
545 m4_define([_AC_COMPILER_EXEEXT],
546 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
549 # When config.status generates a header, we must update the stamp-h file.
550 # This file resides in the same directory as the config header
551 # that is generated. The stamp files are numbered to have different names.
553 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
554 # loop where config.status creates the headers, so we can generate
555 # our stamp files there.
556 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
557 [# Compute $1's index in $config_headers.
560 for _am_header in $config_headers :; do
562 $_am_arg | $_am_arg:* )
565 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
568 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
570 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
573 # This file is free software; the Free Software Foundation
574 # gives unlimited permission to copy and/or distribute it,
575 # with or without modifications, as long as this notice is preserved.
581 # Define $install_sh.
582 AC_DEFUN([AM_PROG_INSTALL_SH],
583 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
584 if test x"${install_sh}" != xset; then
587 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
589 install_sh="\${SHELL} $am_aux_dir/install-sh"
592 AC_SUBST(install_sh)])
594 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
602 # Check whether the underlying file-system supports filenames
603 # with a leading dot. For instance MS-DOS doesn't.
604 AC_DEFUN([AM_SET_LEADING_DOT],
605 [rm -rf .tst 2>/dev/null
606 mkdir .tst 2>/dev/null
607 if test -d .tst; then
612 rmdir .tst 2>/dev/null
613 AC_SUBST([am__leading_dot])])
615 # Check to see how 'make' treats includes. -*- Autoconf -*-
617 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
619 # This file is free software; the Free Software Foundation
620 # gives unlimited permission to copy and/or distribute it,
621 # with or without modifications, as long as this notice is preserved.
627 # Check to see how make treats includes.
628 AC_DEFUN([AM_MAKE_INCLUDE],
629 [am_make=${MAKE-make}
630 cat > confinc << 'END'
632 @echo this is the am__doit target
635 # If we don't find an include directive, just comment out the code.
636 AC_MSG_CHECKING([for style of include used by $am_make])
640 # First try GNU make style include.
641 echo "include confinc" > confmf
642 # Ignore all kinds of additional output from `make'.
643 case `$am_make -s -f confmf 2> /dev/null` in #(
644 *the\ am__doit\ target*)
650 # Now try BSD make style include.
651 if test "$am__include" = "#"; then
652 echo '.include "confinc"' > confmf
653 case `$am_make -s -f confmf 2> /dev/null` in #(
654 *the\ am__doit\ target*)
661 AC_SUBST([am__include])
662 AC_SUBST([am__quote])
663 AC_MSG_RESULT([$_am_result])
667 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
669 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
670 # Free Software Foundation, Inc.
672 # This file is free software; the Free Software Foundation
673 # gives unlimited permission to copy and/or distribute it,
674 # with or without modifications, as long as this notice is preserved.
678 # AM_MISSING_PROG(NAME, PROGRAM)
679 # ------------------------------
680 AC_DEFUN([AM_MISSING_PROG],
681 [AC_REQUIRE([AM_MISSING_HAS_RUN])
682 $1=${$1-"${am_missing_run}$2"}
688 # Define MISSING if not defined so far and test if it supports --run.
689 # If it does, set am_missing_run to use it, otherwise, to nothing.
690 AC_DEFUN([AM_MISSING_HAS_RUN],
691 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
692 AC_REQUIRE_AUX_FILE([missing])dnl
693 if test x"${MISSING+set}" != xset; then
696 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
698 MISSING="\${SHELL} $am_aux_dir/missing" ;;
701 # Use eval to expand $SHELL
702 if eval "$MISSING --run true"; then
703 am_missing_run="$MISSING --run "
706 AC_MSG_WARN([`missing' script is too old or missing])
710 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
713 # This file is free software; the Free Software Foundation
714 # gives unlimited permission to copy and/or distribute it,
715 # with or without modifications, as long as this notice is preserved.
721 # Check for `mkdir -p'.
722 AC_DEFUN([AM_PROG_MKDIR_P],
723 [AC_PREREQ([2.60])dnl
724 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
725 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
726 dnl while keeping a definition of mkdir_p for backward compatibility.
727 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
728 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
729 dnl Makefile.ins that do not define MKDIR_P, so we do our own
730 dnl adjustment using top_builddir (which is defined more often than
732 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
734 [[\\/$]]* | ?:[[\\/]]*) ;;
735 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
739 # Helper functions for option handling. -*- Autoconf -*-
741 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
744 # This file is free software; the Free Software Foundation
745 # gives unlimited permission to copy and/or distribute it,
746 # with or without modifications, as long as this notice is preserved.
750 # _AM_MANGLE_OPTION(NAME)
751 # -----------------------
752 AC_DEFUN([_AM_MANGLE_OPTION],
753 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
755 # _AM_SET_OPTION(NAME)
756 # --------------------
757 # Set option NAME. Presently that only means defining a flag for this option.
758 AC_DEFUN([_AM_SET_OPTION],
759 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
761 # _AM_SET_OPTIONS(OPTIONS)
762 # ------------------------
763 # OPTIONS is a space-separated list of Automake options.
764 AC_DEFUN([_AM_SET_OPTIONS],
765 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
767 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
768 # -------------------------------------------
769 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
770 AC_DEFUN([_AM_IF_OPTION],
771 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
773 # Check to make sure that the build environment is sane. -*- Autoconf -*-
775 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
776 # Free Software Foundation, Inc.
778 # This file is free software; the Free Software Foundation
779 # gives unlimited permission to copy and/or distribute it,
780 # with or without modifications, as long as this notice is preserved.
786 AC_DEFUN([AM_SANITY_CHECK],
787 [AC_MSG_CHECKING([whether build environment is sane])
790 echo timestamp > conftest.file
791 # Reject unsafe characters in $srcdir or the absolute working directory
792 # name. Accept space and tab only in the latter.
796 *[[\\\"\#\$\&\'\`$am_lf]]*)
797 AC_MSG_ERROR([unsafe absolute working directory name]);;
800 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
801 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
804 # Do `set' in a subshell so we don't clobber the current shell's
805 # arguments. Must try -L first in case configure is actually a
806 # symlink; some systems play weird games with the mod time of symlinks
807 # (eg FreeBSD returns the mod time of the symlink's containing
810 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
811 if test "$[*]" = "X"; then
813 set X `ls -t "$srcdir/configure" conftest.file`
816 if test "$[*]" != "X $srcdir/configure conftest.file" \
817 && test "$[*]" != "X conftest.file $srcdir/configure"; then
819 # If neither matched, then we have a broken ls. This can happen
820 # if, for instance, CONFIG_SHELL is bash and it inherits a
821 # broken ls alias from the environment. This has actually
822 # happened. Such a system could not be considered "sane".
823 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
824 alias in your environment])
827 test "$[2]" = conftest.file
833 AC_MSG_ERROR([newly created file is older than distributed files!
834 Check your system clock])
838 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
840 # This file is free software; the Free Software Foundation
841 # gives unlimited permission to copy and/or distribute it,
842 # with or without modifications, as long as this notice is preserved.
846 # AM_SILENT_RULES([DEFAULT])
847 # --------------------------
848 # Enable less verbose build rules; with the default set to DEFAULT
849 # (`yes' being less verbose, `no' or empty being verbose).
850 AC_DEFUN([AM_SILENT_RULES],
851 [AC_ARG_ENABLE([silent-rules],
852 [ --enable-silent-rules less verbose build output (undo: `make V=1')
853 --disable-silent-rules verbose build output (undo: `make V=0')])
854 case $enable_silent_rules in
855 yes) AM_DEFAULT_VERBOSITY=0;;
856 no) AM_DEFAULT_VERBOSITY=1;;
857 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
860 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
861 dnl do not support nested variable expansions.
862 dnl See automake bug#9928 and bug#10237.
864 AC_CACHE_CHECK([whether $am_make supports nested variables],
865 [am_cv_make_support_nested_variables],
866 [if AS_ECHO([['TRUE=$(BAR$(V))
872 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
873 am_cv_make_support_nested_variables=yes
875 am_cv_make_support_nested_variables=no
877 if test $am_cv_make_support_nested_variables = yes; then
878 dnl Using `$V' instead of `$(V)' breaks IRIX make.
880 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
882 AM_V=$AM_DEFAULT_VERBOSITY
883 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
886 AM_SUBST_NOTMAKE([AM_V])dnl
887 AC_SUBST([AM_DEFAULT_V])dnl
888 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
889 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
891 AC_SUBST([AM_BACKSLASH])dnl
892 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
895 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
897 # This file is free software; the Free Software Foundation
898 # gives unlimited permission to copy and/or distribute it,
899 # with or without modifications, as long as this notice is preserved.
903 # AM_PROG_INSTALL_STRIP
904 # ---------------------
905 # One issue with vendor `install' (even GNU) is that you can't
906 # specify the program used to strip binaries. This is especially
907 # annoying in cross-compiling environments, where the build's strip
908 # is unlikely to handle the host's binaries.
909 # Fortunately install-sh will honor a STRIPPROG variable, so we
910 # always use install-sh in `make install-strip', and initialize
911 # STRIPPROG with the value of the STRIP variable (set by the user).
912 AC_DEFUN([AM_PROG_INSTALL_STRIP],
913 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
914 # Installed binaries are usually stripped using `strip' when the user
915 # run `make install-strip'. However `strip' might not be the right
916 # tool to use in cross-compilation environments, therefore Automake
917 # will honor the `STRIP' environment variable to overrule this program.
918 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
919 if test "$cross_compiling" != no; then
920 AC_CHECK_TOOL([STRIP], [strip], :)
922 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
923 AC_SUBST([INSTALL_STRIP_PROGRAM])])
925 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
933 # _AM_SUBST_NOTMAKE(VARIABLE)
934 # ---------------------------
935 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
936 # This macro is traced by Automake.
937 AC_DEFUN([_AM_SUBST_NOTMAKE])
939 # AM_SUBST_NOTMAKE(VARIABLE)
940 # --------------------------
941 # Public sister of _AM_SUBST_NOTMAKE.
942 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
944 # Check how to create a tarball. -*- Autoconf -*-
946 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
948 # This file is free software; the Free Software Foundation
949 # gives unlimited permission to copy and/or distribute it,
950 # with or without modifications, as long as this notice is preserved.
954 # _AM_PROG_TAR(FORMAT)
955 # --------------------
956 # Check how to create a tarball in format FORMAT.
957 # FORMAT should be one of `v7', `ustar', or `pax'.
959 # Substitute a variable $(am__tar) that is a command
960 # writing to stdout a FORMAT-tarball containing the directory
962 # tardir=directory && $(am__tar) > result.tar
964 # Substitute a variable $(am__untar) that extract such
965 # a tarball read from stdin.
966 # $(am__untar) < result.tar
967 AC_DEFUN([_AM_PROG_TAR],
968 [# Always define AMTAR for backward compatibility. Yes, it's still used
969 # in the wild :-( We should find a proper way to deprecate it ...
970 AC_SUBST([AMTAR], ['$${TAR-tar}'])
972 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
973 [m4_case([$1], [ustar],, [pax],,
974 [m4_fatal([Unknown tar format])])
975 AC_MSG_CHECKING([how to create a $1 tar archive])
976 # Loop over all known methods to create a tar archive until one works.
977 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
978 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
979 # Do not fold the above two line into one, because Tru64 sh and
980 # Solaris sh will not grok spaces in the rhs of `-'.
981 for _am_tool in $_am_tools
985 for _am_tar in tar gnutar gtar;
987 AM_RUN_LOG([$_am_tar --version]) && break
989 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
990 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
991 am__untar="$_am_tar -xf -"
994 # Must skip GNU tar: if it does not support --format= it doesn't create
995 # ustar tarball either.
996 (tar --version) >/dev/null 2>&1 && continue
997 am__tar='tar chf - "$$tardir"'
998 am__tar_='tar chf - "$tardir"'
1002 am__tar='pax -L -x $1 -w "$$tardir"'
1003 am__tar_='pax -L -x $1 -w "$tardir"'
1007 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1008 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1009 am__untar='cpio -i -H $1 -d'
1018 # If the value was cached, stop now. We just wanted to have am__tar
1019 # and am__untar set.
1020 test -n "${am_cv_prog_tar_$1}" && break
1022 # tar/untar a dummy directory, and stop if the command works
1025 echo GrepMe > conftest.dir/file
1026 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1028 if test -s conftest.tar; then
1029 AM_RUN_LOG([$am__untar <conftest.tar])
1030 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1035 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1036 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1038 AC_SUBST([am__untar])
1041 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1043 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1044 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1046 # Written by Gordon Matzigkeit, 1996
1048 # This file is free software; the Free Software Foundation gives
1049 # unlimited permission to copy and/or distribute it, with or without
1050 # modifications, as long as this notice is preserved.
1052 m4_define([_LT_COPYING], [dnl
1053 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1054 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1056 # Written by Gordon Matzigkeit, 1996
1058 # This file is part of GNU Libtool.
1060 # GNU Libtool is free software; you can redistribute it and/or
1061 # modify it under the terms of the GNU General Public License as
1062 # published by the Free Software Foundation; either version 2 of
1063 # the License, or (at your option) any later version.
1065 # As a special exception to the GNU General Public License,
1066 # if you distribute this file as part of a program or library that
1067 # is built using GNU Libtool, you may include this file under the
1068 # same distribution terms that you use for the rest of that program.
1070 # GNU Libtool is distributed in the hope that it will be useful,
1071 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1072 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1073 # GNU General Public License for more details.
1075 # You should have received a copy of the GNU General Public License
1076 # along with GNU Libtool; see the file COPYING. If not, a copy
1077 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1078 # obtained by writing to the Free Software Foundation, Inc.,
1079 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1085 # LT_PREREQ(VERSION)
1086 # ------------------
1087 # Complain and exit if this libtool version is less that VERSION.
1088 m4_defun([LT_PREREQ],
1089 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1091 [m4_fatal([Libtool version $1 or higher is required],
1096 # _LT_CHECK_BUILDDIR
1097 # ------------------
1098 # Complain if the absolute build directory name contains unusual characters
1099 m4_defun([_LT_CHECK_BUILDDIR],
1102 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1107 # LT_INIT([OPTIONS])
1108 # ------------------
1110 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1111 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1112 AC_BEFORE([$0], [LT_LANG])dnl
1113 AC_BEFORE([$0], [LT_OUTPUT])dnl
1114 AC_BEFORE([$0], [LTDL_INIT])dnl
1115 m4_require([_LT_CHECK_BUILDDIR])dnl
1117 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1118 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1119 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1120 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1121 dnl unless we require an AC_DEFUNed macro:
1122 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1123 AC_REQUIRE([LTSUGAR_VERSION])dnl
1124 AC_REQUIRE([LTVERSION_VERSION])dnl
1125 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1126 m4_require([_LT_PROG_LTMAIN])dnl
1128 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1131 _LT_SET_OPTIONS([$0], [$1])
1133 # This can be used to rebuild libtool when needed
1134 LIBTOOL_DEPS="$ltmain"
1136 # Always use our own libtool.
1137 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1138 AC_SUBST(LIBTOOL)dnl
1143 m4_define([LT_INIT])
1147 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1148 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1149 dnl aclocal-1.4 backwards compatibility:
1150 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1151 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1154 # _LT_CC_BASENAME(CC)
1155 # -------------------
1156 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1157 m4_defun([_LT_CC_BASENAME],
1158 [for cc_temp in $1""; do
1160 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1161 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1166 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1170 # _LT_FILEUTILS_DEFAULTS
1171 # ----------------------
1172 # It is okay to use these file commands and assume they have been set
1173 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1174 m4_defun([_LT_FILEUTILS_DEFAULTS],
1178 ])# _LT_FILEUTILS_DEFAULTS
1183 m4_defun([_LT_SETUP],
1184 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1185 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1186 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1187 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1189 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1191 _LT_DECL([], [host_alias], [0], [The host system])dnl
1192 _LT_DECL([], [host], [0])dnl
1193 _LT_DECL([], [host_os], [0])dnl
1195 _LT_DECL([], [build_alias], [0], [The build system])dnl
1196 _LT_DECL([], [build], [0])dnl
1197 _LT_DECL([], [build_os], [0])dnl
1199 AC_REQUIRE([AC_PROG_CC])dnl
1200 AC_REQUIRE([LT_PATH_LD])dnl
1201 AC_REQUIRE([LT_PATH_NM])dnl
1203 AC_REQUIRE([AC_PROG_LN_S])dnl
1204 test -z "$LN_S" && LN_S="ln -s"
1205 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1207 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1208 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1209 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1211 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1212 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1213 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1214 m4_require([_LT_CMD_RELOAD])dnl
1215 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1216 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1217 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1218 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1219 m4_require([_LT_WITH_SYSROOT])dnl
1221 _LT_CONFIG_LIBTOOL_INIT([
1222 # See if we are running on zsh, and set the options which allow our
1223 # commands through without removal of \ escapes INIT.
1224 if test -n "\${ZSH_VERSION+set}" ; then
1225 setopt NO_GLOB_SUBST
1228 if test -n "${ZSH_VERSION+set}" ; then
1229 setopt NO_GLOB_SUBST
1234 m4_require([_LT_TAG_COMPILER])dnl
1238 # AIX sometimes has problems with the GCC collect2 program. For some
1239 # reason, if we set the COLLECT_NAMES environment variable, the problems
1240 # vanish in a puff of smoke.
1241 if test "X${COLLECT_NAMES+set}" != Xset; then
1243 export COLLECT_NAMES
1250 can_build_shared=yes
1252 # All known linkers require a `.a' archive for static linking (except MSVC,
1253 # which needs '.lib').
1256 with_gnu_ld="$lt_cv_prog_gnu_ld"
1259 old_CFLAGS="$CFLAGS"
1261 # Set sane defaults for various variables
1262 test -z "$CC" && CC=cc
1263 test -z "$LTCC" && LTCC=$CC
1264 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1265 test -z "$LD" && LD=ld
1266 test -z "$ac_objext" && ac_objext=o
1268 _LT_CC_BASENAME([$compiler])
1270 # Only perform the check for file, if the check method requires it
1271 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1272 case $deplibs_check_method in
1274 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1280 # Use C for the default configuration in the libtool script
1281 LT_SUPPORTED_TAG([CC])
1283 _LT_LANG_DEFAULT_CONFIG
1288 # _LT_PREPARE_SED_QUOTE_VARS
1289 # --------------------------
1290 # Define a few sed substitution that help us do robust quoting.
1291 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1292 [# Backslashify metacharacters that are still active within
1293 # double-quoted strings.
1294 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1296 # Same as above, but do not quote variable references.
1297 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1299 # Sed substitution to delay expansion of an escaped shell variable in a
1300 # double_quote_subst'ed string.
1301 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1303 # Sed substitution to delay expansion of an escaped single quote.
1304 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1306 # Sed substitution to avoid accidental globbing in evaled expressions
1307 no_glob_subst='s/\*/\\\*/g'
1312 # Note that this code is called both from `configure', and `config.status'
1313 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1314 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1315 # so we pass a copy along to make sure it has a sensible value anyway.
1316 m4_defun([_LT_PROG_LTMAIN],
1317 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1318 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1319 ltmain="$ac_aux_dir/ltmain.sh"
1324 # So that we can recreate a full libtool script including additional
1325 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1326 # in macros and then make a single call at the end using the `libtool'
1330 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1331 # ----------------------------------------
1332 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1333 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1335 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1340 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1343 # _LT_CONFIG_LIBTOOL([COMMANDS])
1344 # ------------------------------
1345 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1346 m4_define([_LT_CONFIG_LIBTOOL],
1348 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1353 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1356 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1357 # -----------------------------------------------------
1358 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1359 [_LT_CONFIG_LIBTOOL([$1])
1360 _LT_CONFIG_LIBTOOL_INIT([$2])
1364 # _LT_FORMAT_COMMENT([COMMENT])
1365 # -----------------------------
1366 # Add leading comment marks to the start of each line, and a trailing
1367 # full-stop to the whole comment if one is not present already.
1368 m4_define([_LT_FORMAT_COMMENT],
1370 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1371 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1378 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1379 # -------------------------------------------------------------------
1380 # CONFIGNAME is the name given to the value in the libtool script.
1381 # VARNAME is the (base) name used in the configure script.
1382 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1383 # VARNAME. Any other value will be used directly.
1384 m4_define([_LT_DECL],
1385 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1386 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1387 [m4_ifval([$1], [$1], [$2])])
1388 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1390 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1391 lt_dict_add_subkey([lt_decl_dict], [$2],
1392 [tagged?], [m4_ifval([$5], [yes], [no])])])
1396 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1397 # --------------------------------------------------------
1398 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1401 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1402 # ------------------------------------------------
1403 m4_define([lt_decl_tag_varnames],
1404 [_lt_decl_filter([tagged?], [yes], $@)])
1407 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1408 # ---------------------------------------------------------
1409 m4_define([_lt_decl_filter],
1411 [0], [m4_fatal([$0: too few arguments: $#])],
1412 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1413 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1414 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1415 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1419 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1420 # --------------------------------------------------
1421 m4_define([lt_decl_quote_varnames],
1422 [_lt_decl_filter([value], [1], $@)])
1425 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1426 # ---------------------------------------------------
1427 m4_define([lt_decl_dquote_varnames],
1428 [_lt_decl_filter([value], [2], $@)])
1431 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1432 # ---------------------------------------------------
1433 m4_define([lt_decl_varnames_tagged],
1434 [m4_assert([$# <= 2])dnl
1435 _$0(m4_quote(m4_default([$1], [[, ]])),
1436 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1437 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1438 m4_define([_lt_decl_varnames_tagged],
1439 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1442 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1443 # ------------------------------------------------
1444 m4_define([lt_decl_all_varnames],
1445 [_$0(m4_quote(m4_default([$1], [[, ]])),
1447 m4_quote(lt_decl_varnames),
1448 m4_quote(m4_shift($@))))[]dnl
1450 m4_define([_lt_decl_all_varnames],
1451 [lt_join($@, lt_decl_varnames_tagged([$1],
1452 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1456 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1457 # ------------------------------------
1458 # Quote a variable value, and forward it to `config.status' so that its
1459 # declaration there will have the same value as in `configure'. VARNAME
1460 # must have a single quote delimited value for this to work.
1461 m4_define([_LT_CONFIG_STATUS_DECLARE],
1462 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1465 # _LT_CONFIG_STATUS_DECLARATIONS
1466 # ------------------------------
1467 # We delimit libtool config variables with single quotes, so when
1468 # we write them to config.status, we have to be sure to quote all
1469 # embedded single quotes properly. In configure, this macro expands
1470 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1472 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1473 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1474 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1475 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1480 # Output comment and list of tags supported by the script
1481 m4_defun([_LT_LIBTOOL_TAGS],
1482 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1483 available_tags="_LT_TAGS"dnl
1487 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1488 # -----------------------------------
1489 # Extract the dictionary values for VARNAME (optionally with TAG) and
1490 # expand to a commented shell variable setting:
1492 # # Some comment about what VAR is for.
1493 # visible_name=$lt_internal_name
1494 m4_define([_LT_LIBTOOL_DECLARE],
1495 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1496 [description])))[]dnl
1497 m4_pushdef([_libtool_name],
1498 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1499 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1500 [0], [_libtool_name=[$]$1],
1501 [1], [_libtool_name=$lt_[]$1],
1502 [2], [_libtool_name=$lt_[]$1],
1503 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1504 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1508 # _LT_LIBTOOL_CONFIG_VARS
1509 # -----------------------
1510 # Produce commented declarations of non-tagged libtool config variables
1511 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1512 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1513 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1514 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1515 [m4_foreach([_lt_var],
1516 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1517 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1520 # _LT_LIBTOOL_TAG_VARS(TAG)
1521 # -------------------------
1522 m4_define([_LT_LIBTOOL_TAG_VARS],
1523 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1524 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1527 # _LT_TAGVAR(VARNAME, [TAGNAME])
1528 # ------------------------------
1529 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1532 # _LT_CONFIG_COMMANDS
1533 # -------------------
1534 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1535 # variables for single and double quote escaping we saved from calls
1536 # to _LT_DECL, we can put quote escaped variables declarations
1537 # into `config.status', and then the shell code to quote escape them in
1538 # for loops in `config.status'. Finally, any additional code accumulated
1539 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1540 m4_defun([_LT_CONFIG_COMMANDS],
1541 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1542 dnl If the libtool generation code has been placed in $CONFIG_LT,
1543 dnl instead of duplicating it all over again into config.status,
1544 dnl then we will have config.status run $CONFIG_LT later, so it
1545 dnl needs to know what name is stored there:
1546 [AC_CONFIG_COMMANDS([libtool],
1547 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1548 dnl If the libtool generation code is destined for config.status,
1549 dnl expand the accumulated commands and init code now:
1550 [AC_CONFIG_COMMANDS([libtool],
1551 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1552 ])#_LT_CONFIG_COMMANDS
1556 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1559 # The HP-UX ksh and POSIX shell print the target directory to stdout
1561 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1563 sed_quote_subst='$sed_quote_subst'
1564 double_quote_subst='$double_quote_subst'
1565 delay_variable_subst='$delay_variable_subst'
1566 _LT_CONFIG_STATUS_DECLARATIONS
1568 LTCFLAGS='$LTCFLAGS'
1569 compiler='$compiler_DEFAULT'
1571 # A function that is used when there is no print builtin or printf.
1572 func_fallback_echo ()
1574 eval 'cat <<_LTECHO_EOF
1579 # Quote evaled strings.
1580 for var in lt_decl_all_varnames([[ \
1581 ]], lt_decl_quote_varnames); do
1582 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1583 *[[\\\\\\\`\\"\\\$]]*)
1584 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1587 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1592 # Double-quote double-evaled strings.
1593 for var in lt_decl_all_varnames([[ \
1594 ]], lt_decl_dquote_varnames); do
1595 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1596 *[[\\\\\\\`\\"\\\$]]*)
1597 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1600 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1605 _LT_OUTPUT_LIBTOOL_INIT
1608 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1609 # ------------------------------------
1610 # Generate a child script FILE with all initialization necessary to
1611 # reuse the environment learned by the parent script, and make the
1612 # file executable. If COMMENT is supplied, it is inserted after the
1613 # `#!' sequence but before initialization text begins. After this
1614 # macro, additional text can be appended to FILE to form the body of
1615 # the child script. The macro ends with non-zero status if the
1616 # file could not be fully written (such as if the disk is full).
1617 m4_ifdef([AS_INIT_GENERATED],
1618 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1619 [m4_defun([_LT_GENERATED_FILE_INIT],
1620 [m4_require([AS_PREPARE])]dnl
1621 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1623 cat >$1 <<_ASEOF || lt_write_fail=1
1625 # Generated by $as_me.
1627 SHELL=\${CONFIG_SHELL-$SHELL}
1630 cat >>$1 <<\_ASEOF || lt_write_fail=1
1633 exec AS_MESSAGE_FD>&1
1635 test $lt_write_fail = 0 && chmod +x $1[]dnl
1636 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1640 # This macro allows early generation of the libtool script (before
1641 # AC_OUTPUT is called), incase it is used in configure for compilation
1643 AC_DEFUN([LT_OUTPUT],
1644 [: ${CONFIG_LT=./config.lt}
1645 AC_MSG_NOTICE([creating $CONFIG_LT])
1646 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1647 [# Run this file to recreate a libtool stub with the current configuration.])
1649 cat >>"$CONFIG_LT" <<\_LTEOF
1651 exec AS_MESSAGE_LOG_FD>>config.log
1654 AS_BOX([Running $as_me.])
1655 } >&AS_MESSAGE_LOG_FD
1658 \`$as_me' creates a local libtool stub from the current configuration,
1659 for use in further configure time tests before the real libtool is
1662 Usage: $[0] [[OPTIONS]]
1664 -h, --help print this help, then exit
1665 -V, --version print version number, then exit
1666 -q, --quiet do not print progress messages
1667 -d, --debug don't remove temporary files
1669 Report bugs to <bug-libtool@gnu.org>."
1672 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1673 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1674 configured by $[0], generated by m4_PACKAGE_STRING.
1676 Copyright (C) 2011 Free Software Foundation, Inc.
1677 This config.lt script is free software; the Free Software Foundation
1678 gives unlimited permision to copy, distribute and modify it."
1680 while test $[#] != 0
1683 --version | --v* | -V )
1684 echo "$lt_cl_version"; exit 0 ;;
1685 --help | --h* | -h )
1686 echo "$lt_cl_help"; exit 0 ;;
1687 --debug | --d* | -d )
1689 --quiet | --q* | --silent | --s* | -q )
1692 -*) AC_MSG_ERROR([unrecognized option: $[1]
1693 Try \`$[0] --help' for more information.]) ;;
1695 *) AC_MSG_ERROR([unrecognized argument: $[1]
1696 Try \`$[0] --help' for more information.]) ;;
1701 if $lt_cl_silent; then
1702 exec AS_MESSAGE_FD>/dev/null
1706 cat >>"$CONFIG_LT" <<_LTEOF
1707 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1710 cat >>"$CONFIG_LT" <<\_LTEOF
1711 AC_MSG_NOTICE([creating $ofile])
1712 _LT_OUTPUT_LIBTOOL_COMMANDS
1715 chmod +x "$CONFIG_LT"
1717 # configure is writing to config.log, but config.lt does its own redirection,
1718 # appending to config.log, which fails on DOS, as config.log is still kept
1719 # open by configure. Here we exec the FD to /dev/null, effectively closing
1720 # config.log, so it can be properly (re)opened and appended to by config.lt.
1722 test "$silent" = yes &&
1723 lt_config_lt_args="$lt_config_lt_args --quiet"
1724 exec AS_MESSAGE_LOG_FD>/dev/null
1725 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1726 exec AS_MESSAGE_LOG_FD>>config.log
1727 $lt_cl_success || AS_EXIT(1)
1733 # If TAG is the built-in tag, create an initial libtool script with a
1734 # default configuration from the untagged config vars. Otherwise add code
1735 # to config.status for appending the configuration named by TAG from the
1736 # matching tagged config vars.
1737 m4_defun([_LT_CONFIG],
1738 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1739 _LT_CONFIG_SAVE_COMMANDS([
1740 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1741 m4_if(_LT_TAG, [C], [
1742 # See if we are running on zsh, and set the options which allow our
1743 # commands through without removal of \ escapes.
1744 if test -n "${ZSH_VERSION+set}" ; then
1745 setopt NO_GLOB_SUBST
1749 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1752 cat <<_LT_EOF >> "$cfgfile"
1755 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1756 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1757 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1758 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1763 # ### BEGIN LIBTOOL CONFIG
1764 _LT_LIBTOOL_CONFIG_VARS
1765 _LT_LIBTOOL_TAG_VARS
1766 # ### END LIBTOOL CONFIG
1772 cat <<\_LT_EOF >> "$cfgfile"
1773 # AIX sometimes has problems with the GCC collect2 program. For some
1774 # reason, if we set the COLLECT_NAMES environment variable, the problems
1775 # vanish in a puff of smoke.
1776 if test "X${COLLECT_NAMES+set}" != Xset; then
1778 export COLLECT_NAMES
1786 # We use sed instead of cat because bash on DJGPP gets confused if
1787 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1788 # text mode, it properly converts lines to CR/LF. This bash problem
1789 # is reportedly fixed, but why not run on old versions too?
1790 sed '$q' "$ltmain" >> "$cfgfile" \
1791 || (rm -f "$cfgfile"; exit 1)
1793 _LT_PROG_REPLACE_SHELLFNS
1795 mv -f "$cfgfile" "$ofile" ||
1796 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1799 [cat <<_LT_EOF >> "$ofile"
1801 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1802 dnl in a comment (ie after a #).
1803 # ### BEGIN LIBTOOL TAG CONFIG: $1
1804 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1805 # ### END LIBTOOL TAG CONFIG: $1
1812 TIMESTAMP='$TIMESTAMP'
1814 ofile='$ofile'], [])
1815 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1819 # LT_SUPPORTED_TAG(TAG)
1820 # ---------------------
1821 # Trace this macro to discover what tags are supported by the libtool
1822 # --tag option, using:
1823 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
1824 AC_DEFUN([LT_SUPPORTED_TAG], [])
1827 # C support is built-in for now
1828 m4_define([_LT_LANG_C_enabled], [])
1829 m4_define([_LT_TAGS], [])
1834 # Enable libtool support for the given language if not already enabled.
1836 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1839 [C++], [_LT_LANG(CXX)],
1840 [Go], [_LT_LANG(GO)],
1841 [Java], [_LT_LANG(GCJ)],
1842 [Fortran 77], [_LT_LANG(F77)],
1843 [Fortran], [_LT_LANG(FC)],
1844 [Windows Resource], [_LT_LANG(RC)],
1845 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1847 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1851 # _LT_LANG(LANGNAME)
1852 # ------------------
1853 m4_defun([_LT_LANG],
1854 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1855 [LT_SUPPORTED_TAG([$1])dnl
1856 m4_append([_LT_TAGS], [$1 ])dnl
1857 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1858 _LT_LANG_$1_CONFIG($1)])dnl
1862 m4_ifndef([AC_PROG_GO], [
1863 # NOTE: This macro has been submitted for inclusion into #
1864 # GNU Autoconf as AC_PROG_GO. When it is available in #
1865 # a released version of Autoconf we should remove this #
1866 # macro and use it instead. #
1867 m4_defun([AC_PROG_GO],
1868 [AC_LANG_PUSH(Go)dnl
1869 AC_ARG_VAR([GOC], [Go compiler command])dnl
1870 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1871 _AC_ARG_VAR_LDFLAGS()dnl
1872 AC_CHECK_TOOL(GOC, gccgo)
1873 if test -z "$GOC"; then
1874 if test -n "$ac_tool_prefix"; then
1875 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1878 if test -z "$GOC"; then
1879 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1885 # _LT_LANG_DEFAULT_CONFIG
1886 # -----------------------
1887 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1888 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1890 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1892 AC_PROVIDE_IFELSE([AC_PROG_F77],
1894 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1896 AC_PROVIDE_IFELSE([AC_PROG_FC],
1898 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1900 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1901 dnl pulling things in needlessly.
1902 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1904 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1906 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1908 [m4_ifdef([AC_PROG_GCJ],
1909 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1910 m4_ifdef([A][M_PROG_GCJ],
1911 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1912 m4_ifdef([LT_PROG_GCJ],
1913 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1915 AC_PROVIDE_IFELSE([AC_PROG_GO],
1917 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1919 AC_PROVIDE_IFELSE([LT_PROG_RC],
1921 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1922 ])# _LT_LANG_DEFAULT_CONFIG
1925 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1926 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1927 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1928 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1929 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1930 dnl aclocal-1.4 backwards compatibility:
1931 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1932 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1933 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1934 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1935 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1940 m4_defun([_LT_TAG_COMPILER],
1941 [AC_REQUIRE([AC_PROG_CC])dnl
1943 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1944 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1945 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1946 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1948 # If no C compiler was specified, use CC.
1951 # If no C compiler flags were specified, use CFLAGS.
1952 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1954 # Allow CC to be a program name with arguments.
1956 ])# _LT_TAG_COMPILER
1959 # _LT_COMPILER_BOILERPLATE
1960 # ------------------------
1961 # Check for compiler boilerplate output or warnings with
1962 # the simple compiler test code.
1963 m4_defun([_LT_COMPILER_BOILERPLATE],
1964 [m4_require([_LT_DECL_SED])dnl
1965 ac_outfile=conftest.$ac_objext
1966 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1967 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1968 _lt_compiler_boilerplate=`cat conftest.err`
1970 ])# _LT_COMPILER_BOILERPLATE
1973 # _LT_LINKER_BOILERPLATE
1974 # ----------------------
1975 # Check for linker boilerplate output or warnings with
1976 # the simple link test code.
1977 m4_defun([_LT_LINKER_BOILERPLATE],
1978 [m4_require([_LT_DECL_SED])dnl
1979 ac_outfile=conftest.$ac_objext
1980 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1981 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1982 _lt_linker_boilerplate=`cat conftest.err`
1984 ])# _LT_LINKER_BOILERPLATE
1986 # _LT_REQUIRED_DARWIN_CHECKS
1987 # -------------------------
1988 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1990 rhapsody* | darwin*)
1991 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1992 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1993 AC_CHECK_TOOL([LIPO], [lipo], [:])
1994 AC_CHECK_TOOL([OTOOL], [otool], [:])
1995 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1996 _LT_DECL([], [DSYMUTIL], [1],
1997 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1998 _LT_DECL([], [NMEDIT], [1],
1999 [Tool to change global to local symbols on Mac OS X])
2000 _LT_DECL([], [LIPO], [1],
2001 [Tool to manipulate fat objects and archives on Mac OS X])
2002 _LT_DECL([], [OTOOL], [1],
2003 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2004 _LT_DECL([], [OTOOL64], [1],
2005 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2007 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2008 [lt_cv_apple_cc_single_mod=no
2009 if test -z "${LT_MULTI_MODULE}"; then
2010 # By default we will add the -single_module flag. You can override
2011 # by either setting the environment variable LT_MULTI_MODULE
2012 # non-empty at configure time, or by adding -multi_module to the
2014 rm -rf libconftest.dylib*
2015 echo "int foo(void){return 1;}" > conftest.c
2016 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2017 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2018 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2019 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2021 # If there is a non-empty error log, and "single_module"
2022 # appears in it, assume the flag caused a linker warning
2023 if test -s conftest.err && $GREP single_module conftest.err; then
2024 cat conftest.err >&AS_MESSAGE_LOG_FD
2025 # Otherwise, if the output was created with a 0 exit code from
2026 # the compiler, it worked.
2027 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2028 lt_cv_apple_cc_single_mod=yes
2030 cat conftest.err >&AS_MESSAGE_LOG_FD
2032 rm -rf libconftest.dylib*
2036 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2037 [lt_cv_ld_exported_symbols_list],
2038 [lt_cv_ld_exported_symbols_list=no
2039 save_LDFLAGS=$LDFLAGS
2040 echo "_main" > conftest.sym
2041 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2042 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2043 [lt_cv_ld_exported_symbols_list=yes],
2044 [lt_cv_ld_exported_symbols_list=no])
2045 LDFLAGS="$save_LDFLAGS"
2048 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2049 [lt_cv_ld_force_load=no
2050 cat > conftest.c << _LT_EOF
2051 int forced_loaded() { return 2;}
2053 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2054 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2055 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2056 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2057 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2058 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2059 cat > conftest.c << _LT_EOF
2060 int main() { return 0;}
2062 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2063 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2065 if test -s conftest.err && $GREP force_load conftest.err; then
2066 cat conftest.err >&AS_MESSAGE_LOG_FD
2067 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2068 lt_cv_ld_force_load=yes
2070 cat conftest.err >&AS_MESSAGE_LOG_FD
2072 rm -f conftest.err libconftest.a conftest conftest.c
2073 rm -rf conftest.dSYM
2076 rhapsody* | darwin1.[[012]])
2077 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2079 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2080 darwin*) # darwin 5.x on
2081 # if running on 10.5 or later, the deployment target defaults
2082 # to the OS version, if on x86, and 10.4, the deployment
2083 # target defaults to 10.4. Don't you love it?
2084 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2085 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2086 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2088 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2090 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2094 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2095 _lt_dar_single_mod='$single_module'
2097 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2098 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2100 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2102 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2103 _lt_dsymutil='~$DSYMUTIL $lib || :'
2112 # _LT_DARWIN_LINKER_FEATURES([TAG])
2113 # ---------------------------------
2114 # Checks for linker and compiler features on darwin
2115 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2117 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2118 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2119 _LT_TAGVAR(hardcode_direct, $1)=no
2120 _LT_TAGVAR(hardcode_automatic, $1)=yes
2121 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2122 if test "$lt_cv_ld_force_load" = "yes"; then
2123 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2124 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2125 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2127 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2129 _LT_TAGVAR(link_all_deplibs, $1)=yes
2130 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2131 case $cc_basename in
2132 ifort*) _lt_dar_can_shared=yes ;;
2133 *) _lt_dar_can_shared=$GCC ;;
2135 if test "$_lt_dar_can_shared" = "yes"; then
2136 output_verbose_link_cmd=func_echo_all
2137 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2138 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2139 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2140 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2142 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2143 _LT_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${_lt_dsymutil}"
2144 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
2148 _LT_TAGVAR(ld_shlibs, $1)=no
2152 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2153 # ----------------------------------
2154 # Links a minimal program and checks the executable
2155 # for the system default hardcoded library path. In most cases,
2156 # this is /usr/lib:/lib, but when the MPI compilers are used
2157 # the location of the communication and MPI libs are included too.
2158 # If we don't find anything, use the default library path according
2159 # to the aix ld manual.
2160 # Store the results from the different compilers for each TAGNAME.
2161 # Allow to override them for all tags through lt_cv_aix_libpath.
2162 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2163 [m4_require([_LT_DECL_SED])dnl
2164 if test "${lt_cv_aix_libpath+set}" = set; then
2165 aix_libpath=$lt_cv_aix_libpath
2167 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2168 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2169 lt_aix_libpath_sed='[
2170 /Import File Strings/,/^$/ {
2172 s/^0 *\([^ ]*\) *$/\1/
2176 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2177 # Check for a 64-bit object if we didn't find anything.
2178 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2179 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2181 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2182 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2185 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2187 ])# _LT_SYS_MODULE_PATH_AIX
2190 # _LT_SHELL_INIT(ARG)
2191 # -------------------
2192 m4_define([_LT_SHELL_INIT],
2193 [m4_divert_text([M4SH-INIT], [$1
2194 ])])# _LT_SHELL_INIT
2198 # _LT_PROG_ECHO_BACKSLASH
2199 # -----------------------
2200 # Find how we can fake an echo command that does not interpret backslash.
2201 # In particular, with Autoconf 2.60 or later we add some code to the start
2202 # of the generated configure script which will find a shell with a builtin
2203 # printf (which we can use as an echo command).
2204 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2205 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2206 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2207 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2209 AC_MSG_CHECKING([how to print strings])
2210 # Test print first, because it will be a builtin if present.
2211 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2212 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2214 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2217 # Use this function as a fallback that always works.
2218 func_fallback_echo ()
2220 eval 'cat <<_LTECHO_EOF
2224 ECHO='func_fallback_echo'
2227 # func_echo_all arg...
2228 # Invoke $ECHO with all args, space-separated.
2235 printf*) AC_MSG_RESULT([printf]) ;;
2236 print*) AC_MSG_RESULT([print -r]) ;;
2237 *) AC_MSG_RESULT([cat]) ;;
2240 m4_ifdef([_AS_DETECT_SUGGESTED],
2241 [_AS_DETECT_SUGGESTED([
2242 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2243 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2244 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2245 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2246 PATH=/empty FPATH=/empty; export PATH FPATH
2247 test "X`printf %s $ECHO`" = "X$ECHO" \
2248 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2250 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2251 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2252 ])# _LT_PROG_ECHO_BACKSLASH
2257 AC_DEFUN([_LT_WITH_SYSROOT],
2258 [AC_MSG_CHECKING([for sysroot])
2259 AC_ARG_WITH([sysroot],
2260 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2261 (or the compiler's sysroot if not specified).],
2262 [], [with_sysroot=no])
2264 dnl lt_sysroot will always be passed unquoted. We quote it here
2265 dnl in case the user passed a directory name.
2267 case ${with_sysroot} in #(
2269 if test "$GCC" = yes; then
2270 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2274 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2279 AC_MSG_RESULT([${with_sysroot}])
2280 AC_MSG_ERROR([The sysroot must be an absolute path.])
2284 AC_MSG_RESULT([${lt_sysroot:-no}])
2285 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2286 [dependent libraries, and in which our libraries should be installed.])])
2290 m4_defun([_LT_ENABLE_LOCK],
2291 [AC_ARG_ENABLE([libtool-lock],
2292 [AS_HELP_STRING([--disable-libtool-lock],
2293 [avoid locking (might break parallel builds)])])
2294 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2296 # Some flags need to be propagated to the compiler or linker for good
2300 # Find out which ABI we are using.
2301 echo 'int i;' > conftest.$ac_ext
2302 if AC_TRY_EVAL(ac_compile); then
2303 case `/usr/bin/file conftest.$ac_objext` in
2315 # Find out which ABI we are using.
2316 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2317 if AC_TRY_EVAL(ac_compile); then
2318 if test "$lt_cv_prog_gnu_ld" = yes; then
2319 case `/usr/bin/file conftest.$ac_objext` in
2321 LD="${LD-ld} -melf32bsmip"
2324 LD="${LD-ld} -melf32bmipn32"
2327 LD="${LD-ld} -melf64bmip"
2331 case `/usr/bin/file conftest.$ac_objext` in
2347 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2348 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2349 # Find out which ABI we are using.
2350 echo 'int i;' > conftest.$ac_ext
2351 if AC_TRY_EVAL(ac_compile); then
2352 case `/usr/bin/file conftest.o` in
2355 x86_64-*kfreebsd*-gnu)
2356 LD="${LD-ld} -m elf_i386_fbsd"
2359 LD="${LD-ld} -m elf_i386"
2361 ppc64-*linux*|powerpc64-*linux*)
2362 LD="${LD-ld} -m elf32ppclinux"
2365 LD="${LD-ld} -m elf_s390"
2368 LD="${LD-ld} -m elf32_sparc"
2374 x86_64-*kfreebsd*-gnu)
2375 LD="${LD-ld} -m elf_x86_64_fbsd"
2378 LD="${LD-ld} -m elf_x86_64"
2380 ppc*-*linux*|powerpc*-*linux*)
2381 LD="${LD-ld} -m elf64ppc"
2383 s390*-*linux*|s390*-*tpf*)
2384 LD="${LD-ld} -m elf64_s390"
2387 LD="${LD-ld} -m elf64_sparc"
2397 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2398 SAVE_CFLAGS="$CFLAGS"
2399 CFLAGS="$CFLAGS -belf"
2400 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2402 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2404 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2405 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2406 CFLAGS="$SAVE_CFLAGS"
2410 # Find out which ABI we are using.
2411 echo 'int i;' > conftest.$ac_ext
2412 if AC_TRY_EVAL(ac_compile); then
2413 case `/usr/bin/file conftest.o` in
2415 case $lt_cv_prog_gnu_ld in
2419 LD="${LD-ld} -m elf_x86_64"
2422 LD="${LD-ld} -m elf64_sparc"
2425 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2426 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2431 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2443 need_locks="$enable_libtool_lock"
2449 m4_defun([_LT_PROG_AR],
2450 [AC_CHECK_TOOLS(AR, [ar], false)
2453 _LT_DECL([], [AR], [1], [The archiver])
2454 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2456 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2457 [lt_cv_ar_at_file=no
2458 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2459 [echo conftest.$ac_objext > conftest.lst
2460 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2461 AC_TRY_EVAL([lt_ar_try])
2462 if test "$ac_status" -eq 0; then
2463 # Ensure the archiver fails upon bogus file names.
2464 rm -f conftest.$ac_objext libconftest.a
2465 AC_TRY_EVAL([lt_ar_try])
2466 if test "$ac_status" -ne 0; then
2470 rm -f conftest.* libconftest.a
2474 if test "x$lt_cv_ar_at_file" = xno; then
2477 archiver_list_spec=$lt_cv_ar_at_file
2479 _LT_DECL([], [archiver_list_spec], [1],
2480 [How to feed a file listing to the archiver])
2484 # _LT_CMD_OLD_ARCHIVE
2485 # -------------------
2486 m4_defun([_LT_CMD_OLD_ARCHIVE],
2489 AC_CHECK_TOOL(STRIP, strip, :)
2490 test -z "$STRIP" && STRIP=:
2491 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2493 AC_CHECK_TOOL(RANLIB, ranlib, :)
2494 test -z "$RANLIB" && RANLIB=:
2495 _LT_DECL([], [RANLIB], [1],
2496 [Commands used to install an old-style archive])
2498 # Determine commands to create old-style static archives.
2499 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2500 old_postinstall_cmds='chmod 644 $oldlib'
2501 old_postuninstall_cmds=
2503 if test -n "$RANLIB"; then
2506 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2509 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2512 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2517 lock_old_archive_extraction=yes ;;
2519 lock_old_archive_extraction=no ;;
2521 _LT_DECL([], [old_postinstall_cmds], [2])
2522 _LT_DECL([], [old_postuninstall_cmds], [2])
2523 _LT_TAGDECL([], [old_archive_cmds], [2],
2524 [Commands used to build an old-style archive])
2525 _LT_DECL([], [lock_old_archive_extraction], [0],
2526 [Whether to use a lock for old archive extraction])
2527 ])# _LT_CMD_OLD_ARCHIVE
2530 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2531 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2532 # ----------------------------------------------------------------
2533 # Check whether the given compiler option works
2534 AC_DEFUN([_LT_COMPILER_OPTION],
2535 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_DECL_SED])dnl
2537 AC_CACHE_CHECK([$1], [$2],
2539 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2540 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2541 lt_compiler_flag="$3"
2542 # Insert the option either (1) after the last *FLAGS variable, or
2543 # (2) before a word containing "conftest.", or (3) at the end.
2544 # Note that $ac_compile itself does not contain backslashes and begins
2545 # with a dollar sign (not a hyphen), so the echo should work correctly.
2546 # The option is referenced via a variable to avoid confusing sed.
2547 lt_compile=`echo "$ac_compile" | $SED \
2548 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2549 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2550 -e 's:$: $lt_compiler_flag:'`
2551 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2552 (eval "$lt_compile" 2>conftest.err)
2554 cat conftest.err >&AS_MESSAGE_LOG_FD
2555 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2556 if (exit $ac_status) && test -s "$ac_outfile"; then
2557 # The compiler can only warn and ignore the option if not recognized
2558 # So say no if there are warnings other than the usual output.
2559 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2560 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2561 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2568 if test x"[$]$2" = xyes; then
2569 m4_if([$5], , :, [$5])
2571 m4_if([$6], , :, [$6])
2573 ])# _LT_COMPILER_OPTION
2576 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2577 dnl aclocal-1.4 backwards compatibility:
2578 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2581 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2582 # [ACTION-SUCCESS], [ACTION-FAILURE])
2583 # ----------------------------------------------------
2584 # Check whether the given linker option works
2585 AC_DEFUN([_LT_LINKER_OPTION],
2586 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2587 m4_require([_LT_DECL_SED])dnl
2588 AC_CACHE_CHECK([$1], [$2],
2590 save_LDFLAGS="$LDFLAGS"
2591 LDFLAGS="$LDFLAGS $3"
2592 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2593 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2594 # The linker can only warn and ignore the option if not recognized
2595 # So say no if there are warnings
2596 if test -s conftest.err; then
2597 # Append any errors to the config.log.
2598 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2599 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2600 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2601 if diff conftest.exp conftest.er2 >/dev/null; then
2609 LDFLAGS="$save_LDFLAGS"
2612 if test x"[$]$2" = xyes; then
2613 m4_if([$4], , :, [$4])
2615 m4_if([$5], , :, [$5])
2617 ])# _LT_LINKER_OPTION
2620 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2621 dnl aclocal-1.4 backwards compatibility:
2622 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2627 AC_DEFUN([LT_CMD_MAX_LEN],
2628 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2629 # find the maximum length of command line arguments
2630 AC_MSG_CHECKING([the maximum length of command line arguments])
2631 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2637 # On DJGPP, this test can blow up pretty badly due to problems in libc
2638 # (any single argument exceeding 2000 bytes causes a buffer overrun
2639 # during glob expansion). Even if it were fixed, the result of this
2640 # check would be larger than it should be.
2641 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2645 # Under GNU Hurd, this test is not required because there is
2646 # no limit to the length of command line arguments.
2647 # Libtool will interpret -1 as no limit whatsoever
2648 lt_cv_sys_max_cmd_len=-1;
2651 cygwin* | mingw* | cegcc*)
2652 # On Win9x/ME, this test blows up -- it succeeds, but takes
2653 # about 5 minutes as the teststring grows exponentially.
2654 # Worse, since 9x/ME are not pre-emptively multitasking,
2655 # you end up with a "frozen" computer, even though with patience
2656 # the test eventually succeeds (with a max line length of 256k).
2657 # Instead, let's just punt: use the minimum linelength reported by
2658 # all of the supported platforms: 8192 (on NT/2K/XP).
2659 lt_cv_sys_max_cmd_len=8192;
2663 # On MiNT this can take a long time and run out of memory.
2664 lt_cv_sys_max_cmd_len=8192;
2668 # On AmigaOS with pdksh, this test takes hours, literally.
2669 # So we just punt and use a minimum line length of 8192.
2670 lt_cv_sys_max_cmd_len=8192;
2673 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2674 # This has been around since 386BSD, at least. Likely further.
2675 if test -x /sbin/sysctl; then
2676 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2677 elif test -x /usr/sbin/sysctl; then
2678 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2680 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2682 # And add a safety zone
2683 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2684 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2688 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2689 lt_cv_sys_max_cmd_len=196608
2693 # The test takes a long time on OS/2.
2694 lt_cv_sys_max_cmd_len=8192
2698 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2699 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2700 # nice to cause kernel panics so lets avoid the loop below.
2701 # First set a reasonable default.
2702 lt_cv_sys_max_cmd_len=16384
2704 if test -x /sbin/sysconfig; then
2705 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2706 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2711 lt_cv_sys_max_cmd_len=102400
2713 sysv5* | sco5v6* | sysv4.2uw2*)
2714 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2715 if test -n "$kargmax"; then
2716 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2718 lt_cv_sys_max_cmd_len=32768
2722 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2723 if test -n "$lt_cv_sys_max_cmd_len"; then
2724 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2727 # Make teststring a little bigger before we do anything with it.
2728 # a 1K string should be a reasonable start.
2729 for i in 1 2 3 4 5 6 7 8 ; do
2730 teststring=$teststring$teststring
2732 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2733 # If test is not a shell built-in, we'll probably end up computing a
2734 # maximum length that is only half of the actual maximum length, but
2736 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2737 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2738 test $i != 17 # 1/2 MB should be enough
2741 teststring=$teststring$teststring
2743 # Only check the string length outside the loop.
2744 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2746 # Add a significant safety factor because C++ compilers can tack on
2747 # massive amounts of additional arguments before passing them to the
2748 # linker. It appears as though 1/2 is a usable value.
2749 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2754 if test -n $lt_cv_sys_max_cmd_len ; then
2755 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2759 max_cmd_len=$lt_cv_sys_max_cmd_len
2760 _LT_DECL([], [max_cmd_len], [0],
2761 [What is the maximum length of a command?])
2765 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2766 dnl aclocal-1.4 backwards compatibility:
2767 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2772 m4_defun([_LT_HEADER_DLFCN],
2773 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2774 ])# _LT_HEADER_DLFCN
2777 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2778 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2779 # ----------------------------------------------------------------
2780 m4_defun([_LT_TRY_DLOPEN_SELF],
2781 [m4_require([_LT_HEADER_DLFCN])dnl
2782 if test "$cross_compiling" = yes; then :
2785 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2786 lt_status=$lt_dlunknown
2787 cat > conftest.$ac_ext <<_LT_EOF
2788 [#line $LINENO "configure"
2789 #include "confdefs.h"
2798 # define LT_DLGLOBAL RTLD_GLOBAL
2801 # define LT_DLGLOBAL DL_GLOBAL
2803 # define LT_DLGLOBAL 0
2807 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2808 find out it does not work in some platform. */
2809 #ifndef LT_DLLAZY_OR_NOW
2811 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2814 # define LT_DLLAZY_OR_NOW DL_LAZY
2817 # define LT_DLLAZY_OR_NOW RTLD_NOW
2820 # define LT_DLLAZY_OR_NOW DL_NOW
2822 # define LT_DLLAZY_OR_NOW 0
2829 /* When -fvisbility=hidden is used, assume the code has been annotated
2830 correspondingly for the symbols needed. */
2831 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2832 int fnord () __attribute__((visibility("default")));
2835 int fnord () { return 42; }
2838 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2839 int status = $lt_dlunknown;
2843 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2846 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2847 else puts (dlerror ());
2849 /* dlclose (self); */
2857 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2858 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2861 x$lt_dlno_uscore) $1 ;;
2862 x$lt_dlneed_uscore) $2 ;;
2863 x$lt_dlunknown|x*) $3 ;;
2866 # compilation failed
2871 ])# _LT_TRY_DLOPEN_SELF
2874 # LT_SYS_DLOPEN_SELF
2875 # ------------------
2876 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2877 [m4_require([_LT_HEADER_DLFCN])dnl
2878 if test "x$enable_dlopen" != xyes; then
2879 enable_dlopen=unknown
2880 enable_dlopen_self=unknown
2881 enable_dlopen_self_static=unknown
2888 lt_cv_dlopen="load_add_on"
2890 lt_cv_dlopen_self=yes
2893 mingw* | pw32* | cegcc*)
2894 lt_cv_dlopen="LoadLibrary"
2899 lt_cv_dlopen="dlopen"
2904 # if libdl is installed we need to link against it
2905 AC_CHECK_LIB([dl], [dlopen],
2906 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2909 lt_cv_dlopen_self=yes
2914 AC_CHECK_FUNC([shl_load],
2915 [lt_cv_dlopen="shl_load"],
2916 [AC_CHECK_LIB([dld], [shl_load],
2917 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2918 [AC_CHECK_FUNC([dlopen],
2919 [lt_cv_dlopen="dlopen"],
2920 [AC_CHECK_LIB([dl], [dlopen],
2921 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2922 [AC_CHECK_LIB([svld], [dlopen],
2923 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2924 [AC_CHECK_LIB([dld], [dld_link],
2925 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2934 if test "x$lt_cv_dlopen" != xno; then
2940 case $lt_cv_dlopen in
2942 save_CPPFLAGS="$CPPFLAGS"
2943 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2945 save_LDFLAGS="$LDFLAGS"
2946 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2949 LIBS="$lt_cv_dlopen_libs $LIBS"
2951 AC_CACHE_CHECK([whether a program can dlopen itself],
2952 lt_cv_dlopen_self, [dnl
2953 _LT_TRY_DLOPEN_SELF(
2954 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2955 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2958 if test "x$lt_cv_dlopen_self" = xyes; then
2959 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2960 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2961 lt_cv_dlopen_self_static, [dnl
2962 _LT_TRY_DLOPEN_SELF(
2963 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2964 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2968 CPPFLAGS="$save_CPPFLAGS"
2969 LDFLAGS="$save_LDFLAGS"
2974 case $lt_cv_dlopen_self in
2975 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2976 *) enable_dlopen_self=unknown ;;
2979 case $lt_cv_dlopen_self_static in
2980 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2981 *) enable_dlopen_self_static=unknown ;;
2984 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2985 [Whether dlopen is supported])
2986 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2987 [Whether dlopen of programs is supported])
2988 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2989 [Whether dlopen of statically linked programs is supported])
2990 ])# LT_SYS_DLOPEN_SELF
2993 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2994 dnl aclocal-1.4 backwards compatibility:
2995 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2998 # _LT_COMPILER_C_O([TAGNAME])
2999 # ---------------------------
3000 # Check to see if options -c and -o are simultaneously supported by compiler.
3001 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3002 m4_defun([_LT_COMPILER_C_O],
3003 [m4_require([_LT_DECL_SED])dnl
3004 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3005 m4_require([_LT_TAG_COMPILER])dnl
3006 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3007 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3008 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3009 $RM -r conftest 2>/dev/null
3013 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3015 lt_compiler_flag="-o out/conftest2.$ac_objext"
3016 # Insert the option either (1) after the last *FLAGS variable, or
3017 # (2) before a word containing "conftest.", or (3) at the end.
3018 # Note that $ac_compile itself does not contain backslashes and begins
3019 # with a dollar sign (not a hyphen), so the echo should work correctly.
3020 lt_compile=`echo "$ac_compile" | $SED \
3021 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3022 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3023 -e 's:$: $lt_compiler_flag:'`
3024 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3025 (eval "$lt_compile" 2>out/conftest.err)
3027 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3028 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3029 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3031 # The compiler can only warn and ignore the option if not recognized
3032 # So say no if there are warnings
3033 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3034 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3035 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3036 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3039 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3041 # SGI C++ compiler will create directory out/ii_files/ for
3042 # template instantiation
3043 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3044 $RM out/* && rmdir out
3049 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3050 [Does compiler simultaneously support -c and -o options?])
3051 ])# _LT_COMPILER_C_O
3054 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3055 # ----------------------------------
3056 # Check to see if we can do hard links to lock some files if needed
3057 m4_defun([_LT_COMPILER_FILE_LOCKS],
3058 [m4_require([_LT_ENABLE_LOCK])dnl
3059 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3060 _LT_COMPILER_C_O([$1])
3062 hard_links="nottested"
3063 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3064 # do not overwrite the value of need_locks provided by the user
3065 AC_MSG_CHECKING([if we can lock with hard links])
3068 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3070 ln conftest.a conftest.b 2>&5 || hard_links=no
3071 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3072 AC_MSG_RESULT([$hard_links])
3073 if test "$hard_links" = no; then
3074 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3080 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3081 ])# _LT_COMPILER_FILE_LOCKS
3086 m4_defun([_LT_CHECK_OBJDIR],
3087 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3088 [rm -f .libs 2>/dev/null
3089 mkdir .libs 2>/dev/null
3090 if test -d .libs; then
3093 # MS-DOS does not allow filenames that begin with a dot.
3096 rmdir .libs 2>/dev/null])
3097 objdir=$lt_cv_objdir
3098 _LT_DECL([], [objdir], [0],
3099 [The name of the directory that contains temporary libtool files])dnl
3100 m4_pattern_allow([LT_OBJDIR])dnl
3101 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3102 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3103 ])# _LT_CHECK_OBJDIR
3106 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3107 # --------------------------------------
3108 # Check hardcoding attributes.
3109 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3110 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3111 _LT_TAGVAR(hardcode_action, $1)=
3112 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3113 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3114 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3116 # We can hardcode non-existent directories.
3117 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3118 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3119 # have to relink, otherwise we might link with an installed library
3120 # when we should be linking with a yet-to-be-installed one
3121 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3122 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3123 # Linking always hardcodes the temporary library directory.
3124 _LT_TAGVAR(hardcode_action, $1)=relink
3126 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3127 _LT_TAGVAR(hardcode_action, $1)=immediate
3130 # We cannot hardcode anything, or else we can only hardcode existing
3132 _LT_TAGVAR(hardcode_action, $1)=unsupported
3134 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3136 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3137 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3138 # Fast installation is not supported
3139 enable_fast_install=no
3140 elif test "$shlibpath_overrides_runpath" = yes ||
3141 test "$enable_shared" = no; then
3142 # Fast installation is not necessary
3143 enable_fast_install=needless
3145 _LT_TAGDECL([], [hardcode_action], [0],
3146 [How to hardcode a shared library path into an executable])
3147 ])# _LT_LINKER_HARDCODE_LIBPATH
3152 m4_defun([_LT_CMD_STRIPLIB],
3153 [m4_require([_LT_DECL_EGREP])
3156 AC_MSG_CHECKING([whether stripping libraries is possible])
3157 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3158 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3159 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3160 AC_MSG_RESULT([yes])
3162 # FIXME - insert some real tests, host_os isn't really good enough
3165 if test -n "$STRIP" ; then
3166 striplib="$STRIP -x"
3167 old_striplib="$STRIP -S"
3168 AC_MSG_RESULT([yes])
3178 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3179 _LT_DECL([], [striplib], [1])
3180 ])# _LT_CMD_STRIPLIB
3183 # _LT_SYS_DYNAMIC_LINKER([TAG])
3184 # -----------------------------
3185 # PORTME Fill in your ld.so characteristics
3186 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3187 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3188 m4_require([_LT_DECL_EGREP])dnl
3189 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3190 m4_require([_LT_DECL_OBJDUMP])dnl
3191 m4_require([_LT_DECL_SED])dnl
3192 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3193 AC_MSG_CHECKING([dynamic linker characteristics])
3196 if test "$GCC" = yes; then
3198 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3199 *) lt_awk_arg="/^libraries:/" ;;
3202 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3203 *) lt_sed_strip_eq="s,=/,/,g" ;;
3205 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3206 case $lt_search_path_spec in
3208 # if the path contains ";" then we assume it to be the separator
3209 # otherwise default to the standard path separator (i.e. ":") - it is
3210 # assumed that no part of a normal pathname contains ";" but that should
3211 # okay in the real world where ";" in dirpaths is itself problematic.
3212 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3215 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3218 # Ok, now we have the path, separated by spaces, we can step through it
3219 # and add multilib dir if necessary.
3220 lt_tmp_lt_search_path_spec=
3221 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3222 for lt_sys_path in $lt_search_path_spec; do
3223 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3224 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3226 test -d "$lt_sys_path" && \
3227 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3230 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3231 BEGIN {RS=" "; FS="/|\n";} {
3234 for (lt_i = NF; lt_i > 0; lt_i--) {
3235 if ($lt_i != "" && $lt_i != ".") {
3236 if ($lt_i == "..") {
3239 if (lt_count == 0) {
3240 lt_foo="/" $lt_i lt_foo;
3247 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3248 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3250 # AWK program above erroneously prepends '/' to C:/dos/paths
3253 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3254 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3256 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3258 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3261 libname_spec='lib$name'
3269 shlibpath_overrides_runpath=unknown
3271 dynamic_linker="$host_os ld.so"
3272 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3273 need_lib_prefix=unknown
3274 hardcode_into_libs=no
3276 # when you set need_version to no, make sure it does not cause -set_version
3277 # flags to be left without arguments
3278 need_version=unknown
3282 version_type=linux # correct to gnu/linux during the next big refactor
3283 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3284 shlibpath_var=LIBPATH
3286 # AIX 3 has no versioning support, so we append a major version to the name.
3287 soname_spec='${libname}${release}${shared_ext}$major'
3291 version_type=linux # correct to gnu/linux during the next big refactor
3294 hardcode_into_libs=yes
3295 if test "$host_cpu" = ia64; then
3296 # AIX 5 supports IA64
3297 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3298 shlibpath_var=LD_LIBRARY_PATH
3300 # With GCC up to 2.95.x, collect2 would create an import file
3301 # for dependence libraries. The import file would start with
3302 # the line `#! .'. This would cause the generated library to
3303 # depend on `.', always an invalid library. This was fixed in
3304 # development snapshots of GCC prior to 3.0.
3306 aix4 | aix4.[[01]] | aix4.[[01]].*)
3307 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3309 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3316 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3317 # soname into executable. Probably we can add versioning support to
3318 # collect2, so additional links can be useful in future.
3319 if test "$aix_use_runtimelinking" = yes; then
3320 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3321 # instead of lib<name>.a to let people know that these are not
3322 # typical AIX shared libraries.
3323 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3325 # We preserve .a as extension for shared libraries through AIX4.2
3326 # and later when we are not doing run time linking.
3327 library_names_spec='${libname}${release}.a $libname.a'
3328 soname_spec='${libname}${release}${shared_ext}$major'
3330 shlibpath_var=LIBPATH
3337 # Since July 2007 AmigaOS4 officially supports .so libraries.
3338 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3342 library_names_spec='$libname.ixlibrary $libname.a'
3343 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3344 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3350 library_names_spec='${libname}${shared_ext}'
3351 dynamic_linker="$host_os ld.so"
3352 shlibpath_var=LIBRARY_PATH
3356 version_type=linux # correct to gnu/linux during the next big refactor
3358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3359 soname_spec='${libname}${release}${shared_ext}$major'
3360 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3361 shlibpath_var=LD_LIBRARY_PATH
3362 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3363 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3364 # the default ld.so.conf also contains /usr/contrib/lib and
3365 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3366 # libtool to hard-code these into programs
3369 cygwin* | mingw* | pw32* | cegcc*)
3370 version_type=windows
3375 case $GCC,$cc_basename in
3378 library_names_spec='$libname.dll.a'
3379 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3380 postinstall_cmds='base_file=`basename \${file}`~
3381 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3382 dldir=$destdir/`dirname \$dlpath`~
3383 test -d \$dldir || mkdir -p \$dldir~
3384 $install_prog $dir/$dlname \$dldir/$dlname~
3385 chmod a+x \$dldir/$dlname~
3386 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3387 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3389 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3390 dlpath=$dir/\$dldll~
3392 shlibpath_overrides_runpath=yes
3396 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3397 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3399 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3402 # MinGW DLLs use traditional 'lib' prefix
3403 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3406 # pw32 DLLs use 'pw' prefix rather than 'lib'
3407 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3410 dynamic_linker='Win32 ld.exe'
3415 libname_spec='$name'
3416 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3417 library_names_spec='${libname}.dll.lib'
3421 sys_lib_search_path_spec=
3427 # Let DOS variable expansion print the short 8.3 style file name.
3428 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3429 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3432 # Convert to MSYS style.
3433 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3436 # Convert to unix form, then to dos form, then back to unix form
3437 # but this time dos style (no spaces!) so that the unix form looks
3438 # like /cygdrive/c/PROGRA~1:/cygdr...
3439 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3440 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3441 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3444 sys_lib_search_path_spec="$LIB"
3445 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3446 # It is most probably a Windows format PATH.
3447 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3449 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3451 # FIXME: find the short name or the path components, as spaces are
3452 # common. (e.g. "Program Files" -> "PROGRA~1")
3456 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3457 postinstall_cmds='base_file=`basename \${file}`~
3458 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3459 dldir=$destdir/`dirname \$dlpath`~
3460 test -d \$dldir || mkdir -p \$dldir~
3461 $install_prog $dir/$dlname \$dldir/$dlname'
3462 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3463 dlpath=$dir/\$dldll~
3465 shlibpath_overrides_runpath=yes
3466 dynamic_linker='Win32 link.exe'
3470 # Assume MSVC wrapper
3471 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3472 dynamic_linker='Win32 ld.exe'
3475 # FIXME: first we should search . and the directory the executable is in
3479 darwin* | rhapsody*)
3480 dynamic_linker="$host_os dyld"
3484 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3485 soname_spec='${libname}${release}${major}$shared_ext'
3486 shlibpath_overrides_runpath=yes
3487 shlibpath_var=DYLD_LIBRARY_PATH
3488 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3490 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3491 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3495 version_type=linux # correct to gnu/linux during the next big refactor
3498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3499 soname_spec='${libname}${release}${shared_ext}$major'
3500 shlibpath_var=LD_LIBRARY_PATH
3503 freebsd* | dragonfly*)
3504 # DragonFly does not have aout. When/if they implement a new
3505 # versioning mechanism, adjust this.
3506 if test -x /usr/bin/objformat; then
3507 objformat=`/usr/bin/objformat`
3510 freebsd[[23]].*) objformat=aout ;;
3514 version_type=freebsd-$objformat
3515 case $version_type in
3517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3522 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3526 shlibpath_var=LD_LIBRARY_PATH
3529 shlibpath_overrides_runpath=yes
3531 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3532 shlibpath_overrides_runpath=yes
3533 hardcode_into_libs=yes
3535 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3536 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3537 shlibpath_overrides_runpath=no
3538 hardcode_into_libs=yes
3540 *) # from 4.6 on, and DragonFly
3541 shlibpath_overrides_runpath=yes
3542 hardcode_into_libs=yes
3548 version_type=linux # correct to gnu/linux during the next big refactor
3551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3552 soname_spec='${libname}${release}${shared_ext}$major'
3553 shlibpath_var=LD_LIBRARY_PATH
3554 shlibpath_overrides_runpath=no
3555 hardcode_into_libs=yes
3559 version_type=linux # correct to gnu/linux during the next big refactor
3562 dynamic_linker="$host_os runtime_loader"
3563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3564 soname_spec='${libname}${release}${shared_ext}$major'
3565 shlibpath_var=LIBRARY_PATH
3566 shlibpath_overrides_runpath=yes
3567 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3568 hardcode_into_libs=yes
3571 hpux9* | hpux10* | hpux11*)
3572 # Give a soname corresponding to the major version so that dld.sl refuses to
3573 # link against other versions.
3580 hardcode_into_libs=yes
3581 dynamic_linker="$host_os dld.so"
3582 shlibpath_var=LD_LIBRARY_PATH
3583 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3584 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3585 soname_spec='${libname}${release}${shared_ext}$major'
3586 if test "X$HPUX_IA64_MODE" = X32; then
3587 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3589 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3591 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3595 hardcode_into_libs=yes
3596 dynamic_linker="$host_os dld.sl"
3597 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3598 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3599 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3600 soname_spec='${libname}${release}${shared_ext}$major'
3601 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3602 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3606 dynamic_linker="$host_os dld.sl"
3607 shlibpath_var=SHLIB_PATH
3608 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3609 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3610 soname_spec='${libname}${release}${shared_ext}$major'
3613 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3614 postinstall_cmds='chmod 555 $lib'
3615 # or fails outright, so override atomically:
3616 install_override_mode=555
3620 version_type=linux # correct to gnu/linux during the next big refactor
3623 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3624 soname_spec='${libname}${release}${shared_ext}$major'
3625 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3626 shlibpath_var=LD_LIBRARY_PATH
3627 shlibpath_overrides_runpath=no
3628 hardcode_into_libs=yes
3631 irix5* | irix6* | nonstopux*)
3633 nonstopux*) version_type=nonstopux ;;
3635 if test "$lt_cv_prog_gnu_ld" = yes; then
3636 version_type=linux # correct to gnu/linux during the next big refactor
3643 soname_spec='${libname}${release}${shared_ext}$major'
3644 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3646 irix5* | nonstopux*)
3650 case $LD in # libtool.m4 will add one of these switches to LD
3651 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3652 libsuff= shlibsuff= libmagic=32-bit;;
3653 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3654 libsuff=32 shlibsuff=N32 libmagic=N32;;
3655 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3656 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3657 *) libsuff= shlibsuff= libmagic=never-match;;
3661 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3662 shlibpath_overrides_runpath=no
3663 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3664 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3665 hardcode_into_libs=yes
3668 # No shared lib support for Linux oldld, aout, or coff.
3669 linux*oldld* | linux*aout* | linux*coff*)
3673 # This must be glibc/ELF.
3674 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3675 version_type=linux # correct to gnu/linux during the next big refactor
3678 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3679 soname_spec='${libname}${release}${shared_ext}$major'
3680 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3681 shlibpath_var=LD_LIBRARY_PATH
3682 shlibpath_overrides_runpath=no
3684 # Some binutils ld are patched to set DT_RUNPATH
3685 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3686 [lt_cv_shlibpath_overrides_runpath=no
3687 save_LDFLAGS=$LDFLAGS
3689 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3690 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3691 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3692 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3693 [lt_cv_shlibpath_overrides_runpath=yes])])
3694 LDFLAGS=$save_LDFLAGS
3697 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3699 # This implies no fast_install, which is unacceptable.
3700 # Some rework will be needed to allow for fast_install
3701 # before this can be enabled.
3702 hardcode_into_libs=yes
3704 # Add ABI-specific directories to the system library path.
3705 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3707 # Append ld.so.conf contents to the search path
3708 if test -f /etc/ld.so.conf; then
3709 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3710 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3714 # We used to test for /lib/ld.so.1 and disable shared libraries on
3715 # powerpc, because MkLinux only supported shared libraries with the
3716 # GNU dynamic linker. Since this was broken with cross compilers,
3717 # most powerpc-linux boxes support dynamic linking these days and
3718 # people can always --disable-shared, the test was removed, and we
3719 # assume the GNU/Linux dynamic linker is in use.
3720 dynamic_linker='GNU/Linux ld.so'
3727 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3729 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3730 dynamic_linker='NetBSD (a.out) ld.so'
3732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3733 soname_spec='${libname}${release}${shared_ext}$major'
3734 dynamic_linker='NetBSD ld.elf_so'
3736 shlibpath_var=LD_LIBRARY_PATH
3737 shlibpath_overrides_runpath=yes
3738 hardcode_into_libs=yes
3742 version_type=linux # correct to gnu/linux during the next big refactor
3743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3744 shlibpath_var=LD_LIBRARY_PATH
3745 shlibpath_overrides_runpath=yes
3752 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3753 soname_spec='${libname}${release}${shared_ext}$major'
3754 shlibpath_var=LD_LIBRARY_PATH
3755 shlibpath_overrides_runpath=no
3756 hardcode_into_libs=yes
3757 dynamic_linker='ldqnx.so'
3762 sys_lib_dlsearch_path_spec="/usr/lib"
3764 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3766 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3767 *) need_version=no ;;
3769 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3770 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3771 shlibpath_var=LD_LIBRARY_PATH
3772 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3774 openbsd2.[[89]] | openbsd2.[[89]].*)
3775 shlibpath_overrides_runpath=no
3778 shlibpath_overrides_runpath=yes
3782 shlibpath_overrides_runpath=yes
3787 libname_spec='$name'
3790 library_names_spec='$libname${shared_ext} $libname.a'
3791 dynamic_linker='OS/2 ld.exe'
3792 shlibpath_var=LIBPATH
3795 osf3* | osf4* | osf5*)
3799 soname_spec='${libname}${release}${shared_ext}$major'
3800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3801 shlibpath_var=LD_LIBRARY_PATH
3802 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3803 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3811 version_type=linux # correct to gnu/linux during the next big refactor
3814 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3815 soname_spec='${libname}${release}${shared_ext}$major'
3816 shlibpath_var=LD_LIBRARY_PATH
3817 shlibpath_overrides_runpath=yes
3818 hardcode_into_libs=yes
3819 # ldd complains unless libraries are executable
3820 postinstall_cmds='chmod +x $lib'
3825 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3826 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3827 shlibpath_var=LD_LIBRARY_PATH
3828 shlibpath_overrides_runpath=yes
3829 if test "$with_gnu_ld" = yes; then
3836 version_type=linux # correct to gnu/linux during the next big refactor
3837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3838 soname_spec='${libname}${release}${shared_ext}$major'
3839 shlibpath_var=LD_LIBRARY_PATH
3840 case $host_vendor in
3842 shlibpath_overrides_runpath=no
3844 runpath_var=LD_RUN_PATH
3852 shlibpath_overrides_runpath=no
3853 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3859 if test -d /usr/nec ;then
3860 version_type=linux # correct to gnu/linux during the next big refactor
3861 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3862 soname_spec='$libname${shared_ext}.$major'
3863 shlibpath_var=LD_LIBRARY_PATH
3867 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3868 version_type=freebsd-elf
3871 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3872 soname_spec='${libname}${release}${shared_ext}$major'
3873 shlibpath_var=LD_LIBRARY_PATH
3874 shlibpath_overrides_runpath=yes
3875 hardcode_into_libs=yes
3876 if test "$with_gnu_ld" = yes; then
3877 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3879 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3882 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3886 sys_lib_dlsearch_path_spec='/usr/lib'
3890 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3891 version_type=linux # correct to gnu/linux during the next big refactor
3894 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3895 shlibpath_var=LD_LIBRARY_PATH
3896 shlibpath_overrides_runpath=no
3897 hardcode_into_libs=yes
3901 version_type=linux # correct to gnu/linux during the next big refactor
3902 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3903 soname_spec='${libname}${release}${shared_ext}$major'
3904 shlibpath_var=LD_LIBRARY_PATH
3911 AC_MSG_RESULT([$dynamic_linker])
3912 test "$dynamic_linker" = no && can_build_shared=no
3914 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3915 if test "$GCC" = yes; then
3916 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3919 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3920 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3922 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3923 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3926 _LT_DECL([], [variables_saved_for_relink], [1],
3927 [Variables whose values should be saved in libtool wrapper scripts and
3928 restored at link time])
3929 _LT_DECL([], [need_lib_prefix], [0],
3930 [Do we need the "lib" prefix for modules?])
3931 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3932 _LT_DECL([], [version_type], [0], [Library versioning type])
3933 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3934 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3935 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3936 [Is shlibpath searched before the hard-coded library search path?])
3937 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3938 _LT_DECL([], [library_names_spec], [1],
3939 [[List of archive names. First name is the real one, the rest are links.
3940 The last name is the one that the linker finds with -lNAME]])
3941 _LT_DECL([], [soname_spec], [1],
3942 [[The coded name of the library, if different from the real name]])
3943 _LT_DECL([], [install_override_mode], [1],
3944 [Permission mode override for installation of shared libraries])
3945 _LT_DECL([], [postinstall_cmds], [2],
3946 [Command to use after installation of a shared archive])
3947 _LT_DECL([], [postuninstall_cmds], [2],
3948 [Command to use after uninstallation of a shared archive])
3949 _LT_DECL([], [finish_cmds], [2],
3950 [Commands used to finish a libtool library installation in a directory])
3951 _LT_DECL([], [finish_eval], [1],
3952 [[As "finish_cmds", except a single script fragment to be evaled but
3954 _LT_DECL([], [hardcode_into_libs], [0],
3955 [Whether we should hardcode library paths into libraries])
3956 _LT_DECL([], [sys_lib_search_path_spec], [2],
3957 [Compile-time system search path for libraries])
3958 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3959 [Run-time system search path for libraries])
3960 ])# _LT_SYS_DYNAMIC_LINKER
3963 # _LT_PATH_TOOL_PREFIX(TOOL)
3964 # --------------------------
3965 # find a file program which can recognize shared library
3966 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3967 [m4_require([_LT_DECL_EGREP])dnl
3968 AC_MSG_CHECKING([for $1])
3969 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3971 [[\\/*] | ?:[\\/]*])
3972 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3975 lt_save_MAGIC_CMD="$MAGIC_CMD"
3976 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3977 dnl $ac_dummy forces splitting on constant user-supplied paths.
3978 dnl POSIX.2 word splitting is done only on the output of word expansions,
3979 dnl not every word. This closes a longstanding sh security hole.
3980 ac_dummy="m4_if([$2], , $PATH, [$2])"
3981 for ac_dir in $ac_dummy; do
3983 test -z "$ac_dir" && ac_dir=.
3984 if test -f $ac_dir/$1; then
3985 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3986 if test -n "$file_magic_test_file"; then
3987 case $deplibs_check_method in
3989 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3990 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3991 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3992 $EGREP "$file_magic_regex" > /dev/null; then
3997 *** Warning: the command libtool uses to detect shared libraries,
3998 *** $file_magic_cmd, produces output that libtool cannot recognize.
3999 *** The result is that libtool may fail to recognize shared libraries
4000 *** as such. This will affect the creation of libtool libraries that
4001 *** depend on shared libraries, but programs linked with such libtool
4002 *** libraries will work regardless of this problem. Nevertheless, you
4003 *** may want to report the problem to your system manager and/or to
4004 *** bug-libtool@gnu.org
4014 MAGIC_CMD="$lt_save_MAGIC_CMD"
4017 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4018 if test -n "$MAGIC_CMD"; then
4019 AC_MSG_RESULT($MAGIC_CMD)
4023 _LT_DECL([], [MAGIC_CMD], [0],
4024 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4025 ])# _LT_PATH_TOOL_PREFIX
4028 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4029 dnl aclocal-1.4 backwards compatibility:
4030 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4035 # find a file program which can recognize a shared library
4036 m4_defun([_LT_PATH_MAGIC],
4037 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4038 if test -z "$lt_cv_path_MAGIC_CMD"; then
4039 if test -n "$ac_tool_prefix"; then
4040 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4050 # find the pathname to the GNU or non-GNU linker
4051 AC_DEFUN([LT_PATH_LD],
4052 [AC_REQUIRE([AC_PROG_CC])dnl
4053 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4054 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4055 m4_require([_LT_DECL_SED])dnl
4056 m4_require([_LT_DECL_EGREP])dnl
4057 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4059 AC_ARG_WITH([gnu-ld],
4060 [AS_HELP_STRING([--with-gnu-ld],
4061 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4062 [test "$withval" = no || with_gnu_ld=yes],
4063 [with_gnu_ld=no])dnl
4066 if test "$GCC" = yes; then
4067 # Check if gcc -print-prog-name=ld gives a path.
4068 AC_MSG_CHECKING([for ld used by $CC])
4071 # gcc leaves a trailing carriage return which upsets mingw
4072 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4074 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4077 # Accept absolute paths.
4078 [[\\/]]* | ?:[[\\/]]*)
4079 re_direlt='/[[^/]][[^/]]*/\.\./'
4080 # Canonicalize the pathname of ld
4081 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4082 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4083 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4085 test -z "$LD" && LD="$ac_prog"
4088 # If it fails, then pretend we aren't using GCC.
4092 # If it is relative, then search for the first ld in PATH.
4096 elif test "$with_gnu_ld" = yes; then
4097 AC_MSG_CHECKING([for GNU ld])
4099 AC_MSG_CHECKING([for non-GNU ld])
4101 AC_CACHE_VAL(lt_cv_path_LD,
4102 [if test -z "$LD"; then
4103 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4104 for ac_dir in $PATH; do
4106 test -z "$ac_dir" && ac_dir=.
4107 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4108 lt_cv_path_LD="$ac_dir/$ac_prog"
4109 # Check to see if the program is GNU ld. I'd rather use --version,
4110 # but apparently some variants of GNU ld only accept -v.
4111 # Break only if it was the GNU/non-GNU ld that we prefer.
4112 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4113 *GNU* | *'with BFD'*)
4114 test "$with_gnu_ld" != no && break
4117 test "$with_gnu_ld" != yes && break
4124 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4127 if test -n "$LD"; then
4132 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4136 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4140 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4141 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4142 dnl aclocal-1.4 backwards compatibility:
4143 dnl AC_DEFUN([AM_PROG_LD], [])
4144 dnl AC_DEFUN([AC_PROG_LD], [])
4149 m4_defun([_LT_PATH_LD_GNU],
4150 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4151 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4152 case `$LD -v 2>&1 </dev/null` in
4153 *GNU* | *'with BFD'*)
4154 lt_cv_prog_gnu_ld=yes
4157 lt_cv_prog_gnu_ld=no
4160 with_gnu_ld=$lt_cv_prog_gnu_ld
4166 # find reload flag for linker
4167 # -- PORTME Some linkers may need a different reload flag.
4168 m4_defun([_LT_CMD_RELOAD],
4169 [AC_CACHE_CHECK([for $LD option to reload object files],
4170 lt_cv_ld_reload_flag,
4171 [lt_cv_ld_reload_flag='-r'])
4172 reload_flag=$lt_cv_ld_reload_flag
4173 case $reload_flag in
4175 *) reload_flag=" $reload_flag" ;;
4177 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4179 cygwin* | mingw* | pw32* | cegcc*)
4180 if test "$GCC" != yes; then
4185 if test "$GCC" = yes; then
4186 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4188 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4192 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4193 _LT_TAGDECL([], [reload_cmds], [2])dnl
4197 # _LT_CHECK_MAGIC_METHOD
4198 # ----------------------
4199 # how to check for library dependencies
4200 # -- PORTME fill in with the dynamic library characteristics
4201 m4_defun([_LT_CHECK_MAGIC_METHOD],
4202 [m4_require([_LT_DECL_EGREP])
4203 m4_require([_LT_DECL_OBJDUMP])
4204 AC_CACHE_CHECK([how to recognize dependent libraries],
4205 lt_cv_deplibs_check_method,
4206 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4207 lt_cv_file_magic_test_file=
4208 lt_cv_deplibs_check_method='unknown'
4209 # Need to set the preceding variable on all platforms that support
4210 # interlibrary dependencies.
4211 # 'none' -- dependencies not supported.
4212 # `unknown' -- same as none, but documents that we really don't know.
4213 # 'pass_all' -- all dependencies passed with no checks.
4214 # 'test_compile' -- check by making test program.
4215 # 'file_magic [[regex]]' -- check by looking for files in library path
4216 # which responds to the $file_magic_cmd with a given extended regex.
4217 # If you have `file' or equivalent on your system and you're not sure
4218 # whether `pass_all' will *always* work, you probably want this one.
4222 lt_cv_deplibs_check_method=pass_all
4226 lt_cv_deplibs_check_method=pass_all
4230 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4231 lt_cv_file_magic_cmd='/usr/bin/file -L'
4232 lt_cv_file_magic_test_file=/shlib/libc.so
4236 # func_win32_libid is a shell function defined in ltmain.sh
4237 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4238 lt_cv_file_magic_cmd='func_win32_libid'
4242 # Base MSYS/MinGW do not provide the 'file' command needed by
4243 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4244 # unless we find 'file', for example because we are cross-compiling.
4245 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4246 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4247 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4248 lt_cv_file_magic_cmd='func_win32_libid'
4250 # Keep this pattern in sync with the one in func_win32_libid.
4251 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4252 lt_cv_file_magic_cmd='$OBJDUMP -f'
4257 # use the weaker test based on 'objdump'. See mingw*.
4258 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4259 lt_cv_file_magic_cmd='$OBJDUMP -f'
4262 darwin* | rhapsody*)
4263 lt_cv_deplibs_check_method=pass_all
4266 freebsd* | dragonfly*)
4267 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4270 # Not sure whether the presence of OpenBSD here was a mistake.
4271 # Let's accept both of them until this is cleared up.
4272 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4273 lt_cv_file_magic_cmd=/usr/bin/file
4274 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4278 lt_cv_deplibs_check_method=pass_all
4283 lt_cv_deplibs_check_method=pass_all
4287 lt_cv_deplibs_check_method=pass_all
4290 hpux10.20* | hpux11*)
4291 lt_cv_file_magic_cmd=/usr/bin/file
4294 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4295 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4298 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4299 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4302 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4303 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4309 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4310 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4313 irix5* | irix6* | nonstopux*)
4315 *-32|*"-32 ") libmagic=32-bit;;
4316 *-n32|*"-n32 ") libmagic=N32;;
4317 *-64|*"-64 ") libmagic=64-bit;;
4318 *) libmagic=never-match;;
4320 lt_cv_deplibs_check_method=pass_all
4323 # This must be glibc/ELF.
4324 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4325 lt_cv_deplibs_check_method=pass_all
4329 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4330 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4332 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4337 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4338 lt_cv_file_magic_cmd=/usr/bin/file
4339 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4343 lt_cv_deplibs_check_method=pass_all
4347 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4348 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4350 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4354 osf3* | osf4* | osf5*)
4355 lt_cv_deplibs_check_method=pass_all
4359 lt_cv_deplibs_check_method=pass_all
4363 lt_cv_deplibs_check_method=pass_all
4366 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4367 lt_cv_deplibs_check_method=pass_all
4371 case $host_vendor in
4373 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]]'
4374 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4377 lt_cv_deplibs_check_method=pass_all
4380 lt_cv_file_magic_cmd='/bin/file'
4381 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4384 lt_cv_file_magic_cmd='/bin/file'
4385 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4386 lt_cv_file_magic_test_file=/lib/libc.so
4389 lt_cv_deplibs_check_method=pass_all
4392 lt_cv_deplibs_check_method=pass_all
4398 lt_cv_deplibs_check_method=pass_all
4405 if test "$build" = "$host"; then
4408 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4411 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4417 file_magic_cmd=$lt_cv_file_magic_cmd
4418 deplibs_check_method=$lt_cv_deplibs_check_method
4419 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4421 _LT_DECL([], [deplibs_check_method], [1],
4422 [Method to check whether dependent libraries are shared objects])
4423 _LT_DECL([], [file_magic_cmd], [1],
4424 [Command to use when deplibs_check_method = "file_magic"])
4425 _LT_DECL([], [file_magic_glob], [1],
4426 [How to find potential files when deplibs_check_method = "file_magic"])
4427 _LT_DECL([], [want_nocaseglob], [1],
4428 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4429 ])# _LT_CHECK_MAGIC_METHOD
4434 # find the pathname to a BSD- or MS-compatible name lister
4435 AC_DEFUN([LT_PATH_NM],
4436 [AC_REQUIRE([AC_PROG_CC])dnl
4437 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4438 [if test -n "$NM"; then
4439 # Let the user override the test.
4442 lt_nm_to_check="${ac_tool_prefix}nm"
4443 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4444 lt_nm_to_check="$lt_nm_to_check nm"
4446 for lt_tmp_nm in $lt_nm_to_check; do
4447 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4448 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4450 test -z "$ac_dir" && ac_dir=.
4451 tmp_nm="$ac_dir/$lt_tmp_nm"
4452 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4453 # Check to see if the nm accepts a BSD-compat flag.
4454 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4455 # nm: unknown option "B" ignored
4456 # Tru64's nm complains that /dev/null is an invalid object file
4457 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4458 */dev/null* | *'Invalid file or object type'*)
4459 lt_cv_path_NM="$tmp_nm -B"
4463 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4465 lt_cv_path_NM="$tmp_nm -p"
4469 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4470 continue # so that we can try to find one that supports BSD flags
4479 : ${lt_cv_path_NM=no}
4481 if test "$lt_cv_path_NM" != "no"; then
4484 # Didn't find any BSD compatible name lister, look for dumpbin.
4485 if test -n "$DUMPBIN"; then :
4486 # Let the user override the test.
4488 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4489 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4491 DUMPBIN="$DUMPBIN -symbols"
4499 if test "$DUMPBIN" != ":"; then
4503 test -z "$NM" && NM=nm
4505 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4507 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4508 [lt_cv_nm_interface="BSD nm"
4509 echo "int some_variable = 0;" > conftest.$ac_ext
4510 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4511 (eval "$ac_compile" 2>conftest.err)
4512 cat conftest.err >&AS_MESSAGE_LOG_FD
4513 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4514 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4515 cat conftest.err >&AS_MESSAGE_LOG_FD
4516 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4517 cat conftest.out >&AS_MESSAGE_LOG_FD
4518 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4519 lt_cv_nm_interface="MS dumpbin"
4525 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4526 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4527 dnl aclocal-1.4 backwards compatibility:
4528 dnl AC_DEFUN([AM_PROG_NM], [])
4529 dnl AC_DEFUN([AC_PROG_NM], [])
4531 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4532 # --------------------------------
4533 # how to determine the name of the shared library
4534 # associated with a specific link library.
4535 # -- PORTME fill in with the dynamic library characteristics
4536 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4537 [m4_require([_LT_DECL_EGREP])
4538 m4_require([_LT_DECL_OBJDUMP])
4539 m4_require([_LT_DECL_DLLTOOL])
4540 AC_CACHE_CHECK([how to associate runtime and link libraries],
4541 lt_cv_sharedlib_from_linklib_cmd,
4542 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4545 cygwin* | mingw* | pw32* | cegcc*)
4546 # two different shell functions defined in ltmain.sh
4547 # decide which to use based on capabilities of $DLLTOOL
4548 case `$DLLTOOL --help 2>&1` in
4549 *--identify-strict*)
4550 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4553 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4558 # fallback: assume linklib IS sharedlib
4559 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4563 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4564 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4566 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4567 [Command to associate shared and link libraries])
4568 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4571 # _LT_PATH_MANIFEST_TOOL
4572 # ----------------------
4573 # locate the manifest tool
4574 m4_defun([_LT_PATH_MANIFEST_TOOL],
4575 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4576 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4577 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4578 [lt_cv_path_mainfest_tool=no
4579 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4580 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4581 cat conftest.err >&AS_MESSAGE_LOG_FD
4582 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4583 lt_cv_path_mainfest_tool=yes
4586 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4589 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4590 ])# _LT_PATH_MANIFEST_TOOL
4595 # check for math library
4596 AC_DEFUN([LT_LIB_M],
4597 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4600 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4601 # These system don't have libm, or don't need it
4604 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4605 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4608 AC_CHECK_LIB(m, cos, LIBM="-lm")
4615 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4616 dnl aclocal-1.4 backwards compatibility:
4617 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4620 # _LT_COMPILER_NO_RTTI([TAGNAME])
4621 # -------------------------------
4622 m4_defun([_LT_COMPILER_NO_RTTI],
4623 [m4_require([_LT_TAG_COMPILER])dnl
4625 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4627 if test "$GCC" = yes; then
4628 case $cc_basename in
4630 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4632 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4635 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4636 lt_cv_prog_compiler_rtti_exceptions,
4637 [-fno-rtti -fno-exceptions], [],
4638 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4640 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4641 [Compiler flag to turn off builtin functions])
4642 ])# _LT_COMPILER_NO_RTTI
4645 # _LT_CMD_GLOBAL_SYMBOLS
4646 # ----------------------
4647 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4648 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4649 AC_REQUIRE([AC_PROG_CC])dnl
4650 AC_REQUIRE([AC_PROG_AWK])dnl
4651 AC_REQUIRE([LT_PATH_NM])dnl
4652 AC_REQUIRE([LT_PATH_LD])dnl
4653 m4_require([_LT_DECL_SED])dnl
4654 m4_require([_LT_DECL_EGREP])dnl
4655 m4_require([_LT_TAG_COMPILER])dnl
4657 # Check for command to grab the raw symbol name followed by C symbol from nm.
4658 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4659 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4661 # These are sane defaults that work on at least a few old systems.
4662 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4664 # Character class describing NM global symbol codes.
4665 symcode='[[BCDEGRST]]'
4667 # Regexp to match symbols that can be accessed directly from C.
4668 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4670 # Define system-specific variables.
4675 cygwin* | mingw* | pw32* | cegcc*)
4676 symcode='[[ABCDGISTW]]'
4679 if test "$host_cpu" = ia64; then
4680 symcode='[[ABCDEGRST]]'
4684 symcode='[[BCDEGRST]]'
4687 symcode='[[BCDEGQRST]]'
4698 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4702 symcode='[[DFNSTU]]'
4706 # If we're using GNU nm, then use its standard symbol codes.
4707 case `$NM -V 2>&1` in
4708 *GNU* | *'with BFD'*)
4709 symcode='[[ABCDGIRSTW]]' ;;
4712 # Transform an extracted symbol line into a proper C declaration.
4713 # Some systems (esp. on ia64) link data and code symbols differently,
4714 # so use this general approach.
4715 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4717 # Transform an extracted symbol line into symbol name and symbol address
4718 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4719 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
4721 # Handle CRLF in mingw tool chain
4725 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4729 # Try without a prefix underscore, then with it.
4730 for ac_symprfx in "" "_"; do
4732 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4733 symxfrm="\\1 $ac_symprfx\\2 \\2"
4735 # Write the raw and C identifiers.
4736 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4737 # Fake it for dumpbin and say T for any non-static function
4738 # and D for any global variable.
4739 # Also find C++ and __fastcall symbols from MSVC++,
4740 # which start with @ or ?.
4741 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4742 " {last_section=section; section=\$ 3};"\
4743 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4744 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4745 " \$ 0!~/External *\|/{next};"\
4746 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4747 " {if(hide[section]) next};"\
4748 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4749 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4750 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
4751 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4752 " ' prfx=^$ac_symprfx]"
4754 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4756 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4758 # Check to see that the pipe works correctly.
4762 cat > conftest.$ac_ext <<_LT_EOF
4767 void nm_test_func(void);
4768 void nm_test_func(void){}
4772 int main(){nm_test_var='a';nm_test_func();return(0);}
4775 if AC_TRY_EVAL(ac_compile); then
4776 # Now try to grab the symbols.
4778 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4779 # Try sorting and uniquifying the output.
4780 if sort "$nlist" | uniq > "$nlist"T; then
4781 mv -f "$nlist"T "$nlist"
4786 # Make sure that we snagged all the symbols we need.
4787 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4788 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4789 cat <<_LT_EOF > conftest.$ac_ext
4790 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4791 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4792 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4793 relocations are performed -- see ld's documentation on pseudo-relocs. */
4794 # define LT@&t@_DLSYM_CONST
4795 #elif defined(__osf__)
4796 /* This system does not cope well with relocations in const data. */
4797 # define LT@&t@_DLSYM_CONST
4799 # define LT@&t@_DLSYM_CONST const
4807 # Now generate the symbol file.
4808 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4810 cat <<_LT_EOF >> conftest.$ac_ext
4812 /* The mapping between symbol names and symbols. */
4813 LT@&t@_DLSYM_CONST struct {
4817 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4819 { "@PROGRAM@", (void *) 0 },
4821 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4822 cat <<\_LT_EOF >> conftest.$ac_ext
4826 /* This works around a problem in FreeBSD linker */
4827 #ifdef FREEBSD_WORKAROUND
4828 static const void *lt_preloaded_setup() {
4829 return lt__PROGRAM__LTX_preloaded_symbols;
4837 # Now try linking the two files.
4838 mv conftest.$ac_objext conftstm.$ac_objext
4839 lt_globsym_save_LIBS=$LIBS
4840 lt_globsym_save_CFLAGS=$CFLAGS
4841 LIBS="conftstm.$ac_objext"
4842 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4843 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4846 LIBS=$lt_globsym_save_LIBS
4847 CFLAGS=$lt_globsym_save_CFLAGS
4849 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4852 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4855 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4858 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4859 cat conftest.$ac_ext >&5
4861 rm -rf conftest* conftst*
4863 # Do not use the global_symbol_pipe unless it works.
4864 if test "$pipe_works" = yes; then
4867 lt_cv_sys_global_symbol_pipe=
4871 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4872 lt_cv_sys_global_symbol_to_cdecl=
4874 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4875 AC_MSG_RESULT(failed)
4880 # Response file support.
4881 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4882 nm_file_list_spec='@'
4883 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4884 nm_file_list_spec='@'
4887 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4888 [Take the output of nm and produce a listing of raw symbols and C names])
4889 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4890 [Transform the output of nm in a proper C declaration])
4891 _LT_DECL([global_symbol_to_c_name_address],
4892 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4893 [Transform the output of nm in a C name address pair])
4894 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4895 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4896 [Transform the output of nm in a C name address pair when lib prefix is needed])
4897 _LT_DECL([], [nm_file_list_spec], [1],
4898 [Specify filename containing input files for $NM])
4899 ]) # _LT_CMD_GLOBAL_SYMBOLS
4902 # _LT_COMPILER_PIC([TAGNAME])
4903 # ---------------------------
4904 m4_defun([_LT_COMPILER_PIC],
4905 [m4_require([_LT_TAG_COMPILER])dnl
4906 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4907 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4908 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4910 m4_if([$1], [CXX], [
4911 # C++ specific cases for pic, static, wl, etc.
4912 if test "$GXX" = yes; then
4913 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4914 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4918 # All AIX code is PIC.
4919 if test "$host_cpu" = ia64; then
4920 # AIX 5 now supports IA64 processor
4921 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4928 # see comment about AmigaOS4 .so support
4929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4932 # FIXME: we need at least 68020 code to build shared libraries, but
4933 # adding the `-m68020' flag to GCC prevents building anything better,
4935 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4940 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4941 # PIC is the default for these OSes.
4943 mingw* | cygwin* | os2* | pw32* | cegcc*)
4944 # This hack is so that the source file can tell whether it is being
4945 # built for inclusion in a dll (and should export symbols for example).
4946 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4947 # (--disable-auto-import) libraries
4948 m4_if([$1], [GCJ], [],
4949 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4951 darwin* | rhapsody*)
4952 # PIC is the default on this platform
4953 # Common symbols not allowed in MH_DYLIB files
4954 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4957 # DJGPP does not support shared libraries at all
4958 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4961 # PIC is the default for Haiku.
4962 # The "-static" flag exists, but is broken.
4963 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4966 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4967 # Instead, we relocate shared libraries at runtime.
4970 if test -d /usr/nec; then
4971 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4975 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4976 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4977 # sets the default TLS model and affects inlining.
4982 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4987 # QNX uses GNU C++, but need to define -shared option too, otherwise
4989 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4992 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4998 # All AIX code is PIC.
4999 if test "$host_cpu" = ia64; then
5000 # AIX 5 now supports IA64 processor
5001 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5007 case $cc_basename in
5009 # Green Hills C++ Compiler
5010 # _LT_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"
5014 mingw* | cygwin* | os2* | pw32* | cegcc*)
5015 # This hack is so that the source file can tell whether it is being
5016 # built for inclusion in a dll (and should export symbols for example).
5017 m4_if([$1], [GCJ], [],
5018 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5021 case $cc_basename in
5023 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5026 # Green Hills C++ Compiler
5027 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5033 freebsd* | dragonfly*)
5034 # FreeBSD uses GNU C++
5036 hpux9* | hpux10* | hpux11*)
5037 case $cc_basename in
5039 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5040 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5041 if test "$host_cpu" != ia64; then
5042 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5046 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5047 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5053 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5062 # This is c89, which is MS Visual C++ (no shared libs)
5063 # Anyone wants to do a port?
5065 irix5* | irix6* | nonstopux*)
5066 case $cc_basename in
5068 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5070 # CC pic flag -KPIC is the default.
5076 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5077 case $cc_basename in
5080 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5084 # old Intel C++ for x86_64 which still supported -KPIC.
5085 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5090 # Intel C++, used to be incompatible with GCC.
5091 # ICC 10 doesn't accept -KPIC any more.
5092 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5094 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5097 # Portland Group C++ compiler
5098 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5099 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5100 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5104 # Make sure the PIC flag is empty. It appears that all Alpha
5105 # Linux and Compaq Tru64 Unix objects are PIC.
5106 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5107 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5109 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5110 # IBM XL 8.0, 9.0 on PPC and BlueGene
5111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5113 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5116 case `$CC -V 2>&1 | sed 5q` in
5119 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5120 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5121 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5132 case $cc_basename in
5134 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5143 # QNX uses GNU C++, but need to define -shared option too, otherwise
5145 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5147 osf3* | osf4* | osf5*)
5148 case $cc_basename in
5150 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5153 # Rational C++ 2.4.1
5154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5157 # Digital/Compaq C++
5158 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5159 # Make sure the PIC flag is empty. It appears that all Alpha
5160 # Linux and Compaq Tru64 Unix objects are PIC.
5161 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5162 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5171 case $cc_basename in
5173 # Sun C++ 4.2, 5.x and Centerline C++
5174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5179 # Green Hills C++ Compiler
5180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5187 case $cc_basename in
5190 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5191 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5195 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5201 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5202 case $cc_basename in
5204 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5205 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5211 case $cc_basename in
5213 # NonStop-UX NCC 3.20
5214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5223 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5229 if test "$GCC" = yes; then
5230 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5235 # All AIX code is PIC.
5236 if test "$host_cpu" = ia64; then
5237 # AIX 5 now supports IA64 processor
5238 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5245 # see comment about AmigaOS4 .so support
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5249 # FIXME: we need at least 68020 code to build shared libraries, but
5250 # adding the `-m68020' flag to GCC prevents building anything better,
5252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5257 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5258 # PIC is the default for these OSes.
5261 mingw* | cygwin* | pw32* | os2* | cegcc*)
5262 # This hack is so that the source file can tell whether it is being
5263 # built for inclusion in a dll (and should export symbols for example).
5264 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5265 # (--disable-auto-import) libraries
5266 m4_if([$1], [GCJ], [],
5267 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5270 darwin* | rhapsody*)
5271 # PIC is the default on this platform
5272 # Common symbols not allowed in MH_DYLIB files
5273 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5277 # PIC is the default for Haiku.
5278 # The "-static" flag exists, but is broken.
5279 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5283 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5284 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5285 # sets the default TLS model and affects inlining.
5291 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5297 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5298 # Instead, we relocate shared libraries at runtime.
5302 # Just because we use GCC doesn't mean we suddenly get shared libraries
5303 # on systems that don't support them.
5304 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5309 # QNX uses GNU C++, but need to define -shared option too, otherwise
5311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5315 if test -d /usr/nec; then
5316 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5325 case $cc_basename in
5326 nvcc*) # Cuda Compiler Driver 2.2
5327 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5328 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5329 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5334 # PORTME Check for flag to pass linker flags through the system compiler.
5337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338 if test "$host_cpu" = ia64; then
5339 # AIX 5 now supports IA64 processor
5340 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5342 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5346 mingw* | cygwin* | pw32* | os2* | cegcc*)
5347 # This hack is so that the source file can tell whether it is being
5348 # built for inclusion in a dll (and should export symbols for example).
5349 m4_if([$1], [GCJ], [],
5350 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5353 hpux9* | hpux10* | hpux11*)
5354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5365 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5366 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5369 irix5* | irix6* | nonstopux*)
5370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5371 # PIC (with -KPIC) is the default.
5372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5375 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5376 case $cc_basename in
5377 # old Intel for x86_64 which still supported -KPIC.
5379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5381 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5383 # icc used to be incompatible with GCC.
5384 # ICC 10 doesn't accept -KPIC any more.
5386 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5390 # Lahey Fortran 8.1.
5392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5394 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5397 # NAG Fortran compiler
5398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5402 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5403 # Portland Group compilers (*not* the Pentium gcc compiler,
5404 # which looks to be a dead project)
5405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5406 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5407 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5410 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5411 # All Alpha code is PIC.
5412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5414 xl* | bgxl* | bgf* | mpixl*)
5415 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5416 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5421 case `$CC -V 2>&1 | sed 5q` in
5422 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5423 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5424 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5425 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5426 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5428 *Sun\ F* | *Sun*Fortran*)
5429 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5430 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5435 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5436 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5437 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5439 *Intel*\ [[CF]]*Compiler*)
5440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5441 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5442 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5445 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5446 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5447 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5456 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5460 # QNX uses GNU C++, but need to define -shared option too, otherwise
5462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5465 osf3* | osf4* | osf5*)
5466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5467 # All OSF/1 code is PIC.
5468 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5472 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5476 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5477 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5478 case $cc_basename in
5479 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5482 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5492 sysv4 | sysv4.2uw2* | sysv4.3*)
5493 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5495 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499 if test -d /usr/nec ;then
5500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5501 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5505 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5506 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5507 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5508 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5512 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5513 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5517 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5518 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5522 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5528 # For platforms which do not support PIC, -DPIC is meaningless:
5530 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5533 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5537 AC_CACHE_CHECK([for $compiler option to produce PIC],
5538 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5539 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5540 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5543 # Check to make sure the PIC flag actually works.
5545 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5546 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5547 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5548 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5549 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5551 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5553 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5554 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5556 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5557 [Additional compiler flags for building library objects])
5559 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5560 [How to pass a linker flag through the compiler])
5562 # Check to make sure the static flag actually works.
5564 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5565 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5566 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5567 $lt_tmp_static_flag,
5569 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5570 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5571 [Compiler flag to prevent dynamic linking])
5572 ])# _LT_COMPILER_PIC
5575 # _LT_LINKER_SHLIBS([TAGNAME])
5576 # ----------------------------
5577 # See if the linker supports building shared libraries.
5578 m4_defun([_LT_LINKER_SHLIBS],
5579 [AC_REQUIRE([LT_PATH_LD])dnl
5580 AC_REQUIRE([LT_PATH_NM])dnl
5581 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5582 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5583 m4_require([_LT_DECL_EGREP])dnl
5584 m4_require([_LT_DECL_SED])dnl
5585 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5586 m4_require([_LT_TAG_COMPILER])dnl
5587 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5588 m4_if([$1], [CXX], [
5589 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5590 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5593 # If we're using GNU nm, then we don't want the "-C" option.
5594 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5595 # Also, AIX nm treats weak defined symbols like other global defined
5596 # symbols, whereas GNU nm marks them as "W".
5597 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5598 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5600 _LT_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'
5604 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5606 cygwin* | mingw* | cegcc*)
5607 case $cc_basename in
5609 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5612 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5613 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5618 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5623 _LT_TAGVAR(allow_undefined_flag, $1)=
5624 _LT_TAGVAR(always_export_symbols, $1)=no
5625 _LT_TAGVAR(archive_cmds, $1)=
5626 _LT_TAGVAR(archive_expsym_cmds, $1)=
5627 _LT_TAGVAR(compiler_needs_object, $1)=no
5628 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5629 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5630 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5631 _LT_TAGVAR(hardcode_automatic, $1)=no
5632 _LT_TAGVAR(hardcode_direct, $1)=no
5633 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5634 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5635 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5636 _LT_TAGVAR(hardcode_minus_L, $1)=no
5637 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5638 _LT_TAGVAR(inherit_rpath, $1)=no
5639 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5640 _LT_TAGVAR(module_cmds, $1)=
5641 _LT_TAGVAR(module_expsym_cmds, $1)=
5642 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5643 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5644 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5645 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5646 # include_expsyms should be a list of space-separated symbols to be *always*
5647 # included in the symbol list
5648 _LT_TAGVAR(include_expsyms, $1)=
5649 # exclude_expsyms can be an extended regexp of symbols to exclude
5650 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5651 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5652 # as well as any symbol that contains `d'.
5653 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5654 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5655 # platforms (ab)use it in PIC code, but their linkers get confused if
5656 # the symbol is explicitly referenced. Since portable code cannot
5657 # rely on this symbol name, it's probably fine to never include it in
5658 # preloaded symbol tables.
5659 # Exclude shared library initialization/finalization symbols.
5660 dnl Note also adjust exclude_expsyms for C++ above.
5661 extract_expsyms_cmds=
5664 cygwin* | mingw* | pw32* | cegcc*)
5665 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5666 # When not using gcc, we currently assume that we are using
5667 # Microsoft Visual C++.
5668 if test "$GCC" != yes; then
5673 # we just hope/assume this is gcc and not c89 (= MSVC++)
5681 _LT_TAGVAR(ld_shlibs, $1)=yes
5683 # On some targets, GNU ld is compatible enough with the native linker
5684 # that we're better off using the native interface for both.
5685 lt_use_gnu_ld_interface=no
5686 if test "$with_gnu_ld" = yes; then
5689 # The AIX port of GNU ld has always aspired to compatibility
5690 # with the native linker. However, as the warning in the GNU ld
5691 # block says, versions before 2.19.5* couldn't really create working
5692 # shared libraries, regardless of the interface used.
5693 case `$LD -v 2>&1` in
5694 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5695 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5696 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5698 lt_use_gnu_ld_interface=yes
5703 lt_use_gnu_ld_interface=yes
5708 if test "$lt_use_gnu_ld_interface" = yes; then
5709 # If archive_cmds runs LD, not CC, wlarc should be empty
5712 # Set some defaults for GNU ld with shared library support. These
5713 # are reset later if shared libraries are not supported. Putting them
5714 # here allows them to be overridden if necessary.
5715 runpath_var=LD_RUN_PATH
5716 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5717 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5718 # ancient GNU ld didn't support --whole-archive et. al.
5719 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5720 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5722 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5724 supports_anon_versioning=no
5725 case `$LD -v 2>&1` in
5726 *GNU\ gold*) supports_anon_versioning=yes ;;
5727 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5728 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5729 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5730 *\ 2.11.*) ;; # other 2.11 versions
5731 *) supports_anon_versioning=yes ;;
5734 # See if GNU ld supports shared libraries.
5737 # On AIX/PPC, the GNU linker is very broken
5738 if test "$host_cpu" != ia64; then
5739 _LT_TAGVAR(ld_shlibs, $1)=no
5742 *** Warning: the GNU linker, at least up to release 2.19, is reported
5743 *** to be unable to reliably create shared libraries on AIX.
5744 *** Therefore, libtool is disabling shared libraries support. If you
5745 *** really care for shared libraries, you may want to install binutils
5746 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5747 *** You will then need to restart the configuration process.
5756 # see comment about AmigaOS4 .so support
5757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5758 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5761 _LT_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)'
5762 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5769 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5770 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5771 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5772 # support --undefined. This deserves some investigation. FIXME
5773 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5775 _LT_TAGVAR(ld_shlibs, $1)=no
5779 cygwin* | mingw* | pw32* | cegcc*)
5780 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5781 # as there is no search path for DLLs.
5782 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5783 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5784 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5785 _LT_TAGVAR(always_export_symbols, $1)=no
5786 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5787 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5788 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5790 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5791 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5792 # If the export-symbols file already is a .def file (1st line
5793 # is EXPORTS), use it as is; otherwise, prepend...
5794 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5795 cp $export_symbols $output_objdir/$soname.def;
5797 echo EXPORTS > $output_objdir/$soname.def;
5798 cat $export_symbols >> $output_objdir/$soname.def;
5800 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5802 _LT_TAGVAR(ld_shlibs, $1)=no
5807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808 _LT_TAGVAR(link_all_deplibs, $1)=yes
5812 _LT_TAGVAR(hardcode_direct, $1)=no
5813 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5815 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5816 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5817 # Instead, shared libraries are loaded at an image base (0x10000000 by
5818 # default) and relocated if they conflict, which is a slow very memory
5819 # consuming and fragmenting process. To avoid this, we pick a random,
5820 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5821 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5822 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5823 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5826 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5828 if test "$host_os" = linux-dietlibc; then
5829 case $cc_basename in
5830 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5833 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5834 && test "$tmp_diet" = no
5836 tmp_addflag=' $pic_flag'
5837 tmp_sharedflag='-shared'
5838 case $cc_basename,$host_cpu in
5839 pgcc*) # Portland Group C compiler
5840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5841 tmp_addflag=' $pic_flag'
5843 pgf77* | pgf90* | pgf95* | pgfortran*)
5844 # Portland Group f77 and f90 compilers
5845 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5846 tmp_addflag=' $pic_flag -Mnomain' ;;
5847 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5848 tmp_addflag=' -i_dynamic' ;;
5849 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5850 tmp_addflag=' -i_dynamic -nofor_main' ;;
5851 ifc* | ifort*) # Intel Fortran compiler
5852 tmp_addflag=' -nofor_main' ;;
5853 lf95*) # Lahey Fortran 8.1
5854 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5855 tmp_sharedflag='--shared' ;;
5856 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5857 tmp_sharedflag='-qmkshrobj'
5859 nvcc*) # Cuda Compiler Driver 2.2
5860 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5861 _LT_TAGVAR(compiler_needs_object, $1)=yes
5864 case `$CC -V 2>&1 | sed 5q` in
5865 *Sun\ C*) # Sun C 5.9
5866 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5867 _LT_TAGVAR(compiler_needs_object, $1)=yes
5868 tmp_sharedflag='-G' ;;
5869 *Sun\ F*) # Sun Fortran 8.3
5870 tmp_sharedflag='-G' ;;
5872 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5874 if test "x$supports_anon_versioning" = xyes; then
5875 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5876 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5877 echo "local: *; };" >> $output_objdir/$libname.ver~
5878 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5881 case $cc_basename in
5882 xlf* | bgf* | bgxlf* | mpixlf*)
5883 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5884 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5886 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5887 if test "x$supports_anon_versioning" = xyes; then
5888 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5889 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5890 echo "local: *; };" >> $output_objdir/$libname.ver~
5891 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5896 _LT_TAGVAR(ld_shlibs, $1)=no
5901 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5902 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5906 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5911 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5912 _LT_TAGVAR(ld_shlibs, $1)=no
5915 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5916 *** create shared libraries on Solaris systems. Therefore, libtool
5917 *** is disabling shared libraries support. We urge you to upgrade GNU
5918 *** binutils to release 2.9.1 or newer. Another option is to modify
5919 *** your PATH or compiler configuration so that the native linker is
5920 *** used, and then restart.
5923 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5925 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5927 _LT_TAGVAR(ld_shlibs, $1)=no
5931 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5932 case `$LD -v 2>&1` in
5933 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5934 _LT_TAGVAR(ld_shlibs, $1)=no
5937 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5938 *** reliably create shared libraries on SCO systems. Therefore, libtool
5939 *** is disabling shared libraries support. We urge you to upgrade GNU
5940 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5941 *** your PATH or compiler configuration so that the native linker is
5942 *** used, and then restart.
5947 # For security reasons, it is highly recommended that you always
5948 # use absolute paths for naming shared libraries, and exclude the
5949 # DT_RUNPATH tag from executables and libraries. But doing so
5950 # requires that you compile everything twice, which is a pain.
5951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5953 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5954 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5956 _LT_TAGVAR(ld_shlibs, $1)=no
5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5965 _LT_TAGVAR(hardcode_direct, $1)=yes
5966 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5970 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5971 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5974 _LT_TAGVAR(ld_shlibs, $1)=no
5979 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5983 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5986 # PORTME fill in a description of your system's linker (not GNU ld)
5989 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5990 _LT_TAGVAR(always_export_symbols, $1)=yes
5991 _LT_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'
5992 # Note: this linker hardcodes the directories in LIBPATH if there
5993 # are no directories specified by -L.
5994 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5995 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5996 # Neither direct hardcoding nor static linking is supported with a
5998 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6003 if test "$host_cpu" = ia64; then
6004 # On IA64, the linker does run time linking by default, so we don't
6005 # have to do anything special.
6006 aix_use_runtimelinking=no
6007 exp_sym_flag='-Bexport'
6010 # If we're using GNU nm, then we don't want the "-C" option.
6011 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6012 # Also, AIX nm treats weak defined symbols like other global
6013 # defined symbols, whereas GNU nm marks them as "W".
6014 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6015 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6017 _LT_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'
6019 aix_use_runtimelinking=no
6021 # Test if we are trying to use run time linking or normal
6022 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6023 # need to do runtime linking.
6024 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6025 for ld_flag in $LDFLAGS; do
6026 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6027 aix_use_runtimelinking=yes
6034 exp_sym_flag='-bexport'
6035 no_entry_flag='-bnoentry'
6038 # When large executables or shared objects are built, AIX ld can
6039 # have problems creating the table of contents. If linking a library
6040 # or program results in "error TOC overflow" add -mminimal-toc to
6041 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6042 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6044 _LT_TAGVAR(archive_cmds, $1)=''
6045 _LT_TAGVAR(hardcode_direct, $1)=yes
6046 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6047 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6048 _LT_TAGVAR(link_all_deplibs, $1)=yes
6049 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6051 if test "$GCC" = yes; then
6052 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6053 # We only want to do this on AIX 4.2 and lower, the check
6054 # below for broken collect2 doesn't work under 4.3+
6055 collect2name=`${CC} -print-prog-name=collect2`
6056 if test -f "$collect2name" &&
6057 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6059 # We have reworked collect2
6062 # We have old collect2
6063 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6064 # It fails to find uninstalled libraries when the uninstalled
6065 # path is not listed in the libpath. Setting hardcode_minus_L
6066 # to unsupported forces relinking
6067 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6068 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6073 shared_flag='-shared'
6074 if test "$aix_use_runtimelinking" = yes; then
6075 shared_flag="$shared_flag "'${wl}-G'
6079 if test "$host_cpu" = ia64; then
6080 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6081 # chokes on -Wl,-G. The following line is correct:
6084 if test "$aix_use_runtimelinking" = yes; then
6085 shared_flag='${wl}-G'
6087 shared_flag='${wl}-bM:SRE'
6092 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6093 # It seems that -bexpall does not export symbols beginning with
6094 # underscore (_), so it is better to generate a list of symbols to export.
6095 _LT_TAGVAR(always_export_symbols, $1)=yes
6096 if test "$aix_use_runtimelinking" = yes; then
6097 # Warning - without using the other runtime loading flags (-brtl),
6098 # -berok will link without error, but may produce a broken library.
6099 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6100 # Determine the default libpath from the value encoded in an
6102 _LT_SYS_MODULE_PATH_AIX([$1])
6103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6104 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6106 if test "$host_cpu" = ia64; then
6107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6108 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6109 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6111 # Determine the default libpath from the value encoded in an
6113 _LT_SYS_MODULE_PATH_AIX([$1])
6114 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6115 # Warning - without using the other run time loading flags,
6116 # -berok will link without error, but may produce a broken library.
6117 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6118 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6119 if test "$with_gnu_ld" = yes; then
6120 # We only use this code for GNU lds that support --whole-archive.
6121 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6123 # Exported symbols can be pulled into shared objects from archives
6124 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6126 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6127 # This is similar to how AIX traditionally builds its shared libraries.
6128 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6136 # see comment about AmigaOS4 .so support
6137 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6138 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6141 _LT_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)'
6142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6143 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6149 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6152 cygwin* | mingw* | pw32* | cegcc*)
6153 # When not using gcc, we currently assume that we are using
6154 # Microsoft Visual C++.
6155 # hardcode_libdir_flag_spec is actually meaningless, as there is
6156 # no search path for DLLs.
6157 case $cc_basename in
6160 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6161 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6162 _LT_TAGVAR(always_export_symbols, $1)=yes
6163 _LT_TAGVAR(file_list_spec, $1)='@'
6164 # Tell ltmain to make .lib files, not .a files.
6166 # Tell ltmain to make .dll files, not .so files.
6168 # FIXME: Setting linknames here is a bad hack.
6169 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6170 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6171 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6173 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6175 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6177 # The linker will not automatically build a static lib if we build a DLL.
6178 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6179 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6180 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6181 _LT_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'
6183 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6184 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6185 lt_tool_outputfile="@TOOL_OUTPUT@"~
6186 case $lt_outputfile in
6189 lt_outputfile="$lt_outputfile.exe"
6190 lt_tool_outputfile="$lt_tool_outputfile.exe"
6193 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6194 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6195 $RM "$lt_outputfile.manifest";
6199 # Assume MSVC wrapper
6200 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6201 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6202 # Tell ltmain to make .lib files, not .a files.
6204 # Tell ltmain to make .dll files, not .so files.
6206 # FIXME: Setting linknames here is a bad hack.
6207 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6208 # The linker will automatically build a .lib file if we build a DLL.
6209 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6210 # FIXME: Should let the user specify the lib program.
6211 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6212 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6217 darwin* | rhapsody*)
6218 _LT_DARWIN_LINKER_FEATURES($1)
6222 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6223 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6224 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6227 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6228 # support. Future versions do this automatically, but an explicit c++rt0.o
6229 # does not break anything, and helps significantly (at the cost of a little
6232 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6233 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6234 _LT_TAGVAR(hardcode_direct, $1)=yes
6235 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6238 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6240 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6241 _LT_TAGVAR(hardcode_direct, $1)=yes
6242 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6243 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6246 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6247 freebsd* | dragonfly*)
6248 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6250 _LT_TAGVAR(hardcode_direct, $1)=yes
6251 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6255 if test "$GCC" = yes; then
6256 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6258 _LT_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'
6260 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6261 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6262 _LT_TAGVAR(hardcode_direct, $1)=yes
6264 # hardcode_minus_L: Not really in the search PATH,
6265 # but as the default location of the library.
6266 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6267 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6271 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6272 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6274 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6276 if test "$with_gnu_ld" = no; then
6277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6278 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6279 _LT_TAGVAR(hardcode_direct, $1)=yes
6280 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6281 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6282 # hardcode_minus_L: Not really in the search PATH,
6283 # but as the default location of the library.
6284 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6289 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6295 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6298 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6304 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6307 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6311 # Older versions of the 11.00 compiler do not understand -b yet
6312 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6313 _LT_LINKER_OPTION([if $CC understands -b],
6314 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6315 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6316 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6317 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6321 if test "$with_gnu_ld" = no; then
6322 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6323 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6327 _LT_TAGVAR(hardcode_direct, $1)=no
6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6331 _LT_TAGVAR(hardcode_direct, $1)=yes
6332 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6333 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6335 # hardcode_minus_L: Not really in the search PATH,
6336 # but as the default location of the library.
6337 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6343 irix5* | irix6* | nonstopux*)
6344 if test "$GCC" = yes; then
6345 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6346 # Try to use the -exported_symbol ld option, if it does not
6347 # work, assume that -exports_file does not work either and
6348 # implicitly export all symbols.
6349 # This should be the same for all languages, so no per-tag cache variable.
6350 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6351 [lt_cv_irix_exported_symbol],
6352 [save_LDFLAGS="$LDFLAGS"
6353 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6356 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6357 [C++], [[int foo (void) { return 0; }]],
6364 [lt_cv_irix_exported_symbol=yes],
6365 [lt_cv_irix_exported_symbol=no])
6366 LDFLAGS="$save_LDFLAGS"])
6367 if test "$lt_cv_irix_exported_symbol" = yes; then
6368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6371 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6372 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6374 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6376 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6377 _LT_TAGVAR(inherit_rpath, $1)=yes
6378 _LT_TAGVAR(link_all_deplibs, $1)=yes
6382 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6383 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6385 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6387 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6388 _LT_TAGVAR(hardcode_direct, $1)=yes
6389 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6393 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6394 _LT_TAGVAR(hardcode_direct, $1)=yes
6395 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6396 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6397 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6404 if test -f /usr/libexec/ld.so; then
6405 _LT_TAGVAR(hardcode_direct, $1)=yes
6406 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6407 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6408 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6409 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6410 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6415 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6416 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6420 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6421 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6426 _LT_TAGVAR(ld_shlibs, $1)=no
6431 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6432 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6433 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6434 _LT_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'
6435 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6439 if test "$GCC" = yes; then
6440 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6443 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6444 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6446 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6447 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6448 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6451 osf4* | osf5*) # as osf3* with the addition of -msym flag
6452 if test "$GCC" = yes; then
6453 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6455 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6457 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6458 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6459 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6460 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6462 # Both c and cxx compiler support -rpath directly
6463 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6465 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6466 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6470 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6471 if test "$GCC" = yes; then
6473 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6474 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6475 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6477 case `$CC -V 2>&1` in
6480 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6481 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6482 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6486 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6487 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6488 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6493 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6495 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6497 # The compiler driver will combine and reorder linker options,
6498 # but understands `-z linker_flag'. GCC discards it without `$wl',
6499 # but is careful enough not to reorder.
6500 # Supported since Solaris 2.6 (maybe 2.5.1?)
6501 if test "$GCC" = yes; then
6502 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6504 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6508 _LT_TAGVAR(link_all_deplibs, $1)=yes
6512 if test "x$host_vendor" = xsequent; then
6513 # Use $CC to link under sequent, because it throws in some extra .o
6514 # files that make .init and .fini sections work.
6515 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6517 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6520 _LT_TAGVAR(hardcode_direct, $1)=yes
6521 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6522 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6526 case $host_vendor in
6528 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6529 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6532 ## LD is ld it makes a PLAMLIB
6533 ## CC just makes a GrossModule.
6534 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6535 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6536 _LT_TAGVAR(hardcode_direct, $1)=no
6539 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6540 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6543 runpath_var='LD_RUN_PATH'
6544 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6548 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6549 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6550 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6554 if test -d /usr/nec; then
6555 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6556 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6557 runpath_var=LD_RUN_PATH
6558 hardcode_runpath_var=yes
6559 _LT_TAGVAR(ld_shlibs, $1)=yes
6563 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6564 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6565 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6566 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6567 runpath_var='LD_RUN_PATH'
6569 if test "$GCC" = yes; then
6570 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6571 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6573 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6574 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6578 sysv5* | sco3.2v5* | sco5v6*)
6579 # Note: We can NOT use -z defs as we might desire, because we do not
6580 # link with -lc, and that would cause any symbols used from libc to
6581 # always be unresolved, which means just about no library would
6582 # ever link correctly. If we're not using GNU ld we use -z text
6583 # though, which does catch some bad symbols but isn't as heavy-handed
6585 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6586 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6587 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6588 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6590 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6591 _LT_TAGVAR(link_all_deplibs, $1)=yes
6592 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6593 runpath_var='LD_RUN_PATH'
6595 if test "$GCC" = yes; then
6596 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6597 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6599 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6600 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6605 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6606 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6607 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6611 _LT_TAGVAR(ld_shlibs, $1)=no
6615 if test x$host_vendor = xsni; then
6617 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6618 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6624 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6625 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6627 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6629 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6630 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6631 _LT_DECL([], [extract_expsyms_cmds], [2],
6632 [The commands to extract the exported symbol list from a shared archive])
6635 # Do we need to explicitly link libc?
6637 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6639 # Assume -lc should be added
6640 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6642 if test "$enable_shared" = yes && test "$GCC" = yes; then
6643 case $_LT_TAGVAR(archive_cmds, $1) in
6645 # FIXME: we may have to deal with multi-command sequences.
6648 # Test whether the compiler implicitly links with -lc since on some
6649 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6650 # to ld, don't add -lc before -lgcc.
6651 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6652 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6654 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6656 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6659 libobjs=conftest.$ac_objext
6661 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6662 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6668 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6669 _LT_TAGVAR(allow_undefined_flag, $1)=
6670 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6672 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6674 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6676 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6678 cat conftest.err 1>&5
6682 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6689 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6690 [Whether or not to add -lc for building shared libraries])
6691 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6692 [enable_shared_with_static_runtimes], [0],
6693 [Whether or not to disallow shared libs when runtime libs are static])
6694 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6695 [Compiler flag to allow reflexive dlopens])
6696 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6697 [Compiler flag to generate shared objects directly from archives])
6698 _LT_TAGDECL([], [compiler_needs_object], [1],
6699 [Whether the compiler copes with passing no objects directly])
6700 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6701 [Create an old-style archive from a shared archive])
6702 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6703 [Create a temporary old-style archive to link instead of a shared archive])
6704 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6705 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6706 _LT_TAGDECL([], [module_cmds], [2],
6707 [Commands used to build a loadable module if different from building
6709 _LT_TAGDECL([], [module_expsym_cmds], [2])
6710 _LT_TAGDECL([], [with_gnu_ld], [1],
6711 [Whether we are building with GNU ld or not])
6712 _LT_TAGDECL([], [allow_undefined_flag], [1],
6713 [Flag that allows shared libraries with undefined symbols to be built])
6714 _LT_TAGDECL([], [no_undefined_flag], [1],
6715 [Flag that enforces no undefined symbols])
6716 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6717 [Flag to hardcode $libdir into a binary during linking.
6718 This must work even if $libdir does not exist])
6719 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6720 [Whether we need a single "-rpath" flag with a separated argument])
6721 _LT_TAGDECL([], [hardcode_direct], [0],
6722 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6723 DIR into the resulting binary])
6724 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6725 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6726 DIR into the resulting binary and the resulting library dependency is
6727 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6728 library is relocated])
6729 _LT_TAGDECL([], [hardcode_minus_L], [0],
6730 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6731 into the resulting binary])
6732 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6733 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6734 into the resulting binary])
6735 _LT_TAGDECL([], [hardcode_automatic], [0],
6736 [Set to "yes" if building a shared library automatically hardcodes DIR
6737 into the library and all subsequent libraries and executables linked
6739 _LT_TAGDECL([], [inherit_rpath], [0],
6740 [Set to yes if linker adds runtime paths of dependent libraries
6741 to runtime path list])
6742 _LT_TAGDECL([], [link_all_deplibs], [0],
6743 [Whether libtool must link a program against all its dependency libraries])
6744 _LT_TAGDECL([], [always_export_symbols], [0],
6745 [Set to "yes" if exported symbols are required])
6746 _LT_TAGDECL([], [export_symbols_cmds], [2],
6747 [The commands to list exported symbols])
6748 _LT_TAGDECL([], [exclude_expsyms], [1],
6749 [Symbols that should not be listed in the preloaded symbols])
6750 _LT_TAGDECL([], [include_expsyms], [1],
6751 [Symbols that must always be exported])
6752 _LT_TAGDECL([], [prelink_cmds], [2],
6753 [Commands necessary for linking programs (against libraries) with templates])
6754 _LT_TAGDECL([], [postlink_cmds], [2],
6755 [Commands necessary for finishing linking programs])
6756 _LT_TAGDECL([], [file_list_spec], [1],
6757 [Specify filename containing input files])
6758 dnl FIXME: Not yet implemented
6759 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6760 dnl [Compiler flag to generate thread safe objects])
6761 ])# _LT_LINKER_SHLIBS
6764 # _LT_LANG_C_CONFIG([TAG])
6765 # ------------------------
6766 # Ensure that the configuration variables for a C compiler are suitably
6767 # defined. These variables are subsequently used by _LT_CONFIG to write
6768 # the compiler configuration to `libtool'.
6769 m4_defun([_LT_LANG_C_CONFIG],
6770 [m4_require([_LT_DECL_EGREP])dnl
6774 # Source file extension for C test sources.
6777 # Object file extension for compiled C test sources.
6779 _LT_TAGVAR(objext, $1)=$objext
6781 # Code to be used in simple compile tests
6782 lt_simple_compile_test_code="int some_variable = 0;"
6784 # Code to be used in simple link tests
6785 lt_simple_link_test_code='int main(){return(0);}'
6788 # Save the default compiler, since it gets overwritten when the other
6789 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6790 compiler_DEFAULT=$CC
6792 # save warnings/boilerplate of simple test code
6793 _LT_COMPILER_BOILERPLATE
6794 _LT_LINKER_BOILERPLATE
6796 if test -n "$compiler"; then
6797 _LT_COMPILER_NO_RTTI($1)
6798 _LT_COMPILER_PIC($1)
6799 _LT_COMPILER_C_O($1)
6800 _LT_COMPILER_FILE_LOCKS($1)
6801 _LT_LINKER_SHLIBS($1)
6802 _LT_SYS_DYNAMIC_LINKER($1)
6803 _LT_LINKER_HARDCODE_LIBPATH($1)
6807 # Report which library types will actually be built
6808 AC_MSG_CHECKING([if libtool supports shared libraries])
6809 AC_MSG_RESULT([$can_build_shared])
6811 AC_MSG_CHECKING([whether to build shared libraries])
6812 test "$can_build_shared" = "no" && enable_shared=no
6814 # On AIX, shared libraries and static libraries use the same namespace, and
6815 # are all built from PIC.
6818 test "$enable_shared" = yes && enable_static=no
6819 if test -n "$RANLIB"; then
6820 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821 postinstall_cmds='$RANLIB $lib'
6826 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6827 test "$enable_shared" = yes && enable_static=no
6831 AC_MSG_RESULT([$enable_shared])
6833 AC_MSG_CHECKING([whether to build static libraries])
6834 # Make sure either enable_shared or enable_static is yes.
6835 test "$enable_shared" = yes || enable_static=yes
6836 AC_MSG_RESULT([$enable_static])
6842 ])# _LT_LANG_C_CONFIG
6845 # _LT_LANG_CXX_CONFIG([TAG])
6846 # --------------------------
6847 # Ensure that the configuration variables for a C++ compiler are suitably
6848 # defined. These variables are subsequently used by _LT_CONFIG to write
6849 # the compiler configuration to `libtool'.
6850 m4_defun([_LT_LANG_CXX_CONFIG],
6851 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6852 m4_require([_LT_DECL_EGREP])dnl
6853 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6854 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6855 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6856 (test "X$CXX" != "Xg++"))) ; then
6859 _lt_caught_CXX_error=yes
6863 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6864 _LT_TAGVAR(allow_undefined_flag, $1)=
6865 _LT_TAGVAR(always_export_symbols, $1)=no
6866 _LT_TAGVAR(archive_expsym_cmds, $1)=
6867 _LT_TAGVAR(compiler_needs_object, $1)=no
6868 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6869 _LT_TAGVAR(hardcode_direct, $1)=no
6870 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6872 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6873 _LT_TAGVAR(hardcode_minus_L, $1)=no
6874 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6875 _LT_TAGVAR(hardcode_automatic, $1)=no
6876 _LT_TAGVAR(inherit_rpath, $1)=no
6877 _LT_TAGVAR(module_cmds, $1)=
6878 _LT_TAGVAR(module_expsym_cmds, $1)=
6879 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6880 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6881 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6882 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6883 _LT_TAGVAR(no_undefined_flag, $1)=
6884 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6885 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6887 # Source file extension for C++ test sources.
6890 # Object file extension for compiled C++ test sources.
6892 _LT_TAGVAR(objext, $1)=$objext
6894 # No sense in running all these tests if we already determined that
6895 # the CXX compiler isn't working. Some variables (like enable_shared)
6896 # are currently assumed to apply to all compilers on this platform,
6897 # and will be corrupted by setting them based on a non-working compiler.
6898 if test "$_lt_caught_CXX_error" != yes; then
6899 # Code to be used in simple compile tests
6900 lt_simple_compile_test_code="int some_variable = 0;"
6902 # Code to be used in simple link tests
6903 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6905 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6908 # save warnings/boilerplate of simple test code
6909 _LT_COMPILER_BOILERPLATE
6910 _LT_LINKER_BOILERPLATE
6912 # Allow CC to be a program name with arguments.
6914 lt_save_CFLAGS=$CFLAGS
6918 lt_save_with_gnu_ld=$with_gnu_ld
6919 lt_save_path_LD=$lt_cv_path_LD
6920 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6921 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6923 $as_unset lt_cv_prog_gnu_ld
6925 if test -n "${lt_cv_path_LDCXX+set}"; then
6926 lt_cv_path_LD=$lt_cv_path_LDCXX
6928 $as_unset lt_cv_path_LD
6930 test -z "${LDCXX+set}" || LD=$LDCXX
6934 _LT_TAGVAR(compiler, $1)=$CC
6935 _LT_CC_BASENAME([$compiler])
6937 if test -n "$compiler"; then
6938 # We don't want -fno-exception when compiling C++ code, so set the
6939 # no_builtin_flag separately
6940 if test "$GXX" = yes; then
6941 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6943 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6946 if test "$GXX" = yes; then
6947 # Set up default GNU C++ configuration
6951 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6952 # archiving commands below assume that GNU ld is being used.
6953 if test "$with_gnu_ld" = yes; then
6954 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6955 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6957 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6958 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6960 # If archive_cmds runs LD, not CC, wlarc should be empty
6961 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6962 # investigate it a little bit more. (MM)
6965 # ancient GNU ld didn't support --whole-archive et. al.
6966 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6967 $GREP 'no-whole-archive' > /dev/null; then
6968 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6970 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6976 # A generic and very simple default shared library creation
6977 # command for GNU C++ for the case where it uses the native
6978 # linker, instead of GNU ld. If possible, this setting should
6979 # overridden to take advantage of the native linker features on
6980 # the platform it is being used on.
6981 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6984 # Commands to make compiler produce verbose output that lists
6985 # what "hidden" libraries, object files and flags are used when
6986 # linking a shared library.
6987 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6995 # PORTME: fill in a description of your system's C++ link characteristics
6996 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6997 _LT_TAGVAR(ld_shlibs, $1)=yes
7000 # FIXME: insert proper C++ library support
7001 _LT_TAGVAR(ld_shlibs, $1)=no
7004 if test "$host_cpu" = ia64; then
7005 # On IA64, the linker does run time linking by default, so we don't
7006 # have to do anything special.
7007 aix_use_runtimelinking=no
7008 exp_sym_flag='-Bexport'
7011 aix_use_runtimelinking=no
7013 # Test if we are trying to use run time linking or normal
7014 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7015 # need to do runtime linking.
7016 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7017 for ld_flag in $LDFLAGS; do
7020 aix_use_runtimelinking=yes
7028 exp_sym_flag='-bexport'
7029 no_entry_flag='-bnoentry'
7032 # When large executables or shared objects are built, AIX ld can
7033 # have problems creating the table of contents. If linking a library
7034 # or program results in "error TOC overflow" add -mminimal-toc to
7035 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7036 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7038 _LT_TAGVAR(archive_cmds, $1)=''
7039 _LT_TAGVAR(hardcode_direct, $1)=yes
7040 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7041 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7042 _LT_TAGVAR(link_all_deplibs, $1)=yes
7043 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7045 if test "$GXX" = yes; then
7046 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7047 # We only want to do this on AIX 4.2 and lower, the check
7048 # below for broken collect2 doesn't work under 4.3+
7049 collect2name=`${CC} -print-prog-name=collect2`
7050 if test -f "$collect2name" &&
7051 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7053 # We have reworked collect2
7056 # We have old collect2
7057 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7058 # It fails to find uninstalled libraries when the uninstalled
7059 # path is not listed in the libpath. Setting hardcode_minus_L
7060 # to unsupported forces relinking
7061 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7062 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7063 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7066 shared_flag='-shared'
7067 if test "$aix_use_runtimelinking" = yes; then
7068 shared_flag="$shared_flag "'${wl}-G'
7072 if test "$host_cpu" = ia64; then
7073 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7074 # chokes on -Wl,-G. The following line is correct:
7077 if test "$aix_use_runtimelinking" = yes; then
7078 shared_flag='${wl}-G'
7080 shared_flag='${wl}-bM:SRE'
7085 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7086 # It seems that -bexpall does not export symbols beginning with
7087 # underscore (_), so it is better to generate a list of symbols to
7089 _LT_TAGVAR(always_export_symbols, $1)=yes
7090 if test "$aix_use_runtimelinking" = yes; then
7091 # Warning - without using the other runtime loading flags (-brtl),
7092 # -berok will link without error, but may produce a broken library.
7093 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7094 # Determine the default libpath from the value encoded in an empty
7096 _LT_SYS_MODULE_PATH_AIX([$1])
7097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7099 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7101 if test "$host_cpu" = ia64; then
7102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7103 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7104 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7106 # Determine the default libpath from the value encoded in an
7108 _LT_SYS_MODULE_PATH_AIX([$1])
7109 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7110 # Warning - without using the other run time loading flags,
7111 # -berok will link without error, but may produce a broken library.
7112 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7113 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7114 if test "$with_gnu_ld" = yes; then
7115 # We only use this code for GNU lds that support --whole-archive.
7116 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7118 # Exported symbols can be pulled into shared objects from archives
7119 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7121 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7122 # This is similar to how AIX traditionally builds its shared
7124 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7130 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7131 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7132 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7133 # support --undefined. This deserves some investigation. FIXME
7134 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7136 _LT_TAGVAR(ld_shlibs, $1)=no
7141 case $cc_basename in
7143 # FIXME: insert proper C++ library support
7144 _LT_TAGVAR(ld_shlibs, $1)=no
7149 cygwin* | mingw* | pw32* | cegcc*)
7150 case $GXX,$cc_basename in
7153 # hardcode_libdir_flag_spec is actually meaningless, as there is
7154 # no search path for DLLs.
7155 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7156 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7157 _LT_TAGVAR(always_export_symbols, $1)=yes
7158 _LT_TAGVAR(file_list_spec, $1)='@'
7159 # Tell ltmain to make .lib files, not .a files.
7161 # Tell ltmain to make .dll files, not .so files.
7163 # FIXME: Setting linknames here is a bad hack.
7164 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7165 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7166 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7168 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7170 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7172 # The linker will not automatically build a static lib if we build a DLL.
7173 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7174 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7176 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7177 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7178 lt_tool_outputfile="@TOOL_OUTPUT@"~
7179 case $lt_outputfile in
7182 lt_outputfile="$lt_outputfile.exe"
7183 lt_tool_outputfile="$lt_tool_outputfile.exe"
7186 func_to_tool_file "$lt_outputfile"~
7187 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7188 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7189 $RM "$lt_outputfile.manifest";
7194 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7195 # as there is no search path for DLLs.
7196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7197 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7198 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7199 _LT_TAGVAR(always_export_symbols, $1)=no
7200 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7202 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7203 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7204 # If the export-symbols file already is a .def file (1st line
7205 # is EXPORTS), use it as is; otherwise, prepend...
7206 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7207 cp $export_symbols $output_objdir/$soname.def;
7209 echo EXPORTS > $output_objdir/$soname.def;
7210 cat $export_symbols >> $output_objdir/$soname.def;
7212 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7214 _LT_TAGVAR(ld_shlibs, $1)=no
7219 darwin* | rhapsody*)
7220 _LT_DARWIN_LINKER_FEATURES($1)
7224 case $cc_basename in
7226 # FIXME: insert proper C++ library support
7227 _LT_TAGVAR(ld_shlibs, $1)=no
7230 # Green Hills C++ Compiler
7231 # FIXME: insert proper C++ library support
7232 _LT_TAGVAR(ld_shlibs, $1)=no
7235 # FIXME: insert proper C++ library support
7236 _LT_TAGVAR(ld_shlibs, $1)=no
7242 # C++ shared libraries reported to be fairly broken before
7244 _LT_TAGVAR(ld_shlibs, $1)=no
7248 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7251 freebsd* | dragonfly*)
7252 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7254 _LT_TAGVAR(ld_shlibs, $1)=yes
7261 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7262 _LT_TAGVAR(link_all_deplibs, $1)=yes
7266 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7267 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7268 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7269 _LT_TAGVAR(hardcode_direct, $1)=yes
7270 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7271 # but as the default
7272 # location of the library.
7274 case $cc_basename in
7276 # FIXME: insert proper C++ library support
7277 _LT_TAGVAR(ld_shlibs, $1)=no
7280 _LT_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'
7281 # Commands to make compiler produce verbose output that lists
7282 # what "hidden" libraries, object files and flags are used when
7283 # linking a shared library.
7285 # There doesn't appear to be a way to prevent this compiler from
7286 # explicitly linking system object files so we need to strip them
7287 # from the output so that they don't get included in the library
7289 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7292 if test "$GXX" = yes; then
7293 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7295 # FIXME: insert proper C++ library support
7296 _LT_TAGVAR(ld_shlibs, $1)=no
7303 if test $with_gnu_ld = no; then
7304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7305 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7311 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7317 _LT_TAGVAR(hardcode_direct, $1)=no
7318 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7321 _LT_TAGVAR(hardcode_direct, $1)=yes
7322 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7323 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7324 # but as the default
7325 # location of the library.
7329 case $cc_basename in
7331 # FIXME: insert proper C++ library support
7332 _LT_TAGVAR(ld_shlibs, $1)=no
7337 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7340 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7343 _LT_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'
7346 # Commands to make compiler produce verbose output that lists
7347 # what "hidden" libraries, object files and flags are used when
7348 # linking a shared library.
7350 # There doesn't appear to be a way to prevent this compiler from
7351 # explicitly linking system object files so we need to strip them
7352 # from the output so that they don't get included in the library
7354 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; func_echo_all "$list"'
7357 if test "$GXX" = yes; then
7358 if test $with_gnu_ld = no; then
7361 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7364 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7367 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7372 # FIXME: insert proper C++ library support
7373 _LT_TAGVAR(ld_shlibs, $1)=no
7380 _LT_TAGVAR(hardcode_direct, $1)=no
7381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7384 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7385 # Instead, shared libraries are loaded at an image base (0x10000000 by
7386 # default) and relocated if they conflict, which is a slow very memory
7387 # consuming and fragmenting process. To avoid this, we pick a random,
7388 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7389 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7391 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7394 case $cc_basename in
7397 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7399 # Archives containing C++ object files must be created using
7400 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7401 # necessary to make sure instantiated templates are included
7403 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7406 if test "$GXX" = yes; then
7407 if test "$with_gnu_ld" = no; then
7408 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7410 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7413 _LT_TAGVAR(link_all_deplibs, $1)=yes
7416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7417 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7418 _LT_TAGVAR(inherit_rpath, $1)=yes
7421 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7422 case $cc_basename in
7424 # Kuck and Associates, Inc. (KAI) C++ Compiler
7426 # KCC will only create a shared library if the output file
7427 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7428 # to its proper name (with version) after linking.
7429 _LT_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'
7430 _LT_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'
7431 # Commands to make compiler produce verbose output that lists
7432 # what "hidden" libraries, object files and flags are used when
7433 # linking a shared library.
7435 # There doesn't appear to be a way to prevent this compiler from
7436 # explicitly linking system object files so we need to strip them
7437 # from the output so that they don't get included in the library
7439 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; func_echo_all "$list"'
7441 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7442 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7444 # Archives containing C++ object files must be created using
7445 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7446 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7451 # version 8.0 and above of icpc choke on multiply defined symbols
7452 # if we add $predep_objects and $postdep_objects, however 7.1 and
7453 # earlier do not add the objects themselves.
7454 case `$CC -V 2>&1` in
7456 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7457 _LT_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'
7459 *) # Version 8.0 or newer
7462 ia64*) tmp_idyn=' -i_dynamic';;
7464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7465 _LT_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'
7468 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7470 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7471 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7474 # Portland Group C++ compiler
7476 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7477 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7479 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7480 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7481 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7483 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7484 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7486 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7488 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7489 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7490 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7492 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7493 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7495 *) # Version 6 and above use weak symbols
7496 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7497 _LT_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'
7501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7503 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7507 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7508 _LT_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'
7510 runpath_var=LD_RUN_PATH
7511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7512 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7514 # Commands to make compiler produce verbose output that lists
7515 # what "hidden" libraries, object files and flags are used when
7516 # linking a shared library.
7518 # There doesn't appear to be a way to prevent this compiler from
7519 # explicitly linking system object files so we need to strip them
7520 # from the output so that they don't get included in the library
7522 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7524 xl* | mpixl* | bgxl*)
7525 # IBM XL 8.0 on PPC, with GNU ld
7526 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7527 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7528 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7529 if test "x$supports_anon_versioning" = xyes; then
7530 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7531 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7532 echo "local: *; };" >> $output_objdir/$libname.ver~
7533 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7537 case `$CC -V 2>&1 | sed 5q` in
7540 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7541 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7542 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7544 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7545 _LT_TAGVAR(compiler_needs_object, $1)=yes
7547 # Not sure whether something based on
7548 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7550 output_verbose_link_cmd='func_echo_all'
7552 # Archives containing C++ object files must be created using
7553 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7554 # necessary to make sure instantiated templates are included
7556 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7564 # FIXME: insert proper C++ library support
7565 _LT_TAGVAR(ld_shlibs, $1)=no
7569 # FIXME: insert proper C++ library support
7570 _LT_TAGVAR(ld_shlibs, $1)=no
7574 case $cc_basename in
7576 # FIXME: insert proper C++ library support
7577 _LT_TAGVAR(ld_shlibs, $1)=no
7580 # FIXME: insert proper C++ library support
7581 _LT_TAGVAR(ld_shlibs, $1)=no
7587 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7588 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7591 _LT_TAGVAR(hardcode_direct, $1)=yes
7592 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7594 # Workaround some broken pre-1.5 toolchains
7595 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7599 _LT_TAGVAR(ld_shlibs, $1)=yes
7603 # C++ shared libraries are fairly broken
7604 _LT_TAGVAR(ld_shlibs, $1)=no
7608 if test -f /usr/libexec/ld.so; then
7609 _LT_TAGVAR(hardcode_direct, $1)=yes
7610 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7611 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7612 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7613 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7614 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7615 _LT_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'
7616 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7617 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7619 output_verbose_link_cmd=func_echo_all
7621 _LT_TAGVAR(ld_shlibs, $1)=no
7625 osf3* | osf4* | osf5*)
7626 case $cc_basename in
7628 # Kuck and Associates, Inc. (KAI) C++ Compiler
7630 # KCC will only create a shared library if the output file
7631 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7632 # to its proper name (with version) after linking.
7633 _LT_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'
7635 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7636 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7638 # Archives containing C++ object files must be created using
7639 # the KAI C++ compiler.
7641 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7642 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7646 # Rational C++ 2.4.1
7647 # FIXME: insert proper C++ library support
7648 _LT_TAGVAR(ld_shlibs, $1)=no
7653 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7654 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7655 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7658 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7659 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7660 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7661 echo "-hidden">> $lib.exp~
7662 $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~
7664 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7668 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7670 # Commands to make compiler produce verbose output that lists
7671 # what "hidden" libraries, object files and flags are used when
7672 # linking a shared library.
7674 # There doesn't appear to be a way to prevent this compiler from
7675 # explicitly linking system object files so we need to strip them
7676 # from the output so that they don't get included in the library
7678 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7681 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7682 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7685 _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7688 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7692 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7693 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7695 # Commands to make compiler produce verbose output that lists
7696 # what "hidden" libraries, object files and flags are used when
7697 # linking a shared library.
7698 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7701 # FIXME: insert proper C++ library support
7702 _LT_TAGVAR(ld_shlibs, $1)=no
7709 # FIXME: insert proper C++ library support
7710 _LT_TAGVAR(ld_shlibs, $1)=no
7714 case $cc_basename in
7717 # FIXME: insert proper C++ library support
7718 _LT_TAGVAR(ld_shlibs, $1)=no
7722 # FIXME: insert proper C++ library support
7723 _LT_TAGVAR(ld_shlibs, $1)=no
7726 # FIXME: insert proper C++ library support
7727 _LT_TAGVAR(ld_shlibs, $1)=no
7733 case $cc_basename in
7735 # Sun C++ 4.2, 5.x and Centerline C++
7736 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7737 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7738 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7739 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7740 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7742 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7743 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7745 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7747 # The compiler driver will combine and reorder linker options,
7748 # but understands `-z linker_flag'.
7749 # Supported since Solaris 2.6 (maybe 2.5.1?)
7750 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7753 _LT_TAGVAR(link_all_deplibs, $1)=yes
7755 output_verbose_link_cmd='func_echo_all'
7757 # Archives containing C++ object files must be created using
7758 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7759 # necessary to make sure instantiated templates are included
7761 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7764 # Green Hills C++ Compiler
7765 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7767 # The C++ compiler must be used to create the archive.
7768 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7771 # GNU C++ compiler with Solaris linker
7772 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7773 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7774 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7775 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7776 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7777 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7779 # Commands to make compiler produce verbose output that lists
7780 # what "hidden" libraries, object files and flags are used when
7781 # linking a shared library.
7782 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7784 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7786 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7787 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7788 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7790 # Commands to make compiler produce verbose output that lists
7791 # what "hidden" libraries, object files and flags are used when
7792 # linking a shared library.
7793 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7796 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7798 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7800 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7808 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7809 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7810 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7811 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7812 runpath_var='LD_RUN_PATH'
7814 case $cc_basename in
7816 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7817 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7820 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7821 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7826 sysv5* | sco3.2v5* | sco5v6*)
7827 # Note: We can NOT use -z defs as we might desire, because we do not
7828 # link with -lc, and that would cause any symbols used from libc to
7829 # always be unresolved, which means just about no library would
7830 # ever link correctly. If we're not using GNU ld we use -z text
7831 # though, which does catch some bad symbols but isn't as heavy-handed
7833 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7834 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7835 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7836 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7837 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7838 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7839 _LT_TAGVAR(link_all_deplibs, $1)=yes
7840 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7841 runpath_var='LD_RUN_PATH'
7843 case $cc_basename in
7845 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7846 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7847 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7848 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7849 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7850 '"$_LT_TAGVAR(reload_cmds, $1)"
7853 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7854 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7860 case $cc_basename in
7862 # NonStop-UX NCC 3.20
7863 # FIXME: insert proper C++ library support
7864 _LT_TAGVAR(ld_shlibs, $1)=no
7867 # FIXME: insert proper C++ library support
7868 _LT_TAGVAR(ld_shlibs, $1)=no
7874 # FIXME: insert proper C++ library support
7875 _LT_TAGVAR(ld_shlibs, $1)=no
7879 # FIXME: insert proper C++ library support
7880 _LT_TAGVAR(ld_shlibs, $1)=no
7884 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7885 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7887 _LT_TAGVAR(GCC, $1)="$GXX"
7888 _LT_TAGVAR(LD, $1)="$LD"
7891 ## There is no encapsulation within the following macros, do not change
7892 ## the running order or otherwise move them around unless you know exactly
7893 ## what you are doing...
7894 _LT_SYS_HIDDEN_LIBDEPS($1)
7895 _LT_COMPILER_PIC($1)
7896 _LT_COMPILER_C_O($1)
7897 _LT_COMPILER_FILE_LOCKS($1)
7898 _LT_LINKER_SHLIBS($1)
7899 _LT_SYS_DYNAMIC_LINKER($1)
7900 _LT_LINKER_HARDCODE_LIBPATH($1)
7903 fi # test -n "$compiler"
7906 CFLAGS=$lt_save_CFLAGS
7910 with_gnu_ld=$lt_save_with_gnu_ld
7911 lt_cv_path_LDCXX=$lt_cv_path_LD
7912 lt_cv_path_LD=$lt_save_path_LD
7913 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7914 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7915 fi # test "$_lt_caught_CXX_error" != yes
7918 ])# _LT_LANG_CXX_CONFIG
7921 # _LT_FUNC_STRIPNAME_CNF
7922 # ----------------------
7923 # func_stripname_cnf prefix suffix name
7924 # strip PREFIX and SUFFIX off of NAME.
7925 # PREFIX and SUFFIX must not contain globbing or regex special
7926 # characters, hashes, percent signs, but SUFFIX may contain a leading
7927 # dot (in which case that matches only a dot).
7929 # This function is identical to the (non-XSI) version of func_stripname,
7930 # except this one can be used by m4 code that may be executed by configure,
7931 # rather than the libtool script.
7932 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7933 AC_REQUIRE([_LT_DECL_SED])
7934 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7935 func_stripname_cnf ()
7938 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7939 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7941 } # func_stripname_cnf
7942 ])# _LT_FUNC_STRIPNAME_CNF
7944 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7945 # ---------------------------------
7946 # Figure out "hidden" library dependencies from verbose
7947 # compiler output when linking a shared library.
7948 # Parse the compiler output and extract the necessary
7949 # objects, libraries and library flags.
7950 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7951 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7952 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7953 # Dependencies to place before and after the object being linked:
7954 _LT_TAGVAR(predep_objects, $1)=
7955 _LT_TAGVAR(postdep_objects, $1)=
7956 _LT_TAGVAR(predeps, $1)=
7957 _LT_TAGVAR(postdeps, $1)=
7958 _LT_TAGVAR(compiler_lib_search_path, $1)=
7960 dnl we can't use the lt_simple_compile_test_code here,
7961 dnl because it contains code intended for an executable,
7962 dnl not a library. It's possible we should let each
7963 dnl tag define a new lt_????_link_test_code variable,
7964 dnl but it's only used here...
7965 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7967 void foo (void) { a = 0; }
7969 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7973 Foo (void) { a = 0; }
7978 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7986 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7994 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7997 public void bar (void) {
8002 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8009 _lt_libdeps_save_CFLAGS=$CFLAGS
8010 case "$CC $CFLAGS " in #(
8011 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8012 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8013 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8016 dnl Parse the compiler output and extract the necessary
8017 dnl objects, libraries and library flags.
8018 if AC_TRY_EVAL(ac_compile); then
8019 # Parse the compiler output and extract the necessary
8020 # objects, libraries and library flags.
8022 # Sentinel used to keep track of whether or not we are before
8023 # the conftest object file.
8024 pre_test_object_deps_done=no
8026 for p in `eval "$output_verbose_link_cmd"`; do
8030 # Some compilers place space between "-{L,R}" and the path.
8032 if test $p = "-L" ||
8033 test $p = "-R"; then
8038 # Expand the sysroot to ease extracting the directories later.
8039 if test -z "$prev"; then
8041 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8042 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8043 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8047 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8049 if test "$pre_test_object_deps_done" = no; then
8052 # Internal compiler library paths should come after those
8053 # provided the user. The postdeps already come after the
8054 # user supplied libs so there is no need to process them.
8055 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8056 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8058 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8061 # The "-l" case would never come before the object being
8062 # linked, so don't bother handling this case.
8065 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8066 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8068 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8074 *.lto.$objext) ;; # Ignore GCC LTO objects
8076 # This assumes that the test object file only shows up
8077 # once in the compiler output.
8078 if test "$p" = "conftest.$objext"; then
8079 pre_test_object_deps_done=yes
8083 if test "$pre_test_object_deps_done" = no; then
8084 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8085 _LT_TAGVAR(predep_objects, $1)="$p"
8087 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8090 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8091 _LT_TAGVAR(postdep_objects, $1)="$p"
8093 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8098 *) ;; # Ignore the rest.
8106 echo "libtool.m4: error: problem compiling $1 test program"
8109 $RM -f confest.$objext
8110 CFLAGS=$_lt_libdeps_save_CFLAGS
8112 # PORTME: override above test on systems where it is broken
8116 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8117 # hack all around it, let's just trust "g++" to DTRT.
8118 _LT_TAGVAR(predep_objects,$1)=
8119 _LT_TAGVAR(postdep_objects,$1)=
8120 _LT_TAGVAR(postdeps,$1)=
8124 case `$CC -V 2>&1 | sed 5q` in
8128 # The more standards-conforming stlport4 library is
8129 # incompatible with the Cstd library. Avoid specifying
8130 # it if it's in CXXFLAGS. Ignore libCrun as
8131 # -library=stlport4 depends on it.
8132 case " $CXX $CXXFLAGS " in
8133 *" -library=stlport4 "*)
8134 solaris_use_stlport4=yes
8138 if test "$solaris_use_stlport4" != yes; then
8139 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8146 case $cc_basename in
8148 # The more standards-conforming stlport4 library is
8149 # incompatible with the Cstd library. Avoid specifying
8150 # it if it's in CXXFLAGS. Ignore libCrun as
8151 # -library=stlport4 depends on it.
8152 case " $CXX $CXXFLAGS " in
8153 *" -library=stlport4 "*)
8154 solaris_use_stlport4=yes
8158 # Adding this requires a known-good setup of shared libraries for
8159 # Sun compiler versions before 5.6, else PIC objects from an old
8160 # archive will be linked into the output, leading to subtle bugs.
8161 if test "$solaris_use_stlport4" != yes; then
8162 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8170 case " $_LT_TAGVAR(postdeps, $1) " in
8171 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8173 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8174 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8175 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8177 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8178 [The directories searched by this compiler when creating a shared library])
8179 _LT_TAGDECL([], [predep_objects], [1],
8180 [Dependencies to place before and after the objects being linked to
8181 create a shared library])
8182 _LT_TAGDECL([], [postdep_objects], [1])
8183 _LT_TAGDECL([], [predeps], [1])
8184 _LT_TAGDECL([], [postdeps], [1])
8185 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8186 [The library search path used internally by the compiler when linking
8188 ])# _LT_SYS_HIDDEN_LIBDEPS
8191 # _LT_LANG_F77_CONFIG([TAG])
8192 # --------------------------
8193 # Ensure that the configuration variables for a Fortran 77 compiler are
8194 # suitably defined. These variables are subsequently used by _LT_CONFIG
8195 # to write the compiler configuration to `libtool'.
8196 m4_defun([_LT_LANG_F77_CONFIG],
8197 [AC_LANG_PUSH(Fortran 77)
8198 if test -z "$F77" || test "X$F77" = "Xno"; then
8202 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8203 _LT_TAGVAR(allow_undefined_flag, $1)=
8204 _LT_TAGVAR(always_export_symbols, $1)=no
8205 _LT_TAGVAR(archive_expsym_cmds, $1)=
8206 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8207 _LT_TAGVAR(hardcode_direct, $1)=no
8208 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8210 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8211 _LT_TAGVAR(hardcode_minus_L, $1)=no
8212 _LT_TAGVAR(hardcode_automatic, $1)=no
8213 _LT_TAGVAR(inherit_rpath, $1)=no
8214 _LT_TAGVAR(module_cmds, $1)=
8215 _LT_TAGVAR(module_expsym_cmds, $1)=
8216 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8217 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8218 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8219 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8220 _LT_TAGVAR(no_undefined_flag, $1)=
8221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8222 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8224 # Source file extension for f77 test sources.
8227 # Object file extension for compiled f77 test sources.
8229 _LT_TAGVAR(objext, $1)=$objext
8231 # No sense in running all these tests if we already determined that
8232 # the F77 compiler isn't working. Some variables (like enable_shared)
8233 # are currently assumed to apply to all compilers on this platform,
8234 # and will be corrupted by setting them based on a non-working compiler.
8235 if test "$_lt_disable_F77" != yes; then
8236 # Code to be used in simple compile tests
8237 lt_simple_compile_test_code="\
8243 # Code to be used in simple link tests
8244 lt_simple_link_test_code="\
8249 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8252 # save warnings/boilerplate of simple test code
8253 _LT_COMPILER_BOILERPLATE
8254 _LT_LINKER_BOILERPLATE
8256 # Allow CC to be a program name with arguments.
8259 lt_save_CFLAGS=$CFLAGS
8263 _LT_TAGVAR(compiler, $1)=$CC
8264 _LT_CC_BASENAME([$compiler])
8266 if test -n "$compiler"; then
8267 AC_MSG_CHECKING([if libtool supports shared libraries])
8268 AC_MSG_RESULT([$can_build_shared])
8270 AC_MSG_CHECKING([whether to build shared libraries])
8271 test "$can_build_shared" = "no" && enable_shared=no
8273 # On AIX, shared libraries and static libraries use the same namespace, and
8274 # are all built from PIC.
8277 test "$enable_shared" = yes && enable_static=no
8278 if test -n "$RANLIB"; then
8279 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8280 postinstall_cmds='$RANLIB $lib'
8284 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8285 test "$enable_shared" = yes && enable_static=no
8289 AC_MSG_RESULT([$enable_shared])
8291 AC_MSG_CHECKING([whether to build static libraries])
8292 # Make sure either enable_shared or enable_static is yes.
8293 test "$enable_shared" = yes || enable_static=yes
8294 AC_MSG_RESULT([$enable_static])
8296 _LT_TAGVAR(GCC, $1)="$G77"
8297 _LT_TAGVAR(LD, $1)="$LD"
8300 ## There is no encapsulation within the following macros, do not change
8301 ## the running order or otherwise move them around unless you know exactly
8302 ## what you are doing...
8303 _LT_COMPILER_PIC($1)
8304 _LT_COMPILER_C_O($1)
8305 _LT_COMPILER_FILE_LOCKS($1)
8306 _LT_LINKER_SHLIBS($1)
8307 _LT_SYS_DYNAMIC_LINKER($1)
8308 _LT_LINKER_HARDCODE_LIBPATH($1)
8311 fi # test -n "$compiler"
8315 CFLAGS="$lt_save_CFLAGS"
8316 fi # test "$_lt_disable_F77" != yes
8319 ])# _LT_LANG_F77_CONFIG
8322 # _LT_LANG_FC_CONFIG([TAG])
8323 # -------------------------
8324 # Ensure that the configuration variables for a Fortran compiler are
8325 # suitably defined. These variables are subsequently used by _LT_CONFIG
8326 # to write the compiler configuration to `libtool'.
8327 m4_defun([_LT_LANG_FC_CONFIG],
8328 [AC_LANG_PUSH(Fortran)
8330 if test -z "$FC" || test "X$FC" = "Xno"; then
8334 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8335 _LT_TAGVAR(allow_undefined_flag, $1)=
8336 _LT_TAGVAR(always_export_symbols, $1)=no
8337 _LT_TAGVAR(archive_expsym_cmds, $1)=
8338 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8339 _LT_TAGVAR(hardcode_direct, $1)=no
8340 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8342 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8343 _LT_TAGVAR(hardcode_minus_L, $1)=no
8344 _LT_TAGVAR(hardcode_automatic, $1)=no
8345 _LT_TAGVAR(inherit_rpath, $1)=no
8346 _LT_TAGVAR(module_cmds, $1)=
8347 _LT_TAGVAR(module_expsym_cmds, $1)=
8348 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8349 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8350 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8351 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8352 _LT_TAGVAR(no_undefined_flag, $1)=
8353 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8354 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8356 # Source file extension for fc test sources.
8357 ac_ext=${ac_fc_srcext-f}
8359 # Object file extension for compiled fc test sources.
8361 _LT_TAGVAR(objext, $1)=$objext
8363 # No sense in running all these tests if we already determined that
8364 # the FC compiler isn't working. Some variables (like enable_shared)
8365 # are currently assumed to apply to all compilers on this platform,
8366 # and will be corrupted by setting them based on a non-working compiler.
8367 if test "$_lt_disable_FC" != yes; then
8368 # Code to be used in simple compile tests
8369 lt_simple_compile_test_code="\
8375 # Code to be used in simple link tests
8376 lt_simple_link_test_code="\
8381 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8384 # save warnings/boilerplate of simple test code
8385 _LT_COMPILER_BOILERPLATE
8386 _LT_LINKER_BOILERPLATE
8388 # Allow CC to be a program name with arguments.
8391 lt_save_CFLAGS=$CFLAGS
8395 GCC=$ac_cv_fc_compiler_gnu
8397 _LT_TAGVAR(compiler, $1)=$CC
8398 _LT_CC_BASENAME([$compiler])
8400 if test -n "$compiler"; then
8401 AC_MSG_CHECKING([if libtool supports shared libraries])
8402 AC_MSG_RESULT([$can_build_shared])
8404 AC_MSG_CHECKING([whether to build shared libraries])
8405 test "$can_build_shared" = "no" && enable_shared=no
8407 # On AIX, shared libraries and static libraries use the same namespace, and
8408 # are all built from PIC.
8411 test "$enable_shared" = yes && enable_static=no
8412 if test -n "$RANLIB"; then
8413 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8414 postinstall_cmds='$RANLIB $lib'
8418 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8419 test "$enable_shared" = yes && enable_static=no
8423 AC_MSG_RESULT([$enable_shared])
8425 AC_MSG_CHECKING([whether to build static libraries])
8426 # Make sure either enable_shared or enable_static is yes.
8427 test "$enable_shared" = yes || enable_static=yes
8428 AC_MSG_RESULT([$enable_static])
8430 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8431 _LT_TAGVAR(LD, $1)="$LD"
8434 ## There is no encapsulation within the following macros, do not change
8435 ## the running order or otherwise move them around unless you know exactly
8436 ## what you are doing...
8437 _LT_SYS_HIDDEN_LIBDEPS($1)
8438 _LT_COMPILER_PIC($1)
8439 _LT_COMPILER_C_O($1)
8440 _LT_COMPILER_FILE_LOCKS($1)
8441 _LT_LINKER_SHLIBS($1)
8442 _LT_SYS_DYNAMIC_LINKER($1)
8443 _LT_LINKER_HARDCODE_LIBPATH($1)
8446 fi # test -n "$compiler"
8450 CFLAGS=$lt_save_CFLAGS
8451 fi # test "$_lt_disable_FC" != yes
8454 ])# _LT_LANG_FC_CONFIG
8457 # _LT_LANG_GCJ_CONFIG([TAG])
8458 # --------------------------
8459 # Ensure that the configuration variables for the GNU Java Compiler compiler
8460 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8461 # to write the compiler configuration to `libtool'.
8462 m4_defun([_LT_LANG_GCJ_CONFIG],
8463 [AC_REQUIRE([LT_PROG_GCJ])dnl
8466 # Source file extension for Java test sources.
8469 # Object file extension for compiled Java test sources.
8471 _LT_TAGVAR(objext, $1)=$objext
8473 # Code to be used in simple compile tests
8474 lt_simple_compile_test_code="class foo {}"
8476 # Code to be used in simple link tests
8477 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8479 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8482 # save warnings/boilerplate of simple test code
8483 _LT_COMPILER_BOILERPLATE
8484 _LT_LINKER_BOILERPLATE
8486 # Allow CC to be a program name with arguments.
8488 lt_save_CFLAGS=$CFLAGS
8494 _LT_TAGVAR(compiler, $1)=$CC
8495 _LT_TAGVAR(LD, $1)="$LD"
8496 _LT_CC_BASENAME([$compiler])
8498 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8499 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8501 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8502 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8503 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8505 if test -n "$compiler"; then
8506 _LT_COMPILER_NO_RTTI($1)
8507 _LT_COMPILER_PIC($1)
8508 _LT_COMPILER_C_O($1)
8509 _LT_COMPILER_FILE_LOCKS($1)
8510 _LT_LINKER_SHLIBS($1)
8511 _LT_LINKER_HARDCODE_LIBPATH($1)
8520 CFLAGS=$lt_save_CFLAGS
8521 ])# _LT_LANG_GCJ_CONFIG
8524 # _LT_LANG_GO_CONFIG([TAG])
8525 # --------------------------
8526 # Ensure that the configuration variables for the GNU Go compiler
8527 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8528 # to write the compiler configuration to `libtool'.
8529 m4_defun([_LT_LANG_GO_CONFIG],
8530 [AC_REQUIRE([LT_PROG_GO])dnl
8533 # Source file extension for Go test sources.
8536 # Object file extension for compiled Go test sources.
8538 _LT_TAGVAR(objext, $1)=$objext
8540 # Code to be used in simple compile tests
8541 lt_simple_compile_test_code="package main; func main() { }"
8543 # Code to be used in simple link tests
8544 lt_simple_link_test_code='package main; func main() { }'
8546 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8549 # save warnings/boilerplate of simple test code
8550 _LT_COMPILER_BOILERPLATE
8551 _LT_LINKER_BOILERPLATE
8553 # Allow CC to be a program name with arguments.
8555 lt_save_CFLAGS=$CFLAGS
8561 _LT_TAGVAR(compiler, $1)=$CC
8562 _LT_TAGVAR(LD, $1)="$LD"
8563 _LT_CC_BASENAME([$compiler])
8565 # Go did not exist at the time GCC didn't implicitly link libc in.
8566 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8568 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8569 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8570 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8572 if test -n "$compiler"; then
8573 _LT_COMPILER_NO_RTTI($1)
8574 _LT_COMPILER_PIC($1)
8575 _LT_COMPILER_C_O($1)
8576 _LT_COMPILER_FILE_LOCKS($1)
8577 _LT_LINKER_SHLIBS($1)
8578 _LT_LINKER_HARDCODE_LIBPATH($1)
8587 CFLAGS=$lt_save_CFLAGS
8588 ])# _LT_LANG_GO_CONFIG
8591 # _LT_LANG_RC_CONFIG([TAG])
8592 # -------------------------
8593 # Ensure that the configuration variables for the Windows resource compiler
8594 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8595 # to write the compiler configuration to `libtool'.
8596 m4_defun([_LT_LANG_RC_CONFIG],
8597 [AC_REQUIRE([LT_PROG_RC])dnl
8600 # Source file extension for RC test sources.
8603 # Object file extension for compiled RC test sources.
8605 _LT_TAGVAR(objext, $1)=$objext
8607 # Code to be used in simple compile tests
8608 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8610 # Code to be used in simple link tests
8611 lt_simple_link_test_code="$lt_simple_compile_test_code"
8613 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8616 # save warnings/boilerplate of simple test code
8617 _LT_COMPILER_BOILERPLATE
8618 _LT_LINKER_BOILERPLATE
8620 # Allow CC to be a program name with arguments.
8622 lt_save_CFLAGS=$CFLAGS
8628 _LT_TAGVAR(compiler, $1)=$CC
8629 _LT_CC_BASENAME([$compiler])
8630 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8632 if test -n "$compiler"; then
8640 CFLAGS=$lt_save_CFLAGS
8641 ])# _LT_LANG_RC_CONFIG
8646 AC_DEFUN([LT_PROG_GCJ],
8647 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8648 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8649 [AC_CHECK_TOOL(GCJ, gcj,)
8650 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8651 AC_SUBST(GCJFLAGS)])])[]dnl
8655 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8656 dnl aclocal-1.4 backwards compatibility:
8657 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8662 AC_DEFUN([LT_PROG_GO],
8663 [AC_CHECK_TOOL(GOC, gccgo,)
8669 AC_DEFUN([LT_PROG_RC],
8670 [AC_CHECK_TOOL(RC, windres,)
8674 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8675 dnl aclocal-1.4 backwards compatibility:
8676 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8681 # If we don't have a new enough Autoconf to choose the best grep
8682 # available, choose the one first in the user's PATH.
8683 m4_defun([_LT_DECL_EGREP],
8684 [AC_REQUIRE([AC_PROG_EGREP])dnl
8685 AC_REQUIRE([AC_PROG_FGREP])dnl
8686 test -z "$GREP" && GREP=grep
8687 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8688 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8689 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8690 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8697 # If we don't have a new enough Autoconf to choose the best objdump
8698 # available, choose the one first in the user's PATH.
8699 m4_defun([_LT_DECL_OBJDUMP],
8700 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8701 test -z "$OBJDUMP" && OBJDUMP=objdump
8702 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8708 # Ensure DLLTOOL variable is set.
8709 m4_defun([_LT_DECL_DLLTOOL],
8710 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8711 test -z "$DLLTOOL" && DLLTOOL=dlltool
8712 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8718 # Check for a fully-functional sed program, that truncates
8719 # as few characters as possible. Prefer GNU sed if found.
8720 m4_defun([_LT_DECL_SED],
8722 test -z "$SED" && SED=sed
8723 Xsed="$SED -e 1s/^X//"
8724 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8725 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8726 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8729 m4_ifndef([AC_PROG_SED], [
8730 # NOTE: This macro has been submitted for inclusion into #
8731 # GNU Autoconf as AC_PROG_SED. When it is available in #
8732 # a released version of Autoconf we should remove this #
8733 # macro and use it instead. #
8735 m4_defun([AC_PROG_SED],
8736 [AC_MSG_CHECKING([for a sed that does not truncate output])
8737 AC_CACHE_VAL(lt_cv_path_SED,
8738 [# Loop through the user's path and test for sed and gsed.
8739 # Then use that list of sed's as ones to test for truncation.
8740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744 test -z "$as_dir" && as_dir=.
8745 for lt_ac_prog in sed gsed; do
8746 for ac_exec_ext in '' $ac_executable_extensions; do
8747 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8748 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8756 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8757 # along with /bin/sed that truncates output.
8758 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8759 test ! -f $lt_ac_sed && continue
8760 cat /dev/null > conftest.in
8762 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8763 # Check for GNU sed and select it if it is found.
8764 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8765 lt_cv_path_SED=$lt_ac_sed
8769 cat conftest.in conftest.in >conftest.tmp
8770 mv conftest.tmp conftest.in
8771 cp conftest.in conftest.nl
8773 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8774 cmp -s conftest.out conftest.nl || break
8775 # 10000 chars as input seems more than enough
8776 test $lt_ac_count -gt 10 && break
8777 lt_ac_count=`expr $lt_ac_count + 1`
8778 if test $lt_ac_count -gt $lt_ac_max; then
8779 lt_ac_max=$lt_ac_count
8780 lt_cv_path_SED=$lt_ac_sed
8787 AC_MSG_RESULT([$SED])
8792 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8793 dnl aclocal-1.4 backwards compatibility:
8794 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8797 # _LT_CHECK_SHELL_FEATURES
8798 # ------------------------
8799 # Find out whether the shell is Bourne or XSI compatible,
8800 # or has some other useful features.
8801 m4_defun([_LT_CHECK_SHELL_FEATURES],
8802 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8803 # Try some XSI features
8806 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8808 && eval 'test $(( 1 + 1 )) -eq 2 \
8809 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8811 AC_MSG_RESULT([$xsi_shell])
8812 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8814 AC_MSG_CHECKING([whether the shell understands "+="])
8816 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8818 && lt_shell_append=yes
8819 AC_MSG_RESULT([$lt_shell_append])
8820 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8822 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8827 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8829 # test EBCDIC or ASCII
8830 case `echo X|tr X '\101'` in
8831 A) # ASCII based system
8832 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8833 lt_SP2NL='tr \040 \012'
8834 lt_NL2SP='tr \015\012 \040\040'
8836 *) # EBCDIC based system
8837 lt_SP2NL='tr \100 \n'
8838 lt_NL2SP='tr \r\n \100\100'
8841 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8842 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8843 ])# _LT_CHECK_SHELL_FEATURES
8846 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8847 # ------------------------------------------------------
8848 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8849 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8850 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8852 sed -e '/^$1 ()$/,/^} # $1 /c\
8855 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8856 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8857 && mv -f "$cfgfile.tmp" "$cfgfile" \
8858 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8859 test 0 -eq $? || _lt_function_replace_fail=:
8863 # _LT_PROG_REPLACE_SHELLFNS
8864 # -------------------------
8865 # Replace existing portable implementations of several shell functions with
8866 # equivalent extended shell implementations where those features are available..
8867 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8868 [if test x"$xsi_shell" = xyes; then
8869 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8871 */*) func_dirname_result="${1%/*}${2}" ;;
8872 * ) func_dirname_result="${3}" ;;
8875 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8876 func_basename_result="${1##*/}"])
8878 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8880 */*) func_dirname_result="${1%/*}${2}" ;;
8881 * ) func_dirname_result="${3}" ;;
8883 func_basename_result="${1##*/}"])
8885 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8886 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8887 # positional parameters, so assign one to ordinary parameter first.
8888 func_stripname_result=${3}
8889 func_stripname_result=${func_stripname_result#"${1}"}
8890 func_stripname_result=${func_stripname_result%"${2}"}])
8892 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8893 func_split_long_opt_name=${1%%=*}
8894 func_split_long_opt_arg=${1#*=}])
8896 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8897 func_split_short_opt_arg=${1#??}
8898 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8900 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8902 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8903 *) func_lo2o_result=${1} ;;
8906 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8908 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8910 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8913 if test x"$lt_shell_append" = xyes; then
8914 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8916 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8917 func_quote_for_eval "${2}"
8918 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8919 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8921 # Save a `func_append' function call where possible by direct use of '+='
8922 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8923 && mv -f "$cfgfile.tmp" "$cfgfile" \
8924 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8925 test 0 -eq $? || _lt_function_replace_fail=:
8927 # Save a `func_append' function call even when '+=' is not available
8928 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8929 && mv -f "$cfgfile.tmp" "$cfgfile" \
8930 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8931 test 0 -eq $? || _lt_function_replace_fail=:
8934 if test x"$_lt_function_replace_fail" = x":"; then
8935 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8939 # _LT_PATH_CONVERSION_FUNCTIONS
8940 # -----------------------------
8941 # Determine which file name conversion functions should be used by
8942 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8943 # for certain cross-compile configurations and native mingw.
8944 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8945 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8946 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8947 AC_MSG_CHECKING([how to convert $build file names to $host format])
8948 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8952 *-*-mingw* ) # actually msys
8953 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8956 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8958 * ) # otherwise, assume *nix
8959 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8965 *-*-mingw* ) # actually msys
8966 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8969 lt_cv_to_host_file_cmd=func_convert_file_noop
8971 * ) # otherwise, assume *nix
8972 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8976 * ) # unhandled hosts (and "normal" native builds)
8977 lt_cv_to_host_file_cmd=func_convert_file_noop
8981 to_host_file_cmd=$lt_cv_to_host_file_cmd
8982 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8983 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8984 [0], [convert $build file names to $host format])dnl
8986 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8987 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8988 [#assume ordinary cross tools, or native build.
8989 lt_cv_to_tool_file_cmd=func_convert_file_noop
8993 *-*-mingw* ) # actually msys
8994 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9000 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9001 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9002 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9003 [0], [convert $build files to toolchain format])dnl
9004 ])# _LT_PATH_CONVERSION_FUNCTIONS
9006 # Helper functions for option handling. -*- Autoconf -*-
9008 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9010 # Written by Gary V. Vaughan, 2004
9012 # This file is free software; the Free Software Foundation gives
9013 # unlimited permission to copy and/or distribute it, with or without
9014 # modifications, as long as this notice is preserved.
9016 # serial 7 ltoptions.m4
9018 # This is to help aclocal find these macros, as it can't see m4_define.
9019 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9022 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9023 # ------------------------------------------
9024 m4_define([_LT_MANGLE_OPTION],
9025 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9028 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9029 # ---------------------------------------
9030 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9031 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9033 m4_define([_LT_SET_OPTION],
9034 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9035 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9036 _LT_MANGLE_DEFUN([$1], [$2]),
9037 [m4_warning([Unknown $1 option `$2'])])[]dnl
9041 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9042 # ------------------------------------------------------------
9043 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9044 m4_define([_LT_IF_OPTION],
9045 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9048 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9049 # -------------------------------------------------------
9050 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9052 m4_define([_LT_UNLESS_OPTIONS],
9053 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9054 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9055 [m4_define([$0_found])])])[]dnl
9056 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9061 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9062 # ----------------------------------------
9063 # OPTION-LIST is a space-separated list of Libtool options associated
9064 # with MACRO-NAME. If any OPTION has a matching handler declared with
9065 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9066 # the unknown option and exit.
9067 m4_defun([_LT_SET_OPTIONS],
9069 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9070 [_LT_SET_OPTION([$1], _LT_Option)])
9072 m4_if([$1],[LT_INIT],[
9074 dnl Simply set some default values (i.e off) if boolean options were not
9076 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9078 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9081 dnl If no reference was made to various pairs of opposing options, then
9082 dnl we run the default mode handler for the pair. For example, if neither
9083 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9084 dnl archives by default:
9085 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9086 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9087 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9088 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9089 [_LT_ENABLE_FAST_INSTALL])
9095 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9096 # -----------------------------------------
9097 m4_define([_LT_MANGLE_DEFUN],
9098 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9101 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9102 # -----------------------------------------------
9103 m4_define([LT_OPTION_DEFINE],
9104 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9105 ])# LT_OPTION_DEFINE
9110 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9113 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9114 [_LT_SET_OPTION([LT_INIT], [dlopen])
9115 AC_DIAGNOSE([obsolete],
9116 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9117 put the `dlopen' option into LT_INIT's first parameter.])
9120 dnl aclocal-1.4 backwards compatibility:
9121 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9126 # Declare package support for building win32 dll's.
9127 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9128 [enable_win32_dll=yes
9131 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9132 AC_CHECK_TOOL(AS, as, false)
9133 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9134 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9138 test -z "$AS" && AS=as
9139 _LT_DECL([], [AS], [1], [Assembler program])dnl
9141 test -z "$DLLTOOL" && DLLTOOL=dlltool
9142 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9144 test -z "$OBJDUMP" && OBJDUMP=objdump
9145 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9148 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9149 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9150 _LT_SET_OPTION([LT_INIT], [win32-dll])
9151 AC_DIAGNOSE([obsolete],
9152 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9153 put the `win32-dll' option into LT_INIT's first parameter.])
9156 dnl aclocal-1.4 backwards compatibility:
9157 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9160 # _LT_ENABLE_SHARED([DEFAULT])
9161 # ----------------------------
9162 # implement the --enable-shared flag, and supports the `shared' and
9163 # `disable-shared' LT_INIT options.
9164 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9165 m4_define([_LT_ENABLE_SHARED],
9166 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9167 AC_ARG_ENABLE([shared],
9168 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9169 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9170 [p=${PACKAGE-default}
9172 yes) enable_shared=yes ;;
9173 no) enable_shared=no ;;
9176 # Look at the argument we got. We use all the common list separators.
9177 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9178 for pkg in $enableval; do
9180 if test "X$pkg" = "X$p"; then
9187 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9189 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9190 [Whether or not to build shared libraries])
9191 ])# _LT_ENABLE_SHARED
9193 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9194 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9197 AC_DEFUN([AC_ENABLE_SHARED],
9198 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9201 AC_DEFUN([AC_DISABLE_SHARED],
9202 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9205 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9206 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9208 dnl aclocal-1.4 backwards compatibility:
9209 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9210 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9214 # _LT_ENABLE_STATIC([DEFAULT])
9215 # ----------------------------
9216 # implement the --enable-static flag, and support the `static' and
9217 # `disable-static' LT_INIT options.
9218 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9219 m4_define([_LT_ENABLE_STATIC],
9220 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9221 AC_ARG_ENABLE([static],
9222 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9223 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9224 [p=${PACKAGE-default}
9226 yes) enable_static=yes ;;
9227 no) enable_static=no ;;
9230 # Look at the argument we got. We use all the common list separators.
9231 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9232 for pkg in $enableval; do
9234 if test "X$pkg" = "X$p"; then
9241 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9243 _LT_DECL([build_old_libs], [enable_static], [0],
9244 [Whether or not to build static libraries])
9245 ])# _LT_ENABLE_STATIC
9247 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9248 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9251 AC_DEFUN([AC_ENABLE_STATIC],
9252 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9255 AC_DEFUN([AC_DISABLE_STATIC],
9256 [_LT_SET_OPTION([LT_INIT], [disable-static])
9259 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9260 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9262 dnl aclocal-1.4 backwards compatibility:
9263 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9264 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9268 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9269 # ----------------------------------
9270 # implement the --enable-fast-install flag, and support the `fast-install'
9271 # and `disable-fast-install' LT_INIT options.
9272 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9273 m4_define([_LT_ENABLE_FAST_INSTALL],
9274 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9275 AC_ARG_ENABLE([fast-install],
9276 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9277 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9278 [p=${PACKAGE-default}
9280 yes) enable_fast_install=yes ;;
9281 no) enable_fast_install=no ;;
9283 enable_fast_install=no
9284 # Look at the argument we got. We use all the common list separators.
9285 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9286 for pkg in $enableval; do
9288 if test "X$pkg" = "X$p"; then
9289 enable_fast_install=yes
9295 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9297 _LT_DECL([fast_install], [enable_fast_install], [0],
9298 [Whether or not to optimize for fast installation])dnl
9299 ])# _LT_ENABLE_FAST_INSTALL
9301 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9302 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9305 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9306 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9307 AC_DIAGNOSE([obsolete],
9308 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9309 the `fast-install' option into LT_INIT's first parameter.])
9312 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9313 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9314 AC_DIAGNOSE([obsolete],
9315 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9316 the `disable-fast-install' option into LT_INIT's first parameter.])
9319 dnl aclocal-1.4 backwards compatibility:
9320 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9321 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9324 # _LT_WITH_PIC([MODE])
9325 # --------------------
9326 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9328 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9329 m4_define([_LT_WITH_PIC],
9331 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9332 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9333 [lt_p=${PACKAGE-default}
9335 yes|no) pic_mode=$withval ;;
9338 # Look at the argument we got. We use all the common list separators.
9339 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9340 for lt_pkg in $withval; do
9342 if test "X$lt_pkg" = "X$lt_p"; then
9351 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9353 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9356 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9357 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9360 AU_DEFUN([AC_LIBTOOL_PICMODE],
9361 [_LT_SET_OPTION([LT_INIT], [pic-only])
9362 AC_DIAGNOSE([obsolete],
9363 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9364 put the `pic-only' option into LT_INIT's first parameter.])
9367 dnl aclocal-1.4 backwards compatibility:
9368 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9371 m4_define([_LTDL_MODE], [])
9372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9373 [m4_define([_LTDL_MODE], [nonrecursive])])
9374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9375 [m4_define([_LTDL_MODE], [recursive])])
9376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9377 [m4_define([_LTDL_MODE], [subproject])])
9379 m4_define([_LTDL_TYPE], [])
9380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9381 [m4_define([_LTDL_TYPE], [installable])])
9382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9383 [m4_define([_LTDL_TYPE], [convenience])])
9385 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9387 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9388 # Written by Gary V. Vaughan, 2004
9390 # This file is free software; the Free Software Foundation gives
9391 # unlimited permission to copy and/or distribute it, with or without
9392 # modifications, as long as this notice is preserved.
9394 # serial 6 ltsugar.m4
9396 # This is to help aclocal find these macros, as it can't see m4_define.
9397 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9400 # lt_join(SEP, ARG1, [ARG2...])
9401 # -----------------------------
9402 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9403 # associated separator.
9404 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9405 # versions in m4sugar had bugs.
9406 m4_define([lt_join],
9407 [m4_if([$#], [1], [],
9409 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9410 m4_define([_lt_join],
9411 [m4_if([$#$2], [2], [],
9412 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9418 # Manipulate m4 lists.
9419 # These macros are necessary as long as will still need to support
9420 # Autoconf-2.59 which quotes differently.
9421 m4_define([lt_car], [[$1]])
9423 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9425 [m4_dquote(m4_shift($@))])])
9426 m4_define([lt_unquote], $1)
9429 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9430 # ------------------------------------------
9431 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9432 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9433 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9434 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9435 # than defined and empty).
9437 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9438 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9439 m4_define([lt_append],
9441 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9445 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9446 # ----------------------------------------------------------
9447 # Produce a SEP delimited list of all paired combinations of elements of
9448 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9449 # has the form PREFIXmINFIXSUFFIXn.
9450 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9451 m4_define([lt_combine],
9452 [m4_if(m4_eval([$# > 3]), [1],
9453 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9454 [[m4_foreach([_Lt_prefix], [$2],
9455 [m4_foreach([_Lt_suffix],
9456 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9457 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9460 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9461 # -----------------------------------------------------------------------
9462 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9463 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9464 m4_define([lt_if_append_uniq],
9466 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9467 [lt_append([$1], [$2], [$3])$4],
9469 [lt_append([$1], [$2], [$3])$4])])
9472 # lt_dict_add(DICT, KEY, VALUE)
9473 # -----------------------------
9474 m4_define([lt_dict_add],
9475 [m4_define([$1($2)], [$3])])
9478 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9479 # --------------------------------------------
9480 m4_define([lt_dict_add_subkey],
9481 [m4_define([$1($2:$3)], [$4])])
9484 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9485 # ----------------------------------
9486 m4_define([lt_dict_fetch],
9488 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9489 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9492 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9493 # -----------------------------------------------------------------
9494 m4_define([lt_if_dict_fetch],
9495 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9500 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9501 # --------------------------------------------------------------
9502 m4_define([lt_dict_filter],
9503 [m4_if([$5], [], [],
9504 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9505 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9506 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9509 # ltversion.m4 -- version numbers -*- Autoconf -*-
9511 # Copyright (C) 2004 Free Software Foundation, Inc.
9512 # Written by Scott James Remnant, 2004
9514 # This file is free software; the Free Software Foundation gives
9515 # unlimited permission to copy and/or distribute it, with or without
9516 # modifications, as long as this notice is preserved.
9520 # serial 3337 ltversion.m4
9521 # This file is part of GNU Libtool
9523 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9524 m4_define([LT_PACKAGE_REVISION], [1.3337])
9526 AC_DEFUN([LTVERSION_VERSION],
9527 [macro_version='2.4.2'
9528 macro_revision='1.3337'
9529 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9530 _LT_DECL(, macro_revision, 0)
9533 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9535 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9536 # Written by Scott James Remnant, 2004.
9538 # This file is free software; the Free Software Foundation gives
9539 # unlimited permission to copy and/or distribute it, with or without
9540 # modifications, as long as this notice is preserved.
9542 # serial 5 lt~obsolete.m4
9544 # These exist entirely to fool aclocal when bootstrapping libtool.
9546 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9547 # which have later been changed to m4_define as they aren't part of the
9548 # exported API, or moved to Autoconf or Automake where they belong.
9550 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9551 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9552 # using a macro with the same name in our local m4/libtool.m4 it'll
9553 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9554 # and doesn't know about Autoconf macros at all.)
9556 # So we provide this file, which has a silly filename so it's always
9557 # included after everything else. This provides aclocal with the
9558 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9559 # because those macros already exist, or will be overwritten later.
9560 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9562 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9563 # Yes, that means every name once taken will need to remain here until
9564 # we give up compatibility with versions before 1.7, at which point
9565 # we need to keep only those names which we still refer to.
9567 # This is to help aclocal find these macros, as it can't see m4_define.
9568 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9570 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9571 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9572 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9573 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9574 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9575 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9576 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9577 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9578 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9579 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9580 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9581 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9582 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9583 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9584 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9585 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9586 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9587 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9588 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9589 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9590 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9591 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9592 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9593 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9594 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9595 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9596 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9597 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9598 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9599 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9600 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9601 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9602 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9603 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9604 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9605 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9606 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9607 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9608 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9609 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9610 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9611 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9612 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9613 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9614 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9615 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9616 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9617 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9618 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9619 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9620 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9621 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9622 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9623 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9624 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9625 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9626 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9627 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9628 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9629 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9630 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9632 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9633 # serial 1 (pkg-config-0.24)
9635 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9637 # This program is free software; you can redistribute it and/or modify
9638 # it under the terms of the GNU General Public License as published by
9639 # the Free Software Foundation; either version 2 of the License, or
9640 # (at your option) any later version.
9642 # This program is distributed in the hope that it will be useful, but
9643 # WITHOUT ANY WARRANTY; without even the implied warranty of
9644 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9645 # General Public License for more details.
9647 # You should have received a copy of the GNU General Public License
9648 # along with this program; if not, write to the Free Software
9649 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9651 # As a special exception to the GNU General Public License, if you
9652 # distribute this file as part of a program that contains a
9653 # configuration script generated by Autoconf, you may include it under
9654 # the same distribution terms that you use for the rest of that program.
9656 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9657 # ----------------------------------
9658 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9659 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9660 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9661 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9662 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9663 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9665 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9666 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9668 if test -n "$PKG_CONFIG"; then
9669 _pkg_min_version=m4_default([$1], [0.9.0])
9670 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9671 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9672 AC_MSG_RESULT([yes])
9678 ])# PKG_PROG_PKG_CONFIG
9680 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9682 # Check to see whether a particular set of modules exists. Similar
9683 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9685 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9686 # only at the first occurence in configure.ac, so if the first place
9687 # it's called might be skipped (such as if it is within an "if", you
9688 # have to call PKG_CHECK_EXISTS manually
9689 # --------------------------------------------------------------
9690 AC_DEFUN([PKG_CHECK_EXISTS],
9691 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9692 if test -n "$PKG_CONFIG" && \
9693 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9694 m4_default([$2], [:])
9695 m4_ifvaln([$3], [else
9699 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9700 # ---------------------------------------------
9701 m4_define([_PKG_CONFIG],
9702 [if test -n "$$1"; then
9704 elif test -n "$PKG_CONFIG"; then
9705 PKG_CHECK_EXISTS([$3],
9706 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9713 # _PKG_SHORT_ERRORS_SUPPORTED
9714 # -----------------------------
9715 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9716 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9717 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9718 _pkg_short_errors_supported=yes
9720 _pkg_short_errors_supported=no
9722 ])# _PKG_SHORT_ERRORS_SUPPORTED
9725 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9726 # [ACTION-IF-NOT-FOUND])
9729 # Note that if there is a possibility the first call to
9730 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9731 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9734 # --------------------------------------------------------------
9735 AC_DEFUN([PKG_CHECK_MODULES],
9736 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9737 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9738 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9741 AC_MSG_CHECKING([for $1])
9743 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9744 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9746 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9747 and $1[]_LIBS to avoid the need to call pkg-config.
9748 See the pkg-config man page for more details.])
9750 if test $pkg_failed = yes; then
9752 _PKG_SHORT_ERRORS_SUPPORTED
9753 if test $_pkg_short_errors_supported = yes; then
9754 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9756 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9758 # Put the nasty error message in config.log where it belongs
9759 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9761 m4_default([$4], [AC_MSG_ERROR(
9762 [Package requirements ($2) were not met:
9766 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9767 installed software in a non-standard prefix.
9771 elif test $pkg_failed = untried; then
9773 m4_default([$4], [AC_MSG_FAILURE(
9774 [The pkg-config script could not be found or is too old. Make sure it
9775 is in your PATH or set the PKG_CONFIG environment variable to the full
9780 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
9783 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9784 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9785 AC_MSG_RESULT([yes])
9788 ])# PKG_CHECK_MODULES
9790 dnl -*- mode: autoconf -*-
9795 dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
9796 AC_DEFUN([GTK_DOC_CHECK],
9798 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9799 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
9800 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
9802 dnl check for tools we added during development
9803 AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
9804 AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
9805 AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
9807 dnl for overriding the documentation installation directory
9808 AC_ARG_WITH([html-dir],
9809 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
9810 [with_html_dir='${datadir}/gtk-doc/html'])
9811 HTML_DIR="$with_html_dir"
9812 AC_SUBST([HTML_DIR])
9814 dnl enable/disable documentation building
9815 AC_ARG_ENABLE([gtk-doc],
9816 AS_HELP_STRING([--enable-gtk-doc],
9817 [use gtk-doc to build documentation [[default=no]]]),,
9818 [enable_gtk_doc=no])
9820 if test x$enable_gtk_doc = xyes; then
9822 [PKG_CHECK_EXISTS([gtk-doc],,
9823 AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
9824 [PKG_CHECK_EXISTS([gtk-doc >= $1],,
9825 AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
9826 dnl don't check for glib if we build glib
9827 if test "x$PACKAGE_NAME" != "xglib"; then
9828 dnl don't fail if someone does not have glib
9829 PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,)
9833 AC_MSG_CHECKING([whether to build gtk-doc documentation])
9834 AC_MSG_RESULT($enable_gtk_doc)
9836 dnl enable/disable output formats
9837 AC_ARG_ENABLE([gtk-doc-html],
9838 AS_HELP_STRING([--enable-gtk-doc-html],
9839 [build documentation in html format [[default=yes]]]),,
9840 [enable_gtk_doc_html=yes])
9841 AC_ARG_ENABLE([gtk-doc-pdf],
9842 AS_HELP_STRING([--enable-gtk-doc-pdf],
9843 [build documentation in pdf format [[default=no]]]),,
9844 [enable_gtk_doc_pdf=no])
9846 if test -z "$GTKDOC_MKPDF"; then
9847 enable_gtk_doc_pdf=no
9851 AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
9852 AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
9853 AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
9854 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
9855 AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
9858 m4_include([acinclude.m4])