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 # Do all the work for Automake. -*- Autoconf -*-
421 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
422 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
424 # This file is free software; the Free Software Foundation
425 # gives unlimited permission to copy and/or distribute it,
426 # with or without modifications, as long as this notice is preserved.
430 # This macro actually does too much. Some checks are only needed if
431 # your package does certain things. But this isn't really a big deal.
433 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
434 # AM_INIT_AUTOMAKE([OPTIONS])
435 # -----------------------------------------------
436 # The call with PACKAGE and VERSION arguments is the old style
437 # call (pre autoconf-2.50), which is being phased out. PACKAGE
438 # and VERSION should now be passed to AC_INIT and removed from
439 # the call to AM_INIT_AUTOMAKE.
440 # We support both call styles for the transition. After
441 # the next Automake release, Autoconf can make the AC_INIT
442 # arguments mandatory, and then we can depend on a new Autoconf
443 # release and drop the old call support.
444 AC_DEFUN([AM_INIT_AUTOMAKE],
445 [AC_PREREQ([2.62])dnl
446 dnl Autoconf wants to disallow AM_ names. We explicitly allow
447 dnl the ones we care about.
448 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
449 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
450 AC_REQUIRE([AC_PROG_INSTALL])dnl
451 if test "`cd $srcdir && pwd`" != "`pwd`"; then
452 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
453 # is not polluted with repeated "-I."
454 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
455 # test to see if srcdir already configured
456 if test -f $srcdir/config.status; then
457 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
461 # test whether we have cygpath
462 if test -z "$CYGPATH_W"; then
463 if (cygpath --version) >/dev/null 2>/dev/null; then
464 CYGPATH_W='cygpath -w'
469 AC_SUBST([CYGPATH_W])
471 # Define the identity of the package.
472 dnl Distinguish between old-style and new-style calls.
474 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
475 AC_SUBST([PACKAGE], [$1])dnl
476 AC_SUBST([VERSION], [$2])],
477 [_AM_SET_OPTIONS([$1])dnl
478 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
479 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
480 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
481 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
482 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
484 _AM_IF_OPTION([no-define],,
485 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
486 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
488 # Some tools Automake needs.
489 AC_REQUIRE([AM_SANITY_CHECK])dnl
490 AC_REQUIRE([AC_ARG_PROGRAM])dnl
491 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
492 AM_MISSING_PROG(AUTOCONF, autoconf)
493 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
494 AM_MISSING_PROG(AUTOHEADER, autoheader)
495 AM_MISSING_PROG(MAKEINFO, makeinfo)
496 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
497 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
498 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
499 # We need awk for the "check" target. The system "awk" is bad on
501 AC_REQUIRE([AC_PROG_AWK])dnl
502 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
503 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
504 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
505 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
506 [_AM_PROG_TAR([v7])])])
507 _AM_IF_OPTION([no-dependencies],,
508 [AC_PROVIDE_IFELSE([AC_PROG_CC],
509 [_AM_DEPENDENCIES(CC)],
510 [define([AC_PROG_CC],
511 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
512 AC_PROVIDE_IFELSE([AC_PROG_CXX],
513 [_AM_DEPENDENCIES(CXX)],
514 [define([AC_PROG_CXX],
515 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
516 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
517 [_AM_DEPENDENCIES(OBJC)],
518 [define([AC_PROG_OBJC],
519 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
521 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
522 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
523 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
524 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
525 AC_CONFIG_COMMANDS_PRE(dnl
526 [m4_provide_if([_AM_COMPILER_EXEEXT],
527 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
531 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
532 dnl mangled by Autoconf and run in a shell conditional statement.
533 m4_define([_AC_COMPILER_EXEEXT],
534 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537 # When config.status generates a header, we must update the stamp-h file.
538 # This file resides in the same directory as the config header
539 # that is generated. The stamp files are numbered to have different names.
541 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
542 # loop where config.status creates the headers, so we can generate
543 # our stamp files there.
544 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
545 [# Compute $1's index in $config_headers.
548 for _am_header in $config_headers :; do
550 $_am_arg | $_am_arg:* )
553 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
558 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
561 # This file is free software; the Free Software Foundation
562 # gives unlimited permission to copy and/or distribute it,
563 # with or without modifications, as long as this notice is preserved.
569 # Define $install_sh.
570 AC_DEFUN([AM_PROG_INSTALL_SH],
571 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
572 if test x"${install_sh}" != xset; then
575 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
577 install_sh="\${SHELL} $am_aux_dir/install-sh"
580 AC_SUBST(install_sh)])
582 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
584 # This file is free software; the Free Software Foundation
585 # gives unlimited permission to copy and/or distribute it,
586 # with or without modifications, as long as this notice is preserved.
590 # Check whether the underlying file-system supports filenames
591 # with a leading dot. For instance MS-DOS doesn't.
592 AC_DEFUN([AM_SET_LEADING_DOT],
593 [rm -rf .tst 2>/dev/null
594 mkdir .tst 2>/dev/null
595 if test -d .tst; then
600 rmdir .tst 2>/dev/null
601 AC_SUBST([am__leading_dot])])
603 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
606 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
607 # 2011 Free Software Foundation, Inc.
609 # This file is free software; the Free Software Foundation
610 # gives unlimited permission to copy and/or distribute it,
611 # with or without modifications, as long as this notice is preserved.
615 # AM_MAINTAINER_MODE([DEFAULT-MODE])
616 # ----------------------------------
617 # Control maintainer-specific portions of Makefiles.
618 # Default is to disable them, unless `enable' is passed literally.
619 # For symmetry, `disable' may be passed as well. Anyway, the user
620 # can override the default with the --enable/--disable switch.
621 AC_DEFUN([AM_MAINTAINER_MODE],
622 [m4_case(m4_default([$1], [disable]),
623 [enable], [m4_define([am_maintainer_other], [disable])],
624 [disable], [m4_define([am_maintainer_other], [enable])],
625 [m4_define([am_maintainer_other], [enable])
626 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
627 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
628 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
629 AC_ARG_ENABLE([maintainer-mode],
630 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
631 (and sometimes confusing) to the casual installer],
632 [USE_MAINTAINER_MODE=$enableval],
633 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
634 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
635 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
636 MAINT=$MAINTAINER_MODE_TRUE
641 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
643 # Check to see how 'make' treats includes. -*- Autoconf -*-
645 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
647 # This file is free software; the Free Software Foundation
648 # gives unlimited permission to copy and/or distribute it,
649 # with or without modifications, as long as this notice is preserved.
655 # Check to see how make treats includes.
656 AC_DEFUN([AM_MAKE_INCLUDE],
657 [am_make=${MAKE-make}
658 cat > confinc << 'END'
660 @echo this is the am__doit target
663 # If we don't find an include directive, just comment out the code.
664 AC_MSG_CHECKING([for style of include used by $am_make])
668 # First try GNU make style include.
669 echo "include confinc" > confmf
670 # Ignore all kinds of additional output from `make'.
671 case `$am_make -s -f confmf 2> /dev/null` in #(
672 *the\ am__doit\ target*)
678 # Now try BSD make style include.
679 if test "$am__include" = "#"; then
680 echo '.include "confinc"' > confmf
681 case `$am_make -s -f confmf 2> /dev/null` in #(
682 *the\ am__doit\ target*)
689 AC_SUBST([am__include])
690 AC_SUBST([am__quote])
691 AC_MSG_RESULT([$_am_result])
695 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
696 # Free Software Foundation, Inc.
698 # This file is free software; the Free Software Foundation
699 # gives unlimited permission to copy and/or distribute it,
700 # with or without modifications, as long as this notice is preserved.
706 # Like AC_PROG_CC_C_O, but changed for automake.
707 AC_DEFUN([AM_PROG_CC_C_O],
708 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
709 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
710 AC_REQUIRE_AUX_FILE([compile])dnl
711 # FIXME: we rely on the cache variable name because
712 # there is no other way.
714 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
715 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
716 if test "$am_t" != yes; then
717 # Losing compiler, so override with the script.
718 # FIXME: It is wrong to rewrite CC.
719 # But if we don't then we get into trouble of one sort or another.
720 # A longer-term fix would be to have automake use am__CC in this case,
721 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
722 CC="$am_aux_dir/compile $CC"
724 dnl Make sure AC_PROG_CC is never called again, or it will override our
726 m4_define([AC_PROG_CC],
727 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
730 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
732 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
733 # Free Software Foundation, Inc.
735 # This file is free software; the Free Software Foundation
736 # gives unlimited permission to copy and/or distribute it,
737 # with or without modifications, as long as this notice is preserved.
741 # AM_MISSING_PROG(NAME, PROGRAM)
742 # ------------------------------
743 AC_DEFUN([AM_MISSING_PROG],
744 [AC_REQUIRE([AM_MISSING_HAS_RUN])
745 $1=${$1-"${am_missing_run}$2"}
751 # Define MISSING if not defined so far and test if it supports --run.
752 # If it does, set am_missing_run to use it, otherwise, to nothing.
753 AC_DEFUN([AM_MISSING_HAS_RUN],
754 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
755 AC_REQUIRE_AUX_FILE([missing])dnl
756 if test x"${MISSING+set}" != xset; then
759 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
761 MISSING="\${SHELL} $am_aux_dir/missing" ;;
764 # Use eval to expand $SHELL
765 if eval "$MISSING --run true"; then
766 am_missing_run="$MISSING --run "
769 AC_MSG_WARN([`missing' script is too old or missing])
773 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
776 # This file is free software; the Free Software Foundation
777 # gives unlimited permission to copy and/or distribute it,
778 # with or without modifications, as long as this notice is preserved.
784 # Check for `mkdir -p'.
785 AC_DEFUN([AM_PROG_MKDIR_P],
786 [AC_PREREQ([2.60])dnl
787 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
788 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
789 dnl while keeping a definition of mkdir_p for backward compatibility.
790 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
791 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
792 dnl Makefile.ins that do not define MKDIR_P, so we do our own
793 dnl adjustment using top_builddir (which is defined more often than
795 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
797 [[\\/$]]* | ?:[[\\/]]*) ;;
798 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
802 # Helper functions for option handling. -*- Autoconf -*-
804 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
807 # This file is free software; the Free Software Foundation
808 # gives unlimited permission to copy and/or distribute it,
809 # with or without modifications, as long as this notice is preserved.
813 # _AM_MANGLE_OPTION(NAME)
814 # -----------------------
815 AC_DEFUN([_AM_MANGLE_OPTION],
816 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
818 # _AM_SET_OPTION(NAME)
819 # --------------------
820 # Set option NAME. Presently that only means defining a flag for this option.
821 AC_DEFUN([_AM_SET_OPTION],
822 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
824 # _AM_SET_OPTIONS(OPTIONS)
825 # ------------------------
826 # OPTIONS is a space-separated list of Automake options.
827 AC_DEFUN([_AM_SET_OPTIONS],
828 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
830 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
831 # -------------------------------------------
832 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
833 AC_DEFUN([_AM_IF_OPTION],
834 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
836 # Check to make sure that the build environment is sane. -*- Autoconf -*-
838 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
839 # Free Software Foundation, Inc.
841 # This file is free software; the Free Software Foundation
842 # gives unlimited permission to copy and/or distribute it,
843 # with or without modifications, as long as this notice is preserved.
849 AC_DEFUN([AM_SANITY_CHECK],
850 [AC_MSG_CHECKING([whether build environment is sane])
853 echo timestamp > conftest.file
854 # Reject unsafe characters in $srcdir or the absolute working directory
855 # name. Accept space and tab only in the latter.
859 *[[\\\"\#\$\&\'\`$am_lf]]*)
860 AC_MSG_ERROR([unsafe absolute working directory name]);;
863 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
864 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
867 # Do `set' in a subshell so we don't clobber the current shell's
868 # arguments. Must try -L first in case configure is actually a
869 # symlink; some systems play weird games with the mod time of symlinks
870 # (eg FreeBSD returns the mod time of the symlink's containing
873 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
874 if test "$[*]" = "X"; then
876 set X `ls -t "$srcdir/configure" conftest.file`
879 if test "$[*]" != "X $srcdir/configure conftest.file" \
880 && test "$[*]" != "X conftest.file $srcdir/configure"; then
882 # If neither matched, then we have a broken ls. This can happen
883 # if, for instance, CONFIG_SHELL is bash and it inherits a
884 # broken ls alias from the environment. This has actually
885 # happened. Such a system could not be considered "sane".
886 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
887 alias in your environment])
890 test "$[2]" = conftest.file
896 AC_MSG_ERROR([newly created file is older than distributed files!
897 Check your system clock])
901 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
903 # This file is free software; the Free Software Foundation
904 # gives unlimited permission to copy and/or distribute it,
905 # with or without modifications, as long as this notice is preserved.
909 # AM_SILENT_RULES([DEFAULT])
910 # --------------------------
911 # Enable less verbose build rules; with the default set to DEFAULT
912 # (`yes' being less verbose, `no' or empty being verbose).
913 AC_DEFUN([AM_SILENT_RULES],
914 [AC_ARG_ENABLE([silent-rules],
915 [ --enable-silent-rules less verbose build output (undo: `make V=1')
916 --disable-silent-rules verbose build output (undo: `make V=0')])
917 case $enable_silent_rules in
918 yes) AM_DEFAULT_VERBOSITY=0;;
919 no) AM_DEFAULT_VERBOSITY=1;;
920 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
923 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
924 dnl do not support nested variable expansions.
925 dnl See automake bug#9928 and bug#10237.
927 AC_CACHE_CHECK([whether $am_make supports nested variables],
928 [am_cv_make_support_nested_variables],
929 [if AS_ECHO([['TRUE=$(BAR$(V))
935 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
936 am_cv_make_support_nested_variables=yes
938 am_cv_make_support_nested_variables=no
940 if test $am_cv_make_support_nested_variables = yes; then
941 dnl Using `$V' instead of `$(V)' breaks IRIX make.
943 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
945 AM_V=$AM_DEFAULT_VERBOSITY
946 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
949 AM_SUBST_NOTMAKE([AM_V])dnl
950 AC_SUBST([AM_DEFAULT_V])dnl
951 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
952 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
954 AC_SUBST([AM_BACKSLASH])dnl
955 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
958 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
960 # This file is free software; the Free Software Foundation
961 # gives unlimited permission to copy and/or distribute it,
962 # with or without modifications, as long as this notice is preserved.
966 # AM_PROG_INSTALL_STRIP
967 # ---------------------
968 # One issue with vendor `install' (even GNU) is that you can't
969 # specify the program used to strip binaries. This is especially
970 # annoying in cross-compiling environments, where the build's strip
971 # is unlikely to handle the host's binaries.
972 # Fortunately install-sh will honor a STRIPPROG variable, so we
973 # always use install-sh in `make install-strip', and initialize
974 # STRIPPROG with the value of the STRIP variable (set by the user).
975 AC_DEFUN([AM_PROG_INSTALL_STRIP],
976 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
977 # Installed binaries are usually stripped using `strip' when the user
978 # run `make install-strip'. However `strip' might not be the right
979 # tool to use in cross-compilation environments, therefore Automake
980 # will honor the `STRIP' environment variable to overrule this program.
981 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
982 if test "$cross_compiling" != no; then
983 AC_CHECK_TOOL([STRIP], [strip], :)
985 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
986 AC_SUBST([INSTALL_STRIP_PROGRAM])])
988 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
990 # This file is free software; the Free Software Foundation
991 # gives unlimited permission to copy and/or distribute it,
992 # with or without modifications, as long as this notice is preserved.
996 # _AM_SUBST_NOTMAKE(VARIABLE)
997 # ---------------------------
998 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
999 # This macro is traced by Automake.
1000 AC_DEFUN([_AM_SUBST_NOTMAKE])
1002 # AM_SUBST_NOTMAKE(VARIABLE)
1003 # --------------------------
1004 # Public sister of _AM_SUBST_NOTMAKE.
1005 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1007 # Check how to create a tarball. -*- Autoconf -*-
1009 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1011 # This file is free software; the Free Software Foundation
1012 # gives unlimited permission to copy and/or distribute it,
1013 # with or without modifications, as long as this notice is preserved.
1017 # _AM_PROG_TAR(FORMAT)
1018 # --------------------
1019 # Check how to create a tarball in format FORMAT.
1020 # FORMAT should be one of `v7', `ustar', or `pax'.
1022 # Substitute a variable $(am__tar) that is a command
1023 # writing to stdout a FORMAT-tarball containing the directory
1025 # tardir=directory && $(am__tar) > result.tar
1027 # Substitute a variable $(am__untar) that extract such
1028 # a tarball read from stdin.
1029 # $(am__untar) < result.tar
1030 AC_DEFUN([_AM_PROG_TAR],
1031 [# Always define AMTAR for backward compatibility. Yes, it's still used
1032 # in the wild :-( We should find a proper way to deprecate it ...
1033 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1035 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1036 [m4_case([$1], [ustar],, [pax],,
1037 [m4_fatal([Unknown tar format])])
1038 AC_MSG_CHECKING([how to create a $1 tar archive])
1039 # Loop over all known methods to create a tar archive until one works.
1040 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1041 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1042 # Do not fold the above two line into one, because Tru64 sh and
1043 # Solaris sh will not grok spaces in the rhs of `-'.
1044 for _am_tool in $_am_tools
1048 for _am_tar in tar gnutar gtar;
1050 AM_RUN_LOG([$_am_tar --version]) && break
1052 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1053 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1054 am__untar="$_am_tar -xf -"
1057 # Must skip GNU tar: if it does not support --format= it doesn't create
1058 # ustar tarball either.
1059 (tar --version) >/dev/null 2>&1 && continue
1060 am__tar='tar chf - "$$tardir"'
1061 am__tar_='tar chf - "$tardir"'
1062 am__untar='tar xf -'
1065 am__tar='pax -L -x $1 -w "$$tardir"'
1066 am__tar_='pax -L -x $1 -w "$tardir"'
1070 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1071 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1072 am__untar='cpio -i -H $1 -d'
1081 # If the value was cached, stop now. We just wanted to have am__tar
1082 # and am__untar set.
1083 test -n "${am_cv_prog_tar_$1}" && break
1085 # tar/untar a dummy directory, and stop if the command works
1088 echo GrepMe > conftest.dir/file
1089 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1091 if test -s conftest.tar; then
1092 AM_RUN_LOG([$am__untar <conftest.tar])
1093 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1098 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1099 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1101 AC_SUBST([am__untar])
1105 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1106 # serial 42 IT_PROG_INTLTOOL
1107 AC_DEFUN([IT_PROG_INTLTOOL], [
1108 AC_PREREQ([2.50])dnl
1109 AC_REQUIRE([AM_NLS])dnl
1111 case "$am__api_version" in
1113 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1119 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1120 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1121 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1122 if test -n "$1"; then
1123 AC_MSG_CHECKING([for intltool >= $1])
1124 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1125 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1126 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1129 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1130 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1131 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1132 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1133 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1136 if test -z "$AM_DEFAULT_VERBOSITY"; then
1137 AM_DEFAULT_VERBOSITY=1
1139 AC_SUBST([AM_DEFAULT_VERBOSITY])
1141 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1142 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1143 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
1144 AC_SUBST(INTLTOOL_V_MERGE)
1145 AC_SUBST(INTLTOOL__v_MERGE_)
1146 AC_SUBST(INTLTOOL__v_MERGE_0)
1148 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1149 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1150 intltool__v_merge_options_0='-q'
1151 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1152 AC_SUBST(intltool__v_merge_options_)
1153 AC_SUBST(intltool__v_merge_options_0)
1155 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1156 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1157 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1158 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1159 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
1160 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1161 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1162 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1163 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1164 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1165 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1166 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1167 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
1169 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
1171 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1172 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1173 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1174 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1175 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1176 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1177 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1179 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
1180 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1181 _IT_SUBST(INTLTOOL_KEYS_RULE)
1182 _IT_SUBST(INTLTOOL_PROP_RULE)
1183 _IT_SUBST(INTLTOOL_OAF_RULE)
1184 _IT_SUBST(INTLTOOL_PONG_RULE)
1185 _IT_SUBST(INTLTOOL_SERVER_RULE)
1186 _IT_SUBST(INTLTOOL_SHEET_RULE)
1187 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1188 _IT_SUBST(INTLTOOL_UI_RULE)
1189 _IT_SUBST(INTLTOOL_XAM_RULE)
1190 _IT_SUBST(INTLTOOL_KBD_RULE)
1191 _IT_SUBST(INTLTOOL_XML_RULE)
1192 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1193 _IT_SUBST(INTLTOOL_CAVES_RULE)
1194 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1195 _IT_SUBST(INTLTOOL_THEME_RULE)
1196 _IT_SUBST(INTLTOOL_SERVICE_RULE)
1197 _IT_SUBST(INTLTOOL_POLICY_RULE)
1199 # Check the gettext tools to make sure they are GNU
1200 AC_PATH_PROG(XGETTEXT, xgettext)
1201 AC_PATH_PROG(MSGMERGE, msgmerge)
1202 AC_PATH_PROG(MSGFMT, msgfmt)
1203 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1204 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1205 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1207 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1208 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1209 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1210 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1211 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1214 AC_PATH_PROG(INTLTOOL_PERL, perl)
1215 if test -z "$INTLTOOL_PERL"; then
1216 AC_MSG_ERROR([perl not found])
1218 AC_MSG_CHECKING([for perl >= 5.8.1])
1219 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1220 if test $? -ne 0; then
1221 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1223 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1224 AC_MSG_RESULT([$IT_PERL_VERSION])
1226 if test "x$2" != "xno-xml"; then
1227 AC_MSG_CHECKING([for XML::Parser])
1228 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1231 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1235 # Substitute ALL_LINGUAS so we can use it in po/Makefile
1236 AC_SUBST(ALL_LINGUAS)
1238 # Set DATADIRNAME correctly if it is not set yet
1239 # (copied from glib-gettext.m4)
1240 if test -z "$DATADIRNAME"; then
1242 [AC_LANG_PROGRAM([[]],
1243 [[extern int _nl_msg_cat_cntr;
1244 return _nl_msg_cat_cntr]])],
1245 [DATADIRNAME=share],
1248 dnl On Solaris, if bind_textdomain_codeset is in libc,
1249 dnl GNU format message catalog is always supported,
1250 dnl since both are added to the libc all together.
1251 dnl Hence, we'd like to go with DATADIRNAME=share
1253 AC_CHECK_FUNC(bind_textdomain_codeset,
1254 [DATADIRNAME=share], [DATADIRNAME=lib])
1261 AC_SUBST(DATADIRNAME)
1268 # IT_PO_SUBDIR(DIRNAME)
1269 # ---------------------
1270 # All po subdirs have to be declared with this macro; the subdir "po" is
1271 # declared by IT_PROG_INTLTOOL.
1273 AC_DEFUN([IT_PO_SUBDIR],
1274 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1276 dnl The following CONFIG_COMMANDS should be executed at the very end
1277 dnl of config.status.
1278 AC_CONFIG_COMMANDS_PRE([
1279 AC_CONFIG_COMMANDS([$1/stamp-it], [
1280 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1281 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1283 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1288 '"s|^| $ac_top_srcdir/|" \
1289 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1291 [sed '/^POTFILES =/,/[^\\]$/ {
1295 ' "$1/Makefile.in" >"$1/Makefile"]
1296 rm -f "$1/Makefile.tmp"
1297 mv "$1/stamp-it.tmp" "$1/stamp-it"
1302 # _IT_SUBST(VARIABLE)
1303 # -------------------
1304 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1306 AC_DEFUN([_IT_SUBST],
1309 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1314 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1315 # A hint is needed for aclocal from Automake <= 1.9.4:
1316 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1319 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1321 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1322 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1324 # Written by Gordon Matzigkeit, 1996
1326 # This file is free software; the Free Software Foundation gives
1327 # unlimited permission to copy and/or distribute it, with or without
1328 # modifications, as long as this notice is preserved.
1330 m4_define([_LT_COPYING], [dnl
1331 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1332 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1334 # Written by Gordon Matzigkeit, 1996
1336 # This file is part of GNU Libtool.
1338 # GNU Libtool is free software; you can redistribute it and/or
1339 # modify it under the terms of the GNU General Public License as
1340 # published by the Free Software Foundation; either version 2 of
1341 # the License, or (at your option) any later version.
1343 # As a special exception to the GNU General Public License,
1344 # if you distribute this file as part of a program or library that
1345 # is built using GNU Libtool, you may include this file under the
1346 # same distribution terms that you use for the rest of that program.
1348 # GNU Libtool is distributed in the hope that it will be useful,
1349 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1350 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1351 # GNU General Public License for more details.
1353 # You should have received a copy of the GNU General Public License
1354 # along with GNU Libtool; see the file COPYING. If not, a copy
1355 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1356 # obtained by writing to the Free Software Foundation, Inc.,
1357 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1363 # LT_PREREQ(VERSION)
1364 # ------------------
1365 # Complain and exit if this libtool version is less that VERSION.
1366 m4_defun([LT_PREREQ],
1367 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1369 [m4_fatal([Libtool version $1 or higher is required],
1374 # _LT_CHECK_BUILDDIR
1375 # ------------------
1376 # Complain if the absolute build directory name contains unusual characters
1377 m4_defun([_LT_CHECK_BUILDDIR],
1380 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1385 # LT_INIT([OPTIONS])
1386 # ------------------
1388 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1389 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1390 AC_BEFORE([$0], [LT_LANG])dnl
1391 AC_BEFORE([$0], [LT_OUTPUT])dnl
1392 AC_BEFORE([$0], [LTDL_INIT])dnl
1393 m4_require([_LT_CHECK_BUILDDIR])dnl
1395 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1396 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1397 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1398 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1399 dnl unless we require an AC_DEFUNed macro:
1400 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1401 AC_REQUIRE([LTSUGAR_VERSION])dnl
1402 AC_REQUIRE([LTVERSION_VERSION])dnl
1403 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1404 m4_require([_LT_PROG_LTMAIN])dnl
1406 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1409 _LT_SET_OPTIONS([$0], [$1])
1411 # This can be used to rebuild libtool when needed
1412 LIBTOOL_DEPS="$ltmain"
1414 # Always use our own libtool.
1415 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1416 AC_SUBST(LIBTOOL)dnl
1421 m4_define([LT_INIT])
1425 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1426 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1427 dnl aclocal-1.4 backwards compatibility:
1428 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1429 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1432 # _LT_CC_BASENAME(CC)
1433 # -------------------
1434 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1435 m4_defun([_LT_CC_BASENAME],
1436 [for cc_temp in $1""; do
1438 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1439 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1444 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1448 # _LT_FILEUTILS_DEFAULTS
1449 # ----------------------
1450 # It is okay to use these file commands and assume they have been set
1451 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1452 m4_defun([_LT_FILEUTILS_DEFAULTS],
1456 ])# _LT_FILEUTILS_DEFAULTS
1461 m4_defun([_LT_SETUP],
1462 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1463 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1464 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1465 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1467 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1469 _LT_DECL([], [host_alias], [0], [The host system])dnl
1470 _LT_DECL([], [host], [0])dnl
1471 _LT_DECL([], [host_os], [0])dnl
1473 _LT_DECL([], [build_alias], [0], [The build system])dnl
1474 _LT_DECL([], [build], [0])dnl
1475 _LT_DECL([], [build_os], [0])dnl
1477 AC_REQUIRE([AC_PROG_CC])dnl
1478 AC_REQUIRE([LT_PATH_LD])dnl
1479 AC_REQUIRE([LT_PATH_NM])dnl
1481 AC_REQUIRE([AC_PROG_LN_S])dnl
1482 test -z "$LN_S" && LN_S="ln -s"
1483 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1485 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1486 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1487 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1489 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1490 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1491 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1492 m4_require([_LT_CMD_RELOAD])dnl
1493 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1494 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1495 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1496 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1497 m4_require([_LT_WITH_SYSROOT])dnl
1499 _LT_CONFIG_LIBTOOL_INIT([
1500 # See if we are running on zsh, and set the options which allow our
1501 # commands through without removal of \ escapes INIT.
1502 if test -n "\${ZSH_VERSION+set}" ; then
1503 setopt NO_GLOB_SUBST
1506 if test -n "${ZSH_VERSION+set}" ; then
1507 setopt NO_GLOB_SUBST
1512 m4_require([_LT_TAG_COMPILER])dnl
1516 # AIX sometimes has problems with the GCC collect2 program. For some
1517 # reason, if we set the COLLECT_NAMES environment variable, the problems
1518 # vanish in a puff of smoke.
1519 if test "X${COLLECT_NAMES+set}" != Xset; then
1521 export COLLECT_NAMES
1528 can_build_shared=yes
1530 # All known linkers require a `.a' archive for static linking (except MSVC,
1531 # which needs '.lib').
1534 with_gnu_ld="$lt_cv_prog_gnu_ld"
1537 old_CFLAGS="$CFLAGS"
1539 # Set sane defaults for various variables
1540 test -z "$CC" && CC=cc
1541 test -z "$LTCC" && LTCC=$CC
1542 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1543 test -z "$LD" && LD=ld
1544 test -z "$ac_objext" && ac_objext=o
1546 _LT_CC_BASENAME([$compiler])
1548 # Only perform the check for file, if the check method requires it
1549 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1550 case $deplibs_check_method in
1552 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1558 # Use C for the default configuration in the libtool script
1559 LT_SUPPORTED_TAG([CC])
1561 _LT_LANG_DEFAULT_CONFIG
1566 # _LT_PREPARE_SED_QUOTE_VARS
1567 # --------------------------
1568 # Define a few sed substitution that help us do robust quoting.
1569 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1570 [# Backslashify metacharacters that are still active within
1571 # double-quoted strings.
1572 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1574 # Same as above, but do not quote variable references.
1575 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1577 # Sed substitution to delay expansion of an escaped shell variable in a
1578 # double_quote_subst'ed string.
1579 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1581 # Sed substitution to delay expansion of an escaped single quote.
1582 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1584 # Sed substitution to avoid accidental globbing in evaled expressions
1585 no_glob_subst='s/\*/\\\*/g'
1590 # Note that this code is called both from `configure', and `config.status'
1591 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1592 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1593 # so we pass a copy along to make sure it has a sensible value anyway.
1594 m4_defun([_LT_PROG_LTMAIN],
1595 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1596 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1597 ltmain="$ac_aux_dir/ltmain.sh"
1602 # So that we can recreate a full libtool script including additional
1603 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1604 # in macros and then make a single call at the end using the `libtool'
1608 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1609 # ----------------------------------------
1610 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1611 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1613 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1618 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1621 # _LT_CONFIG_LIBTOOL([COMMANDS])
1622 # ------------------------------
1623 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1624 m4_define([_LT_CONFIG_LIBTOOL],
1626 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1631 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1634 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1635 # -----------------------------------------------------
1636 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1637 [_LT_CONFIG_LIBTOOL([$1])
1638 _LT_CONFIG_LIBTOOL_INIT([$2])
1642 # _LT_FORMAT_COMMENT([COMMENT])
1643 # -----------------------------
1644 # Add leading comment marks to the start of each line, and a trailing
1645 # full-stop to the whole comment if one is not present already.
1646 m4_define([_LT_FORMAT_COMMENT],
1648 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1649 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1656 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1657 # -------------------------------------------------------------------
1658 # CONFIGNAME is the name given to the value in the libtool script.
1659 # VARNAME is the (base) name used in the configure script.
1660 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1661 # VARNAME. Any other value will be used directly.
1662 m4_define([_LT_DECL],
1663 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1664 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1665 [m4_ifval([$1], [$1], [$2])])
1666 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1668 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1669 lt_dict_add_subkey([lt_decl_dict], [$2],
1670 [tagged?], [m4_ifval([$5], [yes], [no])])])
1674 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1675 # --------------------------------------------------------
1676 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1679 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1680 # ------------------------------------------------
1681 m4_define([lt_decl_tag_varnames],
1682 [_lt_decl_filter([tagged?], [yes], $@)])
1685 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1686 # ---------------------------------------------------------
1687 m4_define([_lt_decl_filter],
1689 [0], [m4_fatal([$0: too few arguments: $#])],
1690 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1691 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1692 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1693 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1697 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1698 # --------------------------------------------------
1699 m4_define([lt_decl_quote_varnames],
1700 [_lt_decl_filter([value], [1], $@)])
1703 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1704 # ---------------------------------------------------
1705 m4_define([lt_decl_dquote_varnames],
1706 [_lt_decl_filter([value], [2], $@)])
1709 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1710 # ---------------------------------------------------
1711 m4_define([lt_decl_varnames_tagged],
1712 [m4_assert([$# <= 2])dnl
1713 _$0(m4_quote(m4_default([$1], [[, ]])),
1714 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1715 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1716 m4_define([_lt_decl_varnames_tagged],
1717 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1720 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1721 # ------------------------------------------------
1722 m4_define([lt_decl_all_varnames],
1723 [_$0(m4_quote(m4_default([$1], [[, ]])),
1725 m4_quote(lt_decl_varnames),
1726 m4_quote(m4_shift($@))))[]dnl
1728 m4_define([_lt_decl_all_varnames],
1729 [lt_join($@, lt_decl_varnames_tagged([$1],
1730 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1734 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1735 # ------------------------------------
1736 # Quote a variable value, and forward it to `config.status' so that its
1737 # declaration there will have the same value as in `configure'. VARNAME
1738 # must have a single quote delimited value for this to work.
1739 m4_define([_LT_CONFIG_STATUS_DECLARE],
1740 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1743 # _LT_CONFIG_STATUS_DECLARATIONS
1744 # ------------------------------
1745 # We delimit libtool config variables with single quotes, so when
1746 # we write them to config.status, we have to be sure to quote all
1747 # embedded single quotes properly. In configure, this macro expands
1748 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1750 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1751 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1752 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1753 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1758 # Output comment and list of tags supported by the script
1759 m4_defun([_LT_LIBTOOL_TAGS],
1760 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1761 available_tags="_LT_TAGS"dnl
1765 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1766 # -----------------------------------
1767 # Extract the dictionary values for VARNAME (optionally with TAG) and
1768 # expand to a commented shell variable setting:
1770 # # Some comment about what VAR is for.
1771 # visible_name=$lt_internal_name
1772 m4_define([_LT_LIBTOOL_DECLARE],
1773 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1774 [description])))[]dnl
1775 m4_pushdef([_libtool_name],
1776 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1777 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1778 [0], [_libtool_name=[$]$1],
1779 [1], [_libtool_name=$lt_[]$1],
1780 [2], [_libtool_name=$lt_[]$1],
1781 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1782 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1786 # _LT_LIBTOOL_CONFIG_VARS
1787 # -----------------------
1788 # Produce commented declarations of non-tagged libtool config variables
1789 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1790 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1791 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1792 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1793 [m4_foreach([_lt_var],
1794 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1795 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1798 # _LT_LIBTOOL_TAG_VARS(TAG)
1799 # -------------------------
1800 m4_define([_LT_LIBTOOL_TAG_VARS],
1801 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1802 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1805 # _LT_TAGVAR(VARNAME, [TAGNAME])
1806 # ------------------------------
1807 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1810 # _LT_CONFIG_COMMANDS
1811 # -------------------
1812 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1813 # variables for single and double quote escaping we saved from calls
1814 # to _LT_DECL, we can put quote escaped variables declarations
1815 # into `config.status', and then the shell code to quote escape them in
1816 # for loops in `config.status'. Finally, any additional code accumulated
1817 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1818 m4_defun([_LT_CONFIG_COMMANDS],
1819 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1820 dnl If the libtool generation code has been placed in $CONFIG_LT,
1821 dnl instead of duplicating it all over again into config.status,
1822 dnl then we will have config.status run $CONFIG_LT later, so it
1823 dnl needs to know what name is stored there:
1824 [AC_CONFIG_COMMANDS([libtool],
1825 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1826 dnl If the libtool generation code is destined for config.status,
1827 dnl expand the accumulated commands and init code now:
1828 [AC_CONFIG_COMMANDS([libtool],
1829 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1830 ])#_LT_CONFIG_COMMANDS
1834 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1837 # The HP-UX ksh and POSIX shell print the target directory to stdout
1839 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1841 sed_quote_subst='$sed_quote_subst'
1842 double_quote_subst='$double_quote_subst'
1843 delay_variable_subst='$delay_variable_subst'
1844 _LT_CONFIG_STATUS_DECLARATIONS
1846 LTCFLAGS='$LTCFLAGS'
1847 compiler='$compiler_DEFAULT'
1849 # A function that is used when there is no print builtin or printf.
1850 func_fallback_echo ()
1852 eval 'cat <<_LTECHO_EOF
1857 # Quote evaled strings.
1858 for var in lt_decl_all_varnames([[ \
1859 ]], lt_decl_quote_varnames); do
1860 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1861 *[[\\\\\\\`\\"\\\$]]*)
1862 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1865 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1870 # Double-quote double-evaled strings.
1871 for var in lt_decl_all_varnames([[ \
1872 ]], lt_decl_dquote_varnames); do
1873 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1874 *[[\\\\\\\`\\"\\\$]]*)
1875 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1878 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1883 _LT_OUTPUT_LIBTOOL_INIT
1886 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1887 # ------------------------------------
1888 # Generate a child script FILE with all initialization necessary to
1889 # reuse the environment learned by the parent script, and make the
1890 # file executable. If COMMENT is supplied, it is inserted after the
1891 # `#!' sequence but before initialization text begins. After this
1892 # macro, additional text can be appended to FILE to form the body of
1893 # the child script. The macro ends with non-zero status if the
1894 # file could not be fully written (such as if the disk is full).
1895 m4_ifdef([AS_INIT_GENERATED],
1896 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1897 [m4_defun([_LT_GENERATED_FILE_INIT],
1898 [m4_require([AS_PREPARE])]dnl
1899 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1901 cat >$1 <<_ASEOF || lt_write_fail=1
1903 # Generated by $as_me.
1905 SHELL=\${CONFIG_SHELL-$SHELL}
1908 cat >>$1 <<\_ASEOF || lt_write_fail=1
1911 exec AS_MESSAGE_FD>&1
1913 test $lt_write_fail = 0 && chmod +x $1[]dnl
1914 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1918 # This macro allows early generation of the libtool script (before
1919 # AC_OUTPUT is called), incase it is used in configure for compilation
1921 AC_DEFUN([LT_OUTPUT],
1922 [: ${CONFIG_LT=./config.lt}
1923 AC_MSG_NOTICE([creating $CONFIG_LT])
1924 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1925 [# Run this file to recreate a libtool stub with the current configuration.])
1927 cat >>"$CONFIG_LT" <<\_LTEOF
1929 exec AS_MESSAGE_LOG_FD>>config.log
1932 AS_BOX([Running $as_me.])
1933 } >&AS_MESSAGE_LOG_FD
1936 \`$as_me' creates a local libtool stub from the current configuration,
1937 for use in further configure time tests before the real libtool is
1940 Usage: $[0] [[OPTIONS]]
1942 -h, --help print this help, then exit
1943 -V, --version print version number, then exit
1944 -q, --quiet do not print progress messages
1945 -d, --debug don't remove temporary files
1947 Report bugs to <bug-libtool@gnu.org>."
1950 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1951 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1952 configured by $[0], generated by m4_PACKAGE_STRING.
1954 Copyright (C) 2011 Free Software Foundation, Inc.
1955 This config.lt script is free software; the Free Software Foundation
1956 gives unlimited permision to copy, distribute and modify it."
1958 while test $[#] != 0
1961 --version | --v* | -V )
1962 echo "$lt_cl_version"; exit 0 ;;
1963 --help | --h* | -h )
1964 echo "$lt_cl_help"; exit 0 ;;
1965 --debug | --d* | -d )
1967 --quiet | --q* | --silent | --s* | -q )
1970 -*) AC_MSG_ERROR([unrecognized option: $[1]
1971 Try \`$[0] --help' for more information.]) ;;
1973 *) AC_MSG_ERROR([unrecognized argument: $[1]
1974 Try \`$[0] --help' for more information.]) ;;
1979 if $lt_cl_silent; then
1980 exec AS_MESSAGE_FD>/dev/null
1984 cat >>"$CONFIG_LT" <<_LTEOF
1985 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1988 cat >>"$CONFIG_LT" <<\_LTEOF
1989 AC_MSG_NOTICE([creating $ofile])
1990 _LT_OUTPUT_LIBTOOL_COMMANDS
1993 chmod +x "$CONFIG_LT"
1995 # configure is writing to config.log, but config.lt does its own redirection,
1996 # appending to config.log, which fails on DOS, as config.log is still kept
1997 # open by configure. Here we exec the FD to /dev/null, effectively closing
1998 # config.log, so it can be properly (re)opened and appended to by config.lt.
2000 test "$silent" = yes &&
2001 lt_config_lt_args="$lt_config_lt_args --quiet"
2002 exec AS_MESSAGE_LOG_FD>/dev/null
2003 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2004 exec AS_MESSAGE_LOG_FD>>config.log
2005 $lt_cl_success || AS_EXIT(1)
2011 # If TAG is the built-in tag, create an initial libtool script with a
2012 # default configuration from the untagged config vars. Otherwise add code
2013 # to config.status for appending the configuration named by TAG from the
2014 # matching tagged config vars.
2015 m4_defun([_LT_CONFIG],
2016 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2017 _LT_CONFIG_SAVE_COMMANDS([
2018 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2019 m4_if(_LT_TAG, [C], [
2020 # See if we are running on zsh, and set the options which allow our
2021 # commands through without removal of \ escapes.
2022 if test -n "${ZSH_VERSION+set}" ; then
2023 setopt NO_GLOB_SUBST
2027 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2030 cat <<_LT_EOF >> "$cfgfile"
2033 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2034 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2035 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2036 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2041 # ### BEGIN LIBTOOL CONFIG
2042 _LT_LIBTOOL_CONFIG_VARS
2043 _LT_LIBTOOL_TAG_VARS
2044 # ### END LIBTOOL CONFIG
2050 cat <<\_LT_EOF >> "$cfgfile"
2051 # AIX sometimes has problems with the GCC collect2 program. For some
2052 # reason, if we set the COLLECT_NAMES environment variable, the problems
2053 # vanish in a puff of smoke.
2054 if test "X${COLLECT_NAMES+set}" != Xset; then
2056 export COLLECT_NAMES
2064 # We use sed instead of cat because bash on DJGPP gets confused if
2065 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2066 # text mode, it properly converts lines to CR/LF. This bash problem
2067 # is reportedly fixed, but why not run on old versions too?
2068 sed '$q' "$ltmain" >> "$cfgfile" \
2069 || (rm -f "$cfgfile"; exit 1)
2071 _LT_PROG_REPLACE_SHELLFNS
2073 mv -f "$cfgfile" "$ofile" ||
2074 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2077 [cat <<_LT_EOF >> "$ofile"
2079 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2080 dnl in a comment (ie after a #).
2081 # ### BEGIN LIBTOOL TAG CONFIG: $1
2082 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2083 # ### END LIBTOOL TAG CONFIG: $1
2090 TIMESTAMP='$TIMESTAMP'
2092 ofile='$ofile'], [])
2093 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2097 # LT_SUPPORTED_TAG(TAG)
2098 # ---------------------
2099 # Trace this macro to discover what tags are supported by the libtool
2100 # --tag option, using:
2101 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
2102 AC_DEFUN([LT_SUPPORTED_TAG], [])
2105 # C support is built-in for now
2106 m4_define([_LT_LANG_C_enabled], [])
2107 m4_define([_LT_TAGS], [])
2112 # Enable libtool support for the given language if not already enabled.
2114 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2117 [C++], [_LT_LANG(CXX)],
2118 [Go], [_LT_LANG(GO)],
2119 [Java], [_LT_LANG(GCJ)],
2120 [Fortran 77], [_LT_LANG(F77)],
2121 [Fortran], [_LT_LANG(FC)],
2122 [Windows Resource], [_LT_LANG(RC)],
2123 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2125 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2129 # _LT_LANG(LANGNAME)
2130 # ------------------
2131 m4_defun([_LT_LANG],
2132 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2133 [LT_SUPPORTED_TAG([$1])dnl
2134 m4_append([_LT_TAGS], [$1 ])dnl
2135 m4_define([_LT_LANG_]$1[_enabled], [])dnl
2136 _LT_LANG_$1_CONFIG($1)])dnl
2140 m4_ifndef([AC_PROG_GO], [
2141 # NOTE: This macro has been submitted for inclusion into #
2142 # GNU Autoconf as AC_PROG_GO. When it is available in #
2143 # a released version of Autoconf we should remove this #
2144 # macro and use it instead. #
2145 m4_defun([AC_PROG_GO],
2146 [AC_LANG_PUSH(Go)dnl
2147 AC_ARG_VAR([GOC], [Go compiler command])dnl
2148 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2149 _AC_ARG_VAR_LDFLAGS()dnl
2150 AC_CHECK_TOOL(GOC, gccgo)
2151 if test -z "$GOC"; then
2152 if test -n "$ac_tool_prefix"; then
2153 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2156 if test -z "$GOC"; then
2157 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2163 # _LT_LANG_DEFAULT_CONFIG
2164 # -----------------------
2165 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2166 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2168 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2170 AC_PROVIDE_IFELSE([AC_PROG_F77],
2172 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2174 AC_PROVIDE_IFELSE([AC_PROG_FC],
2176 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2178 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2179 dnl pulling things in needlessly.
2180 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2182 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2184 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2186 [m4_ifdef([AC_PROG_GCJ],
2187 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2188 m4_ifdef([A][M_PROG_GCJ],
2189 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2190 m4_ifdef([LT_PROG_GCJ],
2191 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2193 AC_PROVIDE_IFELSE([AC_PROG_GO],
2195 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2197 AC_PROVIDE_IFELSE([LT_PROG_RC],
2199 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2200 ])# _LT_LANG_DEFAULT_CONFIG
2203 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2204 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2205 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2206 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2207 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2208 dnl aclocal-1.4 backwards compatibility:
2209 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2210 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2211 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2212 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2213 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2218 m4_defun([_LT_TAG_COMPILER],
2219 [AC_REQUIRE([AC_PROG_CC])dnl
2221 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2222 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2223 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2224 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2226 # If no C compiler was specified, use CC.
2229 # If no C compiler flags were specified, use CFLAGS.
2230 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2232 # Allow CC to be a program name with arguments.
2234 ])# _LT_TAG_COMPILER
2237 # _LT_COMPILER_BOILERPLATE
2238 # ------------------------
2239 # Check for compiler boilerplate output or warnings with
2240 # the simple compiler test code.
2241 m4_defun([_LT_COMPILER_BOILERPLATE],
2242 [m4_require([_LT_DECL_SED])dnl
2243 ac_outfile=conftest.$ac_objext
2244 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2245 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2246 _lt_compiler_boilerplate=`cat conftest.err`
2248 ])# _LT_COMPILER_BOILERPLATE
2251 # _LT_LINKER_BOILERPLATE
2252 # ----------------------
2253 # Check for linker boilerplate output or warnings with
2254 # the simple link test code.
2255 m4_defun([_LT_LINKER_BOILERPLATE],
2256 [m4_require([_LT_DECL_SED])dnl
2257 ac_outfile=conftest.$ac_objext
2258 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2259 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2260 _lt_linker_boilerplate=`cat conftest.err`
2262 ])# _LT_LINKER_BOILERPLATE
2264 # _LT_REQUIRED_DARWIN_CHECKS
2265 # -------------------------
2266 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2268 rhapsody* | darwin*)
2269 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2270 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2271 AC_CHECK_TOOL([LIPO], [lipo], [:])
2272 AC_CHECK_TOOL([OTOOL], [otool], [:])
2273 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2274 _LT_DECL([], [DSYMUTIL], [1],
2275 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2276 _LT_DECL([], [NMEDIT], [1],
2277 [Tool to change global to local symbols on Mac OS X])
2278 _LT_DECL([], [LIPO], [1],
2279 [Tool to manipulate fat objects and archives on Mac OS X])
2280 _LT_DECL([], [OTOOL], [1],
2281 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2282 _LT_DECL([], [OTOOL64], [1],
2283 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2285 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2286 [lt_cv_apple_cc_single_mod=no
2287 if test -z "${LT_MULTI_MODULE}"; then
2288 # By default we will add the -single_module flag. You can override
2289 # by either setting the environment variable LT_MULTI_MODULE
2290 # non-empty at configure time, or by adding -multi_module to the
2292 rm -rf libconftest.dylib*
2293 echo "int foo(void){return 1;}" > conftest.c
2294 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2295 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2296 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2297 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2299 # If there is a non-empty error log, and "single_module"
2300 # appears in it, assume the flag caused a linker warning
2301 if test -s conftest.err && $GREP single_module conftest.err; then
2302 cat conftest.err >&AS_MESSAGE_LOG_FD
2303 # Otherwise, if the output was created with a 0 exit code from
2304 # the compiler, it worked.
2305 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2306 lt_cv_apple_cc_single_mod=yes
2308 cat conftest.err >&AS_MESSAGE_LOG_FD
2310 rm -rf libconftest.dylib*
2314 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2315 [lt_cv_ld_exported_symbols_list],
2316 [lt_cv_ld_exported_symbols_list=no
2317 save_LDFLAGS=$LDFLAGS
2318 echo "_main" > conftest.sym
2319 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2320 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2321 [lt_cv_ld_exported_symbols_list=yes],
2322 [lt_cv_ld_exported_symbols_list=no])
2323 LDFLAGS="$save_LDFLAGS"
2326 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2327 [lt_cv_ld_force_load=no
2328 cat > conftest.c << _LT_EOF
2329 int forced_loaded() { return 2;}
2331 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2332 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2333 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2334 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2335 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2336 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2337 cat > conftest.c << _LT_EOF
2338 int main() { return 0;}
2340 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2341 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2343 if test -s conftest.err && $GREP force_load conftest.err; then
2344 cat conftest.err >&AS_MESSAGE_LOG_FD
2345 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2346 lt_cv_ld_force_load=yes
2348 cat conftest.err >&AS_MESSAGE_LOG_FD
2350 rm -f conftest.err libconftest.a conftest conftest.c
2351 rm -rf conftest.dSYM
2354 rhapsody* | darwin1.[[012]])
2355 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2357 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2358 darwin*) # darwin 5.x on
2359 # if running on 10.5 or later, the deployment target defaults
2360 # to the OS version, if on x86, and 10.4, the deployment
2361 # target defaults to 10.4. Don't you love it?
2362 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2363 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2364 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2366 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2368 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2372 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2373 _lt_dar_single_mod='$single_module'
2375 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2376 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2378 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2380 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2381 _lt_dsymutil='~$DSYMUTIL $lib || :'
2390 # _LT_DARWIN_LINKER_FEATURES([TAG])
2391 # ---------------------------------
2392 # Checks for linker and compiler features on darwin
2393 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2395 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2396 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2397 _LT_TAGVAR(hardcode_direct, $1)=no
2398 _LT_TAGVAR(hardcode_automatic, $1)=yes
2399 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2400 if test "$lt_cv_ld_force_load" = "yes"; then
2401 _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\"`'
2402 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2403 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2405 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2407 _LT_TAGVAR(link_all_deplibs, $1)=yes
2408 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2409 case $cc_basename in
2410 ifort*) _lt_dar_can_shared=yes ;;
2411 *) _lt_dar_can_shared=$GCC ;;
2413 if test "$_lt_dar_can_shared" = "yes"; then
2414 output_verbose_link_cmd=func_echo_all
2415 _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}"
2416 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2417 _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}"
2418 _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}"
2420 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2421 _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}"
2422 _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}"
2426 _LT_TAGVAR(ld_shlibs, $1)=no
2430 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2431 # ----------------------------------
2432 # Links a minimal program and checks the executable
2433 # for the system default hardcoded library path. In most cases,
2434 # this is /usr/lib:/lib, but when the MPI compilers are used
2435 # the location of the communication and MPI libs are included too.
2436 # If we don't find anything, use the default library path according
2437 # to the aix ld manual.
2438 # Store the results from the different compilers for each TAGNAME.
2439 # Allow to override them for all tags through lt_cv_aix_libpath.
2440 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2441 [m4_require([_LT_DECL_SED])dnl
2442 if test "${lt_cv_aix_libpath+set}" = set; then
2443 aix_libpath=$lt_cv_aix_libpath
2445 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2446 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2447 lt_aix_libpath_sed='[
2448 /Import File Strings/,/^$/ {
2450 s/^0 *\([^ ]*\) *$/\1/
2454 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2455 # Check for a 64-bit object if we didn't find anything.
2456 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2457 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2459 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2460 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2463 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2465 ])# _LT_SYS_MODULE_PATH_AIX
2468 # _LT_SHELL_INIT(ARG)
2469 # -------------------
2470 m4_define([_LT_SHELL_INIT],
2471 [m4_divert_text([M4SH-INIT], [$1
2472 ])])# _LT_SHELL_INIT
2476 # _LT_PROG_ECHO_BACKSLASH
2477 # -----------------------
2478 # Find how we can fake an echo command that does not interpret backslash.
2479 # In particular, with Autoconf 2.60 or later we add some code to the start
2480 # of the generated configure script which will find a shell with a builtin
2481 # printf (which we can use as an echo command).
2482 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2483 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2484 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2485 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2487 AC_MSG_CHECKING([how to print strings])
2488 # Test print first, because it will be a builtin if present.
2489 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2490 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2492 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2495 # Use this function as a fallback that always works.
2496 func_fallback_echo ()
2498 eval 'cat <<_LTECHO_EOF
2502 ECHO='func_fallback_echo'
2505 # func_echo_all arg...
2506 # Invoke $ECHO with all args, space-separated.
2513 printf*) AC_MSG_RESULT([printf]) ;;
2514 print*) AC_MSG_RESULT([print -r]) ;;
2515 *) AC_MSG_RESULT([cat]) ;;
2518 m4_ifdef([_AS_DETECT_SUGGESTED],
2519 [_AS_DETECT_SUGGESTED([
2520 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2521 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2522 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2523 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2524 PATH=/empty FPATH=/empty; export PATH FPATH
2525 test "X`printf %s $ECHO`" = "X$ECHO" \
2526 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2528 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2529 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2530 ])# _LT_PROG_ECHO_BACKSLASH
2535 AC_DEFUN([_LT_WITH_SYSROOT],
2536 [AC_MSG_CHECKING([for sysroot])
2537 AC_ARG_WITH([sysroot],
2538 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2539 (or the compiler's sysroot if not specified).],
2540 [], [with_sysroot=no])
2542 dnl lt_sysroot will always be passed unquoted. We quote it here
2543 dnl in case the user passed a directory name.
2545 case ${with_sysroot} in #(
2547 if test "$GCC" = yes; then
2548 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2552 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2557 AC_MSG_RESULT([${with_sysroot}])
2558 AC_MSG_ERROR([The sysroot must be an absolute path.])
2562 AC_MSG_RESULT([${lt_sysroot:-no}])
2563 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2564 [dependent libraries, and in which our libraries should be installed.])])
2568 m4_defun([_LT_ENABLE_LOCK],
2569 [AC_ARG_ENABLE([libtool-lock],
2570 [AS_HELP_STRING([--disable-libtool-lock],
2571 [avoid locking (might break parallel builds)])])
2572 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2574 # Some flags need to be propagated to the compiler or linker for good
2578 # Find out which ABI we are using.
2579 echo 'int i;' > conftest.$ac_ext
2580 if AC_TRY_EVAL(ac_compile); then
2581 case `/usr/bin/file conftest.$ac_objext` in
2593 # Find out which ABI we are using.
2594 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2595 if AC_TRY_EVAL(ac_compile); then
2596 if test "$lt_cv_prog_gnu_ld" = yes; then
2597 case `/usr/bin/file conftest.$ac_objext` in
2599 LD="${LD-ld} -melf32bsmip"
2602 LD="${LD-ld} -melf32bmipn32"
2605 LD="${LD-ld} -melf64bmip"
2609 case `/usr/bin/file conftest.$ac_objext` in
2625 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2626 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2627 # Find out which ABI we are using.
2628 echo 'int i;' > conftest.$ac_ext
2629 if AC_TRY_EVAL(ac_compile); then
2630 case `/usr/bin/file conftest.o` in
2633 x86_64-*kfreebsd*-gnu)
2634 LD="${LD-ld} -m elf_i386_fbsd"
2637 LD="${LD-ld} -m elf_i386"
2639 ppc64-*linux*|powerpc64-*linux*)
2640 LD="${LD-ld} -m elf32ppclinux"
2643 LD="${LD-ld} -m elf_s390"
2646 LD="${LD-ld} -m elf32_sparc"
2652 x86_64-*kfreebsd*-gnu)
2653 LD="${LD-ld} -m elf_x86_64_fbsd"
2656 LD="${LD-ld} -m elf_x86_64"
2658 ppc*-*linux*|powerpc*-*linux*)
2659 LD="${LD-ld} -m elf64ppc"
2661 s390*-*linux*|s390*-*tpf*)
2662 LD="${LD-ld} -m elf64_s390"
2665 LD="${LD-ld} -m elf64_sparc"
2675 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2676 SAVE_CFLAGS="$CFLAGS"
2677 CFLAGS="$CFLAGS -belf"
2678 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2680 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2682 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2683 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2684 CFLAGS="$SAVE_CFLAGS"
2688 # Find out which ABI we are using.
2689 echo 'int i;' > conftest.$ac_ext
2690 if AC_TRY_EVAL(ac_compile); then
2691 case `/usr/bin/file conftest.o` in
2693 case $lt_cv_prog_gnu_ld in
2697 LD="${LD-ld} -m elf_x86_64"
2700 LD="${LD-ld} -m elf64_sparc"
2703 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2704 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2709 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2721 need_locks="$enable_libtool_lock"
2727 m4_defun([_LT_PROG_AR],
2728 [AC_CHECK_TOOLS(AR, [ar], false)
2731 _LT_DECL([], [AR], [1], [The archiver])
2732 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2734 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2735 [lt_cv_ar_at_file=no
2736 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2737 [echo conftest.$ac_objext > conftest.lst
2738 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2739 AC_TRY_EVAL([lt_ar_try])
2740 if test "$ac_status" -eq 0; then
2741 # Ensure the archiver fails upon bogus file names.
2742 rm -f conftest.$ac_objext libconftest.a
2743 AC_TRY_EVAL([lt_ar_try])
2744 if test "$ac_status" -ne 0; then
2748 rm -f conftest.* libconftest.a
2752 if test "x$lt_cv_ar_at_file" = xno; then
2755 archiver_list_spec=$lt_cv_ar_at_file
2757 _LT_DECL([], [archiver_list_spec], [1],
2758 [How to feed a file listing to the archiver])
2762 # _LT_CMD_OLD_ARCHIVE
2763 # -------------------
2764 m4_defun([_LT_CMD_OLD_ARCHIVE],
2767 AC_CHECK_TOOL(STRIP, strip, :)
2768 test -z "$STRIP" && STRIP=:
2769 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2771 AC_CHECK_TOOL(RANLIB, ranlib, :)
2772 test -z "$RANLIB" && RANLIB=:
2773 _LT_DECL([], [RANLIB], [1],
2774 [Commands used to install an old-style archive])
2776 # Determine commands to create old-style static archives.
2777 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2778 old_postinstall_cmds='chmod 644 $oldlib'
2779 old_postuninstall_cmds=
2781 if test -n "$RANLIB"; then
2784 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2787 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2790 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2795 lock_old_archive_extraction=yes ;;
2797 lock_old_archive_extraction=no ;;
2799 _LT_DECL([], [old_postinstall_cmds], [2])
2800 _LT_DECL([], [old_postuninstall_cmds], [2])
2801 _LT_TAGDECL([], [old_archive_cmds], [2],
2802 [Commands used to build an old-style archive])
2803 _LT_DECL([], [lock_old_archive_extraction], [0],
2804 [Whether to use a lock for old archive extraction])
2805 ])# _LT_CMD_OLD_ARCHIVE
2808 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2809 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2810 # ----------------------------------------------------------------
2811 # Check whether the given compiler option works
2812 AC_DEFUN([_LT_COMPILER_OPTION],
2813 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2814 m4_require([_LT_DECL_SED])dnl
2815 AC_CACHE_CHECK([$1], [$2],
2817 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2818 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2819 lt_compiler_flag="$3"
2820 # Insert the option either (1) after the last *FLAGS variable, or
2821 # (2) before a word containing "conftest.", or (3) at the end.
2822 # Note that $ac_compile itself does not contain backslashes and begins
2823 # with a dollar sign (not a hyphen), so the echo should work correctly.
2824 # The option is referenced via a variable to avoid confusing sed.
2825 lt_compile=`echo "$ac_compile" | $SED \
2826 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2827 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2828 -e 's:$: $lt_compiler_flag:'`
2829 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2830 (eval "$lt_compile" 2>conftest.err)
2832 cat conftest.err >&AS_MESSAGE_LOG_FD
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2834 if (exit $ac_status) && test -s "$ac_outfile"; then
2835 # The compiler can only warn and ignore the option if not recognized
2836 # So say no if there are warnings other than the usual output.
2837 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2838 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2839 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2846 if test x"[$]$2" = xyes; then
2847 m4_if([$5], , :, [$5])
2849 m4_if([$6], , :, [$6])
2851 ])# _LT_COMPILER_OPTION
2854 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2855 dnl aclocal-1.4 backwards compatibility:
2856 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2859 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2860 # [ACTION-SUCCESS], [ACTION-FAILURE])
2861 # ----------------------------------------------------
2862 # Check whether the given linker option works
2863 AC_DEFUN([_LT_LINKER_OPTION],
2864 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2865 m4_require([_LT_DECL_SED])dnl
2866 AC_CACHE_CHECK([$1], [$2],
2868 save_LDFLAGS="$LDFLAGS"
2869 LDFLAGS="$LDFLAGS $3"
2870 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2871 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2872 # The linker can only warn and ignore the option if not recognized
2873 # So say no if there are warnings
2874 if test -s conftest.err; then
2875 # Append any errors to the config.log.
2876 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2877 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2878 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2879 if diff conftest.exp conftest.er2 >/dev/null; then
2887 LDFLAGS="$save_LDFLAGS"
2890 if test x"[$]$2" = xyes; then
2891 m4_if([$4], , :, [$4])
2893 m4_if([$5], , :, [$5])
2895 ])# _LT_LINKER_OPTION
2898 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2899 dnl aclocal-1.4 backwards compatibility:
2900 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2905 AC_DEFUN([LT_CMD_MAX_LEN],
2906 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2907 # find the maximum length of command line arguments
2908 AC_MSG_CHECKING([the maximum length of command line arguments])
2909 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2915 # On DJGPP, this test can blow up pretty badly due to problems in libc
2916 # (any single argument exceeding 2000 bytes causes a buffer overrun
2917 # during glob expansion). Even if it were fixed, the result of this
2918 # check would be larger than it should be.
2919 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2923 # Under GNU Hurd, this test is not required because there is
2924 # no limit to the length of command line arguments.
2925 # Libtool will interpret -1 as no limit whatsoever
2926 lt_cv_sys_max_cmd_len=-1;
2929 cygwin* | mingw* | cegcc*)
2930 # On Win9x/ME, this test blows up -- it succeeds, but takes
2931 # about 5 minutes as the teststring grows exponentially.
2932 # Worse, since 9x/ME are not pre-emptively multitasking,
2933 # you end up with a "frozen" computer, even though with patience
2934 # the test eventually succeeds (with a max line length of 256k).
2935 # Instead, let's just punt: use the minimum linelength reported by
2936 # all of the supported platforms: 8192 (on NT/2K/XP).
2937 lt_cv_sys_max_cmd_len=8192;
2941 # On MiNT this can take a long time and run out of memory.
2942 lt_cv_sys_max_cmd_len=8192;
2946 # On AmigaOS with pdksh, this test takes hours, literally.
2947 # So we just punt and use a minimum line length of 8192.
2948 lt_cv_sys_max_cmd_len=8192;
2951 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2952 # This has been around since 386BSD, at least. Likely further.
2953 if test -x /sbin/sysctl; then
2954 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2955 elif test -x /usr/sbin/sysctl; then
2956 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2958 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2960 # And add a safety zone
2961 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2962 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2966 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2967 lt_cv_sys_max_cmd_len=196608
2971 # The test takes a long time on OS/2.
2972 lt_cv_sys_max_cmd_len=8192
2976 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2977 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2978 # nice to cause kernel panics so lets avoid the loop below.
2979 # First set a reasonable default.
2980 lt_cv_sys_max_cmd_len=16384
2982 if test -x /sbin/sysconfig; then
2983 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2984 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2989 lt_cv_sys_max_cmd_len=102400
2991 sysv5* | sco5v6* | sysv4.2uw2*)
2992 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2993 if test -n "$kargmax"; then
2994 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2996 lt_cv_sys_max_cmd_len=32768
3000 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3001 if test -n "$lt_cv_sys_max_cmd_len"; then
3002 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3003 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3005 # Make teststring a little bigger before we do anything with it.
3006 # a 1K string should be a reasonable start.
3007 for i in 1 2 3 4 5 6 7 8 ; do
3008 teststring=$teststring$teststring
3010 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3011 # If test is not a shell built-in, we'll probably end up computing a
3012 # maximum length that is only half of the actual maximum length, but
3014 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
3015 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3016 test $i != 17 # 1/2 MB should be enough
3019 teststring=$teststring$teststring
3021 # Only check the string length outside the loop.
3022 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3024 # Add a significant safety factor because C++ compilers can tack on
3025 # massive amounts of additional arguments before passing them to the
3026 # linker. It appears as though 1/2 is a usable value.
3027 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3032 if test -n $lt_cv_sys_max_cmd_len ; then
3033 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3037 max_cmd_len=$lt_cv_sys_max_cmd_len
3038 _LT_DECL([], [max_cmd_len], [0],
3039 [What is the maximum length of a command?])
3043 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3044 dnl aclocal-1.4 backwards compatibility:
3045 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3050 m4_defun([_LT_HEADER_DLFCN],
3051 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3052 ])# _LT_HEADER_DLFCN
3055 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3056 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3057 # ----------------------------------------------------------------
3058 m4_defun([_LT_TRY_DLOPEN_SELF],
3059 [m4_require([_LT_HEADER_DLFCN])dnl
3060 if test "$cross_compiling" = yes; then :
3063 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3064 lt_status=$lt_dlunknown
3065 cat > conftest.$ac_ext <<_LT_EOF
3066 [#line $LINENO "configure"
3067 #include "confdefs.h"
3076 # define LT_DLGLOBAL RTLD_GLOBAL
3079 # define LT_DLGLOBAL DL_GLOBAL
3081 # define LT_DLGLOBAL 0
3085 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3086 find out it does not work in some platform. */
3087 #ifndef LT_DLLAZY_OR_NOW
3089 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3092 # define LT_DLLAZY_OR_NOW DL_LAZY
3095 # define LT_DLLAZY_OR_NOW RTLD_NOW
3098 # define LT_DLLAZY_OR_NOW DL_NOW
3100 # define LT_DLLAZY_OR_NOW 0
3107 /* When -fvisbility=hidden is used, assume the code has been annotated
3108 correspondingly for the symbols needed. */
3109 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3110 int fnord () __attribute__((visibility("default")));
3113 int fnord () { return 42; }
3116 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3117 int status = $lt_dlunknown;
3121 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3124 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3125 else puts (dlerror ());
3127 /* dlclose (self); */
3135 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3136 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3139 x$lt_dlno_uscore) $1 ;;
3140 x$lt_dlneed_uscore) $2 ;;
3141 x$lt_dlunknown|x*) $3 ;;
3144 # compilation failed
3149 ])# _LT_TRY_DLOPEN_SELF
3152 # LT_SYS_DLOPEN_SELF
3153 # ------------------
3154 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3155 [m4_require([_LT_HEADER_DLFCN])dnl
3156 if test "x$enable_dlopen" != xyes; then
3157 enable_dlopen=unknown
3158 enable_dlopen_self=unknown
3159 enable_dlopen_self_static=unknown
3166 lt_cv_dlopen="load_add_on"
3168 lt_cv_dlopen_self=yes
3171 mingw* | pw32* | cegcc*)
3172 lt_cv_dlopen="LoadLibrary"
3177 lt_cv_dlopen="dlopen"
3182 # if libdl is installed we need to link against it
3183 AC_CHECK_LIB([dl], [dlopen],
3184 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3187 lt_cv_dlopen_self=yes
3192 AC_CHECK_FUNC([shl_load],
3193 [lt_cv_dlopen="shl_load"],
3194 [AC_CHECK_LIB([dld], [shl_load],
3195 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3196 [AC_CHECK_FUNC([dlopen],
3197 [lt_cv_dlopen="dlopen"],
3198 [AC_CHECK_LIB([dl], [dlopen],
3199 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3200 [AC_CHECK_LIB([svld], [dlopen],
3201 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3202 [AC_CHECK_LIB([dld], [dld_link],
3203 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3212 if test "x$lt_cv_dlopen" != xno; then
3218 case $lt_cv_dlopen in
3220 save_CPPFLAGS="$CPPFLAGS"
3221 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3223 save_LDFLAGS="$LDFLAGS"
3224 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3227 LIBS="$lt_cv_dlopen_libs $LIBS"
3229 AC_CACHE_CHECK([whether a program can dlopen itself],
3230 lt_cv_dlopen_self, [dnl
3231 _LT_TRY_DLOPEN_SELF(
3232 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3233 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3236 if test "x$lt_cv_dlopen_self" = xyes; then
3237 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3238 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3239 lt_cv_dlopen_self_static, [dnl
3240 _LT_TRY_DLOPEN_SELF(
3241 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3242 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3246 CPPFLAGS="$save_CPPFLAGS"
3247 LDFLAGS="$save_LDFLAGS"
3252 case $lt_cv_dlopen_self in
3253 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3254 *) enable_dlopen_self=unknown ;;
3257 case $lt_cv_dlopen_self_static in
3258 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3259 *) enable_dlopen_self_static=unknown ;;
3262 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3263 [Whether dlopen is supported])
3264 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3265 [Whether dlopen of programs is supported])
3266 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3267 [Whether dlopen of statically linked programs is supported])
3268 ])# LT_SYS_DLOPEN_SELF
3271 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3272 dnl aclocal-1.4 backwards compatibility:
3273 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3276 # _LT_COMPILER_C_O([TAGNAME])
3277 # ---------------------------
3278 # Check to see if options -c and -o are simultaneously supported by compiler.
3279 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3280 m4_defun([_LT_COMPILER_C_O],
3281 [m4_require([_LT_DECL_SED])dnl
3282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3283 m4_require([_LT_TAG_COMPILER])dnl
3284 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3285 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3286 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3287 $RM -r conftest 2>/dev/null
3291 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3293 lt_compiler_flag="-o out/conftest2.$ac_objext"
3294 # Insert the option either (1) after the last *FLAGS variable, or
3295 # (2) before a word containing "conftest.", or (3) at the end.
3296 # Note that $ac_compile itself does not contain backslashes and begins
3297 # with a dollar sign (not a hyphen), so the echo should work correctly.
3298 lt_compile=`echo "$ac_compile" | $SED \
3299 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3300 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3301 -e 's:$: $lt_compiler_flag:'`
3302 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3303 (eval "$lt_compile" 2>out/conftest.err)
3305 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3306 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3307 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3309 # The compiler can only warn and ignore the option if not recognized
3310 # So say no if there are warnings
3311 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3312 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3313 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3314 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3317 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3319 # SGI C++ compiler will create directory out/ii_files/ for
3320 # template instantiation
3321 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3322 $RM out/* && rmdir out
3327 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3328 [Does compiler simultaneously support -c and -o options?])
3329 ])# _LT_COMPILER_C_O
3332 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3333 # ----------------------------------
3334 # Check to see if we can do hard links to lock some files if needed
3335 m4_defun([_LT_COMPILER_FILE_LOCKS],
3336 [m4_require([_LT_ENABLE_LOCK])dnl
3337 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3338 _LT_COMPILER_C_O([$1])
3340 hard_links="nottested"
3341 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3342 # do not overwrite the value of need_locks provided by the user
3343 AC_MSG_CHECKING([if we can lock with hard links])
3346 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3348 ln conftest.a conftest.b 2>&5 || hard_links=no
3349 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3350 AC_MSG_RESULT([$hard_links])
3351 if test "$hard_links" = no; then
3352 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3358 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3359 ])# _LT_COMPILER_FILE_LOCKS
3364 m4_defun([_LT_CHECK_OBJDIR],
3365 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3366 [rm -f .libs 2>/dev/null
3367 mkdir .libs 2>/dev/null
3368 if test -d .libs; then
3371 # MS-DOS does not allow filenames that begin with a dot.
3374 rmdir .libs 2>/dev/null])
3375 objdir=$lt_cv_objdir
3376 _LT_DECL([], [objdir], [0],
3377 [The name of the directory that contains temporary libtool files])dnl
3378 m4_pattern_allow([LT_OBJDIR])dnl
3379 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3380 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3381 ])# _LT_CHECK_OBJDIR
3384 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3385 # --------------------------------------
3386 # Check hardcoding attributes.
3387 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3388 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3389 _LT_TAGVAR(hardcode_action, $1)=
3390 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3391 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3392 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3394 # We can hardcode non-existent directories.
3395 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3396 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3397 # have to relink, otherwise we might link with an installed library
3398 # when we should be linking with a yet-to-be-installed one
3399 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3400 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3401 # Linking always hardcodes the temporary library directory.
3402 _LT_TAGVAR(hardcode_action, $1)=relink
3404 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3405 _LT_TAGVAR(hardcode_action, $1)=immediate
3408 # We cannot hardcode anything, or else we can only hardcode existing
3410 _LT_TAGVAR(hardcode_action, $1)=unsupported
3412 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3414 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3415 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3416 # Fast installation is not supported
3417 enable_fast_install=no
3418 elif test "$shlibpath_overrides_runpath" = yes ||
3419 test "$enable_shared" = no; then
3420 # Fast installation is not necessary
3421 enable_fast_install=needless
3423 _LT_TAGDECL([], [hardcode_action], [0],
3424 [How to hardcode a shared library path into an executable])
3425 ])# _LT_LINKER_HARDCODE_LIBPATH
3430 m4_defun([_LT_CMD_STRIPLIB],
3431 [m4_require([_LT_DECL_EGREP])
3434 AC_MSG_CHECKING([whether stripping libraries is possible])
3435 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3436 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3437 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3438 AC_MSG_RESULT([yes])
3440 # FIXME - insert some real tests, host_os isn't really good enough
3443 if test -n "$STRIP" ; then
3444 striplib="$STRIP -x"
3445 old_striplib="$STRIP -S"
3446 AC_MSG_RESULT([yes])
3456 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3457 _LT_DECL([], [striplib], [1])
3458 ])# _LT_CMD_STRIPLIB
3461 # _LT_SYS_DYNAMIC_LINKER([TAG])
3462 # -----------------------------
3463 # PORTME Fill in your ld.so characteristics
3464 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3465 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3466 m4_require([_LT_DECL_EGREP])dnl
3467 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3468 m4_require([_LT_DECL_OBJDUMP])dnl
3469 m4_require([_LT_DECL_SED])dnl
3470 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3471 AC_MSG_CHECKING([dynamic linker characteristics])
3474 if test "$GCC" = yes; then
3476 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3477 *) lt_awk_arg="/^libraries:/" ;;
3480 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3481 *) lt_sed_strip_eq="s,=/,/,g" ;;
3483 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3484 case $lt_search_path_spec in
3486 # if the path contains ";" then we assume it to be the separator
3487 # otherwise default to the standard path separator (i.e. ":") - it is
3488 # assumed that no part of a normal pathname contains ";" but that should
3489 # okay in the real world where ";" in dirpaths is itself problematic.
3490 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3493 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3496 # Ok, now we have the path, separated by spaces, we can step through it
3497 # and add multilib dir if necessary.
3498 lt_tmp_lt_search_path_spec=
3499 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3500 for lt_sys_path in $lt_search_path_spec; do
3501 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3502 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3504 test -d "$lt_sys_path" && \
3505 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3508 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3509 BEGIN {RS=" "; FS="/|\n";} {
3512 for (lt_i = NF; lt_i > 0; lt_i--) {
3513 if ($lt_i != "" && $lt_i != ".") {
3514 if ($lt_i == "..") {
3517 if (lt_count == 0) {
3518 lt_foo="/" $lt_i lt_foo;
3525 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3526 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3528 # AWK program above erroneously prepends '/' to C:/dos/paths
3531 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3532 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3534 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3536 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3539 libname_spec='lib$name'
3547 shlibpath_overrides_runpath=unknown
3549 dynamic_linker="$host_os ld.so"
3550 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3551 need_lib_prefix=unknown
3552 hardcode_into_libs=no
3554 # when you set need_version to no, make sure it does not cause -set_version
3555 # flags to be left without arguments
3556 need_version=unknown
3560 version_type=linux # correct to gnu/linux during the next big refactor
3561 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3562 shlibpath_var=LIBPATH
3564 # AIX 3 has no versioning support, so we append a major version to the name.
3565 soname_spec='${libname}${release}${shared_ext}$major'
3569 version_type=linux # correct to gnu/linux during the next big refactor
3572 hardcode_into_libs=yes
3573 if test "$host_cpu" = ia64; then
3574 # AIX 5 supports IA64
3575 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3576 shlibpath_var=LD_LIBRARY_PATH
3578 # With GCC up to 2.95.x, collect2 would create an import file
3579 # for dependence libraries. The import file would start with
3580 # the line `#! .'. This would cause the generated library to
3581 # depend on `.', always an invalid library. This was fixed in
3582 # development snapshots of GCC prior to 3.0.
3584 aix4 | aix4.[[01]] | aix4.[[01]].*)
3585 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3587 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3594 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3595 # soname into executable. Probably we can add versioning support to
3596 # collect2, so additional links can be useful in future.
3597 if test "$aix_use_runtimelinking" = yes; then
3598 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3599 # instead of lib<name>.a to let people know that these are not
3600 # typical AIX shared libraries.
3601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3603 # We preserve .a as extension for shared libraries through AIX4.2
3604 # and later when we are not doing run time linking.
3605 library_names_spec='${libname}${release}.a $libname.a'
3606 soname_spec='${libname}${release}${shared_ext}$major'
3608 shlibpath_var=LIBPATH
3615 # Since July 2007 AmigaOS4 officially supports .so libraries.
3616 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3620 library_names_spec='$libname.ixlibrary $libname.a'
3621 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3622 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'
3628 library_names_spec='${libname}${shared_ext}'
3629 dynamic_linker="$host_os ld.so"
3630 shlibpath_var=LIBRARY_PATH
3634 version_type=linux # correct to gnu/linux during the next big refactor
3636 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3637 soname_spec='${libname}${release}${shared_ext}$major'
3638 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3639 shlibpath_var=LD_LIBRARY_PATH
3640 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3641 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3642 # the default ld.so.conf also contains /usr/contrib/lib and
3643 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3644 # libtool to hard-code these into programs
3647 cygwin* | mingw* | pw32* | cegcc*)
3648 version_type=windows
3653 case $GCC,$cc_basename in
3656 library_names_spec='$libname.dll.a'
3657 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3658 postinstall_cmds='base_file=`basename \${file}`~
3659 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3660 dldir=$destdir/`dirname \$dlpath`~
3661 test -d \$dldir || mkdir -p \$dldir~
3662 $install_prog $dir/$dlname \$dldir/$dlname~
3663 chmod a+x \$dldir/$dlname~
3664 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3665 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3667 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3668 dlpath=$dir/\$dldll~
3670 shlibpath_overrides_runpath=yes
3674 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3675 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3677 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3680 # MinGW DLLs use traditional 'lib' prefix
3681 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3684 # pw32 DLLs use 'pw' prefix rather than 'lib'
3685 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3688 dynamic_linker='Win32 ld.exe'
3693 libname_spec='$name'
3694 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3695 library_names_spec='${libname}.dll.lib'
3699 sys_lib_search_path_spec=
3705 # Let DOS variable expansion print the short 8.3 style file name.
3706 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3707 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3710 # Convert to MSYS style.
3711 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3714 # Convert to unix form, then to dos form, then back to unix form
3715 # but this time dos style (no spaces!) so that the unix form looks
3716 # like /cygdrive/c/PROGRA~1:/cygdr...
3717 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3718 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3719 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3722 sys_lib_search_path_spec="$LIB"
3723 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3724 # It is most probably a Windows format PATH.
3725 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3727 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3729 # FIXME: find the short name or the path components, as spaces are
3730 # common. (e.g. "Program Files" -> "PROGRA~1")
3734 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3735 postinstall_cmds='base_file=`basename \${file}`~
3736 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3737 dldir=$destdir/`dirname \$dlpath`~
3738 test -d \$dldir || mkdir -p \$dldir~
3739 $install_prog $dir/$dlname \$dldir/$dlname'
3740 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3741 dlpath=$dir/\$dldll~
3743 shlibpath_overrides_runpath=yes
3744 dynamic_linker='Win32 link.exe'
3748 # Assume MSVC wrapper
3749 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3750 dynamic_linker='Win32 ld.exe'
3753 # FIXME: first we should search . and the directory the executable is in
3757 darwin* | rhapsody*)
3758 dynamic_linker="$host_os dyld"
3762 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3763 soname_spec='${libname}${release}${major}$shared_ext'
3764 shlibpath_overrides_runpath=yes
3765 shlibpath_var=DYLD_LIBRARY_PATH
3766 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3768 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3769 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3773 version_type=linux # correct to gnu/linux during the next big refactor
3776 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3777 soname_spec='${libname}${release}${shared_ext}$major'
3778 shlibpath_var=LD_LIBRARY_PATH
3781 freebsd* | dragonfly*)
3782 # DragonFly does not have aout. When/if they implement a new
3783 # versioning mechanism, adjust this.
3784 if test -x /usr/bin/objformat; then
3785 objformat=`/usr/bin/objformat`
3788 freebsd[[23]].*) objformat=aout ;;
3792 version_type=freebsd-$objformat
3793 case $version_type in
3795 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3800 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3804 shlibpath_var=LD_LIBRARY_PATH
3807 shlibpath_overrides_runpath=yes
3809 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3810 shlibpath_overrides_runpath=yes
3811 hardcode_into_libs=yes
3813 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3814 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3815 shlibpath_overrides_runpath=no
3816 hardcode_into_libs=yes
3818 *) # from 4.6 on, and DragonFly
3819 shlibpath_overrides_runpath=yes
3820 hardcode_into_libs=yes
3826 version_type=linux # correct to gnu/linux during the next big refactor
3829 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3830 soname_spec='${libname}${release}${shared_ext}$major'
3831 shlibpath_var=LD_LIBRARY_PATH
3832 shlibpath_overrides_runpath=no
3833 hardcode_into_libs=yes
3837 version_type=linux # correct to gnu/linux during the next big refactor
3840 dynamic_linker="$host_os runtime_loader"
3841 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3842 soname_spec='${libname}${release}${shared_ext}$major'
3843 shlibpath_var=LIBRARY_PATH
3844 shlibpath_overrides_runpath=yes
3845 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3846 hardcode_into_libs=yes
3849 hpux9* | hpux10* | hpux11*)
3850 # Give a soname corresponding to the major version so that dld.sl refuses to
3851 # link against other versions.
3858 hardcode_into_libs=yes
3859 dynamic_linker="$host_os dld.so"
3860 shlibpath_var=LD_LIBRARY_PATH
3861 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3862 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3863 soname_spec='${libname}${release}${shared_ext}$major'
3864 if test "X$HPUX_IA64_MODE" = X32; then
3865 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3867 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3869 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3873 hardcode_into_libs=yes
3874 dynamic_linker="$host_os dld.sl"
3875 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3876 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3877 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3878 soname_spec='${libname}${release}${shared_ext}$major'
3879 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3880 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3884 dynamic_linker="$host_os dld.sl"
3885 shlibpath_var=SHLIB_PATH
3886 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3887 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3888 soname_spec='${libname}${release}${shared_ext}$major'
3891 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3892 postinstall_cmds='chmod 555 $lib'
3893 # or fails outright, so override atomically:
3894 install_override_mode=555
3898 version_type=linux # correct to gnu/linux during the next big refactor
3901 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3902 soname_spec='${libname}${release}${shared_ext}$major'
3903 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3904 shlibpath_var=LD_LIBRARY_PATH
3905 shlibpath_overrides_runpath=no
3906 hardcode_into_libs=yes
3909 irix5* | irix6* | nonstopux*)
3911 nonstopux*) version_type=nonstopux ;;
3913 if test "$lt_cv_prog_gnu_ld" = yes; then
3914 version_type=linux # correct to gnu/linux during the next big refactor
3921 soname_spec='${libname}${release}${shared_ext}$major'
3922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3924 irix5* | nonstopux*)
3928 case $LD in # libtool.m4 will add one of these switches to LD
3929 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3930 libsuff= shlibsuff= libmagic=32-bit;;
3931 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3932 libsuff=32 shlibsuff=N32 libmagic=N32;;
3933 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3934 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3935 *) libsuff= shlibsuff= libmagic=never-match;;
3939 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3940 shlibpath_overrides_runpath=no
3941 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3942 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3943 hardcode_into_libs=yes
3946 # No shared lib support for Linux oldld, aout, or coff.
3947 linux*oldld* | linux*aout* | linux*coff*)
3951 # This must be glibc/ELF.
3952 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3953 version_type=linux # correct to gnu/linux during the next big refactor
3956 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3957 soname_spec='${libname}${release}${shared_ext}$major'
3958 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3959 shlibpath_var=LD_LIBRARY_PATH
3960 shlibpath_overrides_runpath=no
3962 # Some binutils ld are patched to set DT_RUNPATH
3963 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3964 [lt_cv_shlibpath_overrides_runpath=no
3965 save_LDFLAGS=$LDFLAGS
3967 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3968 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3969 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3970 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3971 [lt_cv_shlibpath_overrides_runpath=yes])])
3972 LDFLAGS=$save_LDFLAGS
3975 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3977 # This implies no fast_install, which is unacceptable.
3978 # Some rework will be needed to allow for fast_install
3979 # before this can be enabled.
3980 hardcode_into_libs=yes
3982 # Add ABI-specific directories to the system library path.
3983 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3985 # Append ld.so.conf contents to the search path
3986 if test -f /etc/ld.so.conf; then
3987 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' ' '`
3988 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3992 # We used to test for /lib/ld.so.1 and disable shared libraries on
3993 # powerpc, because MkLinux only supported shared libraries with the
3994 # GNU dynamic linker. Since this was broken with cross compilers,
3995 # most powerpc-linux boxes support dynamic linking these days and
3996 # people can always --disable-shared, the test was removed, and we
3997 # assume the GNU/Linux dynamic linker is in use.
3998 dynamic_linker='GNU/Linux ld.so'
4005 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4006 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4007 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4008 dynamic_linker='NetBSD (a.out) ld.so'
4010 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4011 soname_spec='${libname}${release}${shared_ext}$major'
4012 dynamic_linker='NetBSD ld.elf_so'
4014 shlibpath_var=LD_LIBRARY_PATH
4015 shlibpath_overrides_runpath=yes
4016 hardcode_into_libs=yes
4020 version_type=linux # correct to gnu/linux during the next big refactor
4021 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4022 shlibpath_var=LD_LIBRARY_PATH
4023 shlibpath_overrides_runpath=yes
4030 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4031 soname_spec='${libname}${release}${shared_ext}$major'
4032 shlibpath_var=LD_LIBRARY_PATH
4033 shlibpath_overrides_runpath=no
4034 hardcode_into_libs=yes
4035 dynamic_linker='ldqnx.so'
4040 sys_lib_dlsearch_path_spec="/usr/lib"
4042 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4044 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4045 *) need_version=no ;;
4047 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4048 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4049 shlibpath_var=LD_LIBRARY_PATH
4050 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4052 openbsd2.[[89]] | openbsd2.[[89]].*)
4053 shlibpath_overrides_runpath=no
4056 shlibpath_overrides_runpath=yes
4060 shlibpath_overrides_runpath=yes
4065 libname_spec='$name'
4068 library_names_spec='$libname${shared_ext} $libname.a'
4069 dynamic_linker='OS/2 ld.exe'
4070 shlibpath_var=LIBPATH
4073 osf3* | osf4* | osf5*)
4077 soname_spec='${libname}${release}${shared_ext}$major'
4078 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4079 shlibpath_var=LD_LIBRARY_PATH
4080 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4081 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4089 version_type=linux # correct to gnu/linux during the next big refactor
4092 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4093 soname_spec='${libname}${release}${shared_ext}$major'
4094 shlibpath_var=LD_LIBRARY_PATH
4095 shlibpath_overrides_runpath=yes
4096 hardcode_into_libs=yes
4097 # ldd complains unless libraries are executable
4098 postinstall_cmds='chmod +x $lib'
4103 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4104 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4105 shlibpath_var=LD_LIBRARY_PATH
4106 shlibpath_overrides_runpath=yes
4107 if test "$with_gnu_ld" = yes; then
4114 version_type=linux # correct to gnu/linux during the next big refactor
4115 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4116 soname_spec='${libname}${release}${shared_ext}$major'
4117 shlibpath_var=LD_LIBRARY_PATH
4118 case $host_vendor in
4120 shlibpath_overrides_runpath=no
4122 runpath_var=LD_RUN_PATH
4130 shlibpath_overrides_runpath=no
4131 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4137 if test -d /usr/nec ;then
4138 version_type=linux # correct to gnu/linux during the next big refactor
4139 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4140 soname_spec='$libname${shared_ext}.$major'
4141 shlibpath_var=LD_LIBRARY_PATH
4145 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4146 version_type=freebsd-elf
4149 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4150 soname_spec='${libname}${release}${shared_ext}$major'
4151 shlibpath_var=LD_LIBRARY_PATH
4152 shlibpath_overrides_runpath=yes
4153 hardcode_into_libs=yes
4154 if test "$with_gnu_ld" = yes; then
4155 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4157 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4160 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4164 sys_lib_dlsearch_path_spec='/usr/lib'
4168 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4169 version_type=linux # correct to gnu/linux during the next big refactor
4172 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4173 shlibpath_var=LD_LIBRARY_PATH
4174 shlibpath_overrides_runpath=no
4175 hardcode_into_libs=yes
4179 version_type=linux # correct to gnu/linux during the next big refactor
4180 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4181 soname_spec='${libname}${release}${shared_ext}$major'
4182 shlibpath_var=LD_LIBRARY_PATH
4189 AC_MSG_RESULT([$dynamic_linker])
4190 test "$dynamic_linker" = no && can_build_shared=no
4192 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4193 if test "$GCC" = yes; then
4194 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4197 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4198 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4200 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4201 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4204 _LT_DECL([], [variables_saved_for_relink], [1],
4205 [Variables whose values should be saved in libtool wrapper scripts and
4206 restored at link time])
4207 _LT_DECL([], [need_lib_prefix], [0],
4208 [Do we need the "lib" prefix for modules?])
4209 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4210 _LT_DECL([], [version_type], [0], [Library versioning type])
4211 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4212 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4213 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4214 [Is shlibpath searched before the hard-coded library search path?])
4215 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4216 _LT_DECL([], [library_names_spec], [1],
4217 [[List of archive names. First name is the real one, the rest are links.
4218 The last name is the one that the linker finds with -lNAME]])
4219 _LT_DECL([], [soname_spec], [1],
4220 [[The coded name of the library, if different from the real name]])
4221 _LT_DECL([], [install_override_mode], [1],
4222 [Permission mode override for installation of shared libraries])
4223 _LT_DECL([], [postinstall_cmds], [2],
4224 [Command to use after installation of a shared archive])
4225 _LT_DECL([], [postuninstall_cmds], [2],
4226 [Command to use after uninstallation of a shared archive])
4227 _LT_DECL([], [finish_cmds], [2],
4228 [Commands used to finish a libtool library installation in a directory])
4229 _LT_DECL([], [finish_eval], [1],
4230 [[As "finish_cmds", except a single script fragment to be evaled but
4232 _LT_DECL([], [hardcode_into_libs], [0],
4233 [Whether we should hardcode library paths into libraries])
4234 _LT_DECL([], [sys_lib_search_path_spec], [2],
4235 [Compile-time system search path for libraries])
4236 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4237 [Run-time system search path for libraries])
4238 ])# _LT_SYS_DYNAMIC_LINKER
4241 # _LT_PATH_TOOL_PREFIX(TOOL)
4242 # --------------------------
4243 # find a file program which can recognize shared library
4244 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4245 [m4_require([_LT_DECL_EGREP])dnl
4246 AC_MSG_CHECKING([for $1])
4247 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4249 [[\\/*] | ?:[\\/]*])
4250 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4253 lt_save_MAGIC_CMD="$MAGIC_CMD"
4254 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4255 dnl $ac_dummy forces splitting on constant user-supplied paths.
4256 dnl POSIX.2 word splitting is done only on the output of word expansions,
4257 dnl not every word. This closes a longstanding sh security hole.
4258 ac_dummy="m4_if([$2], , $PATH, [$2])"
4259 for ac_dir in $ac_dummy; do
4261 test -z "$ac_dir" && ac_dir=.
4262 if test -f $ac_dir/$1; then
4263 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4264 if test -n "$file_magic_test_file"; then
4265 case $deplibs_check_method in
4267 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4268 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4269 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4270 $EGREP "$file_magic_regex" > /dev/null; then
4275 *** Warning: the command libtool uses to detect shared libraries,
4276 *** $file_magic_cmd, produces output that libtool cannot recognize.
4277 *** The result is that libtool may fail to recognize shared libraries
4278 *** as such. This will affect the creation of libtool libraries that
4279 *** depend on shared libraries, but programs linked with such libtool
4280 *** libraries will work regardless of this problem. Nevertheless, you
4281 *** may want to report the problem to your system manager and/or to
4282 *** bug-libtool@gnu.org
4292 MAGIC_CMD="$lt_save_MAGIC_CMD"
4295 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4296 if test -n "$MAGIC_CMD"; then
4297 AC_MSG_RESULT($MAGIC_CMD)
4301 _LT_DECL([], [MAGIC_CMD], [0],
4302 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4303 ])# _LT_PATH_TOOL_PREFIX
4306 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4307 dnl aclocal-1.4 backwards compatibility:
4308 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4313 # find a file program which can recognize a shared library
4314 m4_defun([_LT_PATH_MAGIC],
4315 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4316 if test -z "$lt_cv_path_MAGIC_CMD"; then
4317 if test -n "$ac_tool_prefix"; then
4318 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4328 # find the pathname to the GNU or non-GNU linker
4329 AC_DEFUN([LT_PATH_LD],
4330 [AC_REQUIRE([AC_PROG_CC])dnl
4331 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4332 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4333 m4_require([_LT_DECL_SED])dnl
4334 m4_require([_LT_DECL_EGREP])dnl
4335 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4337 AC_ARG_WITH([gnu-ld],
4338 [AS_HELP_STRING([--with-gnu-ld],
4339 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4340 [test "$withval" = no || with_gnu_ld=yes],
4341 [with_gnu_ld=no])dnl
4344 if test "$GCC" = yes; then
4345 # Check if gcc -print-prog-name=ld gives a path.
4346 AC_MSG_CHECKING([for ld used by $CC])
4349 # gcc leaves a trailing carriage return which upsets mingw
4350 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4352 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4355 # Accept absolute paths.
4356 [[\\/]]* | ?:[[\\/]]*)
4357 re_direlt='/[[^/]][[^/]]*/\.\./'
4358 # Canonicalize the pathname of ld
4359 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4360 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4361 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4363 test -z "$LD" && LD="$ac_prog"
4366 # If it fails, then pretend we aren't using GCC.
4370 # If it is relative, then search for the first ld in PATH.
4374 elif test "$with_gnu_ld" = yes; then
4375 AC_MSG_CHECKING([for GNU ld])
4377 AC_MSG_CHECKING([for non-GNU ld])
4379 AC_CACHE_VAL(lt_cv_path_LD,
4380 [if test -z "$LD"; then
4381 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4382 for ac_dir in $PATH; do
4384 test -z "$ac_dir" && ac_dir=.
4385 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4386 lt_cv_path_LD="$ac_dir/$ac_prog"
4387 # Check to see if the program is GNU ld. I'd rather use --version,
4388 # but apparently some variants of GNU ld only accept -v.
4389 # Break only if it was the GNU/non-GNU ld that we prefer.
4390 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4391 *GNU* | *'with BFD'*)
4392 test "$with_gnu_ld" != no && break
4395 test "$with_gnu_ld" != yes && break
4402 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4405 if test -n "$LD"; then
4410 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4414 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4418 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4419 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4420 dnl aclocal-1.4 backwards compatibility:
4421 dnl AC_DEFUN([AM_PROG_LD], [])
4422 dnl AC_DEFUN([AC_PROG_LD], [])
4427 m4_defun([_LT_PATH_LD_GNU],
4428 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4429 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4430 case `$LD -v 2>&1 </dev/null` in
4431 *GNU* | *'with BFD'*)
4432 lt_cv_prog_gnu_ld=yes
4435 lt_cv_prog_gnu_ld=no
4438 with_gnu_ld=$lt_cv_prog_gnu_ld
4444 # find reload flag for linker
4445 # -- PORTME Some linkers may need a different reload flag.
4446 m4_defun([_LT_CMD_RELOAD],
4447 [AC_CACHE_CHECK([for $LD option to reload object files],
4448 lt_cv_ld_reload_flag,
4449 [lt_cv_ld_reload_flag='-r'])
4450 reload_flag=$lt_cv_ld_reload_flag
4451 case $reload_flag in
4453 *) reload_flag=" $reload_flag" ;;
4455 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4457 cygwin* | mingw* | pw32* | cegcc*)
4458 if test "$GCC" != yes; then
4463 if test "$GCC" = yes; then
4464 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4466 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4470 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4471 _LT_TAGDECL([], [reload_cmds], [2])dnl
4475 # _LT_CHECK_MAGIC_METHOD
4476 # ----------------------
4477 # how to check for library dependencies
4478 # -- PORTME fill in with the dynamic library characteristics
4479 m4_defun([_LT_CHECK_MAGIC_METHOD],
4480 [m4_require([_LT_DECL_EGREP])
4481 m4_require([_LT_DECL_OBJDUMP])
4482 AC_CACHE_CHECK([how to recognize dependent libraries],
4483 lt_cv_deplibs_check_method,
4484 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4485 lt_cv_file_magic_test_file=
4486 lt_cv_deplibs_check_method='unknown'
4487 # Need to set the preceding variable on all platforms that support
4488 # interlibrary dependencies.
4489 # 'none' -- dependencies not supported.
4490 # `unknown' -- same as none, but documents that we really don't know.
4491 # 'pass_all' -- all dependencies passed with no checks.
4492 # 'test_compile' -- check by making test program.
4493 # 'file_magic [[regex]]' -- check by looking for files in library path
4494 # which responds to the $file_magic_cmd with a given extended regex.
4495 # If you have `file' or equivalent on your system and you're not sure
4496 # whether `pass_all' will *always* work, you probably want this one.
4500 lt_cv_deplibs_check_method=pass_all
4504 lt_cv_deplibs_check_method=pass_all
4508 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4509 lt_cv_file_magic_cmd='/usr/bin/file -L'
4510 lt_cv_file_magic_test_file=/shlib/libc.so
4514 # func_win32_libid is a shell function defined in ltmain.sh
4515 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4516 lt_cv_file_magic_cmd='func_win32_libid'
4520 # Base MSYS/MinGW do not provide the 'file' command needed by
4521 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4522 # unless we find 'file', for example because we are cross-compiling.
4523 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4524 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4525 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4526 lt_cv_file_magic_cmd='func_win32_libid'
4528 # Keep this pattern in sync with the one in func_win32_libid.
4529 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4530 lt_cv_file_magic_cmd='$OBJDUMP -f'
4535 # use the weaker test based on 'objdump'. See mingw*.
4536 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4537 lt_cv_file_magic_cmd='$OBJDUMP -f'
4540 darwin* | rhapsody*)
4541 lt_cv_deplibs_check_method=pass_all
4544 freebsd* | dragonfly*)
4545 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4548 # Not sure whether the presence of OpenBSD here was a mistake.
4549 # Let's accept both of them until this is cleared up.
4550 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4551 lt_cv_file_magic_cmd=/usr/bin/file
4552 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4556 lt_cv_deplibs_check_method=pass_all
4561 lt_cv_deplibs_check_method=pass_all
4565 lt_cv_deplibs_check_method=pass_all
4568 hpux10.20* | hpux11*)
4569 lt_cv_file_magic_cmd=/usr/bin/file
4572 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4573 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4576 [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]']
4577 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4580 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4581 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4587 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4588 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4591 irix5* | irix6* | nonstopux*)
4593 *-32|*"-32 ") libmagic=32-bit;;
4594 *-n32|*"-n32 ") libmagic=N32;;
4595 *-64|*"-64 ") libmagic=64-bit;;
4596 *) libmagic=never-match;;
4598 lt_cv_deplibs_check_method=pass_all
4601 # This must be glibc/ELF.
4602 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4603 lt_cv_deplibs_check_method=pass_all
4607 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4608 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4610 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4615 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4616 lt_cv_file_magic_cmd=/usr/bin/file
4617 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4621 lt_cv_deplibs_check_method=pass_all
4625 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4626 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4628 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4632 osf3* | osf4* | osf5*)
4633 lt_cv_deplibs_check_method=pass_all
4637 lt_cv_deplibs_check_method=pass_all
4641 lt_cv_deplibs_check_method=pass_all
4644 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4645 lt_cv_deplibs_check_method=pass_all
4649 case $host_vendor in
4651 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]]'
4652 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4655 lt_cv_deplibs_check_method=pass_all
4658 lt_cv_file_magic_cmd='/bin/file'
4659 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4662 lt_cv_file_magic_cmd='/bin/file'
4663 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4664 lt_cv_file_magic_test_file=/lib/libc.so
4667 lt_cv_deplibs_check_method=pass_all
4670 lt_cv_deplibs_check_method=pass_all
4676 lt_cv_deplibs_check_method=pass_all
4683 if test "$build" = "$host"; then
4686 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4689 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4695 file_magic_cmd=$lt_cv_file_magic_cmd
4696 deplibs_check_method=$lt_cv_deplibs_check_method
4697 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4699 _LT_DECL([], [deplibs_check_method], [1],
4700 [Method to check whether dependent libraries are shared objects])
4701 _LT_DECL([], [file_magic_cmd], [1],
4702 [Command to use when deplibs_check_method = "file_magic"])
4703 _LT_DECL([], [file_magic_glob], [1],
4704 [How to find potential files when deplibs_check_method = "file_magic"])
4705 _LT_DECL([], [want_nocaseglob], [1],
4706 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4707 ])# _LT_CHECK_MAGIC_METHOD
4712 # find the pathname to a BSD- or MS-compatible name lister
4713 AC_DEFUN([LT_PATH_NM],
4714 [AC_REQUIRE([AC_PROG_CC])dnl
4715 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4716 [if test -n "$NM"; then
4717 # Let the user override the test.
4720 lt_nm_to_check="${ac_tool_prefix}nm"
4721 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4722 lt_nm_to_check="$lt_nm_to_check nm"
4724 for lt_tmp_nm in $lt_nm_to_check; do
4725 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4726 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4728 test -z "$ac_dir" && ac_dir=.
4729 tmp_nm="$ac_dir/$lt_tmp_nm"
4730 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4731 # Check to see if the nm accepts a BSD-compat flag.
4732 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4733 # nm: unknown option "B" ignored
4734 # Tru64's nm complains that /dev/null is an invalid object file
4735 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4736 */dev/null* | *'Invalid file or object type'*)
4737 lt_cv_path_NM="$tmp_nm -B"
4741 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4743 lt_cv_path_NM="$tmp_nm -p"
4747 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4748 continue # so that we can try to find one that supports BSD flags
4757 : ${lt_cv_path_NM=no}
4759 if test "$lt_cv_path_NM" != "no"; then
4762 # Didn't find any BSD compatible name lister, look for dumpbin.
4763 if test -n "$DUMPBIN"; then :
4764 # Let the user override the test.
4766 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4767 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4769 DUMPBIN="$DUMPBIN -symbols"
4777 if test "$DUMPBIN" != ":"; then
4781 test -z "$NM" && NM=nm
4783 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4785 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4786 [lt_cv_nm_interface="BSD nm"
4787 echo "int some_variable = 0;" > conftest.$ac_ext
4788 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4789 (eval "$ac_compile" 2>conftest.err)
4790 cat conftest.err >&AS_MESSAGE_LOG_FD
4791 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4792 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4793 cat conftest.err >&AS_MESSAGE_LOG_FD
4794 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4795 cat conftest.out >&AS_MESSAGE_LOG_FD
4796 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4797 lt_cv_nm_interface="MS dumpbin"
4803 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4804 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4805 dnl aclocal-1.4 backwards compatibility:
4806 dnl AC_DEFUN([AM_PROG_NM], [])
4807 dnl AC_DEFUN([AC_PROG_NM], [])
4809 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4810 # --------------------------------
4811 # how to determine the name of the shared library
4812 # associated with a specific link library.
4813 # -- PORTME fill in with the dynamic library characteristics
4814 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4815 [m4_require([_LT_DECL_EGREP])
4816 m4_require([_LT_DECL_OBJDUMP])
4817 m4_require([_LT_DECL_DLLTOOL])
4818 AC_CACHE_CHECK([how to associate runtime and link libraries],
4819 lt_cv_sharedlib_from_linklib_cmd,
4820 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4823 cygwin* | mingw* | pw32* | cegcc*)
4824 # two different shell functions defined in ltmain.sh
4825 # decide which to use based on capabilities of $DLLTOOL
4826 case `$DLLTOOL --help 2>&1` in
4827 *--identify-strict*)
4828 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4831 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4836 # fallback: assume linklib IS sharedlib
4837 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4841 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4842 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4844 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4845 [Command to associate shared and link libraries])
4846 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4849 # _LT_PATH_MANIFEST_TOOL
4850 # ----------------------
4851 # locate the manifest tool
4852 m4_defun([_LT_PATH_MANIFEST_TOOL],
4853 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4854 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4855 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4856 [lt_cv_path_mainfest_tool=no
4857 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4858 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4859 cat conftest.err >&AS_MESSAGE_LOG_FD
4860 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4861 lt_cv_path_mainfest_tool=yes
4864 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4867 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4868 ])# _LT_PATH_MANIFEST_TOOL
4873 # check for math library
4874 AC_DEFUN([LT_LIB_M],
4875 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4878 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4879 # These system don't have libm, or don't need it
4882 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4883 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4886 AC_CHECK_LIB(m, cos, LIBM="-lm")
4893 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4894 dnl aclocal-1.4 backwards compatibility:
4895 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4898 # _LT_COMPILER_NO_RTTI([TAGNAME])
4899 # -------------------------------
4900 m4_defun([_LT_COMPILER_NO_RTTI],
4901 [m4_require([_LT_TAG_COMPILER])dnl
4903 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4905 if test "$GCC" = yes; then
4906 case $cc_basename in
4908 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4910 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4913 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4914 lt_cv_prog_compiler_rtti_exceptions,
4915 [-fno-rtti -fno-exceptions], [],
4916 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4918 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4919 [Compiler flag to turn off builtin functions])
4920 ])# _LT_COMPILER_NO_RTTI
4923 # _LT_CMD_GLOBAL_SYMBOLS
4924 # ----------------------
4925 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4926 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4927 AC_REQUIRE([AC_PROG_CC])dnl
4928 AC_REQUIRE([AC_PROG_AWK])dnl
4929 AC_REQUIRE([LT_PATH_NM])dnl
4930 AC_REQUIRE([LT_PATH_LD])dnl
4931 m4_require([_LT_DECL_SED])dnl
4932 m4_require([_LT_DECL_EGREP])dnl
4933 m4_require([_LT_TAG_COMPILER])dnl
4935 # Check for command to grab the raw symbol name followed by C symbol from nm.
4936 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4937 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4939 # These are sane defaults that work on at least a few old systems.
4940 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4942 # Character class describing NM global symbol codes.
4943 symcode='[[BCDEGRST]]'
4945 # Regexp to match symbols that can be accessed directly from C.
4946 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4948 # Define system-specific variables.
4953 cygwin* | mingw* | pw32* | cegcc*)
4954 symcode='[[ABCDGISTW]]'
4957 if test "$host_cpu" = ia64; then
4958 symcode='[[ABCDEGRST]]'
4962 symcode='[[BCDEGRST]]'
4965 symcode='[[BCDEGQRST]]'
4976 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4980 symcode='[[DFNSTU]]'
4984 # If we're using GNU nm, then use its standard symbol codes.
4985 case `$NM -V 2>&1` in
4986 *GNU* | *'with BFD'*)
4987 symcode='[[ABCDGIRSTW]]' ;;
4990 # Transform an extracted symbol line into a proper C declaration.
4991 # Some systems (esp. on ia64) link data and code symbols differently,
4992 # so use this general approach.
4993 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4995 # Transform an extracted symbol line into symbol name and symbol address
4996 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4997 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'"
4999 # Handle CRLF in mingw tool chain
5003 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5007 # Try without a prefix underscore, then with it.
5008 for ac_symprfx in "" "_"; do
5010 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5011 symxfrm="\\1 $ac_symprfx\\2 \\2"
5013 # Write the raw and C identifiers.
5014 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5015 # Fake it for dumpbin and say T for any non-static function
5016 # and D for any global variable.
5017 # Also find C++ and __fastcall symbols from MSVC++,
5018 # which start with @ or ?.
5019 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5020 " {last_section=section; section=\$ 3};"\
5021 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5022 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5023 " \$ 0!~/External *\|/{next};"\
5024 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5025 " {if(hide[section]) next};"\
5026 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5027 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5028 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5029 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5030 " ' prfx=^$ac_symprfx]"
5032 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5034 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5036 # Check to see that the pipe works correctly.
5040 cat > conftest.$ac_ext <<_LT_EOF
5045 void nm_test_func(void);
5046 void nm_test_func(void){}
5050 int main(){nm_test_var='a';nm_test_func();return(0);}
5053 if AC_TRY_EVAL(ac_compile); then
5054 # Now try to grab the symbols.
5056 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5057 # Try sorting and uniquifying the output.
5058 if sort "$nlist" | uniq > "$nlist"T; then
5059 mv -f "$nlist"T "$nlist"
5064 # Make sure that we snagged all the symbols we need.
5065 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5066 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5067 cat <<_LT_EOF > conftest.$ac_ext
5068 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5069 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5070 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5071 relocations are performed -- see ld's documentation on pseudo-relocs. */
5072 # define LT@&t@_DLSYM_CONST
5073 #elif defined(__osf__)
5074 /* This system does not cope well with relocations in const data. */
5075 # define LT@&t@_DLSYM_CONST
5077 # define LT@&t@_DLSYM_CONST const
5085 # Now generate the symbol file.
5086 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5088 cat <<_LT_EOF >> conftest.$ac_ext
5090 /* The mapping between symbol names and symbols. */
5091 LT@&t@_DLSYM_CONST struct {
5095 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5097 { "@PROGRAM@", (void *) 0 },
5099 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5100 cat <<\_LT_EOF >> conftest.$ac_ext
5104 /* This works around a problem in FreeBSD linker */
5105 #ifdef FREEBSD_WORKAROUND
5106 static const void *lt_preloaded_setup() {
5107 return lt__PROGRAM__LTX_preloaded_symbols;
5115 # Now try linking the two files.
5116 mv conftest.$ac_objext conftstm.$ac_objext
5117 lt_globsym_save_LIBS=$LIBS
5118 lt_globsym_save_CFLAGS=$CFLAGS
5119 LIBS="conftstm.$ac_objext"
5120 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5121 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5124 LIBS=$lt_globsym_save_LIBS
5125 CFLAGS=$lt_globsym_save_CFLAGS
5127 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5130 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5133 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5136 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5137 cat conftest.$ac_ext >&5
5139 rm -rf conftest* conftst*
5141 # Do not use the global_symbol_pipe unless it works.
5142 if test "$pipe_works" = yes; then
5145 lt_cv_sys_global_symbol_pipe=
5149 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5150 lt_cv_sys_global_symbol_to_cdecl=
5152 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5153 AC_MSG_RESULT(failed)
5158 # Response file support.
5159 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5160 nm_file_list_spec='@'
5161 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5162 nm_file_list_spec='@'
5165 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5166 [Take the output of nm and produce a listing of raw symbols and C names])
5167 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5168 [Transform the output of nm in a proper C declaration])
5169 _LT_DECL([global_symbol_to_c_name_address],
5170 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5171 [Transform the output of nm in a C name address pair])
5172 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5173 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5174 [Transform the output of nm in a C name address pair when lib prefix is needed])
5175 _LT_DECL([], [nm_file_list_spec], [1],
5176 [Specify filename containing input files for $NM])
5177 ]) # _LT_CMD_GLOBAL_SYMBOLS
5180 # _LT_COMPILER_PIC([TAGNAME])
5181 # ---------------------------
5182 m4_defun([_LT_COMPILER_PIC],
5183 [m4_require([_LT_TAG_COMPILER])dnl
5184 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5185 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5186 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5188 m4_if([$1], [CXX], [
5189 # C++ specific cases for pic, static, wl, etc.
5190 if test "$GXX" = yes; then
5191 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5192 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5196 # All AIX code is PIC.
5197 if test "$host_cpu" = ia64; then
5198 # AIX 5 now supports IA64 processor
5199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5206 # see comment about AmigaOS4 .so support
5207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5210 # FIXME: we need at least 68020 code to build shared libraries, but
5211 # adding the `-m68020' flag to GCC prevents building anything better,
5213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5218 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5219 # PIC is the default for these OSes.
5221 mingw* | cygwin* | os2* | pw32* | cegcc*)
5222 # This hack is so that the source file can tell whether it is being
5223 # built for inclusion in a dll (and should export symbols for example).
5224 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5225 # (--disable-auto-import) libraries
5226 m4_if([$1], [GCJ], [],
5227 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5229 darwin* | rhapsody*)
5230 # PIC is the default on this platform
5231 # Common symbols not allowed in MH_DYLIB files
5232 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5235 # DJGPP does not support shared libraries at all
5236 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5239 # PIC is the default for Haiku.
5240 # The "-static" flag exists, but is broken.
5241 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5244 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5245 # Instead, we relocate shared libraries at runtime.
5248 if test -d /usr/nec; then
5249 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5253 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5254 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5255 # sets the default TLS model and affects inlining.
5260 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5265 # QNX uses GNU C++, but need to define -shared option too, otherwise
5267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5270 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5276 # All AIX code is PIC.
5277 if test "$host_cpu" = ia64; then
5278 # AIX 5 now supports IA64 processor
5279 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5285 case $cc_basename in
5287 # Green Hills C++ Compiler
5288 # _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"
5292 mingw* | cygwin* | os2* | pw32* | cegcc*)
5293 # This hack is so that the source file can tell whether it is being
5294 # built for inclusion in a dll (and should export symbols for example).
5295 m4_if([$1], [GCJ], [],
5296 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5299 case $cc_basename in
5301 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5304 # Green Hills C++ Compiler
5305 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5311 freebsd* | dragonfly*)
5312 # FreeBSD uses GNU C++
5314 hpux9* | hpux10* | hpux11*)
5315 case $cc_basename in
5317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5318 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5319 if test "$host_cpu" != ia64; then
5320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5324 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5325 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5340 # This is c89, which is MS Visual C++ (no shared libs)
5341 # Anyone wants to do a port?
5343 irix5* | irix6* | nonstopux*)
5344 case $cc_basename in
5346 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5347 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5348 # CC pic flag -KPIC is the default.
5354 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5355 case $cc_basename in
5358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5359 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5362 # old Intel C++ for x86_64 which still supported -KPIC.
5363 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5364 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5365 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5368 # Intel C++, used to be incompatible with GCC.
5369 # ICC 10 doesn't accept -KPIC any more.
5370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5371 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5375 # Portland Group C++ compiler
5376 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5377 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5378 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5382 # Make sure the PIC flag is empty. It appears that all Alpha
5383 # Linux and Compaq Tru64 Unix objects are PIC.
5384 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5387 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5388 # IBM XL 8.0, 9.0 on PPC and BlueGene
5389 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5394 case `$CC -V 2>&1 | sed 5q` in
5397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5410 case $cc_basename in
5412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5421 # QNX uses GNU C++, but need to define -shared option too, otherwise
5423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5425 osf3* | osf4* | osf5*)
5426 case $cc_basename in
5428 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5431 # Rational C++ 2.4.1
5432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5435 # Digital/Compaq C++
5436 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5437 # Make sure the PIC flag is empty. It appears that all Alpha
5438 # Linux and Compaq Tru64 Unix objects are PIC.
5439 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5449 case $cc_basename in
5451 # Sun C++ 4.2, 5.x and Centerline C++
5452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5453 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5457 # Green Hills C++ Compiler
5458 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5465 case $cc_basename in
5468 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5469 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5479 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5480 case $cc_basename in
5482 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5483 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5484 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5489 case $cc_basename in
5491 # NonStop-UX NCC 3.20
5492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5501 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5507 if test "$GCC" = yes; then
5508 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5509 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5513 # All AIX code is PIC.
5514 if test "$host_cpu" = ia64; then
5515 # AIX 5 now supports IA64 processor
5516 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5523 # see comment about AmigaOS4 .so support
5524 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5527 # FIXME: we need at least 68020 code to build shared libraries, but
5528 # adding the `-m68020' flag to GCC prevents building anything better,
5530 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5535 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5536 # PIC is the default for these OSes.
5539 mingw* | cygwin* | pw32* | os2* | cegcc*)
5540 # This hack is so that the source file can tell whether it is being
5541 # built for inclusion in a dll (and should export symbols for example).
5542 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5543 # (--disable-auto-import) libraries
5544 m4_if([$1], [GCJ], [],
5545 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5548 darwin* | rhapsody*)
5549 # PIC is the default on this platform
5550 # Common symbols not allowed in MH_DYLIB files
5551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5555 # PIC is the default for Haiku.
5556 # The "-static" flag exists, but is broken.
5557 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5561 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5562 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5563 # sets the default TLS model and affects inlining.
5569 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5575 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5576 # Instead, we relocate shared libraries at runtime.
5580 # Just because we use GCC doesn't mean we suddenly get shared libraries
5581 # on systems that don't support them.
5582 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5587 # QNX uses GNU C++, but need to define -shared option too, otherwise
5589 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5593 if test -d /usr/nec; then
5594 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5599 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5603 case $cc_basename in
5604 nvcc*) # Cuda Compiler Driver 2.2
5605 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5606 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5607 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5612 # PORTME Check for flag to pass linker flags through the system compiler.
5615 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5616 if test "$host_cpu" = ia64; then
5617 # AIX 5 now supports IA64 processor
5618 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5620 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5624 mingw* | cygwin* | pw32* | os2* | cegcc*)
5625 # This hack is so that the source file can tell whether it is being
5626 # built for inclusion in a dll (and should export symbols for example).
5627 m4_if([$1], [GCJ], [],
5628 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5631 hpux9* | hpux10* | hpux11*)
5632 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5633 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5640 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5643 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5644 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5647 irix5* | irix6* | nonstopux*)
5648 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5649 # PIC (with -KPIC) is the default.
5650 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5653 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5654 case $cc_basename in
5655 # old Intel for x86_64 which still supported -KPIC.
5657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5661 # icc used to be incompatible with GCC.
5662 # ICC 10 doesn't accept -KPIC any more.
5664 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5665 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5666 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5668 # Lahey Fortran 8.1.
5670 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5671 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5672 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5675 # NAG Fortran compiler
5676 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5677 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5678 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5680 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5681 # Portland Group compilers (*not* the Pentium gcc compiler,
5682 # which looks to be a dead project)
5683 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5685 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5688 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5689 # All Alpha code is PIC.
5690 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5692 xl* | bgxl* | bgf* | mpixl*)
5693 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5694 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5695 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5696 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5699 case `$CC -V 2>&1 | sed 5q` in
5700 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5701 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5702 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5703 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5704 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5706 *Sun\ F* | *Sun*Fortran*)
5707 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5708 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5714 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5717 *Intel*\ [[CF]]*Compiler*)
5718 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5719 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5720 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5725 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5733 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5734 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5738 # QNX uses GNU C++, but need to define -shared option too, otherwise
5740 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5743 osf3* | osf4* | osf5*)
5744 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5745 # All OSF/1 code is PIC.
5746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5750 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5756 case $cc_basename in
5757 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5758 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5765 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5766 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5767 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5770 sysv4 | sysv4.2uw2* | sysv4.3*)
5771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5772 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5773 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5777 if test -d /usr/nec ;then
5778 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5779 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5783 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5784 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5791 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5795 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5796 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5800 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5806 # For platforms which do not support PIC, -DPIC is meaningless:
5808 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5811 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5815 AC_CACHE_CHECK([for $compiler option to produce PIC],
5816 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5817 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5818 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5821 # Check to make sure the PIC flag actually works.
5823 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5824 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5825 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5826 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5827 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5829 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5831 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5832 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5834 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5835 [Additional compiler flags for building library objects])
5837 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5838 [How to pass a linker flag through the compiler])
5840 # Check to make sure the static flag actually works.
5842 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5843 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5844 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5845 $lt_tmp_static_flag,
5847 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5848 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5849 [Compiler flag to prevent dynamic linking])
5850 ])# _LT_COMPILER_PIC
5853 # _LT_LINKER_SHLIBS([TAGNAME])
5854 # ----------------------------
5855 # See if the linker supports building shared libraries.
5856 m4_defun([_LT_LINKER_SHLIBS],
5857 [AC_REQUIRE([LT_PATH_LD])dnl
5858 AC_REQUIRE([LT_PATH_NM])dnl
5859 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5860 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5861 m4_require([_LT_DECL_EGREP])dnl
5862 m4_require([_LT_DECL_SED])dnl
5863 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5864 m4_require([_LT_TAG_COMPILER])dnl
5865 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5866 m4_if([$1], [CXX], [
5867 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5868 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5871 # If we're using GNU nm, then we don't want the "-C" option.
5872 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5873 # Also, AIX nm treats weak defined symbols like other global defined
5874 # symbols, whereas GNU nm marks them as "W".
5875 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5876 _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'
5878 _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'
5882 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5884 cygwin* | mingw* | cegcc*)
5885 case $cc_basename in
5887 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5890 _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'
5891 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5896 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5901 _LT_TAGVAR(allow_undefined_flag, $1)=
5902 _LT_TAGVAR(always_export_symbols, $1)=no
5903 _LT_TAGVAR(archive_cmds, $1)=
5904 _LT_TAGVAR(archive_expsym_cmds, $1)=
5905 _LT_TAGVAR(compiler_needs_object, $1)=no
5906 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5907 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5908 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5909 _LT_TAGVAR(hardcode_automatic, $1)=no
5910 _LT_TAGVAR(hardcode_direct, $1)=no
5911 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5912 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5913 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5914 _LT_TAGVAR(hardcode_minus_L, $1)=no
5915 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5916 _LT_TAGVAR(inherit_rpath, $1)=no
5917 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5918 _LT_TAGVAR(module_cmds, $1)=
5919 _LT_TAGVAR(module_expsym_cmds, $1)=
5920 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5921 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5922 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5923 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5924 # include_expsyms should be a list of space-separated symbols to be *always*
5925 # included in the symbol list
5926 _LT_TAGVAR(include_expsyms, $1)=
5927 # exclude_expsyms can be an extended regexp of symbols to exclude
5928 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5929 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5930 # as well as any symbol that contains `d'.
5931 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5932 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5933 # platforms (ab)use it in PIC code, but their linkers get confused if
5934 # the symbol is explicitly referenced. Since portable code cannot
5935 # rely on this symbol name, it's probably fine to never include it in
5936 # preloaded symbol tables.
5937 # Exclude shared library initialization/finalization symbols.
5938 dnl Note also adjust exclude_expsyms for C++ above.
5939 extract_expsyms_cmds=
5942 cygwin* | mingw* | pw32* | cegcc*)
5943 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5944 # When not using gcc, we currently assume that we are using
5945 # Microsoft Visual C++.
5946 if test "$GCC" != yes; then
5951 # we just hope/assume this is gcc and not c89 (= MSVC++)
5959 _LT_TAGVAR(ld_shlibs, $1)=yes
5961 # On some targets, GNU ld is compatible enough with the native linker
5962 # that we're better off using the native interface for both.
5963 lt_use_gnu_ld_interface=no
5964 if test "$with_gnu_ld" = yes; then
5967 # The AIX port of GNU ld has always aspired to compatibility
5968 # with the native linker. However, as the warning in the GNU ld
5969 # block says, versions before 2.19.5* couldn't really create working
5970 # shared libraries, regardless of the interface used.
5971 case `$LD -v 2>&1` in
5972 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5973 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5974 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5976 lt_use_gnu_ld_interface=yes
5981 lt_use_gnu_ld_interface=yes
5986 if test "$lt_use_gnu_ld_interface" = yes; then
5987 # If archive_cmds runs LD, not CC, wlarc should be empty
5990 # Set some defaults for GNU ld with shared library support. These
5991 # are reset later if shared libraries are not supported. Putting them
5992 # here allows them to be overridden if necessary.
5993 runpath_var=LD_RUN_PATH
5994 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5995 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5996 # ancient GNU ld didn't support --whole-archive et. al.
5997 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5998 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6000 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6002 supports_anon_versioning=no
6003 case `$LD -v 2>&1` in
6004 *GNU\ gold*) supports_anon_versioning=yes ;;
6005 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6006 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6007 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6008 *\ 2.11.*) ;; # other 2.11 versions
6009 *) supports_anon_versioning=yes ;;
6012 # See if GNU ld supports shared libraries.
6015 # On AIX/PPC, the GNU linker is very broken
6016 if test "$host_cpu" != ia64; then
6017 _LT_TAGVAR(ld_shlibs, $1)=no
6020 *** Warning: the GNU linker, at least up to release 2.19, is reported
6021 *** to be unable to reliably create shared libraries on AIX.
6022 *** Therefore, libtool is disabling shared libraries support. If you
6023 *** really care for shared libraries, you may want to install binutils
6024 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6025 *** You will then need to restart the configuration process.
6034 # see comment about AmigaOS4 .so support
6035 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6036 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6039 _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)'
6040 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6041 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6047 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6048 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6049 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6050 # support --undefined. This deserves some investigation. FIXME
6051 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6053 _LT_TAGVAR(ld_shlibs, $1)=no
6057 cygwin* | mingw* | pw32* | cegcc*)
6058 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6059 # as there is no search path for DLLs.
6060 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6061 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6062 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6063 _LT_TAGVAR(always_export_symbols, $1)=no
6064 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6065 _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'
6066 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6068 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6069 _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'
6070 # If the export-symbols file already is a .def file (1st line
6071 # is EXPORTS), use it as is; otherwise, prepend...
6072 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6073 cp $export_symbols $output_objdir/$soname.def;
6075 echo EXPORTS > $output_objdir/$soname.def;
6076 cat $export_symbols >> $output_objdir/$soname.def;
6078 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6080 _LT_TAGVAR(ld_shlibs, $1)=no
6085 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6086 _LT_TAGVAR(link_all_deplibs, $1)=yes
6090 _LT_TAGVAR(hardcode_direct, $1)=no
6091 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6092 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6093 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6094 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6095 # Instead, shared libraries are loaded at an image base (0x10000000 by
6096 # default) and relocated if they conflict, which is a slow very memory
6097 # consuming and fragmenting process. To avoid this, we pick a random,
6098 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6099 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6100 _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'
6101 _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'
6104 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6106 if test "$host_os" = linux-dietlibc; then
6107 case $cc_basename in
6108 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6111 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6112 && test "$tmp_diet" = no
6114 tmp_addflag=' $pic_flag'
6115 tmp_sharedflag='-shared'
6116 case $cc_basename,$host_cpu in
6117 pgcc*) # Portland Group C compiler
6118 _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'
6119 tmp_addflag=' $pic_flag'
6121 pgf77* | pgf90* | pgf95* | pgfortran*)
6122 # Portland Group f77 and f90 compilers
6123 _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'
6124 tmp_addflag=' $pic_flag -Mnomain' ;;
6125 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6126 tmp_addflag=' -i_dynamic' ;;
6127 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6128 tmp_addflag=' -i_dynamic -nofor_main' ;;
6129 ifc* | ifort*) # Intel Fortran compiler
6130 tmp_addflag=' -nofor_main' ;;
6131 lf95*) # Lahey Fortran 8.1
6132 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6133 tmp_sharedflag='--shared' ;;
6134 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6135 tmp_sharedflag='-qmkshrobj'
6137 nvcc*) # Cuda Compiler Driver 2.2
6138 _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'
6139 _LT_TAGVAR(compiler_needs_object, $1)=yes
6142 case `$CC -V 2>&1 | sed 5q` in
6143 *Sun\ C*) # Sun C 5.9
6144 _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'
6145 _LT_TAGVAR(compiler_needs_object, $1)=yes
6146 tmp_sharedflag='-G' ;;
6147 *Sun\ F*) # Sun Fortran 8.3
6148 tmp_sharedflag='-G' ;;
6150 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6152 if test "x$supports_anon_versioning" = xyes; then
6153 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6154 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6155 echo "local: *; };" >> $output_objdir/$libname.ver~
6156 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6159 case $cc_basename in
6160 xlf* | bgf* | bgxlf* | mpixlf*)
6161 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6162 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6164 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6165 if test "x$supports_anon_versioning" = xyes; then
6166 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6167 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6168 echo "local: *; };" >> $output_objdir/$libname.ver~
6169 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6174 _LT_TAGVAR(ld_shlibs, $1)=no
6179 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6180 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6183 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6184 _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'
6189 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6190 _LT_TAGVAR(ld_shlibs, $1)=no
6193 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6194 *** create shared libraries on Solaris systems. Therefore, libtool
6195 *** is disabling shared libraries support. We urge you to upgrade GNU
6196 *** binutils to release 2.9.1 or newer. Another option is to modify
6197 *** your PATH or compiler configuration so that the native linker is
6198 *** used, and then restart.
6201 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6202 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6203 _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'
6205 _LT_TAGVAR(ld_shlibs, $1)=no
6209 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6210 case `$LD -v 2>&1` in
6211 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6212 _LT_TAGVAR(ld_shlibs, $1)=no
6215 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6216 *** reliably create shared libraries on SCO systems. Therefore, libtool
6217 *** is disabling shared libraries support. We urge you to upgrade GNU
6218 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6219 *** your PATH or compiler configuration so that the native linker is
6220 *** used, and then restart.
6225 # For security reasons, it is highly recommended that you always
6226 # use absolute paths for naming shared libraries, and exclude the
6227 # DT_RUNPATH tag from executables and libraries. But doing so
6228 # requires that you compile everything twice, which is a pain.
6229 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6230 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6231 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6232 _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'
6234 _LT_TAGVAR(ld_shlibs, $1)=no
6241 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6243 _LT_TAGVAR(hardcode_direct, $1)=yes
6244 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6248 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6249 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6250 _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'
6252 _LT_TAGVAR(ld_shlibs, $1)=no
6257 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6260 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6261 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6264 # PORTME fill in a description of your system's linker (not GNU ld)
6267 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6268 _LT_TAGVAR(always_export_symbols, $1)=yes
6269 _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'
6270 # Note: this linker hardcodes the directories in LIBPATH if there
6271 # are no directories specified by -L.
6272 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6273 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6274 # Neither direct hardcoding nor static linking is supported with a
6276 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6281 if test "$host_cpu" = ia64; then
6282 # On IA64, the linker does run time linking by default, so we don't
6283 # have to do anything special.
6284 aix_use_runtimelinking=no
6285 exp_sym_flag='-Bexport'
6288 # If we're using GNU nm, then we don't want the "-C" option.
6289 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6290 # Also, AIX nm treats weak defined symbols like other global
6291 # defined symbols, whereas GNU nm marks them as "W".
6292 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6293 _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'
6295 _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'
6297 aix_use_runtimelinking=no
6299 # Test if we are trying to use run time linking or normal
6300 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6301 # need to do runtime linking.
6302 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6303 for ld_flag in $LDFLAGS; do
6304 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6305 aix_use_runtimelinking=yes
6312 exp_sym_flag='-bexport'
6313 no_entry_flag='-bnoentry'
6316 # When large executables or shared objects are built, AIX ld can
6317 # have problems creating the table of contents. If linking a library
6318 # or program results in "error TOC overflow" add -mminimal-toc to
6319 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6320 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6322 _LT_TAGVAR(archive_cmds, $1)=''
6323 _LT_TAGVAR(hardcode_direct, $1)=yes
6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6325 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6326 _LT_TAGVAR(link_all_deplibs, $1)=yes
6327 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6329 if test "$GCC" = yes; then
6330 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6331 # We only want to do this on AIX 4.2 and lower, the check
6332 # below for broken collect2 doesn't work under 4.3+
6333 collect2name=`${CC} -print-prog-name=collect2`
6334 if test -f "$collect2name" &&
6335 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6337 # We have reworked collect2
6340 # We have old collect2
6341 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6342 # It fails to find uninstalled libraries when the uninstalled
6343 # path is not listed in the libpath. Setting hardcode_minus_L
6344 # to unsupported forces relinking
6345 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6346 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6347 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6351 shared_flag='-shared'
6352 if test "$aix_use_runtimelinking" = yes; then
6353 shared_flag="$shared_flag "'${wl}-G'
6357 if test "$host_cpu" = ia64; then
6358 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6359 # chokes on -Wl,-G. The following line is correct:
6362 if test "$aix_use_runtimelinking" = yes; then
6363 shared_flag='${wl}-G'
6365 shared_flag='${wl}-bM:SRE'
6370 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6371 # It seems that -bexpall does not export symbols beginning with
6372 # underscore (_), so it is better to generate a list of symbols to export.
6373 _LT_TAGVAR(always_export_symbols, $1)=yes
6374 if test "$aix_use_runtimelinking" = yes; then
6375 # Warning - without using the other runtime loading flags (-brtl),
6376 # -berok will link without error, but may produce a broken library.
6377 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6378 # Determine the default libpath from the value encoded in an
6380 _LT_SYS_MODULE_PATH_AIX([$1])
6381 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6382 _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"
6384 if test "$host_cpu" = ia64; then
6385 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6386 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6387 _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"
6389 # Determine the default libpath from the value encoded in an
6391 _LT_SYS_MODULE_PATH_AIX([$1])
6392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6393 # Warning - without using the other run time loading flags,
6394 # -berok will link without error, but may produce a broken library.
6395 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6396 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6397 if test "$with_gnu_ld" = yes; then
6398 # We only use this code for GNU lds that support --whole-archive.
6399 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6401 # Exported symbols can be pulled into shared objects from archives
6402 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6404 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6405 # This is similar to how AIX traditionally builds its shared libraries.
6406 _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'
6414 # see comment about AmigaOS4 .so support
6415 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6416 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6419 _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)'
6420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6421 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6427 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6430 cygwin* | mingw* | pw32* | cegcc*)
6431 # When not using gcc, we currently assume that we are using
6432 # Microsoft Visual C++.
6433 # hardcode_libdir_flag_spec is actually meaningless, as there is
6434 # no search path for DLLs.
6435 case $cc_basename in
6438 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6439 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6440 _LT_TAGVAR(always_export_symbols, $1)=yes
6441 _LT_TAGVAR(file_list_spec, $1)='@'
6442 # Tell ltmain to make .lib files, not .a files.
6444 # Tell ltmain to make .dll files, not .so files.
6446 # FIXME: Setting linknames here is a bad hack.
6447 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6448 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6449 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6451 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6453 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6455 # The linker will not automatically build a static lib if we build a DLL.
6456 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6457 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6458 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6459 _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'
6461 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6462 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6463 lt_tool_outputfile="@TOOL_OUTPUT@"~
6464 case $lt_outputfile in
6467 lt_outputfile="$lt_outputfile.exe"
6468 lt_tool_outputfile="$lt_tool_outputfile.exe"
6471 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6472 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6473 $RM "$lt_outputfile.manifest";
6477 # Assume MSVC wrapper
6478 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6479 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6480 # Tell ltmain to make .lib files, not .a files.
6482 # Tell ltmain to make .dll files, not .so files.
6484 # FIXME: Setting linknames here is a bad hack.
6485 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6486 # The linker will automatically build a .lib file if we build a DLL.
6487 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6488 # FIXME: Should let the user specify the lib program.
6489 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6490 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6495 darwin* | rhapsody*)
6496 _LT_DARWIN_LINKER_FEATURES($1)
6500 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6502 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6505 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6506 # support. Future versions do this automatically, but an explicit c++rt0.o
6507 # does not break anything, and helps significantly (at the cost of a little
6510 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6512 _LT_TAGVAR(hardcode_direct, $1)=yes
6513 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6516 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6518 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6519 _LT_TAGVAR(hardcode_direct, $1)=yes
6520 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6521 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6524 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6525 freebsd* | dragonfly*)
6526 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6527 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6528 _LT_TAGVAR(hardcode_direct, $1)=yes
6529 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6533 if test "$GCC" = yes; then
6534 _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'
6536 _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'
6538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6539 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6540 _LT_TAGVAR(hardcode_direct, $1)=yes
6542 # hardcode_minus_L: Not really in the search PATH,
6543 # but as the default location of the library.
6544 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6545 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6549 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6550 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6552 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6554 if test "$with_gnu_ld" = no; then
6555 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6556 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6557 _LT_TAGVAR(hardcode_direct, $1)=yes
6558 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6559 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6560 # hardcode_minus_L: Not really in the search PATH,
6561 # but as the default location of the library.
6562 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6567 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6570 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6573 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6576 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6582 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6585 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6589 # Older versions of the 11.00 compiler do not understand -b yet
6590 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6591 _LT_LINKER_OPTION([if $CC understands -b],
6592 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6593 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6594 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6595 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6599 if test "$with_gnu_ld" = no; then
6600 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6601 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6605 _LT_TAGVAR(hardcode_direct, $1)=no
6606 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6609 _LT_TAGVAR(hardcode_direct, $1)=yes
6610 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6611 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6613 # hardcode_minus_L: Not really in the search PATH,
6614 # but as the default location of the library.
6615 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6621 irix5* | irix6* | nonstopux*)
6622 if test "$GCC" = yes; then
6623 _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'
6624 # Try to use the -exported_symbol ld option, if it does not
6625 # work, assume that -exports_file does not work either and
6626 # implicitly export all symbols.
6627 # This should be the same for all languages, so no per-tag cache variable.
6628 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6629 [lt_cv_irix_exported_symbol],
6630 [save_LDFLAGS="$LDFLAGS"
6631 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6634 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6635 [C++], [[int foo (void) { return 0; }]],
6642 [lt_cv_irix_exported_symbol=yes],
6643 [lt_cv_irix_exported_symbol=no])
6644 LDFLAGS="$save_LDFLAGS"])
6645 if test "$lt_cv_irix_exported_symbol" = yes; then
6646 _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'
6649 _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'
6650 _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'
6652 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6653 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6654 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6655 _LT_TAGVAR(inherit_rpath, $1)=yes
6656 _LT_TAGVAR(link_all_deplibs, $1)=yes
6660 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6661 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6663 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6665 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6666 _LT_TAGVAR(hardcode_direct, $1)=yes
6667 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6671 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6672 _LT_TAGVAR(hardcode_direct, $1)=yes
6673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6674 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6682 if test -f /usr/libexec/ld.so; then
6683 _LT_TAGVAR(hardcode_direct, $1)=yes
6684 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6685 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6686 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6687 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6688 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6693 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6694 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6695 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6698 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6704 _LT_TAGVAR(ld_shlibs, $1)=no
6709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6710 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6711 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6712 _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'
6713 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6717 if test "$GCC" = yes; then
6718 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6719 _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'
6721 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6722 _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'
6724 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6725 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6726 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6729 osf4* | osf5*) # as osf3* with the addition of -msym flag
6730 if test "$GCC" = yes; then
6731 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6732 _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'
6733 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6735 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6736 _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'
6737 _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~
6738 $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'
6740 # Both c and cxx compiler support -rpath directly
6741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6743 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6744 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6748 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6749 if test "$GCC" = yes; then
6751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6752 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6753 $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'
6755 case `$CC -V 2>&1` in
6758 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6759 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6760 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6764 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6765 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6766 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6771 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6773 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6775 # The compiler driver will combine and reorder linker options,
6776 # but understands `-z linker_flag'. GCC discards it without `$wl',
6777 # but is careful enough not to reorder.
6778 # Supported since Solaris 2.6 (maybe 2.5.1?)
6779 if test "$GCC" = yes; then
6780 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6782 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6786 _LT_TAGVAR(link_all_deplibs, $1)=yes
6790 if test "x$host_vendor" = xsequent; then
6791 # Use $CC to link under sequent, because it throws in some extra .o
6792 # files that make .init and .fini sections work.
6793 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6795 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6797 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6798 _LT_TAGVAR(hardcode_direct, $1)=yes
6799 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6800 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6804 case $host_vendor in
6806 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6807 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6810 ## LD is ld it makes a PLAMLIB
6811 ## CC just makes a GrossModule.
6812 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6813 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6814 _LT_TAGVAR(hardcode_direct, $1)=no
6817 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6818 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6821 runpath_var='LD_RUN_PATH'
6822 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6826 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6827 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6828 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6832 if test -d /usr/nec; then
6833 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6835 runpath_var=LD_RUN_PATH
6836 hardcode_runpath_var=yes
6837 _LT_TAGVAR(ld_shlibs, $1)=yes
6841 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6842 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6843 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6844 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6845 runpath_var='LD_RUN_PATH'
6847 if test "$GCC" = yes; then
6848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6849 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6851 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6852 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6856 sysv5* | sco3.2v5* | sco5v6*)
6857 # Note: We can NOT use -z defs as we might desire, because we do not
6858 # link with -lc, and that would cause any symbols used from libc to
6859 # always be unresolved, which means just about no library would
6860 # ever link correctly. If we're not using GNU ld we use -z text
6861 # though, which does catch some bad symbols but isn't as heavy-handed
6863 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6864 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6865 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6866 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6867 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6868 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6869 _LT_TAGVAR(link_all_deplibs, $1)=yes
6870 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6871 runpath_var='LD_RUN_PATH'
6873 if test "$GCC" = yes; then
6874 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6875 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6877 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6878 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6883 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6885 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6889 _LT_TAGVAR(ld_shlibs, $1)=no
6893 if test x$host_vendor = xsni; then
6895 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6896 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6902 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6903 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6905 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6907 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6908 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6909 _LT_DECL([], [extract_expsyms_cmds], [2],
6910 [The commands to extract the exported symbol list from a shared archive])
6913 # Do we need to explicitly link libc?
6915 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6917 # Assume -lc should be added
6918 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6920 if test "$enable_shared" = yes && test "$GCC" = yes; then
6921 case $_LT_TAGVAR(archive_cmds, $1) in
6923 # FIXME: we may have to deal with multi-command sequences.
6926 # Test whether the compiler implicitly links with -lc since on some
6927 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6928 # to ld, don't add -lc before -lgcc.
6929 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6930 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6932 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6934 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6937 libobjs=conftest.$ac_objext
6939 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6940 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6946 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6947 _LT_TAGVAR(allow_undefined_flag, $1)=
6948 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6950 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6952 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6954 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6956 cat conftest.err 1>&5
6960 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6967 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6968 [Whether or not to add -lc for building shared libraries])
6969 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6970 [enable_shared_with_static_runtimes], [0],
6971 [Whether or not to disallow shared libs when runtime libs are static])
6972 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6973 [Compiler flag to allow reflexive dlopens])
6974 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6975 [Compiler flag to generate shared objects directly from archives])
6976 _LT_TAGDECL([], [compiler_needs_object], [1],
6977 [Whether the compiler copes with passing no objects directly])
6978 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6979 [Create an old-style archive from a shared archive])
6980 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6981 [Create a temporary old-style archive to link instead of a shared archive])
6982 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6983 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6984 _LT_TAGDECL([], [module_cmds], [2],
6985 [Commands used to build a loadable module if different from building
6987 _LT_TAGDECL([], [module_expsym_cmds], [2])
6988 _LT_TAGDECL([], [with_gnu_ld], [1],
6989 [Whether we are building with GNU ld or not])
6990 _LT_TAGDECL([], [allow_undefined_flag], [1],
6991 [Flag that allows shared libraries with undefined symbols to be built])
6992 _LT_TAGDECL([], [no_undefined_flag], [1],
6993 [Flag that enforces no undefined symbols])
6994 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6995 [Flag to hardcode $libdir into a binary during linking.
6996 This must work even if $libdir does not exist])
6997 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6998 [Whether we need a single "-rpath" flag with a separated argument])
6999 _LT_TAGDECL([], [hardcode_direct], [0],
7000 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7001 DIR into the resulting binary])
7002 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7003 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7004 DIR into the resulting binary and the resulting library dependency is
7005 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7006 library is relocated])
7007 _LT_TAGDECL([], [hardcode_minus_L], [0],
7008 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7009 into the resulting binary])
7010 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7011 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7012 into the resulting binary])
7013 _LT_TAGDECL([], [hardcode_automatic], [0],
7014 [Set to "yes" if building a shared library automatically hardcodes DIR
7015 into the library and all subsequent libraries and executables linked
7017 _LT_TAGDECL([], [inherit_rpath], [0],
7018 [Set to yes if linker adds runtime paths of dependent libraries
7019 to runtime path list])
7020 _LT_TAGDECL([], [link_all_deplibs], [0],
7021 [Whether libtool must link a program against all its dependency libraries])
7022 _LT_TAGDECL([], [always_export_symbols], [0],
7023 [Set to "yes" if exported symbols are required])
7024 _LT_TAGDECL([], [export_symbols_cmds], [2],
7025 [The commands to list exported symbols])
7026 _LT_TAGDECL([], [exclude_expsyms], [1],
7027 [Symbols that should not be listed in the preloaded symbols])
7028 _LT_TAGDECL([], [include_expsyms], [1],
7029 [Symbols that must always be exported])
7030 _LT_TAGDECL([], [prelink_cmds], [2],
7031 [Commands necessary for linking programs (against libraries) with templates])
7032 _LT_TAGDECL([], [postlink_cmds], [2],
7033 [Commands necessary for finishing linking programs])
7034 _LT_TAGDECL([], [file_list_spec], [1],
7035 [Specify filename containing input files])
7036 dnl FIXME: Not yet implemented
7037 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7038 dnl [Compiler flag to generate thread safe objects])
7039 ])# _LT_LINKER_SHLIBS
7042 # _LT_LANG_C_CONFIG([TAG])
7043 # ------------------------
7044 # Ensure that the configuration variables for a C compiler are suitably
7045 # defined. These variables are subsequently used by _LT_CONFIG to write
7046 # the compiler configuration to `libtool'.
7047 m4_defun([_LT_LANG_C_CONFIG],
7048 [m4_require([_LT_DECL_EGREP])dnl
7052 # Source file extension for C test sources.
7055 # Object file extension for compiled C test sources.
7057 _LT_TAGVAR(objext, $1)=$objext
7059 # Code to be used in simple compile tests
7060 lt_simple_compile_test_code="int some_variable = 0;"
7062 # Code to be used in simple link tests
7063 lt_simple_link_test_code='int main(){return(0);}'
7066 # Save the default compiler, since it gets overwritten when the other
7067 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7068 compiler_DEFAULT=$CC
7070 # save warnings/boilerplate of simple test code
7071 _LT_COMPILER_BOILERPLATE
7072 _LT_LINKER_BOILERPLATE
7074 if test -n "$compiler"; then
7075 _LT_COMPILER_NO_RTTI($1)
7076 _LT_COMPILER_PIC($1)
7077 _LT_COMPILER_C_O($1)
7078 _LT_COMPILER_FILE_LOCKS($1)
7079 _LT_LINKER_SHLIBS($1)
7080 _LT_SYS_DYNAMIC_LINKER($1)
7081 _LT_LINKER_HARDCODE_LIBPATH($1)
7085 # Report which library types will actually be built
7086 AC_MSG_CHECKING([if libtool supports shared libraries])
7087 AC_MSG_RESULT([$can_build_shared])
7089 AC_MSG_CHECKING([whether to build shared libraries])
7090 test "$can_build_shared" = "no" && enable_shared=no
7092 # On AIX, shared libraries and static libraries use the same namespace, and
7093 # are all built from PIC.
7096 test "$enable_shared" = yes && enable_static=no
7097 if test -n "$RANLIB"; then
7098 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7099 postinstall_cmds='$RANLIB $lib'
7104 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7105 test "$enable_shared" = yes && enable_static=no
7109 AC_MSG_RESULT([$enable_shared])
7111 AC_MSG_CHECKING([whether to build static libraries])
7112 # Make sure either enable_shared or enable_static is yes.
7113 test "$enable_shared" = yes || enable_static=yes
7114 AC_MSG_RESULT([$enable_static])
7120 ])# _LT_LANG_C_CONFIG
7123 # _LT_LANG_CXX_CONFIG([TAG])
7124 # --------------------------
7125 # Ensure that the configuration variables for a C++ compiler are suitably
7126 # defined. These variables are subsequently used by _LT_CONFIG to write
7127 # the compiler configuration to `libtool'.
7128 m4_defun([_LT_LANG_CXX_CONFIG],
7129 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7130 m4_require([_LT_DECL_EGREP])dnl
7131 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7132 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7133 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7134 (test "X$CXX" != "Xg++"))) ; then
7137 _lt_caught_CXX_error=yes
7141 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7142 _LT_TAGVAR(allow_undefined_flag, $1)=
7143 _LT_TAGVAR(always_export_symbols, $1)=no
7144 _LT_TAGVAR(archive_expsym_cmds, $1)=
7145 _LT_TAGVAR(compiler_needs_object, $1)=no
7146 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7147 _LT_TAGVAR(hardcode_direct, $1)=no
7148 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7149 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7150 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7151 _LT_TAGVAR(hardcode_minus_L, $1)=no
7152 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7153 _LT_TAGVAR(hardcode_automatic, $1)=no
7154 _LT_TAGVAR(inherit_rpath, $1)=no
7155 _LT_TAGVAR(module_cmds, $1)=
7156 _LT_TAGVAR(module_expsym_cmds, $1)=
7157 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7158 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7159 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7160 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7161 _LT_TAGVAR(no_undefined_flag, $1)=
7162 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7163 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7165 # Source file extension for C++ test sources.
7168 # Object file extension for compiled C++ test sources.
7170 _LT_TAGVAR(objext, $1)=$objext
7172 # No sense in running all these tests if we already determined that
7173 # the CXX compiler isn't working. Some variables (like enable_shared)
7174 # are currently assumed to apply to all compilers on this platform,
7175 # and will be corrupted by setting them based on a non-working compiler.
7176 if test "$_lt_caught_CXX_error" != yes; then
7177 # Code to be used in simple compile tests
7178 lt_simple_compile_test_code="int some_variable = 0;"
7180 # Code to be used in simple link tests
7181 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7183 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7186 # save warnings/boilerplate of simple test code
7187 _LT_COMPILER_BOILERPLATE
7188 _LT_LINKER_BOILERPLATE
7190 # Allow CC to be a program name with arguments.
7192 lt_save_CFLAGS=$CFLAGS
7196 lt_save_with_gnu_ld=$with_gnu_ld
7197 lt_save_path_LD=$lt_cv_path_LD
7198 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7199 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7201 $as_unset lt_cv_prog_gnu_ld
7203 if test -n "${lt_cv_path_LDCXX+set}"; then
7204 lt_cv_path_LD=$lt_cv_path_LDCXX
7206 $as_unset lt_cv_path_LD
7208 test -z "${LDCXX+set}" || LD=$LDCXX
7212 _LT_TAGVAR(compiler, $1)=$CC
7213 _LT_CC_BASENAME([$compiler])
7215 if test -n "$compiler"; then
7216 # We don't want -fno-exception when compiling C++ code, so set the
7217 # no_builtin_flag separately
7218 if test "$GXX" = yes; then
7219 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7221 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7224 if test "$GXX" = yes; then
7225 # Set up default GNU C++ configuration
7229 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7230 # archiving commands below assume that GNU ld is being used.
7231 if test "$with_gnu_ld" = yes; then
7232 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7233 _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'
7235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7236 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7238 # If archive_cmds runs LD, not CC, wlarc should be empty
7239 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7240 # investigate it a little bit more. (MM)
7243 # ancient GNU ld didn't support --whole-archive et. al.
7244 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7245 $GREP 'no-whole-archive' > /dev/null; then
7246 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7248 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7254 # A generic and very simple default shared library creation
7255 # command for GNU C++ for the case where it uses the native
7256 # linker, instead of GNU ld. If possible, this setting should
7257 # overridden to take advantage of the native linker features on
7258 # the platform it is being used on.
7259 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7262 # Commands to make compiler produce verbose output that lists
7263 # what "hidden" libraries, object files and flags are used when
7264 # linking a shared library.
7265 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7273 # PORTME: fill in a description of your system's C++ link characteristics
7274 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7275 _LT_TAGVAR(ld_shlibs, $1)=yes
7278 # FIXME: insert proper C++ library support
7279 _LT_TAGVAR(ld_shlibs, $1)=no
7282 if test "$host_cpu" = ia64; then
7283 # On IA64, the linker does run time linking by default, so we don't
7284 # have to do anything special.
7285 aix_use_runtimelinking=no
7286 exp_sym_flag='-Bexport'
7289 aix_use_runtimelinking=no
7291 # Test if we are trying to use run time linking or normal
7292 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7293 # need to do runtime linking.
7294 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7295 for ld_flag in $LDFLAGS; do
7298 aix_use_runtimelinking=yes
7306 exp_sym_flag='-bexport'
7307 no_entry_flag='-bnoentry'
7310 # When large executables or shared objects are built, AIX ld can
7311 # have problems creating the table of contents. If linking a library
7312 # or program results in "error TOC overflow" add -mminimal-toc to
7313 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7314 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7316 _LT_TAGVAR(archive_cmds, $1)=''
7317 _LT_TAGVAR(hardcode_direct, $1)=yes
7318 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7319 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7320 _LT_TAGVAR(link_all_deplibs, $1)=yes
7321 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7323 if test "$GXX" = yes; then
7324 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7325 # We only want to do this on AIX 4.2 and lower, the check
7326 # below for broken collect2 doesn't work under 4.3+
7327 collect2name=`${CC} -print-prog-name=collect2`
7328 if test -f "$collect2name" &&
7329 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7331 # We have reworked collect2
7334 # We have old collect2
7335 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7336 # It fails to find uninstalled libraries when the uninstalled
7337 # path is not listed in the libpath. Setting hardcode_minus_L
7338 # to unsupported forces relinking
7339 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7340 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7341 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7344 shared_flag='-shared'
7345 if test "$aix_use_runtimelinking" = yes; then
7346 shared_flag="$shared_flag "'${wl}-G'
7350 if test "$host_cpu" = ia64; then
7351 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7352 # chokes on -Wl,-G. The following line is correct:
7355 if test "$aix_use_runtimelinking" = yes; then
7356 shared_flag='${wl}-G'
7358 shared_flag='${wl}-bM:SRE'
7363 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7364 # It seems that -bexpall does not export symbols beginning with
7365 # underscore (_), so it is better to generate a list of symbols to
7367 _LT_TAGVAR(always_export_symbols, $1)=yes
7368 if test "$aix_use_runtimelinking" = yes; then
7369 # Warning - without using the other runtime loading flags (-brtl),
7370 # -berok will link without error, but may produce a broken library.
7371 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7372 # Determine the default libpath from the value encoded in an empty
7374 _LT_SYS_MODULE_PATH_AIX([$1])
7375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7377 _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"
7379 if test "$host_cpu" = ia64; then
7380 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7381 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7382 _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"
7384 # Determine the default libpath from the value encoded in an
7386 _LT_SYS_MODULE_PATH_AIX([$1])
7387 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7388 # Warning - without using the other run time loading flags,
7389 # -berok will link without error, but may produce a broken library.
7390 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7391 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7392 if test "$with_gnu_ld" = yes; then
7393 # We only use this code for GNU lds that support --whole-archive.
7394 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7396 # Exported symbols can be pulled into shared objects from archives
7397 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7399 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7400 # This is similar to how AIX traditionally builds its shared
7402 _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'
7408 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7409 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7410 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7411 # support --undefined. This deserves some investigation. FIXME
7412 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7414 _LT_TAGVAR(ld_shlibs, $1)=no
7419 case $cc_basename in
7421 # FIXME: insert proper C++ library support
7422 _LT_TAGVAR(ld_shlibs, $1)=no
7427 cygwin* | mingw* | pw32* | cegcc*)
7428 case $GXX,$cc_basename in
7431 # hardcode_libdir_flag_spec is actually meaningless, as there is
7432 # no search path for DLLs.
7433 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7434 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7435 _LT_TAGVAR(always_export_symbols, $1)=yes
7436 _LT_TAGVAR(file_list_spec, $1)='@'
7437 # Tell ltmain to make .lib files, not .a files.
7439 # Tell ltmain to make .dll files, not .so files.
7441 # FIXME: Setting linknames here is a bad hack.
7442 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7443 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7444 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7446 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7448 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7450 # The linker will not automatically build a static lib if we build a DLL.
7451 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7452 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7454 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7455 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7456 lt_tool_outputfile="@TOOL_OUTPUT@"~
7457 case $lt_outputfile in
7460 lt_outputfile="$lt_outputfile.exe"
7461 lt_tool_outputfile="$lt_tool_outputfile.exe"
7464 func_to_tool_file "$lt_outputfile"~
7465 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7466 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7467 $RM "$lt_outputfile.manifest";
7472 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7473 # as there is no search path for DLLs.
7474 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7475 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7476 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7477 _LT_TAGVAR(always_export_symbols, $1)=no
7478 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7480 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7481 _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'
7482 # If the export-symbols file already is a .def file (1st line
7483 # is EXPORTS), use it as is; otherwise, prepend...
7484 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7485 cp $export_symbols $output_objdir/$soname.def;
7487 echo EXPORTS > $output_objdir/$soname.def;
7488 cat $export_symbols >> $output_objdir/$soname.def;
7490 $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'
7492 _LT_TAGVAR(ld_shlibs, $1)=no
7497 darwin* | rhapsody*)
7498 _LT_DARWIN_LINKER_FEATURES($1)
7502 case $cc_basename in
7504 # FIXME: insert proper C++ library support
7505 _LT_TAGVAR(ld_shlibs, $1)=no
7508 # Green Hills C++ Compiler
7509 # FIXME: insert proper C++ library support
7510 _LT_TAGVAR(ld_shlibs, $1)=no
7513 # FIXME: insert proper C++ library support
7514 _LT_TAGVAR(ld_shlibs, $1)=no
7520 # C++ shared libraries reported to be fairly broken before
7522 _LT_TAGVAR(ld_shlibs, $1)=no
7526 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7529 freebsd* | dragonfly*)
7530 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7532 _LT_TAGVAR(ld_shlibs, $1)=yes
7539 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7540 _LT_TAGVAR(link_all_deplibs, $1)=yes
7544 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7545 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7546 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7547 _LT_TAGVAR(hardcode_direct, $1)=yes
7548 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7549 # but as the default
7550 # location of the library.
7552 case $cc_basename in
7554 # FIXME: insert proper C++ library support
7555 _LT_TAGVAR(ld_shlibs, $1)=no
7558 _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'
7559 # Commands to make compiler produce verbose output that lists
7560 # what "hidden" libraries, object files and flags are used when
7561 # linking a shared library.
7563 # There doesn't appear to be a way to prevent this compiler from
7564 # explicitly linking system object files so we need to strip them
7565 # from the output so that they don't get included in the library
7567 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"'
7570 if test "$GXX" = yes; then
7571 _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'
7573 # FIXME: insert proper C++ library support
7574 _LT_TAGVAR(ld_shlibs, $1)=no
7581 if test $with_gnu_ld = no; then
7582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7583 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7589 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7595 _LT_TAGVAR(hardcode_direct, $1)=no
7596 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7599 _LT_TAGVAR(hardcode_direct, $1)=yes
7600 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7601 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7602 # but as the default
7603 # location of the library.
7607 case $cc_basename in
7609 # FIXME: insert proper C++ library support
7610 _LT_TAGVAR(ld_shlibs, $1)=no
7615 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7618 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7621 _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'
7624 # Commands to make compiler produce verbose output that lists
7625 # what "hidden" libraries, object files and flags are used when
7626 # linking a shared library.
7628 # There doesn't appear to be a way to prevent this compiler from
7629 # explicitly linking system object files so we need to strip them
7630 # from the output so that they don't get included in the library
7632 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"'
7635 if test "$GXX" = yes; then
7636 if test $with_gnu_ld = no; then
7639 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7642 _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'
7645 _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'
7650 # FIXME: insert proper C++ library support
7651 _LT_TAGVAR(ld_shlibs, $1)=no
7658 _LT_TAGVAR(hardcode_direct, $1)=no
7659 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7661 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7662 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7663 # Instead, shared libraries are loaded at an image base (0x10000000 by
7664 # default) and relocated if they conflict, which is a slow very memory
7665 # consuming and fragmenting process. To avoid this, we pick a random,
7666 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7667 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7668 _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'
7669 _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'
7672 case $cc_basename in
7675 _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'
7677 # Archives containing C++ object files must be created using
7678 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7679 # necessary to make sure instantiated templates are included
7681 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7684 if test "$GXX" = yes; then
7685 if test "$with_gnu_ld" = no; then
7686 _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'
7688 _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'
7691 _LT_TAGVAR(link_all_deplibs, $1)=yes
7694 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7695 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7696 _LT_TAGVAR(inherit_rpath, $1)=yes
7699 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7700 case $cc_basename in
7702 # Kuck and Associates, Inc. (KAI) C++ Compiler
7704 # KCC will only create a shared library if the output file
7705 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7706 # to its proper name (with version) after linking.
7707 _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'
7708 _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'
7709 # Commands to make compiler produce verbose output that lists
7710 # what "hidden" libraries, object files and flags are used when
7711 # linking a shared library.
7713 # There doesn't appear to be a way to prevent this compiler from
7714 # explicitly linking system object files so we need to strip them
7715 # from the output so that they don't get included in the library
7717 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"'
7719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7720 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7722 # Archives containing C++ object files must be created using
7723 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7724 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7729 # version 8.0 and above of icpc choke on multiply defined symbols
7730 # if we add $predep_objects and $postdep_objects, however 7.1 and
7731 # earlier do not add the objects themselves.
7732 case `$CC -V 2>&1` in
7734 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7735 _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'
7737 *) # Version 8.0 or newer
7740 ia64*) tmp_idyn=' -i_dynamic';;
7742 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7743 _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'
7746 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7748 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7749 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7752 # Portland Group C++ compiler
7754 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7755 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7757 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7758 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7759 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7761 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7762 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7764 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7766 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7767 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7768 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7770 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7771 $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'
7773 *) # Version 6 and above use weak symbols
7774 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7775 _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'
7779 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7780 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7781 _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'
7785 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7786 _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'
7788 runpath_var=LD_RUN_PATH
7789 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7790 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7792 # Commands to make compiler produce verbose output that lists
7793 # what "hidden" libraries, object files and flags are used when
7794 # linking a shared library.
7796 # There doesn't appear to be a way to prevent this compiler from
7797 # explicitly linking system object files so we need to strip them
7798 # from the output so that they don't get included in the library
7800 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'
7802 xl* | mpixl* | bgxl*)
7803 # IBM XL 8.0 on PPC, with GNU ld
7804 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7805 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7806 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7807 if test "x$supports_anon_versioning" = xyes; then
7808 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7809 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7810 echo "local: *; };" >> $output_objdir/$libname.ver~
7811 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7815 case `$CC -V 2>&1 | sed 5q` in
7818 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7819 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7820 _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'
7821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7822 _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'
7823 _LT_TAGVAR(compiler_needs_object, $1)=yes
7825 # Not sure whether something based on
7826 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7828 output_verbose_link_cmd='func_echo_all'
7830 # Archives containing C++ object files must be created using
7831 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7832 # necessary to make sure instantiated templates are included
7834 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7842 # FIXME: insert proper C++ library support
7843 _LT_TAGVAR(ld_shlibs, $1)=no
7847 # FIXME: insert proper C++ library support
7848 _LT_TAGVAR(ld_shlibs, $1)=no
7852 case $cc_basename in
7854 # FIXME: insert proper C++ library support
7855 _LT_TAGVAR(ld_shlibs, $1)=no
7858 # FIXME: insert proper C++ library support
7859 _LT_TAGVAR(ld_shlibs, $1)=no
7865 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7866 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7869 _LT_TAGVAR(hardcode_direct, $1)=yes
7870 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7872 # Workaround some broken pre-1.5 toolchains
7873 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7877 _LT_TAGVAR(ld_shlibs, $1)=yes
7881 # C++ shared libraries are fairly broken
7882 _LT_TAGVAR(ld_shlibs, $1)=no
7886 if test -f /usr/libexec/ld.so; then
7887 _LT_TAGVAR(hardcode_direct, $1)=yes
7888 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7889 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7891 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7892 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7893 _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'
7894 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7895 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7897 output_verbose_link_cmd=func_echo_all
7899 _LT_TAGVAR(ld_shlibs, $1)=no
7903 osf3* | osf4* | osf5*)
7904 case $cc_basename in
7906 # Kuck and Associates, Inc. (KAI) C++ Compiler
7908 # KCC will only create a shared library if the output file
7909 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7910 # to its proper name (with version) after linking.
7911 _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'
7913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7914 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7916 # Archives containing C++ object files must be created using
7917 # the KAI C++ compiler.
7919 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7920 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7924 # Rational C++ 2.4.1
7925 # FIXME: insert proper C++ library support
7926 _LT_TAGVAR(ld_shlibs, $1)=no
7931 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7932 _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'
7933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7936 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7937 _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'
7938 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7939 echo "-hidden">> $lib.exp~
7940 $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~
7942 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7946 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7948 # Commands to make compiler produce verbose output that lists
7949 # what "hidden" libraries, object files and flags are used when
7950 # linking a shared library.
7952 # There doesn't appear to be a way to prevent this compiler from
7953 # explicitly linking system object files so we need to strip them
7954 # from the output so that they don't get included in the library
7956 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"'
7959 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7960 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7963 _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'
7966 _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'
7970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7971 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7973 # Commands to make compiler produce verbose output that lists
7974 # what "hidden" libraries, object files and flags are used when
7975 # linking a shared library.
7976 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7979 # FIXME: insert proper C++ library support
7980 _LT_TAGVAR(ld_shlibs, $1)=no
7987 # FIXME: insert proper C++ library support
7988 _LT_TAGVAR(ld_shlibs, $1)=no
7992 case $cc_basename in
7995 # FIXME: insert proper C++ library support
7996 _LT_TAGVAR(ld_shlibs, $1)=no
8000 # FIXME: insert proper C++ library support
8001 _LT_TAGVAR(ld_shlibs, $1)=no
8004 # FIXME: insert proper C++ library support
8005 _LT_TAGVAR(ld_shlibs, $1)=no
8011 case $cc_basename in
8013 # Sun C++ 4.2, 5.x and Centerline C++
8014 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8015 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8016 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8017 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8018 $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'
8020 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8021 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8023 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8025 # The compiler driver will combine and reorder linker options,
8026 # but understands `-z linker_flag'.
8027 # Supported since Solaris 2.6 (maybe 2.5.1?)
8028 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8031 _LT_TAGVAR(link_all_deplibs, $1)=yes
8033 output_verbose_link_cmd='func_echo_all'
8035 # Archives containing C++ object files must be created using
8036 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8037 # necessary to make sure instantiated templates are included
8039 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8042 # Green Hills C++ Compiler
8043 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8045 # The C++ compiler must be used to create the archive.
8046 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8049 # GNU C++ compiler with Solaris linker
8050 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8051 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8052 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8053 _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'
8054 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8055 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8057 # Commands to make compiler produce verbose output that lists
8058 # what "hidden" libraries, object files and flags are used when
8059 # linking a shared library.
8060 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8062 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8064 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8065 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8066 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8068 # Commands to make compiler produce verbose output that lists
8069 # what "hidden" libraries, object files and flags are used when
8070 # linking a shared library.
8071 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8074 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8076 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8078 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8086 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8087 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8088 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8089 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8090 runpath_var='LD_RUN_PATH'
8092 case $cc_basename in
8094 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8095 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8098 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8099 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8104 sysv5* | sco3.2v5* | sco5v6*)
8105 # Note: We can NOT use -z defs as we might desire, because we do not
8106 # link with -lc, and that would cause any symbols used from libc to
8107 # always be unresolved, which means just about no library would
8108 # ever link correctly. If we're not using GNU ld we use -z text
8109 # though, which does catch some bad symbols but isn't as heavy-handed
8111 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8112 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8113 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8114 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8116 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8117 _LT_TAGVAR(link_all_deplibs, $1)=yes
8118 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8119 runpath_var='LD_RUN_PATH'
8121 case $cc_basename in
8123 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8124 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8125 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8126 '"$_LT_TAGVAR(old_archive_cmds, $1)"
8127 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8128 '"$_LT_TAGVAR(reload_cmds, $1)"
8131 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8132 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8138 case $cc_basename in
8140 # NonStop-UX NCC 3.20
8141 # FIXME: insert proper C++ library support
8142 _LT_TAGVAR(ld_shlibs, $1)=no
8145 # FIXME: insert proper C++ library support
8146 _LT_TAGVAR(ld_shlibs, $1)=no
8152 # FIXME: insert proper C++ library support
8153 _LT_TAGVAR(ld_shlibs, $1)=no
8157 # FIXME: insert proper C++ library support
8158 _LT_TAGVAR(ld_shlibs, $1)=no
8162 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8163 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8165 _LT_TAGVAR(GCC, $1)="$GXX"
8166 _LT_TAGVAR(LD, $1)="$LD"
8169 ## There is no encapsulation within the following macros, do not change
8170 ## the running order or otherwise move them around unless you know exactly
8171 ## what you are doing...
8172 _LT_SYS_HIDDEN_LIBDEPS($1)
8173 _LT_COMPILER_PIC($1)
8174 _LT_COMPILER_C_O($1)
8175 _LT_COMPILER_FILE_LOCKS($1)
8176 _LT_LINKER_SHLIBS($1)
8177 _LT_SYS_DYNAMIC_LINKER($1)
8178 _LT_LINKER_HARDCODE_LIBPATH($1)
8181 fi # test -n "$compiler"
8184 CFLAGS=$lt_save_CFLAGS
8188 with_gnu_ld=$lt_save_with_gnu_ld
8189 lt_cv_path_LDCXX=$lt_cv_path_LD
8190 lt_cv_path_LD=$lt_save_path_LD
8191 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8192 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8193 fi # test "$_lt_caught_CXX_error" != yes
8196 ])# _LT_LANG_CXX_CONFIG
8199 # _LT_FUNC_STRIPNAME_CNF
8200 # ----------------------
8201 # func_stripname_cnf prefix suffix name
8202 # strip PREFIX and SUFFIX off of NAME.
8203 # PREFIX and SUFFIX must not contain globbing or regex special
8204 # characters, hashes, percent signs, but SUFFIX may contain a leading
8205 # dot (in which case that matches only a dot).
8207 # This function is identical to the (non-XSI) version of func_stripname,
8208 # except this one can be used by m4 code that may be executed by configure,
8209 # rather than the libtool script.
8210 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8211 AC_REQUIRE([_LT_DECL_SED])
8212 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8213 func_stripname_cnf ()
8216 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8217 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8219 } # func_stripname_cnf
8220 ])# _LT_FUNC_STRIPNAME_CNF
8222 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8223 # ---------------------------------
8224 # Figure out "hidden" library dependencies from verbose
8225 # compiler output when linking a shared library.
8226 # Parse the compiler output and extract the necessary
8227 # objects, libraries and library flags.
8228 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8229 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8230 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8231 # Dependencies to place before and after the object being linked:
8232 _LT_TAGVAR(predep_objects, $1)=
8233 _LT_TAGVAR(postdep_objects, $1)=
8234 _LT_TAGVAR(predeps, $1)=
8235 _LT_TAGVAR(postdeps, $1)=
8236 _LT_TAGVAR(compiler_lib_search_path, $1)=
8238 dnl we can't use the lt_simple_compile_test_code here,
8239 dnl because it contains code intended for an executable,
8240 dnl not a library. It's possible we should let each
8241 dnl tag define a new lt_????_link_test_code variable,
8242 dnl but it's only used here...
8243 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8245 void foo (void) { a = 0; }
8247 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8251 Foo (void) { a = 0; }
8256 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8264 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8272 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8275 public void bar (void) {
8280 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8287 _lt_libdeps_save_CFLAGS=$CFLAGS
8288 case "$CC $CFLAGS " in #(
8289 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8290 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8291 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8294 dnl Parse the compiler output and extract the necessary
8295 dnl objects, libraries and library flags.
8296 if AC_TRY_EVAL(ac_compile); then
8297 # Parse the compiler output and extract the necessary
8298 # objects, libraries and library flags.
8300 # Sentinel used to keep track of whether or not we are before
8301 # the conftest object file.
8302 pre_test_object_deps_done=no
8304 for p in `eval "$output_verbose_link_cmd"`; do
8308 # Some compilers place space between "-{L,R}" and the path.
8310 if test $p = "-L" ||
8311 test $p = "-R"; then
8316 # Expand the sysroot to ease extracting the directories later.
8317 if test -z "$prev"; then
8319 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8320 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8321 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8325 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8327 if test "$pre_test_object_deps_done" = no; then
8330 # Internal compiler library paths should come after those
8331 # provided the user. The postdeps already come after the
8332 # user supplied libs so there is no need to process them.
8333 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8334 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8336 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8339 # The "-l" case would never come before the object being
8340 # linked, so don't bother handling this case.
8343 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8344 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8346 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8352 *.lto.$objext) ;; # Ignore GCC LTO objects
8354 # This assumes that the test object file only shows up
8355 # once in the compiler output.
8356 if test "$p" = "conftest.$objext"; then
8357 pre_test_object_deps_done=yes
8361 if test "$pre_test_object_deps_done" = no; then
8362 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8363 _LT_TAGVAR(predep_objects, $1)="$p"
8365 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8368 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8369 _LT_TAGVAR(postdep_objects, $1)="$p"
8371 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8376 *) ;; # Ignore the rest.
8384 echo "libtool.m4: error: problem compiling $1 test program"
8387 $RM -f confest.$objext
8388 CFLAGS=$_lt_libdeps_save_CFLAGS
8390 # PORTME: override above test on systems where it is broken
8394 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8395 # hack all around it, let's just trust "g++" to DTRT.
8396 _LT_TAGVAR(predep_objects,$1)=
8397 _LT_TAGVAR(postdep_objects,$1)=
8398 _LT_TAGVAR(postdeps,$1)=
8402 case `$CC -V 2>&1 | sed 5q` in
8406 # The more standards-conforming stlport4 library is
8407 # incompatible with the Cstd library. Avoid specifying
8408 # it if it's in CXXFLAGS. Ignore libCrun as
8409 # -library=stlport4 depends on it.
8410 case " $CXX $CXXFLAGS " in
8411 *" -library=stlport4 "*)
8412 solaris_use_stlport4=yes
8416 if test "$solaris_use_stlport4" != yes; then
8417 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8424 case $cc_basename in
8426 # The more standards-conforming stlport4 library is
8427 # incompatible with the Cstd library. Avoid specifying
8428 # it if it's in CXXFLAGS. Ignore libCrun as
8429 # -library=stlport4 depends on it.
8430 case " $CXX $CXXFLAGS " in
8431 *" -library=stlport4 "*)
8432 solaris_use_stlport4=yes
8436 # Adding this requires a known-good setup of shared libraries for
8437 # Sun compiler versions before 5.6, else PIC objects from an old
8438 # archive will be linked into the output, leading to subtle bugs.
8439 if test "$solaris_use_stlport4" != yes; then
8440 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8448 case " $_LT_TAGVAR(postdeps, $1) " in
8449 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8451 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8452 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8453 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8455 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8456 [The directories searched by this compiler when creating a shared library])
8457 _LT_TAGDECL([], [predep_objects], [1],
8458 [Dependencies to place before and after the objects being linked to
8459 create a shared library])
8460 _LT_TAGDECL([], [postdep_objects], [1])
8461 _LT_TAGDECL([], [predeps], [1])
8462 _LT_TAGDECL([], [postdeps], [1])
8463 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8464 [The library search path used internally by the compiler when linking
8466 ])# _LT_SYS_HIDDEN_LIBDEPS
8469 # _LT_LANG_F77_CONFIG([TAG])
8470 # --------------------------
8471 # Ensure that the configuration variables for a Fortran 77 compiler are
8472 # suitably defined. These variables are subsequently used by _LT_CONFIG
8473 # to write the compiler configuration to `libtool'.
8474 m4_defun([_LT_LANG_F77_CONFIG],
8475 [AC_LANG_PUSH(Fortran 77)
8476 if test -z "$F77" || test "X$F77" = "Xno"; then
8480 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8481 _LT_TAGVAR(allow_undefined_flag, $1)=
8482 _LT_TAGVAR(always_export_symbols, $1)=no
8483 _LT_TAGVAR(archive_expsym_cmds, $1)=
8484 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8485 _LT_TAGVAR(hardcode_direct, $1)=no
8486 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8488 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8489 _LT_TAGVAR(hardcode_minus_L, $1)=no
8490 _LT_TAGVAR(hardcode_automatic, $1)=no
8491 _LT_TAGVAR(inherit_rpath, $1)=no
8492 _LT_TAGVAR(module_cmds, $1)=
8493 _LT_TAGVAR(module_expsym_cmds, $1)=
8494 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8495 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8496 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8497 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8498 _LT_TAGVAR(no_undefined_flag, $1)=
8499 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8500 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8502 # Source file extension for f77 test sources.
8505 # Object file extension for compiled f77 test sources.
8507 _LT_TAGVAR(objext, $1)=$objext
8509 # No sense in running all these tests if we already determined that
8510 # the F77 compiler isn't working. Some variables (like enable_shared)
8511 # are currently assumed to apply to all compilers on this platform,
8512 # and will be corrupted by setting them based on a non-working compiler.
8513 if test "$_lt_disable_F77" != yes; then
8514 # Code to be used in simple compile tests
8515 lt_simple_compile_test_code="\
8521 # Code to be used in simple link tests
8522 lt_simple_link_test_code="\
8527 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8530 # save warnings/boilerplate of simple test code
8531 _LT_COMPILER_BOILERPLATE
8532 _LT_LINKER_BOILERPLATE
8534 # Allow CC to be a program name with arguments.
8537 lt_save_CFLAGS=$CFLAGS
8541 _LT_TAGVAR(compiler, $1)=$CC
8542 _LT_CC_BASENAME([$compiler])
8544 if test -n "$compiler"; then
8545 AC_MSG_CHECKING([if libtool supports shared libraries])
8546 AC_MSG_RESULT([$can_build_shared])
8548 AC_MSG_CHECKING([whether to build shared libraries])
8549 test "$can_build_shared" = "no" && enable_shared=no
8551 # On AIX, shared libraries and static libraries use the same namespace, and
8552 # are all built from PIC.
8555 test "$enable_shared" = yes && enable_static=no
8556 if test -n "$RANLIB"; then
8557 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8558 postinstall_cmds='$RANLIB $lib'
8562 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8563 test "$enable_shared" = yes && enable_static=no
8567 AC_MSG_RESULT([$enable_shared])
8569 AC_MSG_CHECKING([whether to build static libraries])
8570 # Make sure either enable_shared or enable_static is yes.
8571 test "$enable_shared" = yes || enable_static=yes
8572 AC_MSG_RESULT([$enable_static])
8574 _LT_TAGVAR(GCC, $1)="$G77"
8575 _LT_TAGVAR(LD, $1)="$LD"
8578 ## There is no encapsulation within the following macros, do not change
8579 ## the running order or otherwise move them around unless you know exactly
8580 ## what you are doing...
8581 _LT_COMPILER_PIC($1)
8582 _LT_COMPILER_C_O($1)
8583 _LT_COMPILER_FILE_LOCKS($1)
8584 _LT_LINKER_SHLIBS($1)
8585 _LT_SYS_DYNAMIC_LINKER($1)
8586 _LT_LINKER_HARDCODE_LIBPATH($1)
8589 fi # test -n "$compiler"
8593 CFLAGS="$lt_save_CFLAGS"
8594 fi # test "$_lt_disable_F77" != yes
8597 ])# _LT_LANG_F77_CONFIG
8600 # _LT_LANG_FC_CONFIG([TAG])
8601 # -------------------------
8602 # Ensure that the configuration variables for a Fortran compiler are
8603 # suitably defined. These variables are subsequently used by _LT_CONFIG
8604 # to write the compiler configuration to `libtool'.
8605 m4_defun([_LT_LANG_FC_CONFIG],
8606 [AC_LANG_PUSH(Fortran)
8608 if test -z "$FC" || test "X$FC" = "Xno"; then
8612 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8613 _LT_TAGVAR(allow_undefined_flag, $1)=
8614 _LT_TAGVAR(always_export_symbols, $1)=no
8615 _LT_TAGVAR(archive_expsym_cmds, $1)=
8616 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8617 _LT_TAGVAR(hardcode_direct, $1)=no
8618 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8620 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8621 _LT_TAGVAR(hardcode_minus_L, $1)=no
8622 _LT_TAGVAR(hardcode_automatic, $1)=no
8623 _LT_TAGVAR(inherit_rpath, $1)=no
8624 _LT_TAGVAR(module_cmds, $1)=
8625 _LT_TAGVAR(module_expsym_cmds, $1)=
8626 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8627 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8628 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8629 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8630 _LT_TAGVAR(no_undefined_flag, $1)=
8631 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8632 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8634 # Source file extension for fc test sources.
8635 ac_ext=${ac_fc_srcext-f}
8637 # Object file extension for compiled fc test sources.
8639 _LT_TAGVAR(objext, $1)=$objext
8641 # No sense in running all these tests if we already determined that
8642 # the FC compiler isn't working. Some variables (like enable_shared)
8643 # are currently assumed to apply to all compilers on this platform,
8644 # and will be corrupted by setting them based on a non-working compiler.
8645 if test "$_lt_disable_FC" != yes; then
8646 # Code to be used in simple compile tests
8647 lt_simple_compile_test_code="\
8653 # Code to be used in simple link tests
8654 lt_simple_link_test_code="\
8659 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8662 # save warnings/boilerplate of simple test code
8663 _LT_COMPILER_BOILERPLATE
8664 _LT_LINKER_BOILERPLATE
8666 # Allow CC to be a program name with arguments.
8669 lt_save_CFLAGS=$CFLAGS
8673 GCC=$ac_cv_fc_compiler_gnu
8675 _LT_TAGVAR(compiler, $1)=$CC
8676 _LT_CC_BASENAME([$compiler])
8678 if test -n "$compiler"; then
8679 AC_MSG_CHECKING([if libtool supports shared libraries])
8680 AC_MSG_RESULT([$can_build_shared])
8682 AC_MSG_CHECKING([whether to build shared libraries])
8683 test "$can_build_shared" = "no" && enable_shared=no
8685 # On AIX, shared libraries and static libraries use the same namespace, and
8686 # are all built from PIC.
8689 test "$enable_shared" = yes && enable_static=no
8690 if test -n "$RANLIB"; then
8691 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8692 postinstall_cmds='$RANLIB $lib'
8696 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8697 test "$enable_shared" = yes && enable_static=no
8701 AC_MSG_RESULT([$enable_shared])
8703 AC_MSG_CHECKING([whether to build static libraries])
8704 # Make sure either enable_shared or enable_static is yes.
8705 test "$enable_shared" = yes || enable_static=yes
8706 AC_MSG_RESULT([$enable_static])
8708 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8709 _LT_TAGVAR(LD, $1)="$LD"
8712 ## There is no encapsulation within the following macros, do not change
8713 ## the running order or otherwise move them around unless you know exactly
8714 ## what you are doing...
8715 _LT_SYS_HIDDEN_LIBDEPS($1)
8716 _LT_COMPILER_PIC($1)
8717 _LT_COMPILER_C_O($1)
8718 _LT_COMPILER_FILE_LOCKS($1)
8719 _LT_LINKER_SHLIBS($1)
8720 _LT_SYS_DYNAMIC_LINKER($1)
8721 _LT_LINKER_HARDCODE_LIBPATH($1)
8724 fi # test -n "$compiler"
8728 CFLAGS=$lt_save_CFLAGS
8729 fi # test "$_lt_disable_FC" != yes
8732 ])# _LT_LANG_FC_CONFIG
8735 # _LT_LANG_GCJ_CONFIG([TAG])
8736 # --------------------------
8737 # Ensure that the configuration variables for the GNU Java Compiler compiler
8738 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8739 # to write the compiler configuration to `libtool'.
8740 m4_defun([_LT_LANG_GCJ_CONFIG],
8741 [AC_REQUIRE([LT_PROG_GCJ])dnl
8744 # Source file extension for Java test sources.
8747 # Object file extension for compiled Java test sources.
8749 _LT_TAGVAR(objext, $1)=$objext
8751 # Code to be used in simple compile tests
8752 lt_simple_compile_test_code="class foo {}"
8754 # Code to be used in simple link tests
8755 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8757 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8760 # save warnings/boilerplate of simple test code
8761 _LT_COMPILER_BOILERPLATE
8762 _LT_LINKER_BOILERPLATE
8764 # Allow CC to be a program name with arguments.
8766 lt_save_CFLAGS=$CFLAGS
8772 _LT_TAGVAR(compiler, $1)=$CC
8773 _LT_TAGVAR(LD, $1)="$LD"
8774 _LT_CC_BASENAME([$compiler])
8776 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8777 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8779 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8780 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8781 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8783 if test -n "$compiler"; then
8784 _LT_COMPILER_NO_RTTI($1)
8785 _LT_COMPILER_PIC($1)
8786 _LT_COMPILER_C_O($1)
8787 _LT_COMPILER_FILE_LOCKS($1)
8788 _LT_LINKER_SHLIBS($1)
8789 _LT_LINKER_HARDCODE_LIBPATH($1)
8798 CFLAGS=$lt_save_CFLAGS
8799 ])# _LT_LANG_GCJ_CONFIG
8802 # _LT_LANG_GO_CONFIG([TAG])
8803 # --------------------------
8804 # Ensure that the configuration variables for the GNU Go compiler
8805 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8806 # to write the compiler configuration to `libtool'.
8807 m4_defun([_LT_LANG_GO_CONFIG],
8808 [AC_REQUIRE([LT_PROG_GO])dnl
8811 # Source file extension for Go test sources.
8814 # Object file extension for compiled Go test sources.
8816 _LT_TAGVAR(objext, $1)=$objext
8818 # Code to be used in simple compile tests
8819 lt_simple_compile_test_code="package main; func main() { }"
8821 # Code to be used in simple link tests
8822 lt_simple_link_test_code='package main; func main() { }'
8824 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8827 # save warnings/boilerplate of simple test code
8828 _LT_COMPILER_BOILERPLATE
8829 _LT_LINKER_BOILERPLATE
8831 # Allow CC to be a program name with arguments.
8833 lt_save_CFLAGS=$CFLAGS
8839 _LT_TAGVAR(compiler, $1)=$CC
8840 _LT_TAGVAR(LD, $1)="$LD"
8841 _LT_CC_BASENAME([$compiler])
8843 # Go did not exist at the time GCC didn't implicitly link libc in.
8844 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8846 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8847 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8848 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8850 if test -n "$compiler"; then
8851 _LT_COMPILER_NO_RTTI($1)
8852 _LT_COMPILER_PIC($1)
8853 _LT_COMPILER_C_O($1)
8854 _LT_COMPILER_FILE_LOCKS($1)
8855 _LT_LINKER_SHLIBS($1)
8856 _LT_LINKER_HARDCODE_LIBPATH($1)
8865 CFLAGS=$lt_save_CFLAGS
8866 ])# _LT_LANG_GO_CONFIG
8869 # _LT_LANG_RC_CONFIG([TAG])
8870 # -------------------------
8871 # Ensure that the configuration variables for the Windows resource compiler
8872 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8873 # to write the compiler configuration to `libtool'.
8874 m4_defun([_LT_LANG_RC_CONFIG],
8875 [AC_REQUIRE([LT_PROG_RC])dnl
8878 # Source file extension for RC test sources.
8881 # Object file extension for compiled RC test sources.
8883 _LT_TAGVAR(objext, $1)=$objext
8885 # Code to be used in simple compile tests
8886 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8888 # Code to be used in simple link tests
8889 lt_simple_link_test_code="$lt_simple_compile_test_code"
8891 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8894 # save warnings/boilerplate of simple test code
8895 _LT_COMPILER_BOILERPLATE
8896 _LT_LINKER_BOILERPLATE
8898 # Allow CC to be a program name with arguments.
8900 lt_save_CFLAGS=$CFLAGS
8906 _LT_TAGVAR(compiler, $1)=$CC
8907 _LT_CC_BASENAME([$compiler])
8908 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8910 if test -n "$compiler"; then
8918 CFLAGS=$lt_save_CFLAGS
8919 ])# _LT_LANG_RC_CONFIG
8924 AC_DEFUN([LT_PROG_GCJ],
8925 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8926 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8927 [AC_CHECK_TOOL(GCJ, gcj,)
8928 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8929 AC_SUBST(GCJFLAGS)])])[]dnl
8933 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8934 dnl aclocal-1.4 backwards compatibility:
8935 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8940 AC_DEFUN([LT_PROG_GO],
8941 [AC_CHECK_TOOL(GOC, gccgo,)
8947 AC_DEFUN([LT_PROG_RC],
8948 [AC_CHECK_TOOL(RC, windres,)
8952 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8953 dnl aclocal-1.4 backwards compatibility:
8954 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8959 # If we don't have a new enough Autoconf to choose the best grep
8960 # available, choose the one first in the user's PATH.
8961 m4_defun([_LT_DECL_EGREP],
8962 [AC_REQUIRE([AC_PROG_EGREP])dnl
8963 AC_REQUIRE([AC_PROG_FGREP])dnl
8964 test -z "$GREP" && GREP=grep
8965 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8966 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8967 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8968 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8975 # If we don't have a new enough Autoconf to choose the best objdump
8976 # available, choose the one first in the user's PATH.
8977 m4_defun([_LT_DECL_OBJDUMP],
8978 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8979 test -z "$OBJDUMP" && OBJDUMP=objdump
8980 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8986 # Ensure DLLTOOL variable is set.
8987 m4_defun([_LT_DECL_DLLTOOL],
8988 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8989 test -z "$DLLTOOL" && DLLTOOL=dlltool
8990 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8996 # Check for a fully-functional sed program, that truncates
8997 # as few characters as possible. Prefer GNU sed if found.
8998 m4_defun([_LT_DECL_SED],
9000 test -z "$SED" && SED=sed
9001 Xsed="$SED -e 1s/^X//"
9002 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9003 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9004 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9007 m4_ifndef([AC_PROG_SED], [
9008 # NOTE: This macro has been submitted for inclusion into #
9009 # GNU Autoconf as AC_PROG_SED. When it is available in #
9010 # a released version of Autoconf we should remove this #
9011 # macro and use it instead. #
9013 m4_defun([AC_PROG_SED],
9014 [AC_MSG_CHECKING([for a sed that does not truncate output])
9015 AC_CACHE_VAL(lt_cv_path_SED,
9016 [# Loop through the user's path and test for sed and gsed.
9017 # Then use that list of sed's as ones to test for truncation.
9018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9022 test -z "$as_dir" && as_dir=.
9023 for lt_ac_prog in sed gsed; do
9024 for ac_exec_ext in '' $ac_executable_extensions; do
9025 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9026 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9034 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9035 # along with /bin/sed that truncates output.
9036 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9037 test ! -f $lt_ac_sed && continue
9038 cat /dev/null > conftest.in
9040 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9041 # Check for GNU sed and select it if it is found.
9042 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9043 lt_cv_path_SED=$lt_ac_sed
9047 cat conftest.in conftest.in >conftest.tmp
9048 mv conftest.tmp conftest.in
9049 cp conftest.in conftest.nl
9051 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9052 cmp -s conftest.out conftest.nl || break
9053 # 10000 chars as input seems more than enough
9054 test $lt_ac_count -gt 10 && break
9055 lt_ac_count=`expr $lt_ac_count + 1`
9056 if test $lt_ac_count -gt $lt_ac_max; then
9057 lt_ac_max=$lt_ac_count
9058 lt_cv_path_SED=$lt_ac_sed
9065 AC_MSG_RESULT([$SED])
9070 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9071 dnl aclocal-1.4 backwards compatibility:
9072 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9075 # _LT_CHECK_SHELL_FEATURES
9076 # ------------------------
9077 # Find out whether the shell is Bourne or XSI compatible,
9078 # or has some other useful features.
9079 m4_defun([_LT_CHECK_SHELL_FEATURES],
9080 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9081 # Try some XSI features
9084 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9086 && eval 'test $(( 1 + 1 )) -eq 2 \
9087 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9089 AC_MSG_RESULT([$xsi_shell])
9090 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9092 AC_MSG_CHECKING([whether the shell understands "+="])
9094 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9096 && lt_shell_append=yes
9097 AC_MSG_RESULT([$lt_shell_append])
9098 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9100 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9105 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9107 # test EBCDIC or ASCII
9108 case `echo X|tr X '\101'` in
9109 A) # ASCII based system
9110 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9111 lt_SP2NL='tr \040 \012'
9112 lt_NL2SP='tr \015\012 \040\040'
9114 *) # EBCDIC based system
9115 lt_SP2NL='tr \100 \n'
9116 lt_NL2SP='tr \r\n \100\100'
9119 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9120 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9121 ])# _LT_CHECK_SHELL_FEATURES
9124 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9125 # ------------------------------------------------------
9126 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9127 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9128 m4_defun([_LT_PROG_FUNCTION_REPLACE],
9130 sed -e '/^$1 ()$/,/^} # $1 /c\
9133 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
9134 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9135 && mv -f "$cfgfile.tmp" "$cfgfile" \
9136 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9137 test 0 -eq $? || _lt_function_replace_fail=:
9141 # _LT_PROG_REPLACE_SHELLFNS
9142 # -------------------------
9143 # Replace existing portable implementations of several shell functions with
9144 # equivalent extended shell implementations where those features are available..
9145 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9146 [if test x"$xsi_shell" = xyes; then
9147 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9149 */*) func_dirname_result="${1%/*}${2}" ;;
9150 * ) func_dirname_result="${3}" ;;
9153 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9154 func_basename_result="${1##*/}"])
9156 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9158 */*) func_dirname_result="${1%/*}${2}" ;;
9159 * ) func_dirname_result="${3}" ;;
9161 func_basename_result="${1##*/}"])
9163 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9164 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9165 # positional parameters, so assign one to ordinary parameter first.
9166 func_stripname_result=${3}
9167 func_stripname_result=${func_stripname_result#"${1}"}
9168 func_stripname_result=${func_stripname_result%"${2}"}])
9170 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9171 func_split_long_opt_name=${1%%=*}
9172 func_split_long_opt_arg=${1#*=}])
9174 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9175 func_split_short_opt_arg=${1#??}
9176 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9178 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9180 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9181 *) func_lo2o_result=${1} ;;
9184 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
9186 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
9188 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
9191 if test x"$lt_shell_append" = xyes; then
9192 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
9194 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9195 func_quote_for_eval "${2}"
9196 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9197 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9199 # Save a `func_append' function call where possible by direct use of '+='
9200 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9201 && mv -f "$cfgfile.tmp" "$cfgfile" \
9202 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9203 test 0 -eq $? || _lt_function_replace_fail=:
9205 # Save a `func_append' function call even when '+=' is not available
9206 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9207 && mv -f "$cfgfile.tmp" "$cfgfile" \
9208 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9209 test 0 -eq $? || _lt_function_replace_fail=:
9212 if test x"$_lt_function_replace_fail" = x":"; then
9213 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9217 # _LT_PATH_CONVERSION_FUNCTIONS
9218 # -----------------------------
9219 # Determine which file name conversion functions should be used by
9220 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
9221 # for certain cross-compile configurations and native mingw.
9222 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9223 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9224 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9225 AC_MSG_CHECKING([how to convert $build file names to $host format])
9226 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9230 *-*-mingw* ) # actually msys
9231 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9234 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9236 * ) # otherwise, assume *nix
9237 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9243 *-*-mingw* ) # actually msys
9244 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9247 lt_cv_to_host_file_cmd=func_convert_file_noop
9249 * ) # otherwise, assume *nix
9250 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9254 * ) # unhandled hosts (and "normal" native builds)
9255 lt_cv_to_host_file_cmd=func_convert_file_noop
9259 to_host_file_cmd=$lt_cv_to_host_file_cmd
9260 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9261 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9262 [0], [convert $build file names to $host format])dnl
9264 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9265 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9266 [#assume ordinary cross tools, or native build.
9267 lt_cv_to_tool_file_cmd=func_convert_file_noop
9271 *-*-mingw* ) # actually msys
9272 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9278 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9279 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9280 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9281 [0], [convert $build files to toolchain format])dnl
9282 ])# _LT_PATH_CONVERSION_FUNCTIONS
9284 # Helper functions for option handling. -*- Autoconf -*-
9286 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9288 # Written by Gary V. Vaughan, 2004
9290 # This file is free software; the Free Software Foundation gives
9291 # unlimited permission to copy and/or distribute it, with or without
9292 # modifications, as long as this notice is preserved.
9294 # serial 7 ltoptions.m4
9296 # This is to help aclocal find these macros, as it can't see m4_define.
9297 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9300 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9301 # ------------------------------------------
9302 m4_define([_LT_MANGLE_OPTION],
9303 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9306 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9307 # ---------------------------------------
9308 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9309 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9311 m4_define([_LT_SET_OPTION],
9312 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9313 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9314 _LT_MANGLE_DEFUN([$1], [$2]),
9315 [m4_warning([Unknown $1 option `$2'])])[]dnl
9319 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9320 # ------------------------------------------------------------
9321 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9322 m4_define([_LT_IF_OPTION],
9323 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9326 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9327 # -------------------------------------------------------
9328 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9330 m4_define([_LT_UNLESS_OPTIONS],
9331 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9332 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9333 [m4_define([$0_found])])])[]dnl
9334 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9339 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9340 # ----------------------------------------
9341 # OPTION-LIST is a space-separated list of Libtool options associated
9342 # with MACRO-NAME. If any OPTION has a matching handler declared with
9343 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9344 # the unknown option and exit.
9345 m4_defun([_LT_SET_OPTIONS],
9347 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9348 [_LT_SET_OPTION([$1], _LT_Option)])
9350 m4_if([$1],[LT_INIT],[
9352 dnl Simply set some default values (i.e off) if boolean options were not
9354 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9356 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9359 dnl If no reference was made to various pairs of opposing options, then
9360 dnl we run the default mode handler for the pair. For example, if neither
9361 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9362 dnl archives by default:
9363 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9364 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9365 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9366 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9367 [_LT_ENABLE_FAST_INSTALL])
9373 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9374 # -----------------------------------------
9375 m4_define([_LT_MANGLE_DEFUN],
9376 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9379 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9380 # -----------------------------------------------
9381 m4_define([LT_OPTION_DEFINE],
9382 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9383 ])# LT_OPTION_DEFINE
9388 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9391 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9392 [_LT_SET_OPTION([LT_INIT], [dlopen])
9393 AC_DIAGNOSE([obsolete],
9394 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9395 put the `dlopen' option into LT_INIT's first parameter.])
9398 dnl aclocal-1.4 backwards compatibility:
9399 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9404 # Declare package support for building win32 dll's.
9405 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9406 [enable_win32_dll=yes
9409 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9410 AC_CHECK_TOOL(AS, as, false)
9411 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9412 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9416 test -z "$AS" && AS=as
9417 _LT_DECL([], [AS], [1], [Assembler program])dnl
9419 test -z "$DLLTOOL" && DLLTOOL=dlltool
9420 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9422 test -z "$OBJDUMP" && OBJDUMP=objdump
9423 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9426 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9427 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9428 _LT_SET_OPTION([LT_INIT], [win32-dll])
9429 AC_DIAGNOSE([obsolete],
9430 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9431 put the `win32-dll' option into LT_INIT's first parameter.])
9434 dnl aclocal-1.4 backwards compatibility:
9435 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9438 # _LT_ENABLE_SHARED([DEFAULT])
9439 # ----------------------------
9440 # implement the --enable-shared flag, and supports the `shared' and
9441 # `disable-shared' LT_INIT options.
9442 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9443 m4_define([_LT_ENABLE_SHARED],
9444 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9445 AC_ARG_ENABLE([shared],
9446 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9447 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9448 [p=${PACKAGE-default}
9450 yes) enable_shared=yes ;;
9451 no) enable_shared=no ;;
9454 # Look at the argument we got. We use all the common list separators.
9455 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9456 for pkg in $enableval; do
9458 if test "X$pkg" = "X$p"; then
9465 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9467 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9468 [Whether or not to build shared libraries])
9469 ])# _LT_ENABLE_SHARED
9471 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9472 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9475 AC_DEFUN([AC_ENABLE_SHARED],
9476 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9479 AC_DEFUN([AC_DISABLE_SHARED],
9480 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9483 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9484 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9486 dnl aclocal-1.4 backwards compatibility:
9487 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9488 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9492 # _LT_ENABLE_STATIC([DEFAULT])
9493 # ----------------------------
9494 # implement the --enable-static flag, and support the `static' and
9495 # `disable-static' LT_INIT options.
9496 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9497 m4_define([_LT_ENABLE_STATIC],
9498 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9499 AC_ARG_ENABLE([static],
9500 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9501 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9502 [p=${PACKAGE-default}
9504 yes) enable_static=yes ;;
9505 no) enable_static=no ;;
9508 # Look at the argument we got. We use all the common list separators.
9509 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9510 for pkg in $enableval; do
9512 if test "X$pkg" = "X$p"; then
9519 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9521 _LT_DECL([build_old_libs], [enable_static], [0],
9522 [Whether or not to build static libraries])
9523 ])# _LT_ENABLE_STATIC
9525 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9526 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9529 AC_DEFUN([AC_ENABLE_STATIC],
9530 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9533 AC_DEFUN([AC_DISABLE_STATIC],
9534 [_LT_SET_OPTION([LT_INIT], [disable-static])
9537 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9538 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9540 dnl aclocal-1.4 backwards compatibility:
9541 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9542 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9546 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9547 # ----------------------------------
9548 # implement the --enable-fast-install flag, and support the `fast-install'
9549 # and `disable-fast-install' LT_INIT options.
9550 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9551 m4_define([_LT_ENABLE_FAST_INSTALL],
9552 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9553 AC_ARG_ENABLE([fast-install],
9554 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9555 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9556 [p=${PACKAGE-default}
9558 yes) enable_fast_install=yes ;;
9559 no) enable_fast_install=no ;;
9561 enable_fast_install=no
9562 # Look at the argument we got. We use all the common list separators.
9563 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9564 for pkg in $enableval; do
9566 if test "X$pkg" = "X$p"; then
9567 enable_fast_install=yes
9573 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9575 _LT_DECL([fast_install], [enable_fast_install], [0],
9576 [Whether or not to optimize for fast installation])dnl
9577 ])# _LT_ENABLE_FAST_INSTALL
9579 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9580 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9583 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9584 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9585 AC_DIAGNOSE([obsolete],
9586 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9587 the `fast-install' option into LT_INIT's first parameter.])
9590 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9591 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9592 AC_DIAGNOSE([obsolete],
9593 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9594 the `disable-fast-install' option into LT_INIT's first parameter.])
9597 dnl aclocal-1.4 backwards compatibility:
9598 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9599 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9602 # _LT_WITH_PIC([MODE])
9603 # --------------------
9604 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9606 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9607 m4_define([_LT_WITH_PIC],
9609 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9610 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9611 [lt_p=${PACKAGE-default}
9613 yes|no) pic_mode=$withval ;;
9616 # Look at the argument we got. We use all the common list separators.
9617 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9618 for lt_pkg in $withval; do
9620 if test "X$lt_pkg" = "X$lt_p"; then
9629 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9631 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9634 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9635 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9638 AU_DEFUN([AC_LIBTOOL_PICMODE],
9639 [_LT_SET_OPTION([LT_INIT], [pic-only])
9640 AC_DIAGNOSE([obsolete],
9641 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9642 put the `pic-only' option into LT_INIT's first parameter.])
9645 dnl aclocal-1.4 backwards compatibility:
9646 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9649 m4_define([_LTDL_MODE], [])
9650 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9651 [m4_define([_LTDL_MODE], [nonrecursive])])
9652 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9653 [m4_define([_LTDL_MODE], [recursive])])
9654 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9655 [m4_define([_LTDL_MODE], [subproject])])
9657 m4_define([_LTDL_TYPE], [])
9658 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9659 [m4_define([_LTDL_TYPE], [installable])])
9660 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9661 [m4_define([_LTDL_TYPE], [convenience])])
9663 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9665 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9666 # Written by Gary V. Vaughan, 2004
9668 # This file is free software; the Free Software Foundation gives
9669 # unlimited permission to copy and/or distribute it, with or without
9670 # modifications, as long as this notice is preserved.
9672 # serial 6 ltsugar.m4
9674 # This is to help aclocal find these macros, as it can't see m4_define.
9675 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9678 # lt_join(SEP, ARG1, [ARG2...])
9679 # -----------------------------
9680 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9681 # associated separator.
9682 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9683 # versions in m4sugar had bugs.
9684 m4_define([lt_join],
9685 [m4_if([$#], [1], [],
9687 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9688 m4_define([_lt_join],
9689 [m4_if([$#$2], [2], [],
9690 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9696 # Manipulate m4 lists.
9697 # These macros are necessary as long as will still need to support
9698 # Autoconf-2.59 which quotes differently.
9699 m4_define([lt_car], [[$1]])
9701 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9703 [m4_dquote(m4_shift($@))])])
9704 m4_define([lt_unquote], $1)
9707 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9708 # ------------------------------------------
9709 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9710 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9711 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9712 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9713 # than defined and empty).
9715 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9716 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9717 m4_define([lt_append],
9719 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9723 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9724 # ----------------------------------------------------------
9725 # Produce a SEP delimited list of all paired combinations of elements of
9726 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9727 # has the form PREFIXmINFIXSUFFIXn.
9728 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9729 m4_define([lt_combine],
9730 [m4_if(m4_eval([$# > 3]), [1],
9731 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9732 [[m4_foreach([_Lt_prefix], [$2],
9733 [m4_foreach([_Lt_suffix],
9734 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9735 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9738 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9739 # -----------------------------------------------------------------------
9740 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9741 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9742 m4_define([lt_if_append_uniq],
9744 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9745 [lt_append([$1], [$2], [$3])$4],
9747 [lt_append([$1], [$2], [$3])$4])])
9750 # lt_dict_add(DICT, KEY, VALUE)
9751 # -----------------------------
9752 m4_define([lt_dict_add],
9753 [m4_define([$1($2)], [$3])])
9756 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9757 # --------------------------------------------
9758 m4_define([lt_dict_add_subkey],
9759 [m4_define([$1($2:$3)], [$4])])
9762 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9763 # ----------------------------------
9764 m4_define([lt_dict_fetch],
9766 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9767 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9770 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9771 # -----------------------------------------------------------------
9772 m4_define([lt_if_dict_fetch],
9773 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9778 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9779 # --------------------------------------------------------------
9780 m4_define([lt_dict_filter],
9781 [m4_if([$5], [], [],
9782 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9783 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9784 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9787 # ltversion.m4 -- version numbers -*- Autoconf -*-
9789 # Copyright (C) 2004 Free Software Foundation, Inc.
9790 # Written by Scott James Remnant, 2004
9792 # This file is free software; the Free Software Foundation gives
9793 # unlimited permission to copy and/or distribute it, with or without
9794 # modifications, as long as this notice is preserved.
9798 # serial 3337 ltversion.m4
9799 # This file is part of GNU Libtool
9801 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9802 m4_define([LT_PACKAGE_REVISION], [1.3337])
9804 AC_DEFUN([LTVERSION_VERSION],
9805 [macro_version='2.4.2'
9806 macro_revision='1.3337'
9807 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9808 _LT_DECL(, macro_revision, 0)
9811 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9813 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9814 # Written by Scott James Remnant, 2004.
9816 # This file is free software; the Free Software Foundation gives
9817 # unlimited permission to copy and/or distribute it, with or without
9818 # modifications, as long as this notice is preserved.
9820 # serial 5 lt~obsolete.m4
9822 # These exist entirely to fool aclocal when bootstrapping libtool.
9824 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9825 # which have later been changed to m4_define as they aren't part of the
9826 # exported API, or moved to Autoconf or Automake where they belong.
9828 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9829 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9830 # using a macro with the same name in our local m4/libtool.m4 it'll
9831 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9832 # and doesn't know about Autoconf macros at all.)
9834 # So we provide this file, which has a silly filename so it's always
9835 # included after everything else. This provides aclocal with the
9836 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9837 # because those macros already exist, or will be overwritten later.
9838 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9840 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9841 # Yes, that means every name once taken will need to remain here until
9842 # we give up compatibility with versions before 1.7, at which point
9843 # we need to keep only those names which we still refer to.
9845 # This is to help aclocal find these macros, as it can't see m4_define.
9846 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9848 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9849 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9850 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9851 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9852 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9853 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9854 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9855 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9856 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9857 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9858 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9859 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9860 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9861 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9862 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9863 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9864 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9865 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9866 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9867 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9868 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9869 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9870 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9871 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9872 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9873 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9874 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9875 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9876 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9877 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9878 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9879 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9880 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9881 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9882 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9883 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9884 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9885 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9886 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9887 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9888 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9889 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9890 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9891 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9892 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9893 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9894 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9895 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9896 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9897 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9898 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9899 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9900 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9901 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9902 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9903 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9904 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9905 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9906 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9907 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9908 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9910 # nls.m4 serial 5 (gettext-0.18)
9911 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9913 dnl This file is free software; the Free Software Foundation
9914 dnl gives unlimited permission to copy and/or distribute it,
9915 dnl with or without modifications, as long as this notice is preserved.
9917 dnl This file can can be used in projects which are not available under
9918 dnl the GNU General Public License or the GNU Library General Public
9919 dnl License but which still want to provide support for the GNU gettext
9921 dnl Please note that the actual code of the GNU gettext library is covered
9922 dnl by the GNU Library General Public License, and the rest of the GNU
9923 dnl gettext package package is covered by the GNU General Public License.
9924 dnl They are *not* in the public domain.
9927 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9928 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9934 AC_MSG_CHECKING([whether NLS is requested])
9935 dnl Default is enabled NLS
9936 AC_ARG_ENABLE([nls],
9937 [ --disable-nls do not use Native Language Support],
9938 USE_NLS=$enableval, USE_NLS=yes)
9939 AC_MSG_RESULT([$USE_NLS])
9943 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9944 # serial 1 (pkg-config-0.24)
9946 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9948 # This program is free software; you can redistribute it and/or modify
9949 # it under the terms of the GNU General Public License as published by
9950 # the Free Software Foundation; either version 2 of the License, or
9951 # (at your option) any later version.
9953 # This program is distributed in the hope that it will be useful, but
9954 # WITHOUT ANY WARRANTY; without even the implied warranty of
9955 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9956 # General Public License for more details.
9958 # You should have received a copy of the GNU General Public License
9959 # along with this program; if not, write to the Free Software
9960 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9962 # As a special exception to the GNU General Public License, if you
9963 # distribute this file as part of a program that contains a
9964 # configuration script generated by Autoconf, you may include it under
9965 # the same distribution terms that you use for the rest of that program.
9967 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9968 # ----------------------------------
9969 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9970 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9971 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9972 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9973 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9974 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9976 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9977 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9979 if test -n "$PKG_CONFIG"; then
9980 _pkg_min_version=m4_default([$1], [0.9.0])
9981 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9982 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9983 AC_MSG_RESULT([yes])
9989 ])# PKG_PROG_PKG_CONFIG
9991 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9993 # Check to see whether a particular set of modules exists. Similar
9994 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9996 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9997 # only at the first occurence in configure.ac, so if the first place
9998 # it's called might be skipped (such as if it is within an "if", you
9999 # have to call PKG_CHECK_EXISTS manually
10000 # --------------------------------------------------------------
10001 AC_DEFUN([PKG_CHECK_EXISTS],
10002 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10003 if test -n "$PKG_CONFIG" && \
10004 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10005 m4_default([$2], [:])
10006 m4_ifvaln([$3], [else
10010 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10011 # ---------------------------------------------
10012 m4_define([_PKG_CONFIG],
10013 [if test -n "$$1"; then
10015 elif test -n "$PKG_CONFIG"; then
10016 PKG_CHECK_EXISTS([$3],
10017 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
10024 # _PKG_SHORT_ERRORS_SUPPORTED
10025 # -----------------------------
10026 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10027 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10028 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10029 _pkg_short_errors_supported=yes
10031 _pkg_short_errors_supported=no
10033 ])# _PKG_SHORT_ERRORS_SUPPORTED
10036 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10037 # [ACTION-IF-NOT-FOUND])
10040 # Note that if there is a possibility the first call to
10041 # PKG_CHECK_MODULES might not happen, you should be sure to include an
10042 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10045 # --------------------------------------------------------------
10046 AC_DEFUN([PKG_CHECK_MODULES],
10047 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10048 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10049 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10052 AC_MSG_CHECKING([for $1])
10054 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10055 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
10057 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10058 and $1[]_LIBS to avoid the need to call pkg-config.
10059 See the pkg-config man page for more details.])
10061 if test $pkg_failed = yes; then
10062 AC_MSG_RESULT([no])
10063 _PKG_SHORT_ERRORS_SUPPORTED
10064 if test $_pkg_short_errors_supported = yes; then
10065 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
10067 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
10069 # Put the nasty error message in config.log where it belongs
10070 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10072 m4_default([$4], [AC_MSG_ERROR(
10073 [Package requirements ($2) were not met:
10077 Consider adjusting the PKG_CONFIG_PATH environment variable if you
10078 installed software in a non-standard prefix.
10082 elif test $pkg_failed = untried; then
10083 AC_MSG_RESULT([no])
10084 m4_default([$4], [AC_MSG_FAILURE(
10085 [The pkg-config script could not be found or is too old. Make sure it
10086 is in your PATH or set the PKG_CONFIG environment variable to the full
10087 path to pkg-config.
10091 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
10094 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10095 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10096 AC_MSG_RESULT([yes])
10099 ])# PKG_CHECK_MODULES
10101 # Configure paths for GLIB
10102 # Owen Taylor 1997-2001
10104 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
10105 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
10106 dnl gthread, or gio is specified in MODULES, pass to pkg-config
10108 AC_DEFUN([AM_PATH_GLIB_2_0],
10110 dnl Get the cflags and libraries from pkg-config
10112 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
10113 , enable_glibtest=yes)
10115 pkg_config_args=glib-2.0
10120 pkg_config_args="$pkg_config_args gmodule-2.0"
10123 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
10126 pkg_config_args="$pkg_config_args gobject-2.0"
10129 pkg_config_args="$pkg_config_args gthread-2.0"
10132 pkg_config_args="$pkg_config_args $module-2.0"
10137 PKG_PROG_PKG_CONFIG([0.16])
10141 if test "x$PKG_CONFIG" = x ; then
10146 min_glib_version=ifelse([$1], ,2.0.0,$1)
10147 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
10149 if test x$PKG_CONFIG != xno ; then
10150 ## don't try to run the test against uninstalled libtool libs
10151 if $PKG_CONFIG --uninstalled $pkg_config_args; then
10152 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
10156 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
10163 if test x"$no_glib" = x ; then
10164 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
10165 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
10166 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
10167 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
10169 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
10170 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
10171 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
10172 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10173 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
10174 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10175 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
10176 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10177 if test "x$enable_glibtest" = "xyes" ; then
10178 ac_save_CFLAGS="$CFLAGS"
10179 ac_save_LIBS="$LIBS"
10180 CFLAGS="$CFLAGS $GLIB_CFLAGS"
10181 LIBS="$GLIB_LIBS $LIBS"
10183 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
10184 dnl checks the results of pkg-config to some extent)
10186 rm -f conf.glibtest
10190 #include <stdlib.h>
10195 unsigned int major, minor, micro;
10198 fclose (fopen ("conf.glibtest", "w"));
10200 /* HP/UX 9 (%@#!) writes to sscanf strings */
10201 tmp_version = g_strdup("$min_glib_version");
10202 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
10203 printf("%s, bad version string\n", "$min_glib_version");
10207 if ((glib_major_version != $glib_config_major_version) ||
10208 (glib_minor_version != $glib_config_minor_version) ||
10209 (glib_micro_version != $glib_config_micro_version))
10211 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
10212 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
10213 glib_major_version, glib_minor_version, glib_micro_version);
10214 printf ("*** was found! If pkg-config was correct, then it is best\n");
10215 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
10216 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
10217 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
10218 printf("*** required on your system.\n");
10219 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
10220 printf("*** to point to the correct configuration files\n");
10222 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
10223 (glib_minor_version != GLIB_MINOR_VERSION) ||
10224 (glib_micro_version != GLIB_MICRO_VERSION))
10226 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
10227 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
10228 printf("*** library (version %d.%d.%d)\n",
10229 glib_major_version, glib_minor_version, glib_micro_version);
10233 if ((glib_major_version > major) ||
10234 ((glib_major_version == major) && (glib_minor_version > minor)) ||
10235 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
10241 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
10242 glib_major_version, glib_minor_version, glib_micro_version);
10243 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
10244 major, minor, micro);
10245 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
10247 printf("*** If you have already installed a sufficiently new version, this error\n");
10248 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
10249 printf("*** being found. The easiest way to fix this is to remove the old version\n");
10250 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
10251 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
10252 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
10253 printf("*** so that the correct libraries are found at run-time))\n");
10258 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10259 CFLAGS="$ac_save_CFLAGS"
10260 LIBS="$ac_save_LIBS"
10263 if test "x$no_glib" = x ; then
10264 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
10265 ifelse([$2], , :, [$2])
10268 if test "$PKG_CONFIG" = "no" ; then
10269 echo "*** A new enough version of pkg-config was not found."
10270 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
10272 if test -f conf.glibtest ; then
10275 echo "*** Could not run GLIB test program, checking why..."
10276 ac_save_CFLAGS="$CFLAGS"
10277 ac_save_LIBS="$LIBS"
10278 CFLAGS="$CFLAGS $GLIB_CFLAGS"
10279 LIBS="$LIBS $GLIB_LIBS"
10283 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
10284 [ echo "*** The test program compiled, but did not run. This usually means"
10285 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
10286 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
10287 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10288 echo "*** to the installed location Also, make sure you have run ldconfig if that"
10289 echo "*** is required on your system"
10291 echo "*** If you have an old version installed, it is best to remove it, although"
10292 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
10293 [ echo "*** The test program failed to compile or link. See the file config.log for the"
10294 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
10295 CFLAGS="$ac_save_CFLAGS"
10296 LIBS="$ac_save_LIBS"
10304 GLIB_COMPILE_RESOURCES=""
10305 ifelse([$3], , :, [$3])
10307 AC_SUBST(GLIB_CFLAGS)
10308 AC_SUBST(GLIB_LIBS)
10309 AC_SUBST(GLIB_GENMARSHAL)
10310 AC_SUBST(GOBJECT_QUERY)
10311 AC_SUBST(GLIB_MKENUMS)
10312 AC_SUBST(GLIB_COMPILE_RESOURCES)
10313 rm -f conf.glibtest
10316 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
10317 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
10319 # This file is free software, distributed under the terms of the GNU
10320 # General Public License. As a special exception to the GNU General
10321 # Public License, this file may be distributed as part of a program
10322 # that contains a configuration script generated by Autoconf, under
10323 # the same distribution terms as the rest of that program.
10325 # This file can be copied and used freely without restrictions. It can
10326 # be used in projects which are not available under the GNU Public License
10327 # but which still want to provide support for the GNU gettext functionality.
10329 # Macro to add for using GNU gettext.
10330 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
10332 # Modified to never use included libintl.
10333 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
10335 # Major rework to remove unused code
10336 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
10338 # Added better handling of ALL_LINGUAS from GNU gettext version
10339 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
10341 # Modified to require ngettext
10342 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
10344 # We need this here as well, since someone might use autoconf-2.5x
10345 # to configure GLib then an older version to configure a package
10346 # using AM_GLIB_GNU_GETTEXT
10350 dnl We go to great lengths to make sure that aclocal won't
10351 dnl try to pull in the installed version of these macros
10352 dnl when running aclocal in the glib directory.
10354 m4_copy([AC_DEFUN],[glib_DEFUN])
10355 m4_copy([AC_REQUIRE],[glib_REQUIRE])
10357 dnl At the end, if we're not within glib, we'll define the public
10358 dnl definitions in terms of our private definitions.
10362 #--------------------
10363 glib_DEFUN([GLIB_LC_MESSAGES],
10364 [AC_CHECK_HEADERS([locale.h])
10365 if test $ac_cv_header_locale_h = yes; then
10366 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
10367 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
10368 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
10369 if test $am_cv_val_LC_MESSAGES = yes; then
10370 AC_DEFINE(HAVE_LC_MESSAGES, 1,
10371 [Define if your <locale.h> file defines LC_MESSAGES.])
10375 # GLIB_PATH_PROG_WITH_TEST
10376 #----------------------------
10377 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10378 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10379 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
10380 [# Extract the first word of "$2", so it can be a program name with args.
10381 set dummy $2; ac_word=[$]2
10382 AC_MSG_CHECKING([for $ac_word])
10383 AC_CACHE_VAL(ac_cv_path_$1,
10386 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10390 for ac_dir in ifelse([$5], , $PATH, [$5]); do
10391 test -z "$ac_dir" && ac_dir=.
10392 if test -f $ac_dir/$ac_word; then
10394 ac_cv_path_$1="$ac_dir/$ac_word"
10400 dnl If no 4th arg is given, leave the cache variable unset,
10401 dnl so AC_PATH_PROGS will keep looking.
10402 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10406 $1="$ac_cv_path_$1"
10407 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10408 AC_MSG_RESULT([$]$1)
10417 glib_DEFUN([GLIB_WITH_NLS],
10418 dnl NLS is obligatory
10422 gt_cv_have_gettext=no
10428 AC_CHECK_HEADER(libintl.h,
10429 [gt_cv_func_dgettext_libintl="no"
10430 libintl_extra_libs=""
10433 # First check in libc
10435 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
10437 #include <libintl.h>
10439 [return !ngettext ("","", 1)],
10440 gt_cv_func_ngettext_libc=yes,
10441 gt_cv_func_ngettext_libc=no)
10444 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
10445 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
10447 #include <libintl.h>
10449 [return !dgettext ("","")],
10450 gt_cv_func_dgettext_libc=yes,
10451 gt_cv_func_dgettext_libc=no)
10455 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
10456 AC_CHECK_FUNCS(bind_textdomain_codeset)
10460 # If we don't have everything we want, check in libintl
10462 if test "$gt_cv_func_dgettext_libc" != "yes" \
10463 || test "$gt_cv_func_ngettext_libc" != "yes" \
10464 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
10466 AC_CHECK_LIB(intl, bindtextdomain,
10467 [AC_CHECK_LIB(intl, ngettext,
10468 [AC_CHECK_LIB(intl, dgettext,
10469 gt_cv_func_dgettext_libintl=yes)])])
10471 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
10472 AC_MSG_CHECKING([if -liconv is needed to use gettext])
10474 AC_CHECK_LIB(intl, ngettext,
10475 [AC_CHECK_LIB(intl, dcgettext,
10476 [gt_cv_func_dgettext_libintl=yes
10477 libintl_extra_libs=-liconv],
10483 # If we found libintl, then check in it for bind_textdomain_codeset();
10484 # we'll prefer libc if neither have bind_textdomain_codeset(),
10485 # and both have dgettext and ngettext
10487 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
10488 glib_save_LIBS="$LIBS"
10489 LIBS="$LIBS -lintl $libintl_extra_libs"
10490 unset ac_cv_func_bind_textdomain_codeset
10491 AC_CHECK_FUNCS(bind_textdomain_codeset)
10492 LIBS="$glib_save_LIBS"
10494 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
10495 gt_cv_func_dgettext_libc=no
10497 if test "$gt_cv_func_dgettext_libc" = "yes" \
10498 && test "$gt_cv_func_ngettext_libc" = "yes"; then
10499 gt_cv_func_dgettext_libintl=no
10505 if test "$gt_cv_func_dgettext_libc" = "yes" \
10506 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10507 gt_cv_have_gettext=yes
10510 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10511 INTLLIBS="-lintl $libintl_extra_libs"
10514 if test "$gt_cv_have_gettext" = "yes"; then
10515 AC_DEFINE(HAVE_GETTEXT,1,
10516 [Define if the GNU gettext() function is already present or preinstalled.])
10517 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
10518 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
10519 if test "$MSGFMT" != "no"; then
10520 glib_save_LIBS="$LIBS"
10521 LIBS="$LIBS $INTLLIBS"
10522 AC_CHECK_FUNCS(dcgettext)
10524 AC_MSG_CHECKING([if msgfmt accepts -c])
10525 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
10528 "Content-Type: text/plain; charset=UTF-8\n"
10529 "Project-Id-Version: test 1.0\n"
10530 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
10531 "Last-Translator: test <foo@bar.xx>\n"
10532 "Language-Team: C <LL@li.org>\n"
10533 "MIME-Version: 1.0\n"
10534 "Content-Transfer-Encoding: 8bit\n"
10535 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
10536 AC_SUBST(MSGFMT_OPTS)
10537 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
10538 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
10539 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
10540 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
10541 return _nl_msg_cat_cntr],
10543 DATADIRNAME=share],
10546 dnl On Solaris, if bind_textdomain_codeset is in libc,
10547 dnl GNU format message catalog is always supported,
10548 dnl since both are added to the libc all together.
10549 dnl Hence, we'd like to go with DATADIRNAME=share and
10550 dnl and CATOBJEXT=.gmo in this case.
10551 AC_CHECK_FUNC(bind_textdomain_codeset,
10553 DATADIRNAME=share],
10566 LIBS="$glib_save_LIBS"
10569 gt_cv_have_gettext=no
10574 if test "$gt_cv_have_gettext" = "yes" ; then
10575 AC_DEFINE(ENABLE_NLS, 1,
10576 [always defined to indicate that i18n is enabled])
10579 dnl Test whether we really found GNU xgettext.
10580 if test "$XGETTEXT" != ":"; then
10581 dnl If it is not GNU xgettext we define it as : so that the
10582 dnl Makefiles still can work.
10583 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10587 [found xgettext program is not GNU xgettext; ignore it])
10592 # We need to process the po/ directory.
10595 AC_OUTPUT_COMMANDS(
10596 [case "$CONFIG_FILES" in *po/Makefile.in*)
10597 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
10600 dnl These rules are solely for the distribution goal. While doing this
10601 dnl we only have to keep exactly one list of the available catalogs
10602 dnl in configure.ac.
10603 for lang in $ALL_LINGUAS; do
10604 GMOFILES="$GMOFILES $lang.gmo"
10605 POFILES="$POFILES $lang.po"
10608 dnl Make all variables we use known to autoconf.
10610 AC_SUBST(CATOBJEXT)
10611 AC_SUBST(DATADIRNAME)
10613 AC_SUBST(INSTOBJEXT)
10615 AC_SUBST(PO_IN_DATADIR_TRUE)
10616 AC_SUBST(PO_IN_DATADIR_FALSE)
10621 # AM_GLIB_GNU_GETTEXT
10622 # -------------------
10623 # Do checks necessary for use of gettext. If a suitable implementation
10624 # of gettext is found in either in libintl or in the C library,
10625 # it will set INTLLIBS to the libraries needed for use of gettext
10626 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
10627 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
10628 # on various variables needed by the Makefile.in.in installed by
10631 glib_DEFUN([GLIB_GNU_GETTEXT],
10632 [AC_REQUIRE([AC_PROG_CC])dnl
10633 AC_REQUIRE([AC_HEADER_STDC])dnl
10638 if test "$gt_cv_have_gettext" = "yes"; then
10639 if test "x$ALL_LINGUAS" = "x"; then
10642 AC_MSG_CHECKING(for catalogs to be installed)
10644 for presentlang in $ALL_LINGUAS; do
10646 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
10647 desiredlanguages="$LINGUAS"
10649 desiredlanguages="$ALL_LINGUAS"
10651 for desiredlang in $desiredlanguages; do
10652 # Use the presentlang catalog if desiredlang is
10653 # a. equal to presentlang, or
10654 # b. a variant of presentlang (because in this case,
10655 # presentlang can be used as a fallback for messages
10656 # which are not translated in the desiredlang catalog).
10657 case "$desiredlang" in
10658 "$presentlang"*) useit=yes;;
10661 if test $useit = yes; then
10662 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
10665 LINGUAS=$NEW_LINGUAS
10666 AC_MSG_RESULT($LINGUAS)
10669 dnl Construct list of names of catalog files to be constructed.
10670 if test -n "$LINGUAS"; then
10671 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10675 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
10676 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
10677 dnl Try to locate is.
10679 if test -n "$ac_aux_dir"; then
10680 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10682 if test -z "$MKINSTALLDIRS"; then
10683 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10685 AC_SUBST(MKINSTALLDIRS)
10687 dnl Generate list of files to be processed by xgettext which will
10688 dnl be included in po/Makefile.
10689 test -d po || mkdir po
10690 if test "x$srcdir" != "x."; then
10691 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10692 posrcprefix="$srcdir/"
10694 posrcprefix="../$srcdir/"
10700 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10701 < $srcdir/po/POTFILES.in > po/POTFILES
10704 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
10705 # -------------------------------
10706 # Define VARIABLE to the location where catalog files will
10707 # be installed by po/Makefile.
10708 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
10709 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
10710 glib_save_prefix="$prefix"
10711 glib_save_exec_prefix="$exec_prefix"
10712 glib_save_datarootdir="$datarootdir"
10713 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10714 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
10715 datarootdir=`eval echo "${datarootdir}"`
10716 if test "x$CATOBJEXT" = "x.mo" ; then
10717 localedir=`eval echo "${libdir}/locale"`
10719 localedir=`eval echo "${datadir}/locale"`
10721 prefix="$glib_save_prefix"
10722 exec_prefix="$glib_save_exec_prefix"
10723 datarootdir="$glib_save_datarootdir"
10724 AC_DEFINE_UNQUOTED($1, "$localedir",
10725 [Define the location where the catalogs will be installed])
10729 dnl Now the definitions that aclocal will find
10731 ifdef(glib_configure_ac,[],[
10732 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
10733 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
10736 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
10738 # Create a temporary file with TEST-FILE as its contents and pass the
10739 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
10740 # 0 and perform ACTION-IF-FAIL for any other exit status.
10741 AC_DEFUN([GLIB_RUN_PROG],
10742 [cat >conftest.foo <<_ACEOF
10745 if AC_RUN_LOG([$1 conftest.foo]); then
10746 m4_ifval([$3], [$3], [:])
10747 m4_ifvaln([$4], [else $4])dnl
10748 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
10749 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD