1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
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.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
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-2013 Free Software Foundation, Inc.
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
29 # AM_AUTOMAKE_VERSION(VERSION)
30 # ----------------------------
31 # Automake X.Y traces this macro to ensure aclocal.m4 has been
32 # generated from the m4 files accompanying Automake X.Y.
33 # (This private macro should not be called outside this file.)
34 AC_DEFUN([AM_AUTOMAKE_VERSION],
35 [am__api_version='1.13'
36 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 dnl require some minimum version. Point them to the right macro.
38 m4_if([$1], [1.13.4], [],
39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
42 # _AM_AUTOCONF_VERSION(VERSION)
43 # -----------------------------
44 # aclocal traces this macro to find the Autoconf version.
45 # This is a private macro too. Using m4_define simplifies
46 # the logic in aclocal, which can simply ignore this definition.
47 m4_define([_AM_AUTOCONF_VERSION], [])
49 # AM_SET_CURRENT_AUTOMAKE_VERSION
50 # -------------------------------
51 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54 [AM_AUTOMAKE_VERSION([1.13.4])dnl
55 m4_ifndef([AC_AUTOCONF_VERSION],
56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
59 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
61 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
63 # This file is free software; the Free Software Foundation
64 # gives unlimited permission to copy and/or distribute it,
65 # with or without modifications, as long as this notice is preserved.
67 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
71 # Of course, Automake must honor this variable whenever it calls a
72 # tool from the auxiliary directory. The problem is that $srcdir (and
73 # therefore $ac_aux_dir as well) can be either absolute or relative,
74 # depending on how configure is run. This is pretty annoying, since
75 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
76 # source directory, any form will work fine, but in subdirectories a
77 # relative path needs to be adjusted first.
80 # fails when called from a subdirectory if $ac_aux_dir is relative
81 # $top_srcdir/$ac_aux_dir/missing
82 # fails if $ac_aux_dir is absolute,
83 # fails when called from a subdirectory in a VPATH build with
84 # a relative $ac_aux_dir
86 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87 # are both prefixed by $srcdir. In an in-source build this is usually
88 # harmless because $srcdir is '.', but things will broke when you
89 # start a VPATH build or use an absolute $srcdir.
91 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94 # and then we would define $MISSING as
95 # MISSING="\${SHELL} $am_aux_dir/missing"
96 # This will work as long as MISSING is not called from configure, because
97 # unfortunately $(top_srcdir) has no meaning in configure.
98 # However there are other variables, like CC, which are often used in
99 # configure, and could therefore not use this "fixed" $ac_aux_dir.
101 # Another solution, used here, is to always expand $ac_aux_dir to an
102 # absolute PATH. The drawback is that using absolute paths prevent a
103 # configured tree to be moved without reconfiguration.
105 AC_DEFUN([AM_AUX_DIR_EXPAND],
106 [dnl Rely on autoconf to set up CDPATH properly.
108 # expand $ac_aux_dir to an absolute path
109 am_aux_dir=`cd $ac_aux_dir && pwd`
112 # AM_CONDITIONAL -*- Autoconf -*-
114 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
116 # This file is free software; the Free Software Foundation
117 # gives unlimited permission to copy and/or distribute it,
118 # with or without modifications, as long as this notice is preserved.
120 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
121 # -------------------------------------
122 # Define a conditional.
123 AC_DEFUN([AM_CONDITIONAL],
124 [AC_PREREQ([2.52])dnl
125 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127 AC_SUBST([$1_TRUE])dnl
128 AC_SUBST([$1_FALSE])dnl
129 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
130 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
131 m4_define([_AM_COND_VALUE_$1], [$2])dnl
139 AC_CONFIG_COMMANDS_PRE(
140 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141 AC_MSG_ERROR([[conditional "$1" was never defined.
142 Usually this means the macro was only invoked conditionally.]])
145 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
147 # This file is free software; the Free Software Foundation
148 # gives unlimited permission to copy and/or distribute it,
149 # with or without modifications, as long as this notice is preserved.
152 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153 # written in clear, in which case automake, when reading aclocal.m4,
154 # will think it sees a *use*, and therefore will trigger all it's
155 # C support machinery. Also note that it means that autoscan, seeing
156 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
159 # _AM_DEPENDENCIES(NAME)
160 # ----------------------
161 # See how the compiler implements dependency checking.
162 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163 # We try a few techniques and use that to set a single cache variable.
165 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167 # dependency, and given that the user is not expected to run this macro,
168 # just rely on AC_PROG_CC.
169 AC_DEFUN([_AM_DEPENDENCIES],
170 [AC_REQUIRE([AM_SET_DEPDIR])dnl
171 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173 AC_REQUIRE([AM_DEP_TRACK])dnl
175 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
176 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
177 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
180 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
181 [depcc="$$1" am_compiler_list=])
183 AC_CACHE_CHECK([dependency style of $depcc],
184 [am_cv_$1_dependencies_compiler_type],
185 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186 # We make a subdir and do the tests there. Otherwise we can end up
187 # making bogus files that we don't know about and never remove. For
188 # instance it was reported that on HP-UX the gcc test will end up
189 # making a dummy file named 'D' -- because '-MD' means "put the output
193 # Copy depcomp to subdir because otherwise we won't find it if we're
194 # using a relative directory.
195 cp "$am_depcomp" conftest.dir
197 # We will build objects and dependencies in a subdirectory because
198 # it helps to detect inapplicable dependency modes. For instance
199 # both Tru64's cc and ICC support -MD to output dependencies as a
200 # side effect of compilation, but ICC will put the dependencies in
201 # the current directory while Tru64 will put them in the object
205 am_cv_$1_dependencies_compiler_type=none
206 if test "$am_compiler_list" = ""; then
207 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
211 [case " $depcc " in #(
212 *\ -arch\ *\ -arch\ *) am__universal=true ;;
215 [case " $depcc " in #(
216 *\ -arch\ *\ -arch\ *) am__universal=true ;;
219 for depmode in $am_compiler_list; do
220 # Setup a source with many dependencies, because some compilers
221 # like to wrap large dependency lists on column 80 (with \), and
222 # we should not choose a depcomp mode which is confused by this.
224 # We need to recreate these files for each test, as the compiler may
225 # overwrite some of them when testing with obscure command lines.
226 # This happens at least with the AIX C compiler.
228 for i in 1 2 3 4 5 6; do
229 echo '#include "conftst'$i'.h"' >> sub/conftest.c
230 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231 # Solaris 10 /bin/sh.
232 echo '/* dummy */' > sub/conftst$i.h
234 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
236 # We check with '-c' and '-o' for the sake of the "dashmstdout"
237 # mode. It turns out that the SunPro C++ compiler does not properly
238 # handle '-M -o', and we need to detect this. Also, some Intel
239 # versions had trouble with output in subdirs.
240 am__obj=sub/conftest.${OBJEXT-o}
241 am__minus_obj="-o $am__obj"
244 # This depmode causes a compiler race in universal mode.
245 test "$am__universal" = false || continue
248 # After this tag, mechanisms are not by side-effect, so they'll
249 # only be used when explicitly requested.
250 if test "x$enable_dependency_tracking" = xyes; then
256 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257 # This compiler won't grok '-c -o', but also, the minuso test has
258 # not run yet. These depmodes are late enough in the game, and
259 # so weak that their functioning should not be impacted.
260 am__obj=conftest.${OBJEXT-o}
265 if depmode=$depmode \
266 source=sub/conftest.c object=$am__obj \
267 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269 >/dev/null 2>conftest.err &&
270 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274 # icc doesn't choke on unknown options, it will just issue warnings
275 # or remarks (even with -Werror). So we grep stderr for any message
276 # that says an option was ignored or not supported.
277 # When given -MP, icc 7.0 and 7.1 complain thusly:
278 # icc: Command line warning: ignoring option '-M'; no argument required
279 # The diagnosis changed in icc 8.0:
280 # icc: Command line remark: option '-MP' not supported
281 if (grep 'ignoring option' conftest.err ||
282 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283 am_cv_$1_dependencies_compiler_type=$depmode
292 am_cv_$1_dependencies_compiler_type=none
295 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296 AM_CONDITIONAL([am__fastdep$1], [
297 test "x$enable_dependency_tracking" != xno \
298 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
304 # Choose a directory name for dependency files.
305 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306 AC_DEFUN([AM_SET_DEPDIR],
307 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
314 AC_DEFUN([AM_DEP_TRACK],
315 [AC_ARG_ENABLE([dependency-tracking], [dnl
317 [--enable-dependency-tracking],
318 [do not reject slow dependency extractors])
320 [--disable-dependency-tracking],
321 [speeds up one-time build])])
322 if test "x$enable_dependency_tracking" != xno; then
323 am_depcomp="$ac_aux_dir/depcomp"
327 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328 AC_SUBST([AMDEPBACKSLASH])dnl
329 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330 AC_SUBST([am__nodep])dnl
331 _AM_SUBST_NOTMAKE([am__nodep])dnl
334 # Generate code to set up dependency tracking. -*- Autoconf -*-
336 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
338 # This file is free software; the Free Software Foundation
339 # gives unlimited permission to copy and/or distribute it,
340 # with or without modifications, as long as this notice is preserved.
343 # _AM_OUTPUT_DEPENDENCY_COMMANDS
344 # ------------------------------
345 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
347 # Older Autoconf quotes --file arguments for eval, but not when files
348 # are listed without --file. Let's play safe and only enable the eval
349 # if we detect the quoting.
350 case $CONFIG_FILES in
351 *\'*) eval set x "$CONFIG_FILES" ;;
352 *) set x $CONFIG_FILES ;;
357 # Strip MF so we end up with the name of the file.
358 mf=`echo "$mf" | sed -e 's/:.*$//'`
359 # Check whether this is an Automake generated Makefile or not.
360 # We used to match only the files named 'Makefile.in', but
361 # some people rename them; so instead we look at the file content.
362 # Grep'ing the first line is not enough: some people post-process
363 # each Makefile.in and add a new line on top of each file to say so.
364 # Grep'ing the whole file is not good either: AIX grep has a line
365 # limit of 2048, but all sed's we know have understand at least 4000.
366 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367 dirpart=`AS_DIRNAME("$mf")`
371 # Extract the definition of DEPDIR, am__include, and am__quote
372 # from the Makefile without running 'make'.
373 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374 test -z "$DEPDIR" && continue
375 am__include=`sed -n 's/^am__include = //p' < "$mf"`
376 test -z "$am__include" && continue
377 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378 # Find all dependency output files, they are included files with
379 # $(DEPDIR) in their names. We invoke sed twice because it is the
380 # simplest approach to changing $(DEPDIR) to its actual value in the
382 for file in `sed -n "
383 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385 # Make sure the directory exists.
386 test -f "$dirpart/$file" && continue
387 fdir=`AS_DIRNAME(["$file"])`
388 AS_MKDIR_P([$dirpart/$fdir])
389 # echo "creating $dirpart/$file"
390 echo '# dummy' > "$dirpart/$file"
394 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
397 # AM_OUTPUT_DEPENDENCY_COMMANDS
398 # -----------------------------
399 # This macro should only be invoked once -- use via AC_REQUIRE.
401 # This code is only required when automatic dependency tracking
402 # is enabled. FIXME. This creates each '.P' file that we will
403 # need in order to bootstrap the dependency handling code.
404 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AC_CONFIG_COMMANDS([depfiles],
406 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
410 # Do all the work for Automake. -*- Autoconf -*-
412 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
418 # This macro actually does too much. Some checks are only needed if
419 # your package does certain things. But this isn't really a big deal.
421 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
422 # AM_INIT_AUTOMAKE([OPTIONS])
423 # -----------------------------------------------
424 # The call with PACKAGE and VERSION arguments is the old style
425 # call (pre autoconf-2.50), which is being phased out. PACKAGE
426 # and VERSION should now be passed to AC_INIT and removed from
427 # the call to AM_INIT_AUTOMAKE.
428 # We support both call styles for the transition. After
429 # the next Automake release, Autoconf can make the AC_INIT
430 # arguments mandatory, and then we can depend on a new Autoconf
431 # release and drop the old call support.
432 AC_DEFUN([AM_INIT_AUTOMAKE],
433 [AC_PREREQ([2.65])dnl
434 dnl Autoconf wants to disallow AM_ names. We explicitly allow
435 dnl the ones we care about.
436 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
437 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
438 AC_REQUIRE([AC_PROG_INSTALL])dnl
439 if test "`cd $srcdir && pwd`" != "`pwd`"; then
440 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
441 # is not polluted with repeated "-I."
442 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
443 # test to see if srcdir already configured
444 if test -f $srcdir/config.status; then
445 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
449 # test whether we have cygpath
450 if test -z "$CYGPATH_W"; then
451 if (cygpath --version) >/dev/null 2>/dev/null; then
452 CYGPATH_W='cygpath -w'
457 AC_SUBST([CYGPATH_W])
459 # Define the identity of the package.
460 dnl Distinguish between old-style and new-style calls.
462 [AC_DIAGNOSE([obsolete],
463 [$0: two- and three-arguments forms are deprecated.])
464 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 AC_SUBST([PACKAGE], [$1])dnl
466 AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
470 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
472 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
473 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
474 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
476 _AM_IF_OPTION([no-define],,
477 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
478 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
480 # Some tools Automake needs.
481 AC_REQUIRE([AM_SANITY_CHECK])dnl
482 AC_REQUIRE([AC_ARG_PROGRAM])dnl
483 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
484 AM_MISSING_PROG([AUTOCONF], [autoconf])
485 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
486 AM_MISSING_PROG([AUTOHEADER], [autoheader])
487 AM_MISSING_PROG([MAKEINFO], [makeinfo])
488 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
489 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
490 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
491 # For better backward compatibility. To be removed once Automake 1.9.x
492 # dies out for good. For more background, see:
493 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
494 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
495 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
496 # We need awk for the "check" target. The system "awk" is bad on
498 AC_REQUIRE([AC_PROG_AWK])dnl
499 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
500 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
501 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
502 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
503 [_AM_PROG_TAR([v7])])])
504 _AM_IF_OPTION([no-dependencies],,
505 [AC_PROVIDE_IFELSE([AC_PROG_CC],
506 [_AM_DEPENDENCIES([CC])],
507 [m4_define([AC_PROG_CC],
508 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
509 AC_PROVIDE_IFELSE([AC_PROG_CXX],
510 [_AM_DEPENDENCIES([CXX])],
511 [m4_define([AC_PROG_CXX],
512 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
513 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
514 [_AM_DEPENDENCIES([OBJC])],
515 [m4_define([AC_PROG_OBJC],
516 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
517 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
518 [_AM_DEPENDENCIES([OBJCXX])],
519 [m4_define([AC_PROG_OBJCXX],
520 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
522 AC_REQUIRE([AM_SILENT_RULES])dnl
523 dnl The testsuite driver may need to know about EXEEXT, so add the
524 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
525 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
526 AC_CONFIG_COMMANDS_PRE(dnl
527 [m4_provide_if([_AM_COMPILER_EXEEXT],
528 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
531 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
532 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
533 dnl mangled by Autoconf and run in a shell conditional statement.
534 m4_define([_AC_COMPILER_EXEEXT],
535 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
538 # When config.status generates a header, we must update the stamp-h file.
539 # This file resides in the same directory as the config header
540 # that is generated. The stamp files are numbered to have different names.
542 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
543 # loop where config.status creates the headers, so we can generate
544 # our stamp files there.
545 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
546 [# Compute $1's index in $config_headers.
549 for _am_header in $config_headers :; do
551 $_am_arg | $_am_arg:* )
554 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
557 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
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.
567 # Define $install_sh.
568 AC_DEFUN([AM_PROG_INSTALL_SH],
569 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
570 if test x"${install_sh}" != xset; then
573 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575 install_sh="\${SHELL} $am_aux_dir/install-sh"
578 AC_SUBST([install_sh])])
580 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
582 # This file is free software; the Free Software Foundation
583 # gives unlimited permission to copy and/or distribute it,
584 # with or without modifications, as long as this notice is preserved.
586 # Check whether the underlying file-system supports filenames
587 # with a leading dot. For instance MS-DOS doesn't.
588 AC_DEFUN([AM_SET_LEADING_DOT],
589 [rm -rf .tst 2>/dev/null
590 mkdir .tst 2>/dev/null
591 if test -d .tst; then
596 rmdir .tst 2>/dev/null
597 AC_SUBST([am__leading_dot])])
599 # Check to see how 'make' treats includes. -*- Autoconf -*-
601 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
603 # This file is free software; the Free Software Foundation
604 # gives unlimited permission to copy and/or distribute it,
605 # with or without modifications, as long as this notice is preserved.
609 # Check to see how make treats includes.
610 AC_DEFUN([AM_MAKE_INCLUDE],
611 [am_make=${MAKE-make}
612 cat > confinc << 'END'
614 @echo this is the am__doit target
617 # If we don't find an include directive, just comment out the code.
618 AC_MSG_CHECKING([for style of include used by $am_make])
622 # First try GNU make style include.
623 echo "include confinc" > confmf
624 # Ignore all kinds of additional output from 'make'.
625 case `$am_make -s -f confmf 2> /dev/null` in #(
626 *the\ am__doit\ target*)
632 # Now try BSD make style include.
633 if test "$am__include" = "#"; then
634 echo '.include "confinc"' > confmf
635 case `$am_make -s -f confmf 2> /dev/null` in #(
636 *the\ am__doit\ target*)
643 AC_SUBST([am__include])
644 AC_SUBST([am__quote])
645 AC_MSG_RESULT([$_am_result])
649 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
651 # This file is free software; the Free Software Foundation
652 # gives unlimited permission to copy and/or distribute it,
653 # with or without modifications, as long as this notice is preserved.
657 # Like AC_PROG_CC_C_O, but changed for automake.
658 AC_DEFUN([AM_PROG_CC_C_O],
659 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
660 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
661 AC_REQUIRE_AUX_FILE([compile])dnl
662 # FIXME: we rely on the cache variable name because
663 # there is no other way.
665 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
666 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
667 if test "$am_t" != yes; then
668 # Losing compiler, so override with the script.
669 # FIXME: It is wrong to rewrite CC.
670 # But if we don't then we get into trouble of one sort or another.
671 # A longer-term fix would be to have automake use am__CC in this case,
672 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
673 CC="$am_aux_dir/compile $CC"
675 dnl Make sure AC_PROG_CC is never called again, or it will override our
677 m4_define([AC_PROG_CC],
678 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
681 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
683 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
685 # This file is free software; the Free Software Foundation
686 # gives unlimited permission to copy and/or distribute it,
687 # with or without modifications, as long as this notice is preserved.
689 # AM_MISSING_PROG(NAME, PROGRAM)
690 # ------------------------------
691 AC_DEFUN([AM_MISSING_PROG],
692 [AC_REQUIRE([AM_MISSING_HAS_RUN])
693 $1=${$1-"${am_missing_run}$2"}
698 # Define MISSING if not defined so far and test if it is modern enough.
699 # If it is, set am_missing_run to use it, otherwise, to nothing.
700 AC_DEFUN([AM_MISSING_HAS_RUN],
701 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
702 AC_REQUIRE_AUX_FILE([missing])dnl
703 if test x"${MISSING+set}" != xset; then
706 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
708 MISSING="\${SHELL} $am_aux_dir/missing" ;;
711 # Use eval to expand $SHELL
712 if eval "$MISSING --is-lightweight"; then
713 am_missing_run="$MISSING "
716 AC_MSG_WARN(['missing' script is too old or missing])
720 # Helper functions for option handling. -*- Autoconf -*-
722 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
724 # This file is free software; the Free Software Foundation
725 # gives unlimited permission to copy and/or distribute it,
726 # with or without modifications, as long as this notice is preserved.
728 # _AM_MANGLE_OPTION(NAME)
729 # -----------------------
730 AC_DEFUN([_AM_MANGLE_OPTION],
731 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
733 # _AM_SET_OPTION(NAME)
734 # --------------------
735 # Set option NAME. Presently that only means defining a flag for this option.
736 AC_DEFUN([_AM_SET_OPTION],
737 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
739 # _AM_SET_OPTIONS(OPTIONS)
740 # ------------------------
741 # OPTIONS is a space-separated list of Automake options.
742 AC_DEFUN([_AM_SET_OPTIONS],
743 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
745 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
746 # -------------------------------------------
747 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
748 AC_DEFUN([_AM_IF_OPTION],
749 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
751 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
753 # This file is free software; the Free Software Foundation
754 # gives unlimited permission to copy and/or distribute it,
755 # with or without modifications, as long as this notice is preserved.
758 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
759 # ---------------------------------------------------------------------------
760 # Adds support for distributing Python modules and packages. To
761 # install modules, copy them to $(pythondir), using the python_PYTHON
762 # automake variable. To install a package with the same name as the
763 # automake package, install to $(pkgpythondir), or use the
764 # pkgpython_PYTHON automake variable.
766 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
767 # locations to install python extension modules (shared libraries).
768 # Another macro is required to find the appropriate flags to compile
771 # If your package is configured with a different prefix to python,
772 # users will have to add the install directory to the PYTHONPATH
773 # environment variable, or create a .pth file (see the python
774 # documentation for details).
776 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
777 # cause an error if the version of python installed on the system
778 # doesn't meet the requirement. MINIMUM-VERSION should consist of
779 # numbers and dots only.
780 AC_DEFUN([AM_PATH_PYTHON],
782 dnl Find a Python interpreter. Python versions prior to 2.0 are not
783 dnl supported. (2.0 was released on October 16, 2000).
784 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
785 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
786 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
788 AC_ARG_VAR([PYTHON], [the Python interpreter])
791 dnl No version check is needed.
792 # Find any Python interpreter.
793 if test -z "$PYTHON"; then
794 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
796 am_display_PYTHON=python
798 dnl A version check is needed.
799 if test -n "$PYTHON"; then
800 # If the user set $PYTHON, use it and don't search something else.
801 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
802 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
803 [AC_MSG_RESULT([yes])],
805 AC_MSG_ERROR([Python interpreter is too old])])
806 am_display_PYTHON=$PYTHON
808 # Otherwise, try each interpreter until we find one that satisfies
810 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
811 [am_cv_pathless_PYTHON],[
812 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
813 test "$am_cv_pathless_PYTHON" = none && break
814 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
816 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
817 if test "$am_cv_pathless_PYTHON" = none; then
820 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
822 am_display_PYTHON=$am_cv_pathless_PYTHON
826 if test "$PYTHON" = :; then
827 dnl Run any user-specified action, or abort.
828 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
831 dnl Query Python for its version number. Getting [:3] seems to be
832 dnl the best way to do this; it's what "site.py" does in the standard
835 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
836 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
837 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
839 dnl Use the values of $prefix and $exec_prefix for the corresponding
840 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
841 dnl distinct variables so they can be overridden if need be. However,
842 dnl general consensus is that you shouldn't need this ability.
844 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
845 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
847 dnl At times (like when building shared libraries) you may want
848 dnl to know which OS platform Python thinks this is.
850 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
851 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
852 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
854 # Just factor out some code duplication.
855 am_python_setup_sysconfig="\
857 # Prefer sysconfig over distutils.sysconfig, for better compatibility
858 # with python 3.x. See automake bug#10227.
862 can_use_sysconfig = 0
864 can_use_sysconfig = 1
865 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
866 # <https://github.com/pypa/virtualenv/issues/118>
868 from platform import python_implementation
869 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
870 can_use_sysconfig = 0
874 dnl Set up 4 directories:
876 dnl pythondir -- where to install python scripts. This is the
877 dnl site-packages directory, not the python standard library
878 dnl directory like in previous automake betas. This behavior
879 dnl is more consistent with lispdir.m4 for example.
880 dnl Query distutils for this directory.
881 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
882 [am_cv_python_pythondir],
883 [if test "x$prefix" = xNONE
885 am_py_prefix=$ac_default_prefix
889 am_cv_python_pythondir=`$PYTHON -c "
890 $am_python_setup_sysconfig
891 if can_use_sysconfig:
892 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
894 from distutils import sysconfig
895 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
896 sys.stdout.write(sitedir)"`
897 case $am_cv_python_pythondir in
899 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
900 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
903 case $am_py_prefix in
906 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
912 AC_SUBST([pythondir], [$am_cv_python_pythondir])
914 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
915 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
916 dnl more consistent with the rest of automake.
918 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
920 dnl pyexecdir -- directory for installing python extension modules
921 dnl (shared libraries)
922 dnl Query distutils for this directory.
923 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
924 [am_cv_python_pyexecdir],
925 [if test "x$exec_prefix" = xNONE
927 am_py_exec_prefix=$am_py_prefix
929 am_py_exec_prefix=$exec_prefix
931 am_cv_python_pyexecdir=`$PYTHON -c "
932 $am_python_setup_sysconfig
933 if can_use_sysconfig:
934 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
936 from distutils import sysconfig
937 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
938 sys.stdout.write(sitedir)"`
939 case $am_cv_python_pyexecdir in
941 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
942 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
945 case $am_py_exec_prefix in
948 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
954 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
956 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
958 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
960 dnl Run any user-specified action.
967 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
968 # ---------------------------------------------------------------------------
969 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
970 # Run ACTION-IF-FALSE otherwise.
971 # This test uses sys.hexversion instead of the string equivalent (first
972 # word of sys.version), in order to cope with versions such as 2.2c1.
973 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
974 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
976 # split strings by '.' and convert to numeric. Append some zeros
977 # because we need at least 4 digits for the hex conversion.
978 # map returns an iterator in Python 3.0 and a list in 2.x
979 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
981 # xrange is not present in Python 3.0 and range returns an iterator
982 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
983 sys.exit(sys.hexversion < minverhex)"
984 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
986 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
988 # This file is free software; the Free Software Foundation
989 # gives unlimited permission to copy and/or distribute it,
990 # with or without modifications, as long as this notice is preserved.
992 # AM_RUN_LOG(COMMAND)
993 # -------------------
994 # Run COMMAND, save the exit status in ac_status, and log it.
995 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
996 AC_DEFUN([AM_RUN_LOG],
997 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
998 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1000 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1001 (exit $ac_status); }])
1003 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1005 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1007 # This file is free software; the Free Software Foundation
1008 # gives unlimited permission to copy and/or distribute it,
1009 # with or without modifications, as long as this notice is preserved.
1013 AC_DEFUN([AM_SANITY_CHECK],
1014 [AC_MSG_CHECKING([whether build environment is sane])
1015 # Reject unsafe characters in $srcdir or the absolute working directory
1016 # name. Accept space and tab only in the latter.
1020 *[[\\\"\#\$\&\'\`$am_lf]]*)
1021 AC_MSG_ERROR([unsafe absolute working directory name]);;
1024 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1025 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1028 # Do 'set' in a subshell so we don't clobber the current shell's
1029 # arguments. Must try -L first in case configure is actually a
1030 # symlink; some systems play weird games with the mod time of symlinks
1031 # (eg FreeBSD returns the mod time of the symlink's containing
1035 for am_try in 1 2; do
1036 echo "timestamp, slept: $am_has_slept" > conftest.file
1037 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1038 if test "$[*]" = "X"; then
1040 set X `ls -t "$srcdir/configure" conftest.file`
1042 if test "$[*]" != "X $srcdir/configure conftest.file" \
1043 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1045 # If neither matched, then we have a broken ls. This can happen
1046 # if, for instance, CONFIG_SHELL is bash and it inherits a
1047 # broken ls alias from the environment. This has actually
1048 # happened. Such a system could not be considered "sane".
1049 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1050 alias in your environment])
1052 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1059 test "$[2]" = conftest.file
1065 AC_MSG_ERROR([newly created file is older than distributed files!
1066 Check your system clock])
1068 AC_MSG_RESULT([yes])
1069 # If we didn't sleep, we still need to ensure time stamps of config.status and
1070 # generated files are strictly newer.
1072 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1076 AC_CONFIG_COMMANDS_PRE(
1077 [AC_MSG_CHECKING([that generated files are newer than configure])
1078 if test -n "$am_sleep_pid"; then
1079 # Hide warnings about reused PIDs.
1080 wait $am_sleep_pid 2>/dev/null
1082 AC_MSG_RESULT([done])])
1086 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1088 # This file is free software; the Free Software Foundation
1089 # gives unlimited permission to copy and/or distribute it,
1090 # with or without modifications, as long as this notice is preserved.
1092 # AM_SILENT_RULES([DEFAULT])
1093 # --------------------------
1094 # Enable less verbose build rules; with the default set to DEFAULT
1095 # ("yes" being less verbose, "no" or empty being verbose).
1096 AC_DEFUN([AM_SILENT_RULES],
1097 [AC_ARG_ENABLE([silent-rules], [dnl
1099 [--enable-silent-rules],
1100 [less verbose build output (undo: "make V=1")])
1102 [--disable-silent-rules],
1103 [verbose build output (undo: "make V=0")])dnl
1105 case $enable_silent_rules in @%:@ (((
1106 yes) AM_DEFAULT_VERBOSITY=0;;
1107 no) AM_DEFAULT_VERBOSITY=1;;
1108 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1111 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1112 dnl do not support nested variable expansions.
1113 dnl See automake bug#9928 and bug#10237.
1114 am_make=${MAKE-make}
1115 AC_CACHE_CHECK([whether $am_make supports nested variables],
1116 [am_cv_make_support_nested_variables],
1117 [if AS_ECHO([['TRUE=$(BAR$(V))
1123 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1124 am_cv_make_support_nested_variables=yes
1126 am_cv_make_support_nested_variables=no
1128 if test $am_cv_make_support_nested_variables = yes; then
1129 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1131 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1133 AM_V=$AM_DEFAULT_VERBOSITY
1134 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1137 AM_SUBST_NOTMAKE([AM_V])dnl
1138 AC_SUBST([AM_DEFAULT_V])dnl
1139 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1140 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1142 AC_SUBST([AM_BACKSLASH])dnl
1143 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1146 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1148 # This file is free software; the Free Software Foundation
1149 # gives unlimited permission to copy and/or distribute it,
1150 # with or without modifications, as long as this notice is preserved.
1152 # AM_PROG_INSTALL_STRIP
1153 # ---------------------
1154 # One issue with vendor 'install' (even GNU) is that you can't
1155 # specify the program used to strip binaries. This is especially
1156 # annoying in cross-compiling environments, where the build's strip
1157 # is unlikely to handle the host's binaries.
1158 # Fortunately install-sh will honor a STRIPPROG variable, so we
1159 # always use install-sh in "make install-strip", and initialize
1160 # STRIPPROG with the value of the STRIP variable (set by the user).
1161 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1162 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1163 # Installed binaries are usually stripped using 'strip' when the user
1164 # run "make install-strip". However 'strip' might not be the right
1165 # tool to use in cross-compilation environments, therefore Automake
1166 # will honor the 'STRIP' environment variable to overrule this program.
1167 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1168 if test "$cross_compiling" != no; then
1169 AC_CHECK_TOOL([STRIP], [strip], :)
1171 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1172 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1174 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1176 # This file is free software; the Free Software Foundation
1177 # gives unlimited permission to copy and/or distribute it,
1178 # with or without modifications, as long as this notice is preserved.
1180 # _AM_SUBST_NOTMAKE(VARIABLE)
1181 # ---------------------------
1182 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1183 # This macro is traced by Automake.
1184 AC_DEFUN([_AM_SUBST_NOTMAKE])
1186 # AM_SUBST_NOTMAKE(VARIABLE)
1187 # --------------------------
1188 # Public sister of _AM_SUBST_NOTMAKE.
1189 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1191 # Check how to create a tarball. -*- Autoconf -*-
1193 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1195 # This file is free software; the Free Software Foundation
1196 # gives unlimited permission to copy and/or distribute it,
1197 # with or without modifications, as long as this notice is preserved.
1199 # _AM_PROG_TAR(FORMAT)
1200 # --------------------
1201 # Check how to create a tarball in format FORMAT.
1202 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1204 # Substitute a variable $(am__tar) that is a command
1205 # writing to stdout a FORMAT-tarball containing the directory
1207 # tardir=directory && $(am__tar) > result.tar
1209 # Substitute a variable $(am__untar) that extract such
1210 # a tarball read from stdin.
1211 # $(am__untar) < result.tar
1213 AC_DEFUN([_AM_PROG_TAR],
1214 [# Always define AMTAR for backward compatibility. Yes, it's still used
1215 # in the wild :-( We should find a proper way to deprecate it ...
1216 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1218 # We'll loop over all known methods to create a tar archive until one works.
1219 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1222 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1226 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1227 # There is notably a 21 bits limit for the UID and the GID. In fact,
1228 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1230 am_max_uid=2097151 # 2^21 - 1
1231 am_max_gid=$am_max_uid
1232 # The $UID and $GID variables are not portable, so we need to resort
1233 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1234 # below are definitely unexpected, so allow the users to see them
1235 # (that is, avoid stderr redirection).
1236 am_uid=`id -u || echo unknown`
1237 am_gid=`id -g || echo unknown`
1238 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1239 if test $am_uid -le $am_max_uid; then
1240 AC_MSG_RESULT([yes])
1245 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1246 if test $am_gid -le $am_max_gid; then
1247 AC_MSG_RESULT([yes])
1256 [m4_fatal([Unknown tar format])])
1258 AC_MSG_CHECKING([how to create a $1 tar archive])
1260 # Go ahead even if we have the value already cached. We do so because we
1261 # need to set the values for the 'am__tar' and 'am__untar' variables.
1262 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1264 for _am_tool in $_am_tools; do
1267 for _am_tar in tar gnutar gtar; do
1268 AM_RUN_LOG([$_am_tar --version]) && break
1270 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1271 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1272 am__untar="$_am_tar -xf -"
1275 # Must skip GNU tar: if it does not support --format= it doesn't create
1276 # ustar tarball either.
1277 (tar --version) >/dev/null 2>&1 && continue
1278 am__tar='tar chf - "$$tardir"'
1279 am__tar_='tar chf - "$tardir"'
1280 am__untar='tar xf -'
1283 am__tar='pax -L -x $1 -w "$$tardir"'
1284 am__tar_='pax -L -x $1 -w "$tardir"'
1288 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1289 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1290 am__untar='cpio -i -H $1 -d'
1299 # If the value was cached, stop now. We just wanted to have am__tar
1300 # and am__untar set.
1301 test -n "${am_cv_prog_tar_$1}" && break
1303 # tar/untar a dummy directory, and stop if the command works.
1306 echo GrepMe > conftest.dir/file
1307 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1309 if test -s conftest.tar; then
1310 AM_RUN_LOG([$am__untar <conftest.tar])
1311 AM_RUN_LOG([cat conftest.dir/file])
1312 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1317 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1318 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1321 AC_SUBST([am__untar])
1324 m4_include([m4/as-ac-expand.m4])
1325 m4_include([m4/jhflags.m4])
1326 m4_include([m4/python.m4])
1327 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1329 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1330 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1332 # Written by Gordon Matzigkeit, 1996
1334 # This file is free software; the Free Software Foundation gives
1335 # unlimited permission to copy and/or distribute it, with or without
1336 # modifications, as long as this notice is preserved.
1338 m4_define([_LT_COPYING], [dnl
1339 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1340 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1342 # Written by Gordon Matzigkeit, 1996
1344 # This file is part of GNU Libtool.
1346 # GNU Libtool is free software; you can redistribute it and/or
1347 # modify it under the terms of the GNU General Public License as
1348 # published by the Free Software Foundation; either version 2 of
1349 # the License, or (at your option) any later version.
1351 # As a special exception to the GNU General Public License,
1352 # if you distribute this file as part of a program or library that
1353 # is built using GNU Libtool, you may include this file under the
1354 # same distribution terms that you use for the rest of that program.
1356 # GNU Libtool is distributed in the hope that it will be useful,
1357 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1359 # GNU General Public License for more details.
1361 # You should have received a copy of the GNU General Public License
1362 # along with GNU Libtool; see the file COPYING. If not, a copy
1363 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1364 # obtained by writing to the Free Software Foundation, Inc.,
1365 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1371 # LT_PREREQ(VERSION)
1372 # ------------------
1373 # Complain and exit if this libtool version is less that VERSION.
1374 m4_defun([LT_PREREQ],
1375 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1377 [m4_fatal([Libtool version $1 or higher is required],
1382 # _LT_CHECK_BUILDDIR
1383 # ------------------
1384 # Complain if the absolute build directory name contains unusual characters
1385 m4_defun([_LT_CHECK_BUILDDIR],
1388 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1393 # LT_INIT([OPTIONS])
1394 # ------------------
1396 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1397 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1398 AC_BEFORE([$0], [LT_LANG])dnl
1399 AC_BEFORE([$0], [LT_OUTPUT])dnl
1400 AC_BEFORE([$0], [LTDL_INIT])dnl
1401 m4_require([_LT_CHECK_BUILDDIR])dnl
1403 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1404 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1405 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1406 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1407 dnl unless we require an AC_DEFUNed macro:
1408 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1409 AC_REQUIRE([LTSUGAR_VERSION])dnl
1410 AC_REQUIRE([LTVERSION_VERSION])dnl
1411 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1412 m4_require([_LT_PROG_LTMAIN])dnl
1414 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1417 _LT_SET_OPTIONS([$0], [$1])
1419 # This can be used to rebuild libtool when needed
1420 LIBTOOL_DEPS="$ltmain"
1422 # Always use our own libtool.
1423 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1424 AC_SUBST(LIBTOOL)dnl
1429 m4_define([LT_INIT])
1433 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1434 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1435 dnl aclocal-1.4 backwards compatibility:
1436 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1437 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1440 # _LT_CC_BASENAME(CC)
1441 # -------------------
1442 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1443 m4_defun([_LT_CC_BASENAME],
1444 [for cc_temp in $1""; do
1446 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1447 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1452 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1456 # _LT_FILEUTILS_DEFAULTS
1457 # ----------------------
1458 # It is okay to use these file commands and assume they have been set
1459 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1460 m4_defun([_LT_FILEUTILS_DEFAULTS],
1464 ])# _LT_FILEUTILS_DEFAULTS
1469 m4_defun([_LT_SETUP],
1470 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1471 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1472 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1473 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1475 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1477 _LT_DECL([], [host_alias], [0], [The host system])dnl
1478 _LT_DECL([], [host], [0])dnl
1479 _LT_DECL([], [host_os], [0])dnl
1481 _LT_DECL([], [build_alias], [0], [The build system])dnl
1482 _LT_DECL([], [build], [0])dnl
1483 _LT_DECL([], [build_os], [0])dnl
1485 AC_REQUIRE([AC_PROG_CC])dnl
1486 AC_REQUIRE([LT_PATH_LD])dnl
1487 AC_REQUIRE([LT_PATH_NM])dnl
1489 AC_REQUIRE([AC_PROG_LN_S])dnl
1490 test -z "$LN_S" && LN_S="ln -s"
1491 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1493 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1494 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1495 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1497 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1498 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1499 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1500 m4_require([_LT_CMD_RELOAD])dnl
1501 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1502 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1503 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1504 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1505 m4_require([_LT_WITH_SYSROOT])dnl
1507 _LT_CONFIG_LIBTOOL_INIT([
1508 # See if we are running on zsh, and set the options which allow our
1509 # commands through without removal of \ escapes INIT.
1510 if test -n "\${ZSH_VERSION+set}" ; then
1511 setopt NO_GLOB_SUBST
1514 if test -n "${ZSH_VERSION+set}" ; then
1515 setopt NO_GLOB_SUBST
1520 m4_require([_LT_TAG_COMPILER])dnl
1524 # AIX sometimes has problems with the GCC collect2 program. For some
1525 # reason, if we set the COLLECT_NAMES environment variable, the problems
1526 # vanish in a puff of smoke.
1527 if test "X${COLLECT_NAMES+set}" != Xset; then
1529 export COLLECT_NAMES
1536 can_build_shared=yes
1538 # All known linkers require a `.a' archive for static linking (except MSVC,
1539 # which needs '.lib').
1542 with_gnu_ld="$lt_cv_prog_gnu_ld"
1545 old_CFLAGS="$CFLAGS"
1547 # Set sane defaults for various variables
1548 test -z "$CC" && CC=cc
1549 test -z "$LTCC" && LTCC=$CC
1550 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1551 test -z "$LD" && LD=ld
1552 test -z "$ac_objext" && ac_objext=o
1554 _LT_CC_BASENAME([$compiler])
1556 # Only perform the check for file, if the check method requires it
1557 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1558 case $deplibs_check_method in
1560 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1566 # Use C for the default configuration in the libtool script
1567 LT_SUPPORTED_TAG([CC])
1569 _LT_LANG_DEFAULT_CONFIG
1574 # _LT_PREPARE_SED_QUOTE_VARS
1575 # --------------------------
1576 # Define a few sed substitution that help us do robust quoting.
1577 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1578 [# Backslashify metacharacters that are still active within
1579 # double-quoted strings.
1580 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1582 # Same as above, but do not quote variable references.
1583 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1585 # Sed substitution to delay expansion of an escaped shell variable in a
1586 # double_quote_subst'ed string.
1587 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1589 # Sed substitution to delay expansion of an escaped single quote.
1590 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1592 # Sed substitution to avoid accidental globbing in evaled expressions
1593 no_glob_subst='s/\*/\\\*/g'
1598 # Note that this code is called both from `configure', and `config.status'
1599 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1600 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1601 # so we pass a copy along to make sure it has a sensible value anyway.
1602 m4_defun([_LT_PROG_LTMAIN],
1603 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1604 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1605 ltmain="$ac_aux_dir/ltmain.sh"
1610 # So that we can recreate a full libtool script including additional
1611 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1612 # in macros and then make a single call at the end using the `libtool'
1616 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1617 # ----------------------------------------
1618 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1619 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1621 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1626 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1629 # _LT_CONFIG_LIBTOOL([COMMANDS])
1630 # ------------------------------
1631 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1632 m4_define([_LT_CONFIG_LIBTOOL],
1634 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1639 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1642 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1643 # -----------------------------------------------------
1644 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1645 [_LT_CONFIG_LIBTOOL([$1])
1646 _LT_CONFIG_LIBTOOL_INIT([$2])
1650 # _LT_FORMAT_COMMENT([COMMENT])
1651 # -----------------------------
1652 # Add leading comment marks to the start of each line, and a trailing
1653 # full-stop to the whole comment if one is not present already.
1654 m4_define([_LT_FORMAT_COMMENT],
1656 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1657 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1664 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1665 # -------------------------------------------------------------------
1666 # CONFIGNAME is the name given to the value in the libtool script.
1667 # VARNAME is the (base) name used in the configure script.
1668 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1669 # VARNAME. Any other value will be used directly.
1670 m4_define([_LT_DECL],
1671 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1672 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1673 [m4_ifval([$1], [$1], [$2])])
1674 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1676 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1677 lt_dict_add_subkey([lt_decl_dict], [$2],
1678 [tagged?], [m4_ifval([$5], [yes], [no])])])
1682 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1683 # --------------------------------------------------------
1684 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1687 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1688 # ------------------------------------------------
1689 m4_define([lt_decl_tag_varnames],
1690 [_lt_decl_filter([tagged?], [yes], $@)])
1693 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1694 # ---------------------------------------------------------
1695 m4_define([_lt_decl_filter],
1697 [0], [m4_fatal([$0: too few arguments: $#])],
1698 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1699 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1700 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1701 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1705 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1706 # --------------------------------------------------
1707 m4_define([lt_decl_quote_varnames],
1708 [_lt_decl_filter([value], [1], $@)])
1711 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1712 # ---------------------------------------------------
1713 m4_define([lt_decl_dquote_varnames],
1714 [_lt_decl_filter([value], [2], $@)])
1717 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1718 # ---------------------------------------------------
1719 m4_define([lt_decl_varnames_tagged],
1720 [m4_assert([$# <= 2])dnl
1721 _$0(m4_quote(m4_default([$1], [[, ]])),
1722 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1723 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1724 m4_define([_lt_decl_varnames_tagged],
1725 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1728 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1729 # ------------------------------------------------
1730 m4_define([lt_decl_all_varnames],
1731 [_$0(m4_quote(m4_default([$1], [[, ]])),
1733 m4_quote(lt_decl_varnames),
1734 m4_quote(m4_shift($@))))[]dnl
1736 m4_define([_lt_decl_all_varnames],
1737 [lt_join($@, lt_decl_varnames_tagged([$1],
1738 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1742 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1743 # ------------------------------------
1744 # Quote a variable value, and forward it to `config.status' so that its
1745 # declaration there will have the same value as in `configure'. VARNAME
1746 # must have a single quote delimited value for this to work.
1747 m4_define([_LT_CONFIG_STATUS_DECLARE],
1748 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1751 # _LT_CONFIG_STATUS_DECLARATIONS
1752 # ------------------------------
1753 # We delimit libtool config variables with single quotes, so when
1754 # we write them to config.status, we have to be sure to quote all
1755 # embedded single quotes properly. In configure, this macro expands
1756 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1758 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1759 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1760 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1761 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1766 # Output comment and list of tags supported by the script
1767 m4_defun([_LT_LIBTOOL_TAGS],
1768 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1769 available_tags="_LT_TAGS"dnl
1773 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1774 # -----------------------------------
1775 # Extract the dictionary values for VARNAME (optionally with TAG) and
1776 # expand to a commented shell variable setting:
1778 # # Some comment about what VAR is for.
1779 # visible_name=$lt_internal_name
1780 m4_define([_LT_LIBTOOL_DECLARE],
1781 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1782 [description])))[]dnl
1783 m4_pushdef([_libtool_name],
1784 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1785 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1786 [0], [_libtool_name=[$]$1],
1787 [1], [_libtool_name=$lt_[]$1],
1788 [2], [_libtool_name=$lt_[]$1],
1789 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1790 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1794 # _LT_LIBTOOL_CONFIG_VARS
1795 # -----------------------
1796 # Produce commented declarations of non-tagged libtool config variables
1797 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1798 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1799 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1800 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1801 [m4_foreach([_lt_var],
1802 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1803 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1806 # _LT_LIBTOOL_TAG_VARS(TAG)
1807 # -------------------------
1808 m4_define([_LT_LIBTOOL_TAG_VARS],
1809 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1810 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1813 # _LT_TAGVAR(VARNAME, [TAGNAME])
1814 # ------------------------------
1815 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1818 # _LT_CONFIG_COMMANDS
1819 # -------------------
1820 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1821 # variables for single and double quote escaping we saved from calls
1822 # to _LT_DECL, we can put quote escaped variables declarations
1823 # into `config.status', and then the shell code to quote escape them in
1824 # for loops in `config.status'. Finally, any additional code accumulated
1825 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1826 m4_defun([_LT_CONFIG_COMMANDS],
1827 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1828 dnl If the libtool generation code has been placed in $CONFIG_LT,
1829 dnl instead of duplicating it all over again into config.status,
1830 dnl then we will have config.status run $CONFIG_LT later, so it
1831 dnl needs to know what name is stored there:
1832 [AC_CONFIG_COMMANDS([libtool],
1833 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1834 dnl If the libtool generation code is destined for config.status,
1835 dnl expand the accumulated commands and init code now:
1836 [AC_CONFIG_COMMANDS([libtool],
1837 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1838 ])#_LT_CONFIG_COMMANDS
1842 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1845 # The HP-UX ksh and POSIX shell print the target directory to stdout
1847 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1849 sed_quote_subst='$sed_quote_subst'
1850 double_quote_subst='$double_quote_subst'
1851 delay_variable_subst='$delay_variable_subst'
1852 _LT_CONFIG_STATUS_DECLARATIONS
1854 LTCFLAGS='$LTCFLAGS'
1855 compiler='$compiler_DEFAULT'
1857 # A function that is used when there is no print builtin or printf.
1858 func_fallback_echo ()
1860 eval 'cat <<_LTECHO_EOF
1865 # Quote evaled strings.
1866 for var in lt_decl_all_varnames([[ \
1867 ]], lt_decl_quote_varnames); do
1868 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1869 *[[\\\\\\\`\\"\\\$]]*)
1870 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1873 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1878 # Double-quote double-evaled strings.
1879 for var in lt_decl_all_varnames([[ \
1880 ]], lt_decl_dquote_varnames); do
1881 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1882 *[[\\\\\\\`\\"\\\$]]*)
1883 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1886 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1891 _LT_OUTPUT_LIBTOOL_INIT
1894 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1895 # ------------------------------------
1896 # Generate a child script FILE with all initialization necessary to
1897 # reuse the environment learned by the parent script, and make the
1898 # file executable. If COMMENT is supplied, it is inserted after the
1899 # `#!' sequence but before initialization text begins. After this
1900 # macro, additional text can be appended to FILE to form the body of
1901 # the child script. The macro ends with non-zero status if the
1902 # file could not be fully written (such as if the disk is full).
1903 m4_ifdef([AS_INIT_GENERATED],
1904 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1905 [m4_defun([_LT_GENERATED_FILE_INIT],
1906 [m4_require([AS_PREPARE])]dnl
1907 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1909 cat >$1 <<_ASEOF || lt_write_fail=1
1911 # Generated by $as_me.
1913 SHELL=\${CONFIG_SHELL-$SHELL}
1916 cat >>$1 <<\_ASEOF || lt_write_fail=1
1919 exec AS_MESSAGE_FD>&1
1921 test $lt_write_fail = 0 && chmod +x $1[]dnl
1922 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1926 # This macro allows early generation of the libtool script (before
1927 # AC_OUTPUT is called), incase it is used in configure for compilation
1929 AC_DEFUN([LT_OUTPUT],
1930 [: ${CONFIG_LT=./config.lt}
1931 AC_MSG_NOTICE([creating $CONFIG_LT])
1932 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1933 [# Run this file to recreate a libtool stub with the current configuration.])
1935 cat >>"$CONFIG_LT" <<\_LTEOF
1937 exec AS_MESSAGE_LOG_FD>>config.log
1940 AS_BOX([Running $as_me.])
1941 } >&AS_MESSAGE_LOG_FD
1944 \`$as_me' creates a local libtool stub from the current configuration,
1945 for use in further configure time tests before the real libtool is
1948 Usage: $[0] [[OPTIONS]]
1950 -h, --help print this help, then exit
1951 -V, --version print version number, then exit
1952 -q, --quiet do not print progress messages
1953 -d, --debug don't remove temporary files
1955 Report bugs to <bug-libtool@gnu.org>."
1958 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1959 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1960 configured by $[0], generated by m4_PACKAGE_STRING.
1962 Copyright (C) 2011 Free Software Foundation, Inc.
1963 This config.lt script is free software; the Free Software Foundation
1964 gives unlimited permision to copy, distribute and modify it."
1966 while test $[#] != 0
1969 --version | --v* | -V )
1970 echo "$lt_cl_version"; exit 0 ;;
1971 --help | --h* | -h )
1972 echo "$lt_cl_help"; exit 0 ;;
1973 --debug | --d* | -d )
1975 --quiet | --q* | --silent | --s* | -q )
1978 -*) AC_MSG_ERROR([unrecognized option: $[1]
1979 Try \`$[0] --help' for more information.]) ;;
1981 *) AC_MSG_ERROR([unrecognized argument: $[1]
1982 Try \`$[0] --help' for more information.]) ;;
1987 if $lt_cl_silent; then
1988 exec AS_MESSAGE_FD>/dev/null
1992 cat >>"$CONFIG_LT" <<_LTEOF
1993 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1996 cat >>"$CONFIG_LT" <<\_LTEOF
1997 AC_MSG_NOTICE([creating $ofile])
1998 _LT_OUTPUT_LIBTOOL_COMMANDS
2001 chmod +x "$CONFIG_LT"
2003 # configure is writing to config.log, but config.lt does its own redirection,
2004 # appending to config.log, which fails on DOS, as config.log is still kept
2005 # open by configure. Here we exec the FD to /dev/null, effectively closing
2006 # config.log, so it can be properly (re)opened and appended to by config.lt.
2008 test "$silent" = yes &&
2009 lt_config_lt_args="$lt_config_lt_args --quiet"
2010 exec AS_MESSAGE_LOG_FD>/dev/null
2011 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2012 exec AS_MESSAGE_LOG_FD>>config.log
2013 $lt_cl_success || AS_EXIT(1)
2019 # If TAG is the built-in tag, create an initial libtool script with a
2020 # default configuration from the untagged config vars. Otherwise add code
2021 # to config.status for appending the configuration named by TAG from the
2022 # matching tagged config vars.
2023 m4_defun([_LT_CONFIG],
2024 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2025 _LT_CONFIG_SAVE_COMMANDS([
2026 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2027 m4_if(_LT_TAG, [C], [
2028 # See if we are running on zsh, and set the options which allow our
2029 # commands through without removal of \ escapes.
2030 if test -n "${ZSH_VERSION+set}" ; then
2031 setopt NO_GLOB_SUBST
2035 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2038 cat <<_LT_EOF >> "$cfgfile"
2041 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2042 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2043 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2044 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2049 # ### BEGIN LIBTOOL CONFIG
2050 _LT_LIBTOOL_CONFIG_VARS
2051 _LT_LIBTOOL_TAG_VARS
2052 # ### END LIBTOOL CONFIG
2058 cat <<\_LT_EOF >> "$cfgfile"
2059 # AIX sometimes has problems with the GCC collect2 program. For some
2060 # reason, if we set the COLLECT_NAMES environment variable, the problems
2061 # vanish in a puff of smoke.
2062 if test "X${COLLECT_NAMES+set}" != Xset; then
2064 export COLLECT_NAMES
2072 # We use sed instead of cat because bash on DJGPP gets confused if
2073 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2074 # text mode, it properly converts lines to CR/LF. This bash problem
2075 # is reportedly fixed, but why not run on old versions too?
2076 sed '$q' "$ltmain" >> "$cfgfile" \
2077 || (rm -f "$cfgfile"; exit 1)
2079 _LT_PROG_REPLACE_SHELLFNS
2081 mv -f "$cfgfile" "$ofile" ||
2082 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2085 [cat <<_LT_EOF >> "$ofile"
2087 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2088 dnl in a comment (ie after a #).
2089 # ### BEGIN LIBTOOL TAG CONFIG: $1
2090 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2091 # ### END LIBTOOL TAG CONFIG: $1
2098 TIMESTAMP='$TIMESTAMP'
2100 ofile='$ofile'], [])
2101 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2105 # LT_SUPPORTED_TAG(TAG)
2106 # ---------------------
2107 # Trace this macro to discover what tags are supported by the libtool
2108 # --tag option, using:
2109 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
2110 AC_DEFUN([LT_SUPPORTED_TAG], [])
2113 # C support is built-in for now
2114 m4_define([_LT_LANG_C_enabled], [])
2115 m4_define([_LT_TAGS], [])
2120 # Enable libtool support for the given language if not already enabled.
2122 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2125 [C++], [_LT_LANG(CXX)],
2126 [Go], [_LT_LANG(GO)],
2127 [Java], [_LT_LANG(GCJ)],
2128 [Fortran 77], [_LT_LANG(F77)],
2129 [Fortran], [_LT_LANG(FC)],
2130 [Windows Resource], [_LT_LANG(RC)],
2131 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2133 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2137 # _LT_LANG(LANGNAME)
2138 # ------------------
2139 m4_defun([_LT_LANG],
2140 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2141 [LT_SUPPORTED_TAG([$1])dnl
2142 m4_append([_LT_TAGS], [$1 ])dnl
2143 m4_define([_LT_LANG_]$1[_enabled], [])dnl
2144 _LT_LANG_$1_CONFIG($1)])dnl
2148 m4_ifndef([AC_PROG_GO], [
2149 # NOTE: This macro has been submitted for inclusion into #
2150 # GNU Autoconf as AC_PROG_GO. When it is available in #
2151 # a released version of Autoconf we should remove this #
2152 # macro and use it instead. #
2153 m4_defun([AC_PROG_GO],
2154 [AC_LANG_PUSH(Go)dnl
2155 AC_ARG_VAR([GOC], [Go compiler command])dnl
2156 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2157 _AC_ARG_VAR_LDFLAGS()dnl
2158 AC_CHECK_TOOL(GOC, gccgo)
2159 if test -z "$GOC"; then
2160 if test -n "$ac_tool_prefix"; then
2161 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2164 if test -z "$GOC"; then
2165 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2171 # _LT_LANG_DEFAULT_CONFIG
2172 # -----------------------
2173 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2174 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2176 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2178 AC_PROVIDE_IFELSE([AC_PROG_F77],
2180 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2182 AC_PROVIDE_IFELSE([AC_PROG_FC],
2184 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2186 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2187 dnl pulling things in needlessly.
2188 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2190 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2192 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2194 [m4_ifdef([AC_PROG_GCJ],
2195 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2196 m4_ifdef([A][M_PROG_GCJ],
2197 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2198 m4_ifdef([LT_PROG_GCJ],
2199 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2201 AC_PROVIDE_IFELSE([AC_PROG_GO],
2203 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2205 AC_PROVIDE_IFELSE([LT_PROG_RC],
2207 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2208 ])# _LT_LANG_DEFAULT_CONFIG
2211 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2212 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2213 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2214 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2215 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2216 dnl aclocal-1.4 backwards compatibility:
2217 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2218 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2219 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2220 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2221 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2226 m4_defun([_LT_TAG_COMPILER],
2227 [AC_REQUIRE([AC_PROG_CC])dnl
2229 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2230 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2231 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2232 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2234 # If no C compiler was specified, use CC.
2237 # If no C compiler flags were specified, use CFLAGS.
2238 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2240 # Allow CC to be a program name with arguments.
2242 ])# _LT_TAG_COMPILER
2245 # _LT_COMPILER_BOILERPLATE
2246 # ------------------------
2247 # Check for compiler boilerplate output or warnings with
2248 # the simple compiler test code.
2249 m4_defun([_LT_COMPILER_BOILERPLATE],
2250 [m4_require([_LT_DECL_SED])dnl
2251 ac_outfile=conftest.$ac_objext
2252 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2253 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2254 _lt_compiler_boilerplate=`cat conftest.err`
2256 ])# _LT_COMPILER_BOILERPLATE
2259 # _LT_LINKER_BOILERPLATE
2260 # ----------------------
2261 # Check for linker boilerplate output or warnings with
2262 # the simple link test code.
2263 m4_defun([_LT_LINKER_BOILERPLATE],
2264 [m4_require([_LT_DECL_SED])dnl
2265 ac_outfile=conftest.$ac_objext
2266 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2267 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2268 _lt_linker_boilerplate=`cat conftest.err`
2270 ])# _LT_LINKER_BOILERPLATE
2272 # _LT_REQUIRED_DARWIN_CHECKS
2273 # -------------------------
2274 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2276 rhapsody* | darwin*)
2277 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2278 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2279 AC_CHECK_TOOL([LIPO], [lipo], [:])
2280 AC_CHECK_TOOL([OTOOL], [otool], [:])
2281 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2282 _LT_DECL([], [DSYMUTIL], [1],
2283 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2284 _LT_DECL([], [NMEDIT], [1],
2285 [Tool to change global to local symbols on Mac OS X])
2286 _LT_DECL([], [LIPO], [1],
2287 [Tool to manipulate fat objects and archives on Mac OS X])
2288 _LT_DECL([], [OTOOL], [1],
2289 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2290 _LT_DECL([], [OTOOL64], [1],
2291 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2293 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2294 [lt_cv_apple_cc_single_mod=no
2295 if test -z "${LT_MULTI_MODULE}"; then
2296 # By default we will add the -single_module flag. You can override
2297 # by either setting the environment variable LT_MULTI_MODULE
2298 # non-empty at configure time, or by adding -multi_module to the
2300 rm -rf libconftest.dylib*
2301 echo "int foo(void){return 1;}" > conftest.c
2302 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2303 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2304 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2305 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2307 # If there is a non-empty error log, and "single_module"
2308 # appears in it, assume the flag caused a linker warning
2309 if test -s conftest.err && $GREP single_module conftest.err; then
2310 cat conftest.err >&AS_MESSAGE_LOG_FD
2311 # Otherwise, if the output was created with a 0 exit code from
2312 # the compiler, it worked.
2313 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2314 lt_cv_apple_cc_single_mod=yes
2316 cat conftest.err >&AS_MESSAGE_LOG_FD
2318 rm -rf libconftest.dylib*
2322 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2323 [lt_cv_ld_exported_symbols_list],
2324 [lt_cv_ld_exported_symbols_list=no
2325 save_LDFLAGS=$LDFLAGS
2326 echo "_main" > conftest.sym
2327 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2328 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2329 [lt_cv_ld_exported_symbols_list=yes],
2330 [lt_cv_ld_exported_symbols_list=no])
2331 LDFLAGS="$save_LDFLAGS"
2334 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2335 [lt_cv_ld_force_load=no
2336 cat > conftest.c << _LT_EOF
2337 int forced_loaded() { return 2;}
2339 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2340 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2341 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2342 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2343 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2344 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2345 cat > conftest.c << _LT_EOF
2346 int main() { return 0;}
2348 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2349 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2351 if test -s conftest.err && $GREP force_load conftest.err; then
2352 cat conftest.err >&AS_MESSAGE_LOG_FD
2353 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2354 lt_cv_ld_force_load=yes
2356 cat conftest.err >&AS_MESSAGE_LOG_FD
2358 rm -f conftest.err libconftest.a conftest conftest.c
2359 rm -rf conftest.dSYM
2362 rhapsody* | darwin1.[[012]])
2363 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2365 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2366 darwin*) # darwin 5.x on
2367 # if running on 10.5 or later, the deployment target defaults
2368 # to the OS version, if on x86, and 10.4, the deployment
2369 # target defaults to 10.4. Don't you love it?
2370 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2371 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2372 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2374 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2376 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2380 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2381 _lt_dar_single_mod='$single_module'
2383 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2384 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2386 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2388 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2389 _lt_dsymutil='~$DSYMUTIL $lib || :'
2398 # _LT_DARWIN_LINKER_FEATURES([TAG])
2399 # ---------------------------------
2400 # Checks for linker and compiler features on darwin
2401 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2403 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2404 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2405 _LT_TAGVAR(hardcode_direct, $1)=no
2406 _LT_TAGVAR(hardcode_automatic, $1)=yes
2407 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2408 if test "$lt_cv_ld_force_load" = "yes"; then
2409 _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\"`'
2410 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2411 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2413 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2415 _LT_TAGVAR(link_all_deplibs, $1)=yes
2416 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2417 case $cc_basename in
2418 ifort*) _lt_dar_can_shared=yes ;;
2419 *) _lt_dar_can_shared=$GCC ;;
2421 if test "$_lt_dar_can_shared" = "yes"; then
2422 output_verbose_link_cmd=func_echo_all
2423 _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}"
2424 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2425 _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}"
2426 _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}"
2428 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2429 _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}"
2430 _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}"
2434 _LT_TAGVAR(ld_shlibs, $1)=no
2438 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2439 # ----------------------------------
2440 # Links a minimal program and checks the executable
2441 # for the system default hardcoded library path. In most cases,
2442 # this is /usr/lib:/lib, but when the MPI compilers are used
2443 # the location of the communication and MPI libs are included too.
2444 # If we don't find anything, use the default library path according
2445 # to the aix ld manual.
2446 # Store the results from the different compilers for each TAGNAME.
2447 # Allow to override them for all tags through lt_cv_aix_libpath.
2448 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2449 [m4_require([_LT_DECL_SED])dnl
2450 if test "${lt_cv_aix_libpath+set}" = set; then
2451 aix_libpath=$lt_cv_aix_libpath
2453 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2454 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2455 lt_aix_libpath_sed='[
2456 /Import File Strings/,/^$/ {
2458 s/^0 *\([^ ]*\) *$/\1/
2462 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2463 # Check for a 64-bit object if we didn't find anything.
2464 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2465 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2467 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2468 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2471 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2473 ])# _LT_SYS_MODULE_PATH_AIX
2476 # _LT_SHELL_INIT(ARG)
2477 # -------------------
2478 m4_define([_LT_SHELL_INIT],
2479 [m4_divert_text([M4SH-INIT], [$1
2480 ])])# _LT_SHELL_INIT
2484 # _LT_PROG_ECHO_BACKSLASH
2485 # -----------------------
2486 # Find how we can fake an echo command that does not interpret backslash.
2487 # In particular, with Autoconf 2.60 or later we add some code to the start
2488 # of the generated configure script which will find a shell with a builtin
2489 # printf (which we can use as an echo command).
2490 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2491 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2492 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2493 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2495 AC_MSG_CHECKING([how to print strings])
2496 # Test print first, because it will be a builtin if present.
2497 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2498 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2500 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2503 # Use this function as a fallback that always works.
2504 func_fallback_echo ()
2506 eval 'cat <<_LTECHO_EOF
2510 ECHO='func_fallback_echo'
2513 # func_echo_all arg...
2514 # Invoke $ECHO with all args, space-separated.
2521 printf*) AC_MSG_RESULT([printf]) ;;
2522 print*) AC_MSG_RESULT([print -r]) ;;
2523 *) AC_MSG_RESULT([cat]) ;;
2526 m4_ifdef([_AS_DETECT_SUGGESTED],
2527 [_AS_DETECT_SUGGESTED([
2528 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2529 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2530 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2531 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2532 PATH=/empty FPATH=/empty; export PATH FPATH
2533 test "X`printf %s $ECHO`" = "X$ECHO" \
2534 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2536 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2537 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2538 ])# _LT_PROG_ECHO_BACKSLASH
2543 AC_DEFUN([_LT_WITH_SYSROOT],
2544 [AC_MSG_CHECKING([for sysroot])
2545 AC_ARG_WITH([sysroot],
2546 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2547 (or the compiler's sysroot if not specified).],
2548 [], [with_sysroot=no])
2550 dnl lt_sysroot will always be passed unquoted. We quote it here
2551 dnl in case the user passed a directory name.
2553 case ${with_sysroot} in #(
2555 if test "$GCC" = yes; then
2556 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2560 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2565 AC_MSG_RESULT([${with_sysroot}])
2566 AC_MSG_ERROR([The sysroot must be an absolute path.])
2570 AC_MSG_RESULT([${lt_sysroot:-no}])
2571 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2572 [dependent libraries, and in which our libraries should be installed.])])
2576 m4_defun([_LT_ENABLE_LOCK],
2577 [AC_ARG_ENABLE([libtool-lock],
2578 [AS_HELP_STRING([--disable-libtool-lock],
2579 [avoid locking (might break parallel builds)])])
2580 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2582 # Some flags need to be propagated to the compiler or linker for good
2586 # Find out which ABI we are using.
2587 echo 'int i;' > conftest.$ac_ext
2588 if AC_TRY_EVAL(ac_compile); then
2589 case `/usr/bin/file conftest.$ac_objext` in
2601 # Find out which ABI we are using.
2602 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2603 if AC_TRY_EVAL(ac_compile); then
2604 if test "$lt_cv_prog_gnu_ld" = yes; then
2605 case `/usr/bin/file conftest.$ac_objext` in
2607 LD="${LD-ld} -melf32bsmip"
2610 LD="${LD-ld} -melf32bmipn32"
2613 LD="${LD-ld} -melf64bmip"
2617 case `/usr/bin/file conftest.$ac_objext` in
2633 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2634 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2635 # Find out which ABI we are using.
2636 echo 'int i;' > conftest.$ac_ext
2637 if AC_TRY_EVAL(ac_compile); then
2638 case `/usr/bin/file conftest.o` in
2641 x86_64-*kfreebsd*-gnu)
2642 LD="${LD-ld} -m elf_i386_fbsd"
2645 LD="${LD-ld} -m elf_i386"
2647 powerpc64le-*linux*)
2648 LD="${LD-ld} -m elf32lppclinux"
2651 LD="${LD-ld} -m elf32ppclinux"
2654 LD="${LD-ld} -m elf_s390"
2657 LD="${LD-ld} -m elf32_sparc"
2663 x86_64-*kfreebsd*-gnu)
2664 LD="${LD-ld} -m elf_x86_64_fbsd"
2667 LD="${LD-ld} -m elf_x86_64"
2670 LD="${LD-ld} -m elf64lppc"
2673 LD="${LD-ld} -m elf64ppc"
2675 s390*-*linux*|s390*-*tpf*)
2676 LD="${LD-ld} -m elf64_s390"
2679 LD="${LD-ld} -m elf64_sparc"
2689 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2690 SAVE_CFLAGS="$CFLAGS"
2691 CFLAGS="$CFLAGS -belf"
2692 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2694 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2696 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2697 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2698 CFLAGS="$SAVE_CFLAGS"
2702 # Find out which ABI we are using.
2703 echo 'int i;' > conftest.$ac_ext
2704 if AC_TRY_EVAL(ac_compile); then
2705 case `/usr/bin/file conftest.o` in
2707 case $lt_cv_prog_gnu_ld in
2711 LD="${LD-ld} -m elf_x86_64"
2714 LD="${LD-ld} -m elf64_sparc"
2717 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2718 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2723 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2735 need_locks="$enable_libtool_lock"
2741 m4_defun([_LT_PROG_AR],
2742 [AC_CHECK_TOOLS(AR, [ar], false)
2745 _LT_DECL([], [AR], [1], [The archiver])
2746 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2748 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2749 [lt_cv_ar_at_file=no
2750 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2751 [echo conftest.$ac_objext > conftest.lst
2752 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2753 AC_TRY_EVAL([lt_ar_try])
2754 if test "$ac_status" -eq 0; then
2755 # Ensure the archiver fails upon bogus file names.
2756 rm -f conftest.$ac_objext libconftest.a
2757 AC_TRY_EVAL([lt_ar_try])
2758 if test "$ac_status" -ne 0; then
2762 rm -f conftest.* libconftest.a
2766 if test "x$lt_cv_ar_at_file" = xno; then
2769 archiver_list_spec=$lt_cv_ar_at_file
2771 _LT_DECL([], [archiver_list_spec], [1],
2772 [How to feed a file listing to the archiver])
2776 # _LT_CMD_OLD_ARCHIVE
2777 # -------------------
2778 m4_defun([_LT_CMD_OLD_ARCHIVE],
2781 AC_CHECK_TOOL(STRIP, strip, :)
2782 test -z "$STRIP" && STRIP=:
2783 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2785 AC_CHECK_TOOL(RANLIB, ranlib, :)
2786 test -z "$RANLIB" && RANLIB=:
2787 _LT_DECL([], [RANLIB], [1],
2788 [Commands used to install an old-style archive])
2790 # Determine commands to create old-style static archives.
2791 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2792 old_postinstall_cmds='chmod 644 $oldlib'
2793 old_postuninstall_cmds=
2795 if test -n "$RANLIB"; then
2798 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2801 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2804 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2809 lock_old_archive_extraction=yes ;;
2811 lock_old_archive_extraction=no ;;
2813 _LT_DECL([], [old_postinstall_cmds], [2])
2814 _LT_DECL([], [old_postuninstall_cmds], [2])
2815 _LT_TAGDECL([], [old_archive_cmds], [2],
2816 [Commands used to build an old-style archive])
2817 _LT_DECL([], [lock_old_archive_extraction], [0],
2818 [Whether to use a lock for old archive extraction])
2819 ])# _LT_CMD_OLD_ARCHIVE
2822 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2823 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2824 # ----------------------------------------------------------------
2825 # Check whether the given compiler option works
2826 AC_DEFUN([_LT_COMPILER_OPTION],
2827 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2828 m4_require([_LT_DECL_SED])dnl
2829 AC_CACHE_CHECK([$1], [$2],
2831 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2832 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2833 lt_compiler_flag="$3"
2834 # Insert the option either (1) after the last *FLAGS variable, or
2835 # (2) before a word containing "conftest.", or (3) at the end.
2836 # Note that $ac_compile itself does not contain backslashes and begins
2837 # with a dollar sign (not a hyphen), so the echo should work correctly.
2838 # The option is referenced via a variable to avoid confusing sed.
2839 lt_compile=`echo "$ac_compile" | $SED \
2840 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2841 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2842 -e 's:$: $lt_compiler_flag:'`
2843 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2844 (eval "$lt_compile" 2>conftest.err)
2846 cat conftest.err >&AS_MESSAGE_LOG_FD
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2848 if (exit $ac_status) && test -s "$ac_outfile"; then
2849 # The compiler can only warn and ignore the option if not recognized
2850 # So say no if there are warnings other than the usual output.
2851 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2852 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2853 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2860 if test x"[$]$2" = xyes; then
2861 m4_if([$5], , :, [$5])
2863 m4_if([$6], , :, [$6])
2865 ])# _LT_COMPILER_OPTION
2868 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2869 dnl aclocal-1.4 backwards compatibility:
2870 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2873 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2874 # [ACTION-SUCCESS], [ACTION-FAILURE])
2875 # ----------------------------------------------------
2876 # Check whether the given linker option works
2877 AC_DEFUN([_LT_LINKER_OPTION],
2878 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2879 m4_require([_LT_DECL_SED])dnl
2880 AC_CACHE_CHECK([$1], [$2],
2882 save_LDFLAGS="$LDFLAGS"
2883 LDFLAGS="$LDFLAGS $3"
2884 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2885 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2886 # The linker can only warn and ignore the option if not recognized
2887 # So say no if there are warnings
2888 if test -s conftest.err; then
2889 # Append any errors to the config.log.
2890 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2891 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2892 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2893 if diff conftest.exp conftest.er2 >/dev/null; then
2901 LDFLAGS="$save_LDFLAGS"
2904 if test x"[$]$2" = xyes; then
2905 m4_if([$4], , :, [$4])
2907 m4_if([$5], , :, [$5])
2909 ])# _LT_LINKER_OPTION
2912 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2913 dnl aclocal-1.4 backwards compatibility:
2914 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2919 AC_DEFUN([LT_CMD_MAX_LEN],
2920 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2921 # find the maximum length of command line arguments
2922 AC_MSG_CHECKING([the maximum length of command line arguments])
2923 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2929 # On DJGPP, this test can blow up pretty badly due to problems in libc
2930 # (any single argument exceeding 2000 bytes causes a buffer overrun
2931 # during glob expansion). Even if it were fixed, the result of this
2932 # check would be larger than it should be.
2933 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2937 # Under GNU Hurd, this test is not required because there is
2938 # no limit to the length of command line arguments.
2939 # Libtool will interpret -1 as no limit whatsoever
2940 lt_cv_sys_max_cmd_len=-1;
2943 cygwin* | mingw* | cegcc*)
2944 # On Win9x/ME, this test blows up -- it succeeds, but takes
2945 # about 5 minutes as the teststring grows exponentially.
2946 # Worse, since 9x/ME are not pre-emptively multitasking,
2947 # you end up with a "frozen" computer, even though with patience
2948 # the test eventually succeeds (with a max line length of 256k).
2949 # Instead, let's just punt: use the minimum linelength reported by
2950 # all of the supported platforms: 8192 (on NT/2K/XP).
2951 lt_cv_sys_max_cmd_len=8192;
2955 # On MiNT this can take a long time and run out of memory.
2956 lt_cv_sys_max_cmd_len=8192;
2960 # On AmigaOS with pdksh, this test takes hours, literally.
2961 # So we just punt and use a minimum line length of 8192.
2962 lt_cv_sys_max_cmd_len=8192;
2965 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2966 # This has been around since 386BSD, at least. Likely further.
2967 if test -x /sbin/sysctl; then
2968 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2969 elif test -x /usr/sbin/sysctl; then
2970 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2972 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2974 # And add a safety zone
2975 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2976 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2980 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2981 lt_cv_sys_max_cmd_len=196608
2985 # The test takes a long time on OS/2.
2986 lt_cv_sys_max_cmd_len=8192
2990 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2991 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2992 # nice to cause kernel panics so lets avoid the loop below.
2993 # First set a reasonable default.
2994 lt_cv_sys_max_cmd_len=16384
2996 if test -x /sbin/sysconfig; then
2997 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2998 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3003 lt_cv_sys_max_cmd_len=102400
3005 sysv5* | sco5v6* | sysv4.2uw2*)
3006 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3007 if test -n "$kargmax"; then
3008 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3010 lt_cv_sys_max_cmd_len=32768
3014 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3015 if test -n "$lt_cv_sys_max_cmd_len"; then
3016 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3017 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3019 # Make teststring a little bigger before we do anything with it.
3020 # a 1K string should be a reasonable start.
3021 for i in 1 2 3 4 5 6 7 8 ; do
3022 teststring=$teststring$teststring
3024 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3025 # If test is not a shell built-in, we'll probably end up computing a
3026 # maximum length that is only half of the actual maximum length, but
3028 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
3029 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3030 test $i != 17 # 1/2 MB should be enough
3033 teststring=$teststring$teststring
3035 # Only check the string length outside the loop.
3036 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3038 # Add a significant safety factor because C++ compilers can tack on
3039 # massive amounts of additional arguments before passing them to the
3040 # linker. It appears as though 1/2 is a usable value.
3041 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3046 if test -n $lt_cv_sys_max_cmd_len ; then
3047 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3051 max_cmd_len=$lt_cv_sys_max_cmd_len
3052 _LT_DECL([], [max_cmd_len], [0],
3053 [What is the maximum length of a command?])
3057 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3058 dnl aclocal-1.4 backwards compatibility:
3059 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3064 m4_defun([_LT_HEADER_DLFCN],
3065 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3066 ])# _LT_HEADER_DLFCN
3069 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3070 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3071 # ----------------------------------------------------------------
3072 m4_defun([_LT_TRY_DLOPEN_SELF],
3073 [m4_require([_LT_HEADER_DLFCN])dnl
3074 if test "$cross_compiling" = yes; then :
3077 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3078 lt_status=$lt_dlunknown
3079 cat > conftest.$ac_ext <<_LT_EOF
3080 [#line $LINENO "configure"
3081 #include "confdefs.h"
3090 # define LT_DLGLOBAL RTLD_GLOBAL
3093 # define LT_DLGLOBAL DL_GLOBAL
3095 # define LT_DLGLOBAL 0
3099 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3100 find out it does not work in some platform. */
3101 #ifndef LT_DLLAZY_OR_NOW
3103 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3106 # define LT_DLLAZY_OR_NOW DL_LAZY
3109 # define LT_DLLAZY_OR_NOW RTLD_NOW
3112 # define LT_DLLAZY_OR_NOW DL_NOW
3114 # define LT_DLLAZY_OR_NOW 0
3121 /* When -fvisbility=hidden is used, assume the code has been annotated
3122 correspondingly for the symbols needed. */
3123 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3124 int fnord () __attribute__((visibility("default")));
3127 int fnord () { return 42; }
3130 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3131 int status = $lt_dlunknown;
3135 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3138 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3139 else puts (dlerror ());
3141 /* dlclose (self); */
3149 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3150 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3153 x$lt_dlno_uscore) $1 ;;
3154 x$lt_dlneed_uscore) $2 ;;
3155 x$lt_dlunknown|x*) $3 ;;
3158 # compilation failed
3163 ])# _LT_TRY_DLOPEN_SELF
3166 # LT_SYS_DLOPEN_SELF
3167 # ------------------
3168 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3169 [m4_require([_LT_HEADER_DLFCN])dnl
3170 if test "x$enable_dlopen" != xyes; then
3171 enable_dlopen=unknown
3172 enable_dlopen_self=unknown
3173 enable_dlopen_self_static=unknown
3180 lt_cv_dlopen="load_add_on"
3182 lt_cv_dlopen_self=yes
3185 mingw* | pw32* | cegcc*)
3186 lt_cv_dlopen="LoadLibrary"
3191 lt_cv_dlopen="dlopen"
3196 # if libdl is installed we need to link against it
3197 AC_CHECK_LIB([dl], [dlopen],
3198 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3201 lt_cv_dlopen_self=yes
3206 AC_CHECK_FUNC([shl_load],
3207 [lt_cv_dlopen="shl_load"],
3208 [AC_CHECK_LIB([dld], [shl_load],
3209 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3210 [AC_CHECK_FUNC([dlopen],
3211 [lt_cv_dlopen="dlopen"],
3212 [AC_CHECK_LIB([dl], [dlopen],
3213 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3214 [AC_CHECK_LIB([svld], [dlopen],
3215 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3216 [AC_CHECK_LIB([dld], [dld_link],
3217 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3226 if test "x$lt_cv_dlopen" != xno; then
3232 case $lt_cv_dlopen in
3234 save_CPPFLAGS="$CPPFLAGS"
3235 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3237 save_LDFLAGS="$LDFLAGS"
3238 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3241 LIBS="$lt_cv_dlopen_libs $LIBS"
3243 AC_CACHE_CHECK([whether a program can dlopen itself],
3244 lt_cv_dlopen_self, [dnl
3245 _LT_TRY_DLOPEN_SELF(
3246 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3247 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3250 if test "x$lt_cv_dlopen_self" = xyes; then
3251 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3252 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3253 lt_cv_dlopen_self_static, [dnl
3254 _LT_TRY_DLOPEN_SELF(
3255 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3256 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3260 CPPFLAGS="$save_CPPFLAGS"
3261 LDFLAGS="$save_LDFLAGS"
3266 case $lt_cv_dlopen_self in
3267 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3268 *) enable_dlopen_self=unknown ;;
3271 case $lt_cv_dlopen_self_static in
3272 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3273 *) enable_dlopen_self_static=unknown ;;
3276 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3277 [Whether dlopen is supported])
3278 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3279 [Whether dlopen of programs is supported])
3280 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3281 [Whether dlopen of statically linked programs is supported])
3282 ])# LT_SYS_DLOPEN_SELF
3285 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3286 dnl aclocal-1.4 backwards compatibility:
3287 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3290 # _LT_COMPILER_C_O([TAGNAME])
3291 # ---------------------------
3292 # Check to see if options -c and -o are simultaneously supported by compiler.
3293 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3294 m4_defun([_LT_COMPILER_C_O],
3295 [m4_require([_LT_DECL_SED])dnl
3296 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3297 m4_require([_LT_TAG_COMPILER])dnl
3298 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3299 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3300 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3301 $RM -r conftest 2>/dev/null
3305 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3307 lt_compiler_flag="-o out/conftest2.$ac_objext"
3308 # Insert the option either (1) after the last *FLAGS variable, or
3309 # (2) before a word containing "conftest.", or (3) at the end.
3310 # Note that $ac_compile itself does not contain backslashes and begins
3311 # with a dollar sign (not a hyphen), so the echo should work correctly.
3312 lt_compile=`echo "$ac_compile" | $SED \
3313 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3314 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3315 -e 's:$: $lt_compiler_flag:'`
3316 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3317 (eval "$lt_compile" 2>out/conftest.err)
3319 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3320 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3321 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3323 # The compiler can only warn and ignore the option if not recognized
3324 # So say no if there are warnings
3325 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3326 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3327 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3328 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3331 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3333 # SGI C++ compiler will create directory out/ii_files/ for
3334 # template instantiation
3335 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3336 $RM out/* && rmdir out
3341 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3342 [Does compiler simultaneously support -c and -o options?])
3343 ])# _LT_COMPILER_C_O
3346 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3347 # ----------------------------------
3348 # Check to see if we can do hard links to lock some files if needed
3349 m4_defun([_LT_COMPILER_FILE_LOCKS],
3350 [m4_require([_LT_ENABLE_LOCK])dnl
3351 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3352 _LT_COMPILER_C_O([$1])
3354 hard_links="nottested"
3355 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3356 # do not overwrite the value of need_locks provided by the user
3357 AC_MSG_CHECKING([if we can lock with hard links])
3360 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3362 ln conftest.a conftest.b 2>&5 || hard_links=no
3363 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3364 AC_MSG_RESULT([$hard_links])
3365 if test "$hard_links" = no; then
3366 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3372 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3373 ])# _LT_COMPILER_FILE_LOCKS
3378 m4_defun([_LT_CHECK_OBJDIR],
3379 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3380 [rm -f .libs 2>/dev/null
3381 mkdir .libs 2>/dev/null
3382 if test -d .libs; then
3385 # MS-DOS does not allow filenames that begin with a dot.
3388 rmdir .libs 2>/dev/null])
3389 objdir=$lt_cv_objdir
3390 _LT_DECL([], [objdir], [0],
3391 [The name of the directory that contains temporary libtool files])dnl
3392 m4_pattern_allow([LT_OBJDIR])dnl
3393 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3394 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3395 ])# _LT_CHECK_OBJDIR
3398 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3399 # --------------------------------------
3400 # Check hardcoding attributes.
3401 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3402 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3403 _LT_TAGVAR(hardcode_action, $1)=
3404 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3405 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3406 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3408 # We can hardcode non-existent directories.
3409 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3410 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3411 # have to relink, otherwise we might link with an installed library
3412 # when we should be linking with a yet-to-be-installed one
3413 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3414 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3415 # Linking always hardcodes the temporary library directory.
3416 _LT_TAGVAR(hardcode_action, $1)=relink
3418 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3419 _LT_TAGVAR(hardcode_action, $1)=immediate
3422 # We cannot hardcode anything, or else we can only hardcode existing
3424 _LT_TAGVAR(hardcode_action, $1)=unsupported
3426 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3428 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3429 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3430 # Fast installation is not supported
3431 enable_fast_install=no
3432 elif test "$shlibpath_overrides_runpath" = yes ||
3433 test "$enable_shared" = no; then
3434 # Fast installation is not necessary
3435 enable_fast_install=needless
3437 _LT_TAGDECL([], [hardcode_action], [0],
3438 [How to hardcode a shared library path into an executable])
3439 ])# _LT_LINKER_HARDCODE_LIBPATH
3444 m4_defun([_LT_CMD_STRIPLIB],
3445 [m4_require([_LT_DECL_EGREP])
3448 AC_MSG_CHECKING([whether stripping libraries is possible])
3449 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3450 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3451 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3452 AC_MSG_RESULT([yes])
3454 # FIXME - insert some real tests, host_os isn't really good enough
3457 if test -n "$STRIP" ; then
3458 striplib="$STRIP -x"
3459 old_striplib="$STRIP -S"
3460 AC_MSG_RESULT([yes])
3470 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3471 _LT_DECL([], [striplib], [1])
3472 ])# _LT_CMD_STRIPLIB
3475 # _LT_SYS_DYNAMIC_LINKER([TAG])
3476 # -----------------------------
3477 # PORTME Fill in your ld.so characteristics
3478 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3479 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3480 m4_require([_LT_DECL_EGREP])dnl
3481 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3482 m4_require([_LT_DECL_OBJDUMP])dnl
3483 m4_require([_LT_DECL_SED])dnl
3484 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3485 AC_MSG_CHECKING([dynamic linker characteristics])
3488 if test "$GCC" = yes; then
3490 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3491 *) lt_awk_arg="/^libraries:/" ;;
3494 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3495 *) lt_sed_strip_eq="s,=/,/,g" ;;
3497 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3498 case $lt_search_path_spec in
3500 # if the path contains ";" then we assume it to be the separator
3501 # otherwise default to the standard path separator (i.e. ":") - it is
3502 # assumed that no part of a normal pathname contains ";" but that should
3503 # okay in the real world where ";" in dirpaths is itself problematic.
3504 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3507 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3510 # Ok, now we have the path, separated by spaces, we can step through it
3511 # and add multilib dir if necessary.
3512 lt_tmp_lt_search_path_spec=
3513 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3514 for lt_sys_path in $lt_search_path_spec; do
3515 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3516 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3518 test -d "$lt_sys_path" && \
3519 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3522 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3523 BEGIN {RS=" "; FS="/|\n";} {
3526 for (lt_i = NF; lt_i > 0; lt_i--) {
3527 if ($lt_i != "" && $lt_i != ".") {
3528 if ($lt_i == "..") {
3531 if (lt_count == 0) {
3532 lt_foo="/" $lt_i lt_foo;
3539 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3540 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3542 # AWK program above erroneously prepends '/' to C:/dos/paths
3545 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3546 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3548 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3550 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3553 libname_spec='lib$name'
3561 shlibpath_overrides_runpath=unknown
3563 dynamic_linker="$host_os ld.so"
3564 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3565 need_lib_prefix=unknown
3566 hardcode_into_libs=no
3568 # when you set need_version to no, make sure it does not cause -set_version
3569 # flags to be left without arguments
3570 need_version=unknown
3574 version_type=linux # correct to gnu/linux during the next big refactor
3575 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3576 shlibpath_var=LIBPATH
3578 # AIX 3 has no versioning support, so we append a major version to the name.
3579 soname_spec='${libname}${release}${shared_ext}$major'
3583 version_type=linux # correct to gnu/linux during the next big refactor
3586 hardcode_into_libs=yes
3587 if test "$host_cpu" = ia64; then
3588 # AIX 5 supports IA64
3589 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3590 shlibpath_var=LD_LIBRARY_PATH
3592 # With GCC up to 2.95.x, collect2 would create an import file
3593 # for dependence libraries. The import file would start with
3594 # the line `#! .'. This would cause the generated library to
3595 # depend on `.', always an invalid library. This was fixed in
3596 # development snapshots of GCC prior to 3.0.
3598 aix4 | aix4.[[01]] | aix4.[[01]].*)
3599 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3601 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3608 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3609 # soname into executable. Probably we can add versioning support to
3610 # collect2, so additional links can be useful in future.
3611 if test "$aix_use_runtimelinking" = yes; then
3612 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3613 # instead of lib<name>.a to let people know that these are not
3614 # typical AIX shared libraries.
3615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3617 # We preserve .a as extension for shared libraries through AIX4.2
3618 # and later when we are not doing run time linking.
3619 library_names_spec='${libname}${release}.a $libname.a'
3620 soname_spec='${libname}${release}${shared_ext}$major'
3622 shlibpath_var=LIBPATH
3629 # Since July 2007 AmigaOS4 officially supports .so libraries.
3630 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3634 library_names_spec='$libname.ixlibrary $libname.a'
3635 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3636 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'
3642 library_names_spec='${libname}${shared_ext}'
3643 dynamic_linker="$host_os ld.so"
3644 shlibpath_var=LIBRARY_PATH
3648 version_type=linux # correct to gnu/linux during the next big refactor
3650 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3651 soname_spec='${libname}${release}${shared_ext}$major'
3652 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3653 shlibpath_var=LD_LIBRARY_PATH
3654 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3655 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3656 # the default ld.so.conf also contains /usr/contrib/lib and
3657 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3658 # libtool to hard-code these into programs
3661 cygwin* | mingw* | pw32* | cegcc*)
3662 version_type=windows
3667 case $GCC,$cc_basename in
3670 library_names_spec='$libname.dll.a'
3671 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3672 postinstall_cmds='base_file=`basename \${file}`~
3673 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3674 dldir=$destdir/`dirname \$dlpath`~
3675 test -d \$dldir || mkdir -p \$dldir~
3676 $install_prog $dir/$dlname \$dldir/$dlname~
3677 chmod a+x \$dldir/$dlname~
3678 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3679 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3681 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3682 dlpath=$dir/\$dldll~
3684 shlibpath_overrides_runpath=yes
3688 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3689 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3691 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3694 # MinGW DLLs use traditional 'lib' prefix
3695 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3698 # pw32 DLLs use 'pw' prefix rather than 'lib'
3699 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3702 dynamic_linker='Win32 ld.exe'
3707 libname_spec='$name'
3708 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3709 library_names_spec='${libname}.dll.lib'
3713 sys_lib_search_path_spec=
3719 # Let DOS variable expansion print the short 8.3 style file name.
3720 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3721 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3724 # Convert to MSYS style.
3725 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3728 # Convert to unix form, then to dos form, then back to unix form
3729 # but this time dos style (no spaces!) so that the unix form looks
3730 # like /cygdrive/c/PROGRA~1:/cygdr...
3731 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3732 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3733 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3736 sys_lib_search_path_spec="$LIB"
3737 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3738 # It is most probably a Windows format PATH.
3739 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3741 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3743 # FIXME: find the short name or the path components, as spaces are
3744 # common. (e.g. "Program Files" -> "PROGRA~1")
3748 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3749 postinstall_cmds='base_file=`basename \${file}`~
3750 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3751 dldir=$destdir/`dirname \$dlpath`~
3752 test -d \$dldir || mkdir -p \$dldir~
3753 $install_prog $dir/$dlname \$dldir/$dlname'
3754 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3755 dlpath=$dir/\$dldll~
3757 shlibpath_overrides_runpath=yes
3758 dynamic_linker='Win32 link.exe'
3762 # Assume MSVC wrapper
3763 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3764 dynamic_linker='Win32 ld.exe'
3767 # FIXME: first we should search . and the directory the executable is in
3771 darwin* | rhapsody*)
3772 dynamic_linker="$host_os dyld"
3776 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3777 soname_spec='${libname}${release}${major}$shared_ext'
3778 shlibpath_overrides_runpath=yes
3779 shlibpath_var=DYLD_LIBRARY_PATH
3780 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3782 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3783 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3787 version_type=linux # correct to gnu/linux during the next big refactor
3790 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3791 soname_spec='${libname}${release}${shared_ext}$major'
3792 shlibpath_var=LD_LIBRARY_PATH
3795 freebsd* | dragonfly*)
3796 # DragonFly does not have aout. When/if they implement a new
3797 # versioning mechanism, adjust this.
3798 if test -x /usr/bin/objformat; then
3799 objformat=`/usr/bin/objformat`
3802 freebsd[[23]].*) objformat=aout ;;
3806 version_type=freebsd-$objformat
3807 case $version_type in
3809 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3814 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3818 shlibpath_var=LD_LIBRARY_PATH
3821 shlibpath_overrides_runpath=yes
3823 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3824 shlibpath_overrides_runpath=yes
3825 hardcode_into_libs=yes
3827 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3828 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3829 shlibpath_overrides_runpath=no
3830 hardcode_into_libs=yes
3832 *) # from 4.6 on, and DragonFly
3833 shlibpath_overrides_runpath=yes
3834 hardcode_into_libs=yes
3840 version_type=linux # correct to gnu/linux during the next big refactor
3843 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3844 soname_spec='${libname}${release}${shared_ext}$major'
3845 shlibpath_var=LD_LIBRARY_PATH
3846 shlibpath_overrides_runpath=no
3847 hardcode_into_libs=yes
3851 version_type=linux # correct to gnu/linux during the next big refactor
3854 dynamic_linker="$host_os runtime_loader"
3855 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3856 soname_spec='${libname}${release}${shared_ext}$major'
3857 shlibpath_var=LIBRARY_PATH
3858 shlibpath_overrides_runpath=yes
3859 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3860 hardcode_into_libs=yes
3863 hpux9* | hpux10* | hpux11*)
3864 # Give a soname corresponding to the major version so that dld.sl refuses to
3865 # link against other versions.
3872 hardcode_into_libs=yes
3873 dynamic_linker="$host_os dld.so"
3874 shlibpath_var=LD_LIBRARY_PATH
3875 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3876 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3877 soname_spec='${libname}${release}${shared_ext}$major'
3878 if test "X$HPUX_IA64_MODE" = X32; then
3879 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3881 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3883 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3887 hardcode_into_libs=yes
3888 dynamic_linker="$host_os dld.sl"
3889 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3890 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3891 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3892 soname_spec='${libname}${release}${shared_ext}$major'
3893 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3894 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3898 dynamic_linker="$host_os dld.sl"
3899 shlibpath_var=SHLIB_PATH
3900 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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'
3905 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3906 postinstall_cmds='chmod 555 $lib'
3907 # or fails outright, so override atomically:
3908 install_override_mode=555
3912 version_type=linux # correct to gnu/linux during the next big refactor
3915 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3916 soname_spec='${libname}${release}${shared_ext}$major'
3917 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3918 shlibpath_var=LD_LIBRARY_PATH
3919 shlibpath_overrides_runpath=no
3920 hardcode_into_libs=yes
3923 irix5* | irix6* | nonstopux*)
3925 nonstopux*) version_type=nonstopux ;;
3927 if test "$lt_cv_prog_gnu_ld" = yes; then
3928 version_type=linux # correct to gnu/linux during the next big refactor
3935 soname_spec='${libname}${release}${shared_ext}$major'
3936 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3938 irix5* | nonstopux*)
3942 case $LD in # libtool.m4 will add one of these switches to LD
3943 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3944 libsuff= shlibsuff= libmagic=32-bit;;
3945 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3946 libsuff=32 shlibsuff=N32 libmagic=N32;;
3947 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3948 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3949 *) libsuff= shlibsuff= libmagic=never-match;;
3953 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3954 shlibpath_overrides_runpath=no
3955 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3956 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3957 hardcode_into_libs=yes
3960 # No shared lib support for Linux oldld, aout, or coff.
3961 linux*oldld* | linux*aout* | linux*coff*)
3965 # This must be glibc/ELF.
3966 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3967 version_type=linux # correct to gnu/linux during the next big refactor
3970 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3971 soname_spec='${libname}${release}${shared_ext}$major'
3972 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3973 shlibpath_var=LD_LIBRARY_PATH
3974 shlibpath_overrides_runpath=no
3976 # Some binutils ld are patched to set DT_RUNPATH
3977 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3978 [lt_cv_shlibpath_overrides_runpath=no
3979 save_LDFLAGS=$LDFLAGS
3981 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3982 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3983 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3984 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3985 [lt_cv_shlibpath_overrides_runpath=yes])])
3986 LDFLAGS=$save_LDFLAGS
3989 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3991 # This implies no fast_install, which is unacceptable.
3992 # Some rework will be needed to allow for fast_install
3993 # before this can be enabled.
3994 hardcode_into_libs=yes
3996 # Add ABI-specific directories to the system library path.
3997 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3999 # Append ld.so.conf contents to the search path
4000 if test -f /etc/ld.so.conf; then
4001 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' ' '`
4002 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
4006 # We used to test for /lib/ld.so.1 and disable shared libraries on
4007 # powerpc, because MkLinux only supported shared libraries with the
4008 # GNU dynamic linker. Since this was broken with cross compilers,
4009 # most powerpc-linux boxes support dynamic linking these days and
4010 # people can always --disable-shared, the test was removed, and we
4011 # assume the GNU/Linux dynamic linker is in use.
4012 dynamic_linker='GNU/Linux ld.so'
4019 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4020 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4021 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4022 dynamic_linker='NetBSD (a.out) ld.so'
4024 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4025 soname_spec='${libname}${release}${shared_ext}$major'
4026 dynamic_linker='NetBSD ld.elf_so'
4028 shlibpath_var=LD_LIBRARY_PATH
4029 shlibpath_overrides_runpath=yes
4030 hardcode_into_libs=yes
4034 version_type=linux # correct to gnu/linux during the next big refactor
4035 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4036 shlibpath_var=LD_LIBRARY_PATH
4037 shlibpath_overrides_runpath=yes
4044 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4045 soname_spec='${libname}${release}${shared_ext}$major'
4046 shlibpath_var=LD_LIBRARY_PATH
4047 shlibpath_overrides_runpath=no
4048 hardcode_into_libs=yes
4049 dynamic_linker='ldqnx.so'
4054 sys_lib_dlsearch_path_spec="/usr/lib"
4056 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4058 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4059 *) need_version=no ;;
4061 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4062 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4063 shlibpath_var=LD_LIBRARY_PATH
4064 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4066 openbsd2.[[89]] | openbsd2.[[89]].*)
4067 shlibpath_overrides_runpath=no
4070 shlibpath_overrides_runpath=yes
4074 shlibpath_overrides_runpath=yes
4079 libname_spec='$name'
4082 library_names_spec='$libname${shared_ext} $libname.a'
4083 dynamic_linker='OS/2 ld.exe'
4084 shlibpath_var=LIBPATH
4087 osf3* | osf4* | osf5*)
4091 soname_spec='${libname}${release}${shared_ext}$major'
4092 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4093 shlibpath_var=LD_LIBRARY_PATH
4094 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4095 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4103 version_type=linux # correct to gnu/linux during the next big refactor
4106 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4107 soname_spec='${libname}${release}${shared_ext}$major'
4108 shlibpath_var=LD_LIBRARY_PATH
4109 shlibpath_overrides_runpath=yes
4110 hardcode_into_libs=yes
4111 # ldd complains unless libraries are executable
4112 postinstall_cmds='chmod +x $lib'
4117 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4118 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4119 shlibpath_var=LD_LIBRARY_PATH
4120 shlibpath_overrides_runpath=yes
4121 if test "$with_gnu_ld" = yes; then
4128 version_type=linux # correct to gnu/linux during the next big refactor
4129 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4130 soname_spec='${libname}${release}${shared_ext}$major'
4131 shlibpath_var=LD_LIBRARY_PATH
4132 case $host_vendor in
4134 shlibpath_overrides_runpath=no
4136 runpath_var=LD_RUN_PATH
4144 shlibpath_overrides_runpath=no
4145 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4151 if test -d /usr/nec ;then
4152 version_type=linux # correct to gnu/linux during the next big refactor
4153 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4154 soname_spec='$libname${shared_ext}.$major'
4155 shlibpath_var=LD_LIBRARY_PATH
4159 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4160 version_type=freebsd-elf
4163 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4164 soname_spec='${libname}${release}${shared_ext}$major'
4165 shlibpath_var=LD_LIBRARY_PATH
4166 shlibpath_overrides_runpath=yes
4167 hardcode_into_libs=yes
4168 if test "$with_gnu_ld" = yes; then
4169 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4171 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4174 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4178 sys_lib_dlsearch_path_spec='/usr/lib'
4182 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4183 version_type=linux # correct to gnu/linux during the next big refactor
4186 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4187 shlibpath_var=LD_LIBRARY_PATH
4188 shlibpath_overrides_runpath=no
4189 hardcode_into_libs=yes
4193 version_type=linux # correct to gnu/linux during the next big refactor
4194 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4195 soname_spec='${libname}${release}${shared_ext}$major'
4196 shlibpath_var=LD_LIBRARY_PATH
4203 AC_MSG_RESULT([$dynamic_linker])
4204 test "$dynamic_linker" = no && can_build_shared=no
4206 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4207 if test "$GCC" = yes; then
4208 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4211 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4212 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4214 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4215 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4218 _LT_DECL([], [variables_saved_for_relink], [1],
4219 [Variables whose values should be saved in libtool wrapper scripts and
4220 restored at link time])
4221 _LT_DECL([], [need_lib_prefix], [0],
4222 [Do we need the "lib" prefix for modules?])
4223 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4224 _LT_DECL([], [version_type], [0], [Library versioning type])
4225 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4226 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4227 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4228 [Is shlibpath searched before the hard-coded library search path?])
4229 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4230 _LT_DECL([], [library_names_spec], [1],
4231 [[List of archive names. First name is the real one, the rest are links.
4232 The last name is the one that the linker finds with -lNAME]])
4233 _LT_DECL([], [soname_spec], [1],
4234 [[The coded name of the library, if different from the real name]])
4235 _LT_DECL([], [install_override_mode], [1],
4236 [Permission mode override for installation of shared libraries])
4237 _LT_DECL([], [postinstall_cmds], [2],
4238 [Command to use after installation of a shared archive])
4239 _LT_DECL([], [postuninstall_cmds], [2],
4240 [Command to use after uninstallation of a shared archive])
4241 _LT_DECL([], [finish_cmds], [2],
4242 [Commands used to finish a libtool library installation in a directory])
4243 _LT_DECL([], [finish_eval], [1],
4244 [[As "finish_cmds", except a single script fragment to be evaled but
4246 _LT_DECL([], [hardcode_into_libs], [0],
4247 [Whether we should hardcode library paths into libraries])
4248 _LT_DECL([], [sys_lib_search_path_spec], [2],
4249 [Compile-time system search path for libraries])
4250 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4251 [Run-time system search path for libraries])
4252 ])# _LT_SYS_DYNAMIC_LINKER
4255 # _LT_PATH_TOOL_PREFIX(TOOL)
4256 # --------------------------
4257 # find a file program which can recognize shared library
4258 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4259 [m4_require([_LT_DECL_EGREP])dnl
4260 AC_MSG_CHECKING([for $1])
4261 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4263 [[\\/*] | ?:[\\/]*])
4264 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4267 lt_save_MAGIC_CMD="$MAGIC_CMD"
4268 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4269 dnl $ac_dummy forces splitting on constant user-supplied paths.
4270 dnl POSIX.2 word splitting is done only on the output of word expansions,
4271 dnl not every word. This closes a longstanding sh security hole.
4272 ac_dummy="m4_if([$2], , $PATH, [$2])"
4273 for ac_dir in $ac_dummy; do
4275 test -z "$ac_dir" && ac_dir=.
4276 if test -f $ac_dir/$1; then
4277 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4278 if test -n "$file_magic_test_file"; then
4279 case $deplibs_check_method in
4281 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4282 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4283 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4284 $EGREP "$file_magic_regex" > /dev/null; then
4289 *** Warning: the command libtool uses to detect shared libraries,
4290 *** $file_magic_cmd, produces output that libtool cannot recognize.
4291 *** The result is that libtool may fail to recognize shared libraries
4292 *** as such. This will affect the creation of libtool libraries that
4293 *** depend on shared libraries, but programs linked with such libtool
4294 *** libraries will work regardless of this problem. Nevertheless, you
4295 *** may want to report the problem to your system manager and/or to
4296 *** bug-libtool@gnu.org
4306 MAGIC_CMD="$lt_save_MAGIC_CMD"
4309 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4310 if test -n "$MAGIC_CMD"; then
4311 AC_MSG_RESULT($MAGIC_CMD)
4315 _LT_DECL([], [MAGIC_CMD], [0],
4316 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4317 ])# _LT_PATH_TOOL_PREFIX
4320 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4321 dnl aclocal-1.4 backwards compatibility:
4322 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4327 # find a file program which can recognize a shared library
4328 m4_defun([_LT_PATH_MAGIC],
4329 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4330 if test -z "$lt_cv_path_MAGIC_CMD"; then
4331 if test -n "$ac_tool_prefix"; then
4332 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4342 # find the pathname to the GNU or non-GNU linker
4343 AC_DEFUN([LT_PATH_LD],
4344 [AC_REQUIRE([AC_PROG_CC])dnl
4345 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4346 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4347 m4_require([_LT_DECL_SED])dnl
4348 m4_require([_LT_DECL_EGREP])dnl
4349 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4351 AC_ARG_WITH([gnu-ld],
4352 [AS_HELP_STRING([--with-gnu-ld],
4353 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4354 [test "$withval" = no || with_gnu_ld=yes],
4355 [with_gnu_ld=no])dnl
4358 if test "$GCC" = yes; then
4359 # Check if gcc -print-prog-name=ld gives a path.
4360 AC_MSG_CHECKING([for ld used by $CC])
4363 # gcc leaves a trailing carriage return which upsets mingw
4364 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4366 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4369 # Accept absolute paths.
4370 [[\\/]]* | ?:[[\\/]]*)
4371 re_direlt='/[[^/]][[^/]]*/\.\./'
4372 # Canonicalize the pathname of ld
4373 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4374 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4375 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4377 test -z "$LD" && LD="$ac_prog"
4380 # If it fails, then pretend we aren't using GCC.
4384 # If it is relative, then search for the first ld in PATH.
4388 elif test "$with_gnu_ld" = yes; then
4389 AC_MSG_CHECKING([for GNU ld])
4391 AC_MSG_CHECKING([for non-GNU ld])
4393 AC_CACHE_VAL(lt_cv_path_LD,
4394 [if test -z "$LD"; then
4395 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4396 for ac_dir in $PATH; do
4398 test -z "$ac_dir" && ac_dir=.
4399 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4400 lt_cv_path_LD="$ac_dir/$ac_prog"
4401 # Check to see if the program is GNU ld. I'd rather use --version,
4402 # but apparently some variants of GNU ld only accept -v.
4403 # Break only if it was the GNU/non-GNU ld that we prefer.
4404 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4405 *GNU* | *'with BFD'*)
4406 test "$with_gnu_ld" != no && break
4409 test "$with_gnu_ld" != yes && break
4416 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4419 if test -n "$LD"; then
4424 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4428 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4432 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4433 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4434 dnl aclocal-1.4 backwards compatibility:
4435 dnl AC_DEFUN([AM_PROG_LD], [])
4436 dnl AC_DEFUN([AC_PROG_LD], [])
4441 m4_defun([_LT_PATH_LD_GNU],
4442 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4443 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4444 case `$LD -v 2>&1 </dev/null` in
4445 *GNU* | *'with BFD'*)
4446 lt_cv_prog_gnu_ld=yes
4449 lt_cv_prog_gnu_ld=no
4452 with_gnu_ld=$lt_cv_prog_gnu_ld
4458 # find reload flag for linker
4459 # -- PORTME Some linkers may need a different reload flag.
4460 m4_defun([_LT_CMD_RELOAD],
4461 [AC_CACHE_CHECK([for $LD option to reload object files],
4462 lt_cv_ld_reload_flag,
4463 [lt_cv_ld_reload_flag='-r'])
4464 reload_flag=$lt_cv_ld_reload_flag
4465 case $reload_flag in
4467 *) reload_flag=" $reload_flag" ;;
4469 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4471 cygwin* | mingw* | pw32* | cegcc*)
4472 if test "$GCC" != yes; then
4477 if test "$GCC" = yes; then
4478 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4480 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4484 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4485 _LT_TAGDECL([], [reload_cmds], [2])dnl
4489 # _LT_CHECK_MAGIC_METHOD
4490 # ----------------------
4491 # how to check for library dependencies
4492 # -- PORTME fill in with the dynamic library characteristics
4493 m4_defun([_LT_CHECK_MAGIC_METHOD],
4494 [m4_require([_LT_DECL_EGREP])
4495 m4_require([_LT_DECL_OBJDUMP])
4496 AC_CACHE_CHECK([how to recognize dependent libraries],
4497 lt_cv_deplibs_check_method,
4498 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4499 lt_cv_file_magic_test_file=
4500 lt_cv_deplibs_check_method='unknown'
4501 # Need to set the preceding variable on all platforms that support
4502 # interlibrary dependencies.
4503 # 'none' -- dependencies not supported.
4504 # `unknown' -- same as none, but documents that we really don't know.
4505 # 'pass_all' -- all dependencies passed with no checks.
4506 # 'test_compile' -- check by making test program.
4507 # 'file_magic [[regex]]' -- check by looking for files in library path
4508 # which responds to the $file_magic_cmd with a given extended regex.
4509 # If you have `file' or equivalent on your system and you're not sure
4510 # whether `pass_all' will *always* work, you probably want this one.
4514 lt_cv_deplibs_check_method=pass_all
4518 lt_cv_deplibs_check_method=pass_all
4522 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4523 lt_cv_file_magic_cmd='/usr/bin/file -L'
4524 lt_cv_file_magic_test_file=/shlib/libc.so
4528 # func_win32_libid is a shell function defined in ltmain.sh
4529 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4530 lt_cv_file_magic_cmd='func_win32_libid'
4534 # Base MSYS/MinGW do not provide the 'file' command needed by
4535 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4536 # unless we find 'file', for example because we are cross-compiling.
4537 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4538 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4539 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4540 lt_cv_file_magic_cmd='func_win32_libid'
4542 # Keep this pattern in sync with the one in func_win32_libid.
4543 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4544 lt_cv_file_magic_cmd='$OBJDUMP -f'
4549 # use the weaker test based on 'objdump'. See mingw*.
4550 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4551 lt_cv_file_magic_cmd='$OBJDUMP -f'
4554 darwin* | rhapsody*)
4555 lt_cv_deplibs_check_method=pass_all
4558 freebsd* | dragonfly*)
4559 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4562 # Not sure whether the presence of OpenBSD here was a mistake.
4563 # Let's accept both of them until this is cleared up.
4564 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4565 lt_cv_file_magic_cmd=/usr/bin/file
4566 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4570 lt_cv_deplibs_check_method=pass_all
4575 lt_cv_deplibs_check_method=pass_all
4579 lt_cv_deplibs_check_method=pass_all
4582 hpux10.20* | hpux11*)
4583 lt_cv_file_magic_cmd=/usr/bin/file
4586 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4587 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4590 [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]']
4591 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4594 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4595 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4601 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4602 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4605 irix5* | irix6* | nonstopux*)
4607 *-32|*"-32 ") libmagic=32-bit;;
4608 *-n32|*"-n32 ") libmagic=N32;;
4609 *-64|*"-64 ") libmagic=64-bit;;
4610 *) libmagic=never-match;;
4612 lt_cv_deplibs_check_method=pass_all
4615 # This must be glibc/ELF.
4616 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4617 lt_cv_deplibs_check_method=pass_all
4621 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4622 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4624 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4629 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4630 lt_cv_file_magic_cmd=/usr/bin/file
4631 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4635 lt_cv_deplibs_check_method=pass_all
4639 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4640 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4642 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4646 osf3* | osf4* | osf5*)
4647 lt_cv_deplibs_check_method=pass_all
4651 lt_cv_deplibs_check_method=pass_all
4655 lt_cv_deplibs_check_method=pass_all
4658 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4659 lt_cv_deplibs_check_method=pass_all
4663 case $host_vendor in
4665 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]]'
4666 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4669 lt_cv_deplibs_check_method=pass_all
4672 lt_cv_file_magic_cmd='/bin/file'
4673 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4676 lt_cv_file_magic_cmd='/bin/file'
4677 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4678 lt_cv_file_magic_test_file=/lib/libc.so
4681 lt_cv_deplibs_check_method=pass_all
4684 lt_cv_deplibs_check_method=pass_all
4690 lt_cv_deplibs_check_method=pass_all
4697 if test "$build" = "$host"; then
4700 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4703 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4709 file_magic_cmd=$lt_cv_file_magic_cmd
4710 deplibs_check_method=$lt_cv_deplibs_check_method
4711 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4713 _LT_DECL([], [deplibs_check_method], [1],
4714 [Method to check whether dependent libraries are shared objects])
4715 _LT_DECL([], [file_magic_cmd], [1],
4716 [Command to use when deplibs_check_method = "file_magic"])
4717 _LT_DECL([], [file_magic_glob], [1],
4718 [How to find potential files when deplibs_check_method = "file_magic"])
4719 _LT_DECL([], [want_nocaseglob], [1],
4720 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4721 ])# _LT_CHECK_MAGIC_METHOD
4726 # find the pathname to a BSD- or MS-compatible name lister
4727 AC_DEFUN([LT_PATH_NM],
4728 [AC_REQUIRE([AC_PROG_CC])dnl
4729 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4730 [if test -n "$NM"; then
4731 # Let the user override the test.
4734 lt_nm_to_check="${ac_tool_prefix}nm"
4735 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4736 lt_nm_to_check="$lt_nm_to_check nm"
4738 for lt_tmp_nm in $lt_nm_to_check; do
4739 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4740 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4742 test -z "$ac_dir" && ac_dir=.
4743 tmp_nm="$ac_dir/$lt_tmp_nm"
4744 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4745 # Check to see if the nm accepts a BSD-compat flag.
4746 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4747 # nm: unknown option "B" ignored
4748 # Tru64's nm complains that /dev/null is an invalid object file
4749 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4750 */dev/null* | *'Invalid file or object type'*)
4751 lt_cv_path_NM="$tmp_nm -B"
4755 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4757 lt_cv_path_NM="$tmp_nm -p"
4761 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4762 continue # so that we can try to find one that supports BSD flags
4771 : ${lt_cv_path_NM=no}
4773 if test "$lt_cv_path_NM" != "no"; then
4776 # Didn't find any BSD compatible name lister, look for dumpbin.
4777 if test -n "$DUMPBIN"; then :
4778 # Let the user override the test.
4780 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4781 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4783 DUMPBIN="$DUMPBIN -symbols"
4791 if test "$DUMPBIN" != ":"; then
4795 test -z "$NM" && NM=nm
4797 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4799 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4800 [lt_cv_nm_interface="BSD nm"
4801 echo "int some_variable = 0;" > conftest.$ac_ext
4802 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4803 (eval "$ac_compile" 2>conftest.err)
4804 cat conftest.err >&AS_MESSAGE_LOG_FD
4805 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4806 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4807 cat conftest.err >&AS_MESSAGE_LOG_FD
4808 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4809 cat conftest.out >&AS_MESSAGE_LOG_FD
4810 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4811 lt_cv_nm_interface="MS dumpbin"
4817 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4818 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4819 dnl aclocal-1.4 backwards compatibility:
4820 dnl AC_DEFUN([AM_PROG_NM], [])
4821 dnl AC_DEFUN([AC_PROG_NM], [])
4823 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4824 # --------------------------------
4825 # how to determine the name of the shared library
4826 # associated with a specific link library.
4827 # -- PORTME fill in with the dynamic library characteristics
4828 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4829 [m4_require([_LT_DECL_EGREP])
4830 m4_require([_LT_DECL_OBJDUMP])
4831 m4_require([_LT_DECL_DLLTOOL])
4832 AC_CACHE_CHECK([how to associate runtime and link libraries],
4833 lt_cv_sharedlib_from_linklib_cmd,
4834 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4837 cygwin* | mingw* | pw32* | cegcc*)
4838 # two different shell functions defined in ltmain.sh
4839 # decide which to use based on capabilities of $DLLTOOL
4840 case `$DLLTOOL --help 2>&1` in
4841 *--identify-strict*)
4842 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4845 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4850 # fallback: assume linklib IS sharedlib
4851 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4855 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4856 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4858 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4859 [Command to associate shared and link libraries])
4860 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4863 # _LT_PATH_MANIFEST_TOOL
4864 # ----------------------
4865 # locate the manifest tool
4866 m4_defun([_LT_PATH_MANIFEST_TOOL],
4867 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4868 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4869 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4870 [lt_cv_path_mainfest_tool=no
4871 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4872 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4873 cat conftest.err >&AS_MESSAGE_LOG_FD
4874 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4875 lt_cv_path_mainfest_tool=yes
4878 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4881 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4882 ])# _LT_PATH_MANIFEST_TOOL
4887 # check for math library
4888 AC_DEFUN([LT_LIB_M],
4889 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4892 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4893 # These system don't have libm, or don't need it
4896 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4897 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4900 AC_CHECK_LIB(m, cos, LIBM="-lm")
4907 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4908 dnl aclocal-1.4 backwards compatibility:
4909 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4912 # _LT_COMPILER_NO_RTTI([TAGNAME])
4913 # -------------------------------
4914 m4_defun([_LT_COMPILER_NO_RTTI],
4915 [m4_require([_LT_TAG_COMPILER])dnl
4917 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4919 if test "$GCC" = yes; then
4920 case $cc_basename in
4922 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4924 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4927 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4928 lt_cv_prog_compiler_rtti_exceptions,
4929 [-fno-rtti -fno-exceptions], [],
4930 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4932 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4933 [Compiler flag to turn off builtin functions])
4934 ])# _LT_COMPILER_NO_RTTI
4937 # _LT_CMD_GLOBAL_SYMBOLS
4938 # ----------------------
4939 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4940 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4941 AC_REQUIRE([AC_PROG_CC])dnl
4942 AC_REQUIRE([AC_PROG_AWK])dnl
4943 AC_REQUIRE([LT_PATH_NM])dnl
4944 AC_REQUIRE([LT_PATH_LD])dnl
4945 m4_require([_LT_DECL_SED])dnl
4946 m4_require([_LT_DECL_EGREP])dnl
4947 m4_require([_LT_TAG_COMPILER])dnl
4949 # Check for command to grab the raw symbol name followed by C symbol from nm.
4950 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4951 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4953 # These are sane defaults that work on at least a few old systems.
4954 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4956 # Character class describing NM global symbol codes.
4957 symcode='[[BCDEGRST]]'
4959 # Regexp to match symbols that can be accessed directly from C.
4960 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4962 # Define system-specific variables.
4967 cygwin* | mingw* | pw32* | cegcc*)
4968 symcode='[[ABCDGISTW]]'
4971 if test "$host_cpu" = ia64; then
4972 symcode='[[ABCDEGRST]]'
4976 symcode='[[BCDEGRST]]'
4979 symcode='[[BCDEGQRST]]'
4990 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4994 symcode='[[DFNSTU]]'
4998 # If we're using GNU nm, then use its standard symbol codes.
4999 case `$NM -V 2>&1` in
5000 *GNU* | *'with BFD'*)
5001 symcode='[[ABCDGIRSTW]]' ;;
5004 # Transform an extracted symbol line into a proper C declaration.
5005 # Some systems (esp. on ia64) link data and code symbols differently,
5006 # so use this general approach.
5007 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5009 # Transform an extracted symbol line into symbol name and symbol address
5010 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5011 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'"
5013 # Handle CRLF in mingw tool chain
5017 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5021 # Try without a prefix underscore, then with it.
5022 for ac_symprfx in "" "_"; do
5024 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5025 symxfrm="\\1 $ac_symprfx\\2 \\2"
5027 # Write the raw and C identifiers.
5028 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5029 # Fake it for dumpbin and say T for any non-static function
5030 # and D for any global variable.
5031 # Also find C++ and __fastcall symbols from MSVC++,
5032 # which start with @ or ?.
5033 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5034 " {last_section=section; section=\$ 3};"\
5035 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5036 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5037 " \$ 0!~/External *\|/{next};"\
5038 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5039 " {if(hide[section]) next};"\
5040 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5041 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5042 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5043 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5044 " ' prfx=^$ac_symprfx]"
5046 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5048 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5050 # Check to see that the pipe works correctly.
5054 cat > conftest.$ac_ext <<_LT_EOF
5059 void nm_test_func(void);
5060 void nm_test_func(void){}
5064 int main(){nm_test_var='a';nm_test_func();return(0);}
5067 if AC_TRY_EVAL(ac_compile); then
5068 # Now try to grab the symbols.
5070 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5071 # Try sorting and uniquifying the output.
5072 if sort "$nlist" | uniq > "$nlist"T; then
5073 mv -f "$nlist"T "$nlist"
5078 # Make sure that we snagged all the symbols we need.
5079 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5080 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5081 cat <<_LT_EOF > conftest.$ac_ext
5082 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5083 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5084 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5085 relocations are performed -- see ld's documentation on pseudo-relocs. */
5086 # define LT@&t@_DLSYM_CONST
5087 #elif defined(__osf__)
5088 /* This system does not cope well with relocations in const data. */
5089 # define LT@&t@_DLSYM_CONST
5091 # define LT@&t@_DLSYM_CONST const
5099 # Now generate the symbol file.
5100 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5102 cat <<_LT_EOF >> conftest.$ac_ext
5104 /* The mapping between symbol names and symbols. */
5105 LT@&t@_DLSYM_CONST struct {
5109 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5111 { "@PROGRAM@", (void *) 0 },
5113 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5114 cat <<\_LT_EOF >> conftest.$ac_ext
5118 /* This works around a problem in FreeBSD linker */
5119 #ifdef FREEBSD_WORKAROUND
5120 static const void *lt_preloaded_setup() {
5121 return lt__PROGRAM__LTX_preloaded_symbols;
5129 # Now try linking the two files.
5130 mv conftest.$ac_objext conftstm.$ac_objext
5131 lt_globsym_save_LIBS=$LIBS
5132 lt_globsym_save_CFLAGS=$CFLAGS
5133 LIBS="conftstm.$ac_objext"
5134 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5135 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5138 LIBS=$lt_globsym_save_LIBS
5139 CFLAGS=$lt_globsym_save_CFLAGS
5141 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5144 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5147 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5150 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5151 cat conftest.$ac_ext >&5
5153 rm -rf conftest* conftst*
5155 # Do not use the global_symbol_pipe unless it works.
5156 if test "$pipe_works" = yes; then
5159 lt_cv_sys_global_symbol_pipe=
5163 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5164 lt_cv_sys_global_symbol_to_cdecl=
5166 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5167 AC_MSG_RESULT(failed)
5172 # Response file support.
5173 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5174 nm_file_list_spec='@'
5175 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5176 nm_file_list_spec='@'
5179 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5180 [Take the output of nm and produce a listing of raw symbols and C names])
5181 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5182 [Transform the output of nm in a proper C declaration])
5183 _LT_DECL([global_symbol_to_c_name_address],
5184 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5185 [Transform the output of nm in a C name address pair])
5186 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5187 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5188 [Transform the output of nm in a C name address pair when lib prefix is needed])
5189 _LT_DECL([], [nm_file_list_spec], [1],
5190 [Specify filename containing input files for $NM])
5191 ]) # _LT_CMD_GLOBAL_SYMBOLS
5194 # _LT_COMPILER_PIC([TAGNAME])
5195 # ---------------------------
5196 m4_defun([_LT_COMPILER_PIC],
5197 [m4_require([_LT_TAG_COMPILER])dnl
5198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5202 m4_if([$1], [CXX], [
5203 # C++ specific cases for pic, static, wl, etc.
5204 if test "$GXX" = yes; then
5205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5210 # All AIX code is PIC.
5211 if test "$host_cpu" = ia64; then
5212 # AIX 5 now supports IA64 processor
5213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5220 # see comment about AmigaOS4 .so support
5221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5224 # FIXME: we need at least 68020 code to build shared libraries, but
5225 # adding the `-m68020' flag to GCC prevents building anything better,
5227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5232 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5233 # PIC is the default for these OSes.
5235 mingw* | cygwin* | os2* | pw32* | cegcc*)
5236 # This hack is so that the source file can tell whether it is being
5237 # built for inclusion in a dll (and should export symbols for example).
5238 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5239 # (--disable-auto-import) libraries
5240 m4_if([$1], [GCJ], [],
5241 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5243 darwin* | rhapsody*)
5244 # PIC is the default on this platform
5245 # Common symbols not allowed in MH_DYLIB files
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5249 # DJGPP does not support shared libraries at all
5250 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5253 # PIC is the default for Haiku.
5254 # The "-static" flag exists, but is broken.
5255 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5258 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5259 # Instead, we relocate shared libraries at runtime.
5262 if test -d /usr/nec; then
5263 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5267 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5268 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5269 # sets the default TLS model and affects inlining.
5274 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5279 # QNX uses GNU C++, but need to define -shared option too, otherwise
5281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5284 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5290 # All AIX code is PIC.
5291 if test "$host_cpu" = ia64; then
5292 # AIX 5 now supports IA64 processor
5293 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5295 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5299 case $cc_basename in
5301 # Green Hills C++ Compiler
5302 # _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"
5306 mingw* | cygwin* | os2* | pw32* | cegcc*)
5307 # This hack is so that the source file can tell whether it is being
5308 # built for inclusion in a dll (and should export symbols for example).
5309 m4_if([$1], [GCJ], [],
5310 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5313 case $cc_basename in
5315 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5318 # Green Hills C++ Compiler
5319 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5325 freebsd* | dragonfly*)
5326 # FreeBSD uses GNU C++
5328 hpux9* | hpux10* | hpux11*)
5329 case $cc_basename in
5331 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5333 if test "$host_cpu" != ia64; then
5334 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5339 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5354 # This is c89, which is MS Visual C++ (no shared libs)
5355 # Anyone wants to do a port?
5357 irix5* | irix6* | nonstopux*)
5358 case $cc_basename in
5360 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5361 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5362 # CC pic flag -KPIC is the default.
5368 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5369 case $cc_basename in
5372 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5376 # old Intel C++ for x86_64 which still supported -KPIC.
5377 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5379 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5382 # Intel C++, used to be incompatible with GCC.
5383 # ICC 10 doesn't accept -KPIC any more.
5384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5385 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5389 # Portland Group C++ compiler
5390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5396 # Make sure the PIC flag is empty. It appears that all Alpha
5397 # Linux and Compaq Tru64 Unix objects are PIC.
5398 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5399 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5401 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5402 # IBM XL 8.0, 9.0 on PPC and BlueGene
5403 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5408 case `$CC -V 2>&1 | sed 5q` in
5411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5413 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5424 case $cc_basename in
5426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5435 # QNX uses GNU C++, but need to define -shared option too, otherwise
5437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5439 osf3* | osf4* | osf5*)
5440 case $cc_basename in
5442 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5445 # Rational C++ 2.4.1
5446 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5449 # Digital/Compaq C++
5450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5451 # Make sure the PIC flag is empty. It appears that all Alpha
5452 # Linux and Compaq Tru64 Unix objects are PIC.
5453 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5454 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5463 case $cc_basename in
5465 # Sun C++ 4.2, 5.x and Centerline C++
5466 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5467 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5471 # Green Hills C++ Compiler
5472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5479 case $cc_basename in
5482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5493 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5494 case $cc_basename in
5496 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5497 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5498 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5503 case $cc_basename in
5505 # NonStop-UX NCC 3.20
5506 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5515 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5521 if test "$GCC" = yes; then
5522 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5523 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5527 # All AIX code is PIC.
5528 if test "$host_cpu" = ia64; then
5529 # AIX 5 now supports IA64 processor
5530 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5537 # see comment about AmigaOS4 .so support
5538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5541 # FIXME: we need at least 68020 code to build shared libraries, but
5542 # adding the `-m68020' flag to GCC prevents building anything better,
5544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5549 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5550 # PIC is the default for these OSes.
5553 mingw* | cygwin* | pw32* | os2* | cegcc*)
5554 # This hack is so that the source file can tell whether it is being
5555 # built for inclusion in a dll (and should export symbols for example).
5556 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5557 # (--disable-auto-import) libraries
5558 m4_if([$1], [GCJ], [],
5559 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5562 darwin* | rhapsody*)
5563 # PIC is the default on this platform
5564 # Common symbols not allowed in MH_DYLIB files
5565 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5569 # PIC is the default for Haiku.
5570 # The "-static" flag exists, but is broken.
5571 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5575 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5576 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5577 # sets the default TLS model and affects inlining.
5583 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5589 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5590 # Instead, we relocate shared libraries at runtime.
5594 # Just because we use GCC doesn't mean we suddenly get shared libraries
5595 # on systems that don't support them.
5596 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5601 # QNX uses GNU C++, but need to define -shared option too, otherwise
5603 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5607 if test -d /usr/nec; then
5608 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5613 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5617 case $cc_basename in
5618 nvcc*) # Cuda Compiler Driver 2.2
5619 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5620 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5621 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5626 # PORTME Check for flag to pass linker flags through the system compiler.
5629 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5630 if test "$host_cpu" = ia64; then
5631 # AIX 5 now supports IA64 processor
5632 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5634 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5638 mingw* | cygwin* | pw32* | os2* | cegcc*)
5639 # This hack is so that the source file can tell whether it is being
5640 # built for inclusion in a dll (and should export symbols for example).
5641 m4_if([$1], [GCJ], [],
5642 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5645 hpux9* | hpux10* | hpux11*)
5646 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5647 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5654 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5657 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5658 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5661 irix5* | irix6* | nonstopux*)
5662 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5663 # PIC (with -KPIC) is the default.
5664 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5667 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5668 case $cc_basename in
5669 # old Intel for x86_64 which still supported -KPIC.
5671 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5673 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5675 # icc used to be incompatible with GCC.
5676 # ICC 10 doesn't accept -KPIC any more.
5678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5679 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5680 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5682 # Lahey Fortran 8.1.
5684 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5686 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5689 # NAG Fortran compiler
5690 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5691 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5692 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5694 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5695 # Portland Group compilers (*not* the Pentium gcc compiler,
5696 # which looks to be a dead project)
5697 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5698 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5699 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5703 # All Alpha code is PIC.
5704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5706 xl* | bgxl* | bgf* | mpixl*)
5707 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5713 case `$CC -V 2>&1 | sed 5q` in
5714 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5715 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5717 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5718 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5720 *Sun\ F* | *Sun*Fortran*)
5721 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5722 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5728 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5729 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5731 *Intel*\ [[CF]]*Compiler*)
5732 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5733 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5734 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5748 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5752 # QNX uses GNU C++, but need to define -shared option too, otherwise
5754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5757 osf3* | osf4* | osf5*)
5758 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5759 # All OSF/1 code is PIC.
5760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5764 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5768 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5769 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5770 case $cc_basename in
5771 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5772 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5779 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5781 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5784 sysv4 | sysv4.2uw2* | sysv4.3*)
5785 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5791 if test -d /usr/nec ;then
5792 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5793 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5797 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5798 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5799 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5800 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5805 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5809 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5810 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5814 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5820 # For platforms which do not support PIC, -DPIC is meaningless:
5822 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5825 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5829 AC_CACHE_CHECK([for $compiler option to produce PIC],
5830 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5831 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5832 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5835 # Check to make sure the PIC flag actually works.
5837 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5838 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5839 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5840 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5841 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5843 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5845 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5846 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5848 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5849 [Additional compiler flags for building library objects])
5851 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5852 [How to pass a linker flag through the compiler])
5854 # Check to make sure the static flag actually works.
5856 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5857 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5858 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5859 $lt_tmp_static_flag,
5861 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5862 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5863 [Compiler flag to prevent dynamic linking])
5864 ])# _LT_COMPILER_PIC
5867 # _LT_LINKER_SHLIBS([TAGNAME])
5868 # ----------------------------
5869 # See if the linker supports building shared libraries.
5870 m4_defun([_LT_LINKER_SHLIBS],
5871 [AC_REQUIRE([LT_PATH_LD])dnl
5872 AC_REQUIRE([LT_PATH_NM])dnl
5873 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5874 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5875 m4_require([_LT_DECL_EGREP])dnl
5876 m4_require([_LT_DECL_SED])dnl
5877 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5878 m4_require([_LT_TAG_COMPILER])dnl
5879 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5880 m4_if([$1], [CXX], [
5881 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5882 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5885 # If we're using GNU nm, then we don't want the "-C" option.
5886 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5887 # Also, AIX nm treats weak defined symbols like other global defined
5888 # symbols, whereas GNU nm marks them as "W".
5889 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5890 _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'
5892 _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'
5896 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5898 cygwin* | mingw* | cegcc*)
5899 case $cc_basename in
5901 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5904 _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'
5905 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5910 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5915 _LT_TAGVAR(allow_undefined_flag, $1)=
5916 _LT_TAGVAR(always_export_symbols, $1)=no
5917 _LT_TAGVAR(archive_cmds, $1)=
5918 _LT_TAGVAR(archive_expsym_cmds, $1)=
5919 _LT_TAGVAR(compiler_needs_object, $1)=no
5920 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5921 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5922 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5923 _LT_TAGVAR(hardcode_automatic, $1)=no
5924 _LT_TAGVAR(hardcode_direct, $1)=no
5925 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5926 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5927 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5928 _LT_TAGVAR(hardcode_minus_L, $1)=no
5929 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5930 _LT_TAGVAR(inherit_rpath, $1)=no
5931 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5932 _LT_TAGVAR(module_cmds, $1)=
5933 _LT_TAGVAR(module_expsym_cmds, $1)=
5934 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5935 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5936 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5937 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5938 # include_expsyms should be a list of space-separated symbols to be *always*
5939 # included in the symbol list
5940 _LT_TAGVAR(include_expsyms, $1)=
5941 # exclude_expsyms can be an extended regexp of symbols to exclude
5942 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5943 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5944 # as well as any symbol that contains `d'.
5945 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5946 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5947 # platforms (ab)use it in PIC code, but their linkers get confused if
5948 # the symbol is explicitly referenced. Since portable code cannot
5949 # rely on this symbol name, it's probably fine to never include it in
5950 # preloaded symbol tables.
5951 # Exclude shared library initialization/finalization symbols.
5952 dnl Note also adjust exclude_expsyms for C++ above.
5953 extract_expsyms_cmds=
5956 cygwin* | mingw* | pw32* | cegcc*)
5957 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5958 # When not using gcc, we currently assume that we are using
5959 # Microsoft Visual C++.
5960 if test "$GCC" != yes; then
5965 # we just hope/assume this is gcc and not c89 (= MSVC++)
5973 _LT_TAGVAR(ld_shlibs, $1)=yes
5975 # On some targets, GNU ld is compatible enough with the native linker
5976 # that we're better off using the native interface for both.
5977 lt_use_gnu_ld_interface=no
5978 if test "$with_gnu_ld" = yes; then
5981 # The AIX port of GNU ld has always aspired to compatibility
5982 # with the native linker. However, as the warning in the GNU ld
5983 # block says, versions before 2.19.5* couldn't really create working
5984 # shared libraries, regardless of the interface used.
5985 case `$LD -v 2>&1` in
5986 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5987 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5988 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5990 lt_use_gnu_ld_interface=yes
5995 lt_use_gnu_ld_interface=yes
6000 if test "$lt_use_gnu_ld_interface" = yes; then
6001 # If archive_cmds runs LD, not CC, wlarc should be empty
6004 # Set some defaults for GNU ld with shared library support. These
6005 # are reset later if shared libraries are not supported. Putting them
6006 # here allows them to be overridden if necessary.
6007 runpath_var=LD_RUN_PATH
6008 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6009 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6010 # ancient GNU ld didn't support --whole-archive et. al.
6011 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6012 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6014 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6016 supports_anon_versioning=no
6017 case `$LD -v 2>&1` in
6018 *GNU\ gold*) supports_anon_versioning=yes ;;
6019 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6020 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6021 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6022 *\ 2.11.*) ;; # other 2.11 versions
6023 *) supports_anon_versioning=yes ;;
6026 # See if GNU ld supports shared libraries.
6029 # On AIX/PPC, the GNU linker is very broken
6030 if test "$host_cpu" != ia64; then
6031 _LT_TAGVAR(ld_shlibs, $1)=no
6034 *** Warning: the GNU linker, at least up to release 2.19, is reported
6035 *** to be unable to reliably create shared libraries on AIX.
6036 *** Therefore, libtool is disabling shared libraries support. If you
6037 *** really care for shared libraries, you may want to install binutils
6038 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6039 *** You will then need to restart the configuration process.
6048 # see comment about AmigaOS4 .so support
6049 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6050 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6053 _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)'
6054 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6055 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6061 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6062 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6063 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6064 # support --undefined. This deserves some investigation. FIXME
6065 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6067 _LT_TAGVAR(ld_shlibs, $1)=no
6071 cygwin* | mingw* | pw32* | cegcc*)
6072 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6073 # as there is no search path for DLLs.
6074 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6075 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6076 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6077 _LT_TAGVAR(always_export_symbols, $1)=no
6078 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6079 _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'
6080 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6082 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6083 _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'
6084 # If the export-symbols file already is a .def file (1st line
6085 # is EXPORTS), use it as is; otherwise, prepend...
6086 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6087 cp $export_symbols $output_objdir/$soname.def;
6089 echo EXPORTS > $output_objdir/$soname.def;
6090 cat $export_symbols >> $output_objdir/$soname.def;
6092 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6094 _LT_TAGVAR(ld_shlibs, $1)=no
6099 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6100 _LT_TAGVAR(link_all_deplibs, $1)=yes
6104 _LT_TAGVAR(hardcode_direct, $1)=no
6105 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6107 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6108 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6109 # Instead, shared libraries are loaded at an image base (0x10000000 by
6110 # default) and relocated if they conflict, which is a slow very memory
6111 # consuming and fragmenting process. To avoid this, we pick a random,
6112 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6113 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6114 _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'
6115 _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'
6118 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6120 if test "$host_os" = linux-dietlibc; then
6121 case $cc_basename in
6122 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6125 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6126 && test "$tmp_diet" = no
6128 tmp_addflag=' $pic_flag'
6129 tmp_sharedflag='-shared'
6130 case $cc_basename,$host_cpu in
6131 pgcc*) # Portland Group C compiler
6132 _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'
6133 tmp_addflag=' $pic_flag'
6135 pgf77* | pgf90* | pgf95* | pgfortran*)
6136 # Portland Group f77 and f90 compilers
6137 _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'
6138 tmp_addflag=' $pic_flag -Mnomain' ;;
6139 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6140 tmp_addflag=' -i_dynamic' ;;
6141 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6142 tmp_addflag=' -i_dynamic -nofor_main' ;;
6143 ifc* | ifort*) # Intel Fortran compiler
6144 tmp_addflag=' -nofor_main' ;;
6145 lf95*) # Lahey Fortran 8.1
6146 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6147 tmp_sharedflag='--shared' ;;
6148 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6149 tmp_sharedflag='-qmkshrobj'
6151 nvcc*) # Cuda Compiler Driver 2.2
6152 _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'
6153 _LT_TAGVAR(compiler_needs_object, $1)=yes
6156 case `$CC -V 2>&1 | sed 5q` in
6157 *Sun\ C*) # Sun C 5.9
6158 _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'
6159 _LT_TAGVAR(compiler_needs_object, $1)=yes
6160 tmp_sharedflag='-G' ;;
6161 *Sun\ F*) # Sun Fortran 8.3
6162 tmp_sharedflag='-G' ;;
6164 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6166 if test "x$supports_anon_versioning" = xyes; then
6167 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6168 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6169 echo "local: *; };" >> $output_objdir/$libname.ver~
6170 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6173 case $cc_basename in
6174 xlf* | bgf* | bgxlf* | mpixlf*)
6175 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6176 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6178 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6179 if test "x$supports_anon_versioning" = xyes; then
6180 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6181 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6182 echo "local: *; };" >> $output_objdir/$libname.ver~
6183 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6188 _LT_TAGVAR(ld_shlibs, $1)=no
6193 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6194 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6197 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6198 _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'
6203 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6204 _LT_TAGVAR(ld_shlibs, $1)=no
6207 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6208 *** create shared libraries on Solaris systems. Therefore, libtool
6209 *** is disabling shared libraries support. We urge you to upgrade GNU
6210 *** binutils to release 2.9.1 or newer. Another option is to modify
6211 *** your PATH or compiler configuration so that the native linker is
6212 *** used, and then restart.
6215 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6216 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6217 _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'
6219 _LT_TAGVAR(ld_shlibs, $1)=no
6223 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6224 case `$LD -v 2>&1` in
6225 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6226 _LT_TAGVAR(ld_shlibs, $1)=no
6229 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6230 *** reliably create shared libraries on SCO systems. Therefore, libtool
6231 *** is disabling shared libraries support. We urge you to upgrade GNU
6232 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6233 *** your PATH or compiler configuration so that the native linker is
6234 *** used, and then restart.
6239 # For security reasons, it is highly recommended that you always
6240 # use absolute paths for naming shared libraries, and exclude the
6241 # DT_RUNPATH tag from executables and libraries. But doing so
6242 # requires that you compile everything twice, which is a pain.
6243 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6244 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6245 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6246 _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'
6248 _LT_TAGVAR(ld_shlibs, $1)=no
6255 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6257 _LT_TAGVAR(hardcode_direct, $1)=yes
6258 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6262 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6264 _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'
6266 _LT_TAGVAR(ld_shlibs, $1)=no
6271 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6273 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6274 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6275 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6278 # PORTME fill in a description of your system's linker (not GNU ld)
6281 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6282 _LT_TAGVAR(always_export_symbols, $1)=yes
6283 _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'
6284 # Note: this linker hardcodes the directories in LIBPATH if there
6285 # are no directories specified by -L.
6286 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6287 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6288 # Neither direct hardcoding nor static linking is supported with a
6290 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6295 if test "$host_cpu" = ia64; then
6296 # On IA64, the linker does run time linking by default, so we don't
6297 # have to do anything special.
6298 aix_use_runtimelinking=no
6299 exp_sym_flag='-Bexport'
6302 # If we're using GNU nm, then we don't want the "-C" option.
6303 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6304 # Also, AIX nm treats weak defined symbols like other global
6305 # defined symbols, whereas GNU nm marks them as "W".
6306 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6307 _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'
6309 _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'
6311 aix_use_runtimelinking=no
6313 # Test if we are trying to use run time linking or normal
6314 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6315 # need to do runtime linking.
6316 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6317 for ld_flag in $LDFLAGS; do
6318 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6319 aix_use_runtimelinking=yes
6326 exp_sym_flag='-bexport'
6327 no_entry_flag='-bnoentry'
6330 # When large executables or shared objects are built, AIX ld can
6331 # have problems creating the table of contents. If linking a library
6332 # or program results in "error TOC overflow" add -mminimal-toc to
6333 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6334 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6336 _LT_TAGVAR(archive_cmds, $1)=''
6337 _LT_TAGVAR(hardcode_direct, $1)=yes
6338 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6339 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6340 _LT_TAGVAR(link_all_deplibs, $1)=yes
6341 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6343 if test "$GCC" = yes; then
6344 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6345 # We only want to do this on AIX 4.2 and lower, the check
6346 # below for broken collect2 doesn't work under 4.3+
6347 collect2name=`${CC} -print-prog-name=collect2`
6348 if test -f "$collect2name" &&
6349 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6351 # We have reworked collect2
6354 # We have old collect2
6355 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6356 # It fails to find uninstalled libraries when the uninstalled
6357 # path is not listed in the libpath. Setting hardcode_minus_L
6358 # to unsupported forces relinking
6359 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6361 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6365 shared_flag='-shared'
6366 if test "$aix_use_runtimelinking" = yes; then
6367 shared_flag="$shared_flag "'${wl}-G'
6371 if test "$host_cpu" = ia64; then
6372 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6373 # chokes on -Wl,-G. The following line is correct:
6376 if test "$aix_use_runtimelinking" = yes; then
6377 shared_flag='${wl}-G'
6379 shared_flag='${wl}-bM:SRE'
6384 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6385 # It seems that -bexpall does not export symbols beginning with
6386 # underscore (_), so it is better to generate a list of symbols to export.
6387 _LT_TAGVAR(always_export_symbols, $1)=yes
6388 if test "$aix_use_runtimelinking" = yes; then
6389 # Warning - without using the other runtime loading flags (-brtl),
6390 # -berok will link without error, but may produce a broken library.
6391 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6392 # Determine the default libpath from the value encoded in an
6394 _LT_SYS_MODULE_PATH_AIX([$1])
6395 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6396 _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"
6398 if test "$host_cpu" = ia64; then
6399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6400 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6401 _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"
6403 # Determine the default libpath from the value encoded in an
6405 _LT_SYS_MODULE_PATH_AIX([$1])
6406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6407 # Warning - without using the other run time loading flags,
6408 # -berok will link without error, but may produce a broken library.
6409 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6410 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6411 if test "$with_gnu_ld" = yes; then
6412 # We only use this code for GNU lds that support --whole-archive.
6413 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6415 # Exported symbols can be pulled into shared objects from archives
6416 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6418 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6419 # This is similar to how AIX traditionally builds its shared libraries.
6420 _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'
6428 # see comment about AmigaOS4 .so support
6429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6430 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6433 _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)'
6434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6435 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6441 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6444 cygwin* | mingw* | pw32* | cegcc*)
6445 # When not using gcc, we currently assume that we are using
6446 # Microsoft Visual C++.
6447 # hardcode_libdir_flag_spec is actually meaningless, as there is
6448 # no search path for DLLs.
6449 case $cc_basename in
6452 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6453 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6454 _LT_TAGVAR(always_export_symbols, $1)=yes
6455 _LT_TAGVAR(file_list_spec, $1)='@'
6456 # Tell ltmain to make .lib files, not .a files.
6458 # Tell ltmain to make .dll files, not .so files.
6460 # FIXME: Setting linknames here is a bad hack.
6461 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6462 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6463 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6465 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6467 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6469 # The linker will not automatically build a static lib if we build a DLL.
6470 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6471 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6472 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6473 _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'
6475 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6476 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6477 lt_tool_outputfile="@TOOL_OUTPUT@"~
6478 case $lt_outputfile in
6481 lt_outputfile="$lt_outputfile.exe"
6482 lt_tool_outputfile="$lt_tool_outputfile.exe"
6485 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6486 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6487 $RM "$lt_outputfile.manifest";
6491 # Assume MSVC wrapper
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6493 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6494 # Tell ltmain to make .lib files, not .a files.
6496 # Tell ltmain to make .dll files, not .so files.
6498 # FIXME: Setting linknames here is a bad hack.
6499 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6500 # The linker will automatically build a .lib file if we build a DLL.
6501 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6502 # FIXME: Should let the user specify the lib program.
6503 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6504 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6509 darwin* | rhapsody*)
6510 _LT_DARWIN_LINKER_FEATURES($1)
6514 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6516 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6519 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6520 # support. Future versions do this automatically, but an explicit c++rt0.o
6521 # does not break anything, and helps significantly (at the cost of a little
6524 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6526 _LT_TAGVAR(hardcode_direct, $1)=yes
6527 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6530 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6532 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6533 _LT_TAGVAR(hardcode_direct, $1)=yes
6534 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6535 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6538 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6539 freebsd* | dragonfly*)
6540 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6541 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6542 _LT_TAGVAR(hardcode_direct, $1)=yes
6543 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6547 if test "$GCC" = yes; then
6548 _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'
6550 _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'
6552 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6553 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6554 _LT_TAGVAR(hardcode_direct, $1)=yes
6556 # hardcode_minus_L: Not really in the search PATH,
6557 # but as the default location of the library.
6558 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6559 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6563 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6564 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6566 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6568 if test "$with_gnu_ld" = no; then
6569 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6570 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6571 _LT_TAGVAR(hardcode_direct, $1)=yes
6572 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6574 # hardcode_minus_L: Not really in the search PATH,
6575 # but as the default location of the library.
6576 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6581 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6584 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6587 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6590 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6596 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6599 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6603 # Older versions of the 11.00 compiler do not understand -b yet
6604 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6605 _LT_LINKER_OPTION([if $CC understands -b],
6606 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6607 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6608 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6609 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6613 if test "$with_gnu_ld" = no; then
6614 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6615 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6619 _LT_TAGVAR(hardcode_direct, $1)=no
6620 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6623 _LT_TAGVAR(hardcode_direct, $1)=yes
6624 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6625 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6627 # hardcode_minus_L: Not really in the search PATH,
6628 # but as the default location of the library.
6629 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6635 irix5* | irix6* | nonstopux*)
6636 if test "$GCC" = yes; then
6637 _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'
6638 # Try to use the -exported_symbol ld option, if it does not
6639 # work, assume that -exports_file does not work either and
6640 # implicitly export all symbols.
6641 # This should be the same for all languages, so no per-tag cache variable.
6642 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6643 [lt_cv_irix_exported_symbol],
6644 [save_LDFLAGS="$LDFLAGS"
6645 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6648 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6649 [C++], [[int foo (void) { return 0; }]],
6656 [lt_cv_irix_exported_symbol=yes],
6657 [lt_cv_irix_exported_symbol=no])
6658 LDFLAGS="$save_LDFLAGS"])
6659 if test "$lt_cv_irix_exported_symbol" = yes; then
6660 _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'
6663 _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'
6664 _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'
6666 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6668 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6669 _LT_TAGVAR(inherit_rpath, $1)=yes
6670 _LT_TAGVAR(link_all_deplibs, $1)=yes
6674 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6675 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6677 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6679 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6680 _LT_TAGVAR(hardcode_direct, $1)=yes
6681 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6685 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6686 _LT_TAGVAR(hardcode_direct, $1)=yes
6687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6688 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6689 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6696 if test -f /usr/libexec/ld.so; then
6697 _LT_TAGVAR(hardcode_direct, $1)=yes
6698 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6699 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6700 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6701 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6702 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6707 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6708 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6712 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6713 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6718 _LT_TAGVAR(ld_shlibs, $1)=no
6723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6724 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6725 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6726 _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'
6727 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6731 if test "$GCC" = yes; then
6732 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6733 _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'
6735 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6736 _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'
6738 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6740 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6743 osf4* | osf5*) # as osf3* with the addition of -msym flag
6744 if test "$GCC" = yes; then
6745 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6746 _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'
6747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6749 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6750 _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'
6751 _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~
6752 $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'
6754 # Both c and cxx compiler support -rpath directly
6755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6757 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6758 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6762 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6763 if test "$GCC" = yes; then
6765 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6766 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6767 $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'
6769 case `$CC -V 2>&1` in
6772 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6773 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6774 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6778 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6779 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6780 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6784 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6785 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6787 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6789 # The compiler driver will combine and reorder linker options,
6790 # but understands `-z linker_flag'. GCC discards it without `$wl',
6791 # but is careful enough not to reorder.
6792 # Supported since Solaris 2.6 (maybe 2.5.1?)
6793 if test "$GCC" = yes; then
6794 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6796 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6800 _LT_TAGVAR(link_all_deplibs, $1)=yes
6804 if test "x$host_vendor" = xsequent; then
6805 # Use $CC to link under sequent, because it throws in some extra .o
6806 # files that make .init and .fini sections work.
6807 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6809 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6811 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6812 _LT_TAGVAR(hardcode_direct, $1)=yes
6813 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6814 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6818 case $host_vendor in
6820 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6821 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6824 ## LD is ld it makes a PLAMLIB
6825 ## CC just makes a GrossModule.
6826 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6827 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6828 _LT_TAGVAR(hardcode_direct, $1)=no
6831 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6832 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6835 runpath_var='LD_RUN_PATH'
6836 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6840 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6841 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6842 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6846 if test -d /usr/nec; then
6847 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6848 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6849 runpath_var=LD_RUN_PATH
6850 hardcode_runpath_var=yes
6851 _LT_TAGVAR(ld_shlibs, $1)=yes
6855 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6856 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6857 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6858 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6859 runpath_var='LD_RUN_PATH'
6861 if test "$GCC" = yes; then
6862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6863 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6865 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6866 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6870 sysv5* | sco3.2v5* | sco5v6*)
6871 # Note: We can NOT use -z defs as we might desire, because we do not
6872 # link with -lc, and that would cause any symbols used from libc to
6873 # always be unresolved, which means just about no library would
6874 # ever link correctly. If we're not using GNU ld we use -z text
6875 # though, which does catch some bad symbols but isn't as heavy-handed
6877 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6878 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6879 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6880 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6881 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6882 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6883 _LT_TAGVAR(link_all_deplibs, $1)=yes
6884 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6885 runpath_var='LD_RUN_PATH'
6887 if test "$GCC" = yes; then
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6891 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6892 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6897 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6898 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6899 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6903 _LT_TAGVAR(ld_shlibs, $1)=no
6907 if test x$host_vendor = xsni; then
6909 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6916 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6917 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6919 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6921 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6922 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6923 _LT_DECL([], [extract_expsyms_cmds], [2],
6924 [The commands to extract the exported symbol list from a shared archive])
6927 # Do we need to explicitly link libc?
6929 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6931 # Assume -lc should be added
6932 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6934 if test "$enable_shared" = yes && test "$GCC" = yes; then
6935 case $_LT_TAGVAR(archive_cmds, $1) in
6937 # FIXME: we may have to deal with multi-command sequences.
6940 # Test whether the compiler implicitly links with -lc since on some
6941 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6942 # to ld, don't add -lc before -lgcc.
6943 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6944 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6946 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6948 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6951 libobjs=conftest.$ac_objext
6953 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6954 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6960 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6961 _LT_TAGVAR(allow_undefined_flag, $1)=
6962 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6964 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6966 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6968 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6970 cat conftest.err 1>&5
6974 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6981 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6982 [Whether or not to add -lc for building shared libraries])
6983 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6984 [enable_shared_with_static_runtimes], [0],
6985 [Whether or not to disallow shared libs when runtime libs are static])
6986 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6987 [Compiler flag to allow reflexive dlopens])
6988 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6989 [Compiler flag to generate shared objects directly from archives])
6990 _LT_TAGDECL([], [compiler_needs_object], [1],
6991 [Whether the compiler copes with passing no objects directly])
6992 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6993 [Create an old-style archive from a shared archive])
6994 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6995 [Create a temporary old-style archive to link instead of a shared archive])
6996 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6997 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6998 _LT_TAGDECL([], [module_cmds], [2],
6999 [Commands used to build a loadable module if different from building
7001 _LT_TAGDECL([], [module_expsym_cmds], [2])
7002 _LT_TAGDECL([], [with_gnu_ld], [1],
7003 [Whether we are building with GNU ld or not])
7004 _LT_TAGDECL([], [allow_undefined_flag], [1],
7005 [Flag that allows shared libraries with undefined symbols to be built])
7006 _LT_TAGDECL([], [no_undefined_flag], [1],
7007 [Flag that enforces no undefined symbols])
7008 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7009 [Flag to hardcode $libdir into a binary during linking.
7010 This must work even if $libdir does not exist])
7011 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7012 [Whether we need a single "-rpath" flag with a separated argument])
7013 _LT_TAGDECL([], [hardcode_direct], [0],
7014 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7015 DIR into the resulting binary])
7016 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7017 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7018 DIR into the resulting binary and the resulting library dependency is
7019 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7020 library is relocated])
7021 _LT_TAGDECL([], [hardcode_minus_L], [0],
7022 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7023 into the resulting binary])
7024 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7025 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7026 into the resulting binary])
7027 _LT_TAGDECL([], [hardcode_automatic], [0],
7028 [Set to "yes" if building a shared library automatically hardcodes DIR
7029 into the library and all subsequent libraries and executables linked
7031 _LT_TAGDECL([], [inherit_rpath], [0],
7032 [Set to yes if linker adds runtime paths of dependent libraries
7033 to runtime path list])
7034 _LT_TAGDECL([], [link_all_deplibs], [0],
7035 [Whether libtool must link a program against all its dependency libraries])
7036 _LT_TAGDECL([], [always_export_symbols], [0],
7037 [Set to "yes" if exported symbols are required])
7038 _LT_TAGDECL([], [export_symbols_cmds], [2],
7039 [The commands to list exported symbols])
7040 _LT_TAGDECL([], [exclude_expsyms], [1],
7041 [Symbols that should not be listed in the preloaded symbols])
7042 _LT_TAGDECL([], [include_expsyms], [1],
7043 [Symbols that must always be exported])
7044 _LT_TAGDECL([], [prelink_cmds], [2],
7045 [Commands necessary for linking programs (against libraries) with templates])
7046 _LT_TAGDECL([], [postlink_cmds], [2],
7047 [Commands necessary for finishing linking programs])
7048 _LT_TAGDECL([], [file_list_spec], [1],
7049 [Specify filename containing input files])
7050 dnl FIXME: Not yet implemented
7051 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7052 dnl [Compiler flag to generate thread safe objects])
7053 ])# _LT_LINKER_SHLIBS
7056 # _LT_LANG_C_CONFIG([TAG])
7057 # ------------------------
7058 # Ensure that the configuration variables for a C compiler are suitably
7059 # defined. These variables are subsequently used by _LT_CONFIG to write
7060 # the compiler configuration to `libtool'.
7061 m4_defun([_LT_LANG_C_CONFIG],
7062 [m4_require([_LT_DECL_EGREP])dnl
7066 # Source file extension for C test sources.
7069 # Object file extension for compiled C test sources.
7071 _LT_TAGVAR(objext, $1)=$objext
7073 # Code to be used in simple compile tests
7074 lt_simple_compile_test_code="int some_variable = 0;"
7076 # Code to be used in simple link tests
7077 lt_simple_link_test_code='int main(){return(0);}'
7080 # Save the default compiler, since it gets overwritten when the other
7081 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7082 compiler_DEFAULT=$CC
7084 # save warnings/boilerplate of simple test code
7085 _LT_COMPILER_BOILERPLATE
7086 _LT_LINKER_BOILERPLATE
7088 if test -n "$compiler"; then
7089 _LT_COMPILER_NO_RTTI($1)
7090 _LT_COMPILER_PIC($1)
7091 _LT_COMPILER_C_O($1)
7092 _LT_COMPILER_FILE_LOCKS($1)
7093 _LT_LINKER_SHLIBS($1)
7094 _LT_SYS_DYNAMIC_LINKER($1)
7095 _LT_LINKER_HARDCODE_LIBPATH($1)
7099 # Report which library types will actually be built
7100 AC_MSG_CHECKING([if libtool supports shared libraries])
7101 AC_MSG_RESULT([$can_build_shared])
7103 AC_MSG_CHECKING([whether to build shared libraries])
7104 test "$can_build_shared" = "no" && enable_shared=no
7106 # On AIX, shared libraries and static libraries use the same namespace, and
7107 # are all built from PIC.
7110 test "$enable_shared" = yes && enable_static=no
7111 if test -n "$RANLIB"; then
7112 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7113 postinstall_cmds='$RANLIB $lib'
7118 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7119 test "$enable_shared" = yes && enable_static=no
7123 AC_MSG_RESULT([$enable_shared])
7125 AC_MSG_CHECKING([whether to build static libraries])
7126 # Make sure either enable_shared or enable_static is yes.
7127 test "$enable_shared" = yes || enable_static=yes
7128 AC_MSG_RESULT([$enable_static])
7134 ])# _LT_LANG_C_CONFIG
7137 # _LT_LANG_CXX_CONFIG([TAG])
7138 # --------------------------
7139 # Ensure that the configuration variables for a C++ compiler are suitably
7140 # defined. These variables are subsequently used by _LT_CONFIG to write
7141 # the compiler configuration to `libtool'.
7142 m4_defun([_LT_LANG_CXX_CONFIG],
7143 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7144 m4_require([_LT_DECL_EGREP])dnl
7145 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7146 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7147 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7148 (test "X$CXX" != "Xg++"))) ; then
7151 _lt_caught_CXX_error=yes
7155 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7156 _LT_TAGVAR(allow_undefined_flag, $1)=
7157 _LT_TAGVAR(always_export_symbols, $1)=no
7158 _LT_TAGVAR(archive_expsym_cmds, $1)=
7159 _LT_TAGVAR(compiler_needs_object, $1)=no
7160 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7161 _LT_TAGVAR(hardcode_direct, $1)=no
7162 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7164 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7165 _LT_TAGVAR(hardcode_minus_L, $1)=no
7166 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7167 _LT_TAGVAR(hardcode_automatic, $1)=no
7168 _LT_TAGVAR(inherit_rpath, $1)=no
7169 _LT_TAGVAR(module_cmds, $1)=
7170 _LT_TAGVAR(module_expsym_cmds, $1)=
7171 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7172 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7173 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7174 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7175 _LT_TAGVAR(no_undefined_flag, $1)=
7176 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7177 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7179 # Source file extension for C++ test sources.
7182 # Object file extension for compiled C++ test sources.
7184 _LT_TAGVAR(objext, $1)=$objext
7186 # No sense in running all these tests if we already determined that
7187 # the CXX compiler isn't working. Some variables (like enable_shared)
7188 # are currently assumed to apply to all compilers on this platform,
7189 # and will be corrupted by setting them based on a non-working compiler.
7190 if test "$_lt_caught_CXX_error" != yes; then
7191 # Code to be used in simple compile tests
7192 lt_simple_compile_test_code="int some_variable = 0;"
7194 # Code to be used in simple link tests
7195 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7197 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7200 # save warnings/boilerplate of simple test code
7201 _LT_COMPILER_BOILERPLATE
7202 _LT_LINKER_BOILERPLATE
7204 # Allow CC to be a program name with arguments.
7206 lt_save_CFLAGS=$CFLAGS
7210 lt_save_with_gnu_ld=$with_gnu_ld
7211 lt_save_path_LD=$lt_cv_path_LD
7212 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7213 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7215 $as_unset lt_cv_prog_gnu_ld
7217 if test -n "${lt_cv_path_LDCXX+set}"; then
7218 lt_cv_path_LD=$lt_cv_path_LDCXX
7220 $as_unset lt_cv_path_LD
7222 test -z "${LDCXX+set}" || LD=$LDCXX
7226 _LT_TAGVAR(compiler, $1)=$CC
7227 _LT_CC_BASENAME([$compiler])
7229 if test -n "$compiler"; then
7230 # We don't want -fno-exception when compiling C++ code, so set the
7231 # no_builtin_flag separately
7232 if test "$GXX" = yes; then
7233 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7235 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7238 if test "$GXX" = yes; then
7239 # Set up default GNU C++ configuration
7243 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7244 # archiving commands below assume that GNU ld is being used.
7245 if test "$with_gnu_ld" = yes; then
7246 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7247 _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'
7249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7250 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7252 # If archive_cmds runs LD, not CC, wlarc should be empty
7253 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7254 # investigate it a little bit more. (MM)
7257 # ancient GNU ld didn't support --whole-archive et. al.
7258 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7259 $GREP 'no-whole-archive' > /dev/null; then
7260 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7262 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7268 # A generic and very simple default shared library creation
7269 # command for GNU C++ for the case where it uses the native
7270 # linker, instead of GNU ld. If possible, this setting should
7271 # overridden to take advantage of the native linker features on
7272 # the platform it is being used on.
7273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7276 # Commands to make compiler produce verbose output that lists
7277 # what "hidden" libraries, object files and flags are used when
7278 # linking a shared library.
7279 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7287 # PORTME: fill in a description of your system's C++ link characteristics
7288 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7289 _LT_TAGVAR(ld_shlibs, $1)=yes
7292 # FIXME: insert proper C++ library support
7293 _LT_TAGVAR(ld_shlibs, $1)=no
7296 if test "$host_cpu" = ia64; then
7297 # On IA64, the linker does run time linking by default, so we don't
7298 # have to do anything special.
7299 aix_use_runtimelinking=no
7300 exp_sym_flag='-Bexport'
7303 aix_use_runtimelinking=no
7305 # Test if we are trying to use run time linking or normal
7306 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7307 # need to do runtime linking.
7308 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7309 for ld_flag in $LDFLAGS; do
7312 aix_use_runtimelinking=yes
7320 exp_sym_flag='-bexport'
7321 no_entry_flag='-bnoentry'
7324 # When large executables or shared objects are built, AIX ld can
7325 # have problems creating the table of contents. If linking a library
7326 # or program results in "error TOC overflow" add -mminimal-toc to
7327 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7328 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7330 _LT_TAGVAR(archive_cmds, $1)=''
7331 _LT_TAGVAR(hardcode_direct, $1)=yes
7332 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7333 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7334 _LT_TAGVAR(link_all_deplibs, $1)=yes
7335 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7337 if test "$GXX" = yes; then
7338 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7339 # We only want to do this on AIX 4.2 and lower, the check
7340 # below for broken collect2 doesn't work under 4.3+
7341 collect2name=`${CC} -print-prog-name=collect2`
7342 if test -f "$collect2name" &&
7343 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7345 # We have reworked collect2
7348 # We have old collect2
7349 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7350 # It fails to find uninstalled libraries when the uninstalled
7351 # path is not listed in the libpath. Setting hardcode_minus_L
7352 # to unsupported forces relinking
7353 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7355 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7358 shared_flag='-shared'
7359 if test "$aix_use_runtimelinking" = yes; then
7360 shared_flag="$shared_flag "'${wl}-G'
7364 if test "$host_cpu" = ia64; then
7365 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7366 # chokes on -Wl,-G. The following line is correct:
7369 if test "$aix_use_runtimelinking" = yes; then
7370 shared_flag='${wl}-G'
7372 shared_flag='${wl}-bM:SRE'
7377 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7378 # It seems that -bexpall does not export symbols beginning with
7379 # underscore (_), so it is better to generate a list of symbols to
7381 _LT_TAGVAR(always_export_symbols, $1)=yes
7382 if test "$aix_use_runtimelinking" = yes; then
7383 # Warning - without using the other runtime loading flags (-brtl),
7384 # -berok will link without error, but may produce a broken library.
7385 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7386 # Determine the default libpath from the value encoded in an empty
7388 _LT_SYS_MODULE_PATH_AIX([$1])
7389 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7391 _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"
7393 if test "$host_cpu" = ia64; then
7394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7395 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7396 _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"
7398 # Determine the default libpath from the value encoded in an
7400 _LT_SYS_MODULE_PATH_AIX([$1])
7401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7402 # Warning - without using the other run time loading flags,
7403 # -berok will link without error, but may produce a broken library.
7404 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7405 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7406 if test "$with_gnu_ld" = yes; then
7407 # We only use this code for GNU lds that support --whole-archive.
7408 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7410 # Exported symbols can be pulled into shared objects from archives
7411 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7413 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7414 # This is similar to how AIX traditionally builds its shared
7416 _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'
7422 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7423 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7424 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7425 # support --undefined. This deserves some investigation. FIXME
7426 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7428 _LT_TAGVAR(ld_shlibs, $1)=no
7433 case $cc_basename in
7435 # FIXME: insert proper C++ library support
7436 _LT_TAGVAR(ld_shlibs, $1)=no
7441 cygwin* | mingw* | pw32* | cegcc*)
7442 case $GXX,$cc_basename in
7445 # hardcode_libdir_flag_spec is actually meaningless, as there is
7446 # no search path for DLLs.
7447 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7448 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7449 _LT_TAGVAR(always_export_symbols, $1)=yes
7450 _LT_TAGVAR(file_list_spec, $1)='@'
7451 # Tell ltmain to make .lib files, not .a files.
7453 # Tell ltmain to make .dll files, not .so files.
7455 # FIXME: Setting linknames here is a bad hack.
7456 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7457 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7458 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7460 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7462 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7464 # The linker will not automatically build a static lib if we build a DLL.
7465 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7466 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7468 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7469 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7470 lt_tool_outputfile="@TOOL_OUTPUT@"~
7471 case $lt_outputfile in
7474 lt_outputfile="$lt_outputfile.exe"
7475 lt_tool_outputfile="$lt_tool_outputfile.exe"
7478 func_to_tool_file "$lt_outputfile"~
7479 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7480 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7481 $RM "$lt_outputfile.manifest";
7486 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7487 # as there is no search path for DLLs.
7488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7489 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7490 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7491 _LT_TAGVAR(always_export_symbols, $1)=no
7492 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7494 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7495 _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'
7496 # If the export-symbols file already is a .def file (1st line
7497 # is EXPORTS), use it as is; otherwise, prepend...
7498 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7499 cp $export_symbols $output_objdir/$soname.def;
7501 echo EXPORTS > $output_objdir/$soname.def;
7502 cat $export_symbols >> $output_objdir/$soname.def;
7504 $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'
7506 _LT_TAGVAR(ld_shlibs, $1)=no
7511 darwin* | rhapsody*)
7512 _LT_DARWIN_LINKER_FEATURES($1)
7516 case $cc_basename in
7518 # FIXME: insert proper C++ library support
7519 _LT_TAGVAR(ld_shlibs, $1)=no
7522 # Green Hills C++ Compiler
7523 # FIXME: insert proper C++ library support
7524 _LT_TAGVAR(ld_shlibs, $1)=no
7527 # FIXME: insert proper C++ library support
7528 _LT_TAGVAR(ld_shlibs, $1)=no
7534 # C++ shared libraries reported to be fairly broken before
7536 _LT_TAGVAR(ld_shlibs, $1)=no
7540 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7543 freebsd* | dragonfly*)
7544 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7546 _LT_TAGVAR(ld_shlibs, $1)=yes
7553 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7554 _LT_TAGVAR(link_all_deplibs, $1)=yes
7558 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7559 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7560 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7561 _LT_TAGVAR(hardcode_direct, $1)=yes
7562 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7563 # but as the default
7564 # location of the library.
7566 case $cc_basename in
7568 # FIXME: insert proper C++ library support
7569 _LT_TAGVAR(ld_shlibs, $1)=no
7572 _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'
7573 # Commands to make compiler produce verbose output that lists
7574 # what "hidden" libraries, object files and flags are used when
7575 # linking a shared library.
7577 # There doesn't appear to be a way to prevent this compiler from
7578 # explicitly linking system object files so we need to strip them
7579 # from the output so that they don't get included in the library
7581 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"'
7584 if test "$GXX" = yes; then
7585 _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'
7587 # FIXME: insert proper C++ library support
7588 _LT_TAGVAR(ld_shlibs, $1)=no
7595 if test $with_gnu_ld = no; then
7596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7597 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7603 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7609 _LT_TAGVAR(hardcode_direct, $1)=no
7610 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7613 _LT_TAGVAR(hardcode_direct, $1)=yes
7614 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7615 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7616 # but as the default
7617 # location of the library.
7621 case $cc_basename in
7623 # FIXME: insert proper C++ library support
7624 _LT_TAGVAR(ld_shlibs, $1)=no
7629 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7632 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7635 _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'
7638 # Commands to make compiler produce verbose output that lists
7639 # what "hidden" libraries, object files and flags are used when
7640 # linking a shared library.
7642 # There doesn't appear to be a way to prevent this compiler from
7643 # explicitly linking system object files so we need to strip them
7644 # from the output so that they don't get included in the library
7646 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"'
7649 if test "$GXX" = yes; then
7650 if test $with_gnu_ld = no; then
7653 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7656 _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'
7659 _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'
7664 # FIXME: insert proper C++ library support
7665 _LT_TAGVAR(ld_shlibs, $1)=no
7672 _LT_TAGVAR(hardcode_direct, $1)=no
7673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7675 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7676 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7677 # Instead, shared libraries are loaded at an image base (0x10000000 by
7678 # default) and relocated if they conflict, which is a slow very memory
7679 # consuming and fragmenting process. To avoid this, we pick a random,
7680 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7681 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7682 _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'
7683 _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'
7686 case $cc_basename in
7689 _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'
7691 # Archives containing C++ object files must be created using
7692 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7693 # necessary to make sure instantiated templates are included
7695 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7698 if test "$GXX" = yes; then
7699 if test "$with_gnu_ld" = no; then
7700 _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'
7702 _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'
7705 _LT_TAGVAR(link_all_deplibs, $1)=yes
7708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7709 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7710 _LT_TAGVAR(inherit_rpath, $1)=yes
7713 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7714 case $cc_basename in
7716 # Kuck and Associates, Inc. (KAI) C++ Compiler
7718 # KCC will only create a shared library if the output file
7719 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7720 # to its proper name (with version) after linking.
7721 _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'
7722 _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'
7723 # Commands to make compiler produce verbose output that lists
7724 # what "hidden" libraries, object files and flags are used when
7725 # linking a shared library.
7727 # There doesn't appear to be a way to prevent this compiler from
7728 # explicitly linking system object files so we need to strip them
7729 # from the output so that they don't get included in the library
7731 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"'
7733 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7734 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7736 # Archives containing C++ object files must be created using
7737 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7738 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7743 # version 8.0 and above of icpc choke on multiply defined symbols
7744 # if we add $predep_objects and $postdep_objects, however 7.1 and
7745 # earlier do not add the objects themselves.
7746 case `$CC -V 2>&1` in
7748 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7749 _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'
7751 *) # Version 8.0 or newer
7754 ia64*) tmp_idyn=' -i_dynamic';;
7756 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7757 _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'
7760 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7761 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7762 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7763 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7766 # Portland Group C++ compiler
7768 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7769 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7771 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7772 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7773 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7775 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7776 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7778 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7780 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7781 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7782 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7784 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7785 $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'
7787 *) # Version 6 and above use weak symbols
7788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7789 _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'
7793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7794 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7795 _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'
7799 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7800 _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'
7802 runpath_var=LD_RUN_PATH
7803 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7804 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7806 # Commands to make compiler produce verbose output that lists
7807 # what "hidden" libraries, object files and flags are used when
7808 # linking a shared library.
7810 # There doesn't appear to be a way to prevent this compiler from
7811 # explicitly linking system object files so we need to strip them
7812 # from the output so that they don't get included in the library
7814 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'
7816 xl* | mpixl* | bgxl*)
7817 # IBM XL 8.0 on PPC, with GNU ld
7818 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7819 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7820 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7821 if test "x$supports_anon_versioning" = xyes; then
7822 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7823 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7824 echo "local: *; };" >> $output_objdir/$libname.ver~
7825 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7829 case `$CC -V 2>&1 | sed 5q` in
7832 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7833 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7834 _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'
7835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7836 _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'
7837 _LT_TAGVAR(compiler_needs_object, $1)=yes
7839 # Not sure whether something based on
7840 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7842 output_verbose_link_cmd='func_echo_all'
7844 # Archives containing C++ object files must be created using
7845 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7846 # necessary to make sure instantiated templates are included
7848 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7856 # FIXME: insert proper C++ library support
7857 _LT_TAGVAR(ld_shlibs, $1)=no
7861 # FIXME: insert proper C++ library support
7862 _LT_TAGVAR(ld_shlibs, $1)=no
7866 case $cc_basename in
7868 # FIXME: insert proper C++ library support
7869 _LT_TAGVAR(ld_shlibs, $1)=no
7872 # FIXME: insert proper C++ library support
7873 _LT_TAGVAR(ld_shlibs, $1)=no
7879 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7880 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7882 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7883 _LT_TAGVAR(hardcode_direct, $1)=yes
7884 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7886 # Workaround some broken pre-1.5 toolchains
7887 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7891 _LT_TAGVAR(ld_shlibs, $1)=yes
7895 # C++ shared libraries are fairly broken
7896 _LT_TAGVAR(ld_shlibs, $1)=no
7900 if test -f /usr/libexec/ld.so; then
7901 _LT_TAGVAR(hardcode_direct, $1)=yes
7902 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7903 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7906 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7907 _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'
7908 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7909 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7911 output_verbose_link_cmd=func_echo_all
7913 _LT_TAGVAR(ld_shlibs, $1)=no
7917 osf3* | osf4* | osf5*)
7918 case $cc_basename in
7920 # Kuck and Associates, Inc. (KAI) C++ Compiler
7922 # KCC will only create a shared library if the output file
7923 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7924 # to its proper name (with version) after linking.
7925 _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'
7927 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7928 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7930 # Archives containing C++ object files must be created using
7931 # the KAI C++ compiler.
7933 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7934 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7938 # Rational C++ 2.4.1
7939 # FIXME: insert proper C++ library support
7940 _LT_TAGVAR(ld_shlibs, $1)=no
7945 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7946 _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'
7947 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7950 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7951 _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'
7952 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7953 echo "-hidden">> $lib.exp~
7954 $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~
7956 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7960 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7962 # Commands to make compiler produce verbose output that lists
7963 # what "hidden" libraries, object files and flags are used when
7964 # linking a shared library.
7966 # There doesn't appear to be a way to prevent this compiler from
7967 # explicitly linking system object files so we need to strip them
7968 # from the output so that they don't get included in the library
7970 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"'
7973 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7974 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7977 _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'
7980 _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'
7984 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7985 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7987 # Commands to make compiler produce verbose output that lists
7988 # what "hidden" libraries, object files and flags are used when
7989 # linking a shared library.
7990 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7993 # FIXME: insert proper C++ library support
7994 _LT_TAGVAR(ld_shlibs, $1)=no
8001 # FIXME: insert proper C++ library support
8002 _LT_TAGVAR(ld_shlibs, $1)=no
8006 case $cc_basename in
8009 # FIXME: insert proper C++ library support
8010 _LT_TAGVAR(ld_shlibs, $1)=no
8014 # FIXME: insert proper C++ library support
8015 _LT_TAGVAR(ld_shlibs, $1)=no
8018 # FIXME: insert proper C++ library support
8019 _LT_TAGVAR(ld_shlibs, $1)=no
8025 case $cc_basename in
8027 # Sun C++ 4.2, 5.x and Centerline C++
8028 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8029 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8030 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8031 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8032 $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'
8034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8035 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8037 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8039 # The compiler driver will combine and reorder linker options,
8040 # but understands `-z linker_flag'.
8041 # Supported since Solaris 2.6 (maybe 2.5.1?)
8042 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8045 _LT_TAGVAR(link_all_deplibs, $1)=yes
8047 output_verbose_link_cmd='func_echo_all'
8049 # Archives containing C++ object files must be created using
8050 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8051 # necessary to make sure instantiated templates are included
8053 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8056 # Green Hills C++ Compiler
8057 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8059 # The C++ compiler must be used to create the archive.
8060 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8063 # GNU C++ compiler with Solaris linker
8064 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8065 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8066 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8067 _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'
8068 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8069 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8071 # Commands to make compiler produce verbose output that lists
8072 # what "hidden" libraries, object files and flags are used when
8073 # linking a shared library.
8074 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8076 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8078 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8079 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8080 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8082 # Commands to make compiler produce verbose output that lists
8083 # what "hidden" libraries, object files and flags are used when
8084 # linking a shared library.
8085 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8090 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8092 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8100 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8101 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8102 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8103 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8104 runpath_var='LD_RUN_PATH'
8106 case $cc_basename in
8108 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8109 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8113 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8118 sysv5* | sco3.2v5* | sco5v6*)
8119 # Note: We can NOT use -z defs as we might desire, because we do not
8120 # link with -lc, and that would cause any symbols used from libc to
8121 # always be unresolved, which means just about no library would
8122 # ever link correctly. If we're not using GNU ld we use -z text
8123 # though, which does catch some bad symbols but isn't as heavy-handed
8125 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8126 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8127 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8128 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8129 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8130 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8131 _LT_TAGVAR(link_all_deplibs, $1)=yes
8132 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8133 runpath_var='LD_RUN_PATH'
8135 case $cc_basename in
8137 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8138 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8139 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8140 '"$_LT_TAGVAR(old_archive_cmds, $1)"
8141 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8142 '"$_LT_TAGVAR(reload_cmds, $1)"
8145 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8146 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8152 case $cc_basename in
8154 # NonStop-UX NCC 3.20
8155 # FIXME: insert proper C++ library support
8156 _LT_TAGVAR(ld_shlibs, $1)=no
8159 # FIXME: insert proper C++ library support
8160 _LT_TAGVAR(ld_shlibs, $1)=no
8166 # FIXME: insert proper C++ library support
8167 _LT_TAGVAR(ld_shlibs, $1)=no
8171 # FIXME: insert proper C++ library support
8172 _LT_TAGVAR(ld_shlibs, $1)=no
8176 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8177 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8179 _LT_TAGVAR(GCC, $1)="$GXX"
8180 _LT_TAGVAR(LD, $1)="$LD"
8183 ## There is no encapsulation within the following macros, do not change
8184 ## the running order or otherwise move them around unless you know exactly
8185 ## what you are doing...
8186 _LT_SYS_HIDDEN_LIBDEPS($1)
8187 _LT_COMPILER_PIC($1)
8188 _LT_COMPILER_C_O($1)
8189 _LT_COMPILER_FILE_LOCKS($1)
8190 _LT_LINKER_SHLIBS($1)
8191 _LT_SYS_DYNAMIC_LINKER($1)
8192 _LT_LINKER_HARDCODE_LIBPATH($1)
8195 fi # test -n "$compiler"
8198 CFLAGS=$lt_save_CFLAGS
8202 with_gnu_ld=$lt_save_with_gnu_ld
8203 lt_cv_path_LDCXX=$lt_cv_path_LD
8204 lt_cv_path_LD=$lt_save_path_LD
8205 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8206 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8207 fi # test "$_lt_caught_CXX_error" != yes
8210 ])# _LT_LANG_CXX_CONFIG
8213 # _LT_FUNC_STRIPNAME_CNF
8214 # ----------------------
8215 # func_stripname_cnf prefix suffix name
8216 # strip PREFIX and SUFFIX off of NAME.
8217 # PREFIX and SUFFIX must not contain globbing or regex special
8218 # characters, hashes, percent signs, but SUFFIX may contain a leading
8219 # dot (in which case that matches only a dot).
8221 # This function is identical to the (non-XSI) version of func_stripname,
8222 # except this one can be used by m4 code that may be executed by configure,
8223 # rather than the libtool script.
8224 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8225 AC_REQUIRE([_LT_DECL_SED])
8226 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8227 func_stripname_cnf ()
8230 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8231 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8233 } # func_stripname_cnf
8234 ])# _LT_FUNC_STRIPNAME_CNF
8236 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8237 # ---------------------------------
8238 # Figure out "hidden" library dependencies from verbose
8239 # compiler output when linking a shared library.
8240 # Parse the compiler output and extract the necessary
8241 # objects, libraries and library flags.
8242 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8243 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8244 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8245 # Dependencies to place before and after the object being linked:
8246 _LT_TAGVAR(predep_objects, $1)=
8247 _LT_TAGVAR(postdep_objects, $1)=
8248 _LT_TAGVAR(predeps, $1)=
8249 _LT_TAGVAR(postdeps, $1)=
8250 _LT_TAGVAR(compiler_lib_search_path, $1)=
8252 dnl we can't use the lt_simple_compile_test_code here,
8253 dnl because it contains code intended for an executable,
8254 dnl not a library. It's possible we should let each
8255 dnl tag define a new lt_????_link_test_code variable,
8256 dnl but it's only used here...
8257 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8259 void foo (void) { a = 0; }
8261 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8265 Foo (void) { a = 0; }
8270 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8278 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8286 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8289 public void bar (void) {
8294 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8301 _lt_libdeps_save_CFLAGS=$CFLAGS
8302 case "$CC $CFLAGS " in #(
8303 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8304 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8305 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8308 dnl Parse the compiler output and extract the necessary
8309 dnl objects, libraries and library flags.
8310 if AC_TRY_EVAL(ac_compile); then
8311 # Parse the compiler output and extract the necessary
8312 # objects, libraries and library flags.
8314 # Sentinel used to keep track of whether or not we are before
8315 # the conftest object file.
8316 pre_test_object_deps_done=no
8318 for p in `eval "$output_verbose_link_cmd"`; do
8322 # Some compilers place space between "-{L,R}" and the path.
8324 if test $p = "-L" ||
8325 test $p = "-R"; then
8330 # Expand the sysroot to ease extracting the directories later.
8331 if test -z "$prev"; then
8333 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8334 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8335 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8339 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8341 if test "$pre_test_object_deps_done" = no; then
8344 # Internal compiler library paths should come after those
8345 # provided the user. The postdeps already come after the
8346 # user supplied libs so there is no need to process them.
8347 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8348 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8350 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8353 # The "-l" case would never come before the object being
8354 # linked, so don't bother handling this case.
8357 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8358 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8360 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8366 *.lto.$objext) ;; # Ignore GCC LTO objects
8368 # This assumes that the test object file only shows up
8369 # once in the compiler output.
8370 if test "$p" = "conftest.$objext"; then
8371 pre_test_object_deps_done=yes
8375 if test "$pre_test_object_deps_done" = no; then
8376 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8377 _LT_TAGVAR(predep_objects, $1)="$p"
8379 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8382 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8383 _LT_TAGVAR(postdep_objects, $1)="$p"
8385 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8390 *) ;; # Ignore the rest.
8398 echo "libtool.m4: error: problem compiling $1 test program"
8401 $RM -f confest.$objext
8402 CFLAGS=$_lt_libdeps_save_CFLAGS
8404 # PORTME: override above test on systems where it is broken
8408 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8409 # hack all around it, let's just trust "g++" to DTRT.
8410 _LT_TAGVAR(predep_objects,$1)=
8411 _LT_TAGVAR(postdep_objects,$1)=
8412 _LT_TAGVAR(postdeps,$1)=
8416 case `$CC -V 2>&1 | sed 5q` in
8420 # The more standards-conforming stlport4 library is
8421 # incompatible with the Cstd library. Avoid specifying
8422 # it if it's in CXXFLAGS. Ignore libCrun as
8423 # -library=stlport4 depends on it.
8424 case " $CXX $CXXFLAGS " in
8425 *" -library=stlport4 "*)
8426 solaris_use_stlport4=yes
8430 if test "$solaris_use_stlport4" != yes; then
8431 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8438 case $cc_basename in
8440 # The more standards-conforming stlport4 library is
8441 # incompatible with the Cstd library. Avoid specifying
8442 # it if it's in CXXFLAGS. Ignore libCrun as
8443 # -library=stlport4 depends on it.
8444 case " $CXX $CXXFLAGS " in
8445 *" -library=stlport4 "*)
8446 solaris_use_stlport4=yes
8450 # Adding this requires a known-good setup of shared libraries for
8451 # Sun compiler versions before 5.6, else PIC objects from an old
8452 # archive will be linked into the output, leading to subtle bugs.
8453 if test "$solaris_use_stlport4" != yes; then
8454 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8462 case " $_LT_TAGVAR(postdeps, $1) " in
8463 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8465 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8466 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8467 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8469 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8470 [The directories searched by this compiler when creating a shared library])
8471 _LT_TAGDECL([], [predep_objects], [1],
8472 [Dependencies to place before and after the objects being linked to
8473 create a shared library])
8474 _LT_TAGDECL([], [postdep_objects], [1])
8475 _LT_TAGDECL([], [predeps], [1])
8476 _LT_TAGDECL([], [postdeps], [1])
8477 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8478 [The library search path used internally by the compiler when linking
8480 ])# _LT_SYS_HIDDEN_LIBDEPS
8483 # _LT_LANG_F77_CONFIG([TAG])
8484 # --------------------------
8485 # Ensure that the configuration variables for a Fortran 77 compiler are
8486 # suitably defined. These variables are subsequently used by _LT_CONFIG
8487 # to write the compiler configuration to `libtool'.
8488 m4_defun([_LT_LANG_F77_CONFIG],
8489 [AC_LANG_PUSH(Fortran 77)
8490 if test -z "$F77" || test "X$F77" = "Xno"; then
8494 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8495 _LT_TAGVAR(allow_undefined_flag, $1)=
8496 _LT_TAGVAR(always_export_symbols, $1)=no
8497 _LT_TAGVAR(archive_expsym_cmds, $1)=
8498 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8499 _LT_TAGVAR(hardcode_direct, $1)=no
8500 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8502 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8503 _LT_TAGVAR(hardcode_minus_L, $1)=no
8504 _LT_TAGVAR(hardcode_automatic, $1)=no
8505 _LT_TAGVAR(inherit_rpath, $1)=no
8506 _LT_TAGVAR(module_cmds, $1)=
8507 _LT_TAGVAR(module_expsym_cmds, $1)=
8508 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8509 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8510 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8511 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8512 _LT_TAGVAR(no_undefined_flag, $1)=
8513 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8514 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8516 # Source file extension for f77 test sources.
8519 # Object file extension for compiled f77 test sources.
8521 _LT_TAGVAR(objext, $1)=$objext
8523 # No sense in running all these tests if we already determined that
8524 # the F77 compiler isn't working. Some variables (like enable_shared)
8525 # are currently assumed to apply to all compilers on this platform,
8526 # and will be corrupted by setting them based on a non-working compiler.
8527 if test "$_lt_disable_F77" != yes; then
8528 # Code to be used in simple compile tests
8529 lt_simple_compile_test_code="\
8535 # Code to be used in simple link tests
8536 lt_simple_link_test_code="\
8541 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8544 # save warnings/boilerplate of simple test code
8545 _LT_COMPILER_BOILERPLATE
8546 _LT_LINKER_BOILERPLATE
8548 # Allow CC to be a program name with arguments.
8551 lt_save_CFLAGS=$CFLAGS
8555 _LT_TAGVAR(compiler, $1)=$CC
8556 _LT_CC_BASENAME([$compiler])
8558 if test -n "$compiler"; then
8559 AC_MSG_CHECKING([if libtool supports shared libraries])
8560 AC_MSG_RESULT([$can_build_shared])
8562 AC_MSG_CHECKING([whether to build shared libraries])
8563 test "$can_build_shared" = "no" && enable_shared=no
8565 # On AIX, shared libraries and static libraries use the same namespace, and
8566 # are all built from PIC.
8569 test "$enable_shared" = yes && enable_static=no
8570 if test -n "$RANLIB"; then
8571 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8572 postinstall_cmds='$RANLIB $lib'
8576 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8577 test "$enable_shared" = yes && enable_static=no
8581 AC_MSG_RESULT([$enable_shared])
8583 AC_MSG_CHECKING([whether to build static libraries])
8584 # Make sure either enable_shared or enable_static is yes.
8585 test "$enable_shared" = yes || enable_static=yes
8586 AC_MSG_RESULT([$enable_static])
8588 _LT_TAGVAR(GCC, $1)="$G77"
8589 _LT_TAGVAR(LD, $1)="$LD"
8592 ## There is no encapsulation within the following macros, do not change
8593 ## the running order or otherwise move them around unless you know exactly
8594 ## what you are doing...
8595 _LT_COMPILER_PIC($1)
8596 _LT_COMPILER_C_O($1)
8597 _LT_COMPILER_FILE_LOCKS($1)
8598 _LT_LINKER_SHLIBS($1)
8599 _LT_SYS_DYNAMIC_LINKER($1)
8600 _LT_LINKER_HARDCODE_LIBPATH($1)
8603 fi # test -n "$compiler"
8607 CFLAGS="$lt_save_CFLAGS"
8608 fi # test "$_lt_disable_F77" != yes
8611 ])# _LT_LANG_F77_CONFIG
8614 # _LT_LANG_FC_CONFIG([TAG])
8615 # -------------------------
8616 # Ensure that the configuration variables for a Fortran compiler are
8617 # suitably defined. These variables are subsequently used by _LT_CONFIG
8618 # to write the compiler configuration to `libtool'.
8619 m4_defun([_LT_LANG_FC_CONFIG],
8620 [AC_LANG_PUSH(Fortran)
8622 if test -z "$FC" || test "X$FC" = "Xno"; then
8626 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8627 _LT_TAGVAR(allow_undefined_flag, $1)=
8628 _LT_TAGVAR(always_export_symbols, $1)=no
8629 _LT_TAGVAR(archive_expsym_cmds, $1)=
8630 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8631 _LT_TAGVAR(hardcode_direct, $1)=no
8632 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8634 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8635 _LT_TAGVAR(hardcode_minus_L, $1)=no
8636 _LT_TAGVAR(hardcode_automatic, $1)=no
8637 _LT_TAGVAR(inherit_rpath, $1)=no
8638 _LT_TAGVAR(module_cmds, $1)=
8639 _LT_TAGVAR(module_expsym_cmds, $1)=
8640 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8641 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8642 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8643 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8644 _LT_TAGVAR(no_undefined_flag, $1)=
8645 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8646 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8648 # Source file extension for fc test sources.
8649 ac_ext=${ac_fc_srcext-f}
8651 # Object file extension for compiled fc test sources.
8653 _LT_TAGVAR(objext, $1)=$objext
8655 # No sense in running all these tests if we already determined that
8656 # the FC compiler isn't working. Some variables (like enable_shared)
8657 # are currently assumed to apply to all compilers on this platform,
8658 # and will be corrupted by setting them based on a non-working compiler.
8659 if test "$_lt_disable_FC" != yes; then
8660 # Code to be used in simple compile tests
8661 lt_simple_compile_test_code="\
8667 # Code to be used in simple link tests
8668 lt_simple_link_test_code="\
8673 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8676 # save warnings/boilerplate of simple test code
8677 _LT_COMPILER_BOILERPLATE
8678 _LT_LINKER_BOILERPLATE
8680 # Allow CC to be a program name with arguments.
8683 lt_save_CFLAGS=$CFLAGS
8687 GCC=$ac_cv_fc_compiler_gnu
8689 _LT_TAGVAR(compiler, $1)=$CC
8690 _LT_CC_BASENAME([$compiler])
8692 if test -n "$compiler"; then
8693 AC_MSG_CHECKING([if libtool supports shared libraries])
8694 AC_MSG_RESULT([$can_build_shared])
8696 AC_MSG_CHECKING([whether to build shared libraries])
8697 test "$can_build_shared" = "no" && enable_shared=no
8699 # On AIX, shared libraries and static libraries use the same namespace, and
8700 # are all built from PIC.
8703 test "$enable_shared" = yes && enable_static=no
8704 if test -n "$RANLIB"; then
8705 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8706 postinstall_cmds='$RANLIB $lib'
8710 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8711 test "$enable_shared" = yes && enable_static=no
8715 AC_MSG_RESULT([$enable_shared])
8717 AC_MSG_CHECKING([whether to build static libraries])
8718 # Make sure either enable_shared or enable_static is yes.
8719 test "$enable_shared" = yes || enable_static=yes
8720 AC_MSG_RESULT([$enable_static])
8722 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8723 _LT_TAGVAR(LD, $1)="$LD"
8726 ## There is no encapsulation within the following macros, do not change
8727 ## the running order or otherwise move them around unless you know exactly
8728 ## what you are doing...
8729 _LT_SYS_HIDDEN_LIBDEPS($1)
8730 _LT_COMPILER_PIC($1)
8731 _LT_COMPILER_C_O($1)
8732 _LT_COMPILER_FILE_LOCKS($1)
8733 _LT_LINKER_SHLIBS($1)
8734 _LT_SYS_DYNAMIC_LINKER($1)
8735 _LT_LINKER_HARDCODE_LIBPATH($1)
8738 fi # test -n "$compiler"
8742 CFLAGS=$lt_save_CFLAGS
8743 fi # test "$_lt_disable_FC" != yes
8746 ])# _LT_LANG_FC_CONFIG
8749 # _LT_LANG_GCJ_CONFIG([TAG])
8750 # --------------------------
8751 # Ensure that the configuration variables for the GNU Java Compiler compiler
8752 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8753 # to write the compiler configuration to `libtool'.
8754 m4_defun([_LT_LANG_GCJ_CONFIG],
8755 [AC_REQUIRE([LT_PROG_GCJ])dnl
8758 # Source file extension for Java test sources.
8761 # Object file extension for compiled Java test sources.
8763 _LT_TAGVAR(objext, $1)=$objext
8765 # Code to be used in simple compile tests
8766 lt_simple_compile_test_code="class foo {}"
8768 # Code to be used in simple link tests
8769 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8771 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8774 # save warnings/boilerplate of simple test code
8775 _LT_COMPILER_BOILERPLATE
8776 _LT_LINKER_BOILERPLATE
8778 # Allow CC to be a program name with arguments.
8780 lt_save_CFLAGS=$CFLAGS
8786 _LT_TAGVAR(compiler, $1)=$CC
8787 _LT_TAGVAR(LD, $1)="$LD"
8788 _LT_CC_BASENAME([$compiler])
8790 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8791 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8793 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8794 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8795 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8797 if test -n "$compiler"; then
8798 _LT_COMPILER_NO_RTTI($1)
8799 _LT_COMPILER_PIC($1)
8800 _LT_COMPILER_C_O($1)
8801 _LT_COMPILER_FILE_LOCKS($1)
8802 _LT_LINKER_SHLIBS($1)
8803 _LT_LINKER_HARDCODE_LIBPATH($1)
8812 CFLAGS=$lt_save_CFLAGS
8813 ])# _LT_LANG_GCJ_CONFIG
8816 # _LT_LANG_GO_CONFIG([TAG])
8817 # --------------------------
8818 # Ensure that the configuration variables for the GNU Go compiler
8819 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8820 # to write the compiler configuration to `libtool'.
8821 m4_defun([_LT_LANG_GO_CONFIG],
8822 [AC_REQUIRE([LT_PROG_GO])dnl
8825 # Source file extension for Go test sources.
8828 # Object file extension for compiled Go test sources.
8830 _LT_TAGVAR(objext, $1)=$objext
8832 # Code to be used in simple compile tests
8833 lt_simple_compile_test_code="package main; func main() { }"
8835 # Code to be used in simple link tests
8836 lt_simple_link_test_code='package main; func main() { }'
8838 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8841 # save warnings/boilerplate of simple test code
8842 _LT_COMPILER_BOILERPLATE
8843 _LT_LINKER_BOILERPLATE
8845 # Allow CC to be a program name with arguments.
8847 lt_save_CFLAGS=$CFLAGS
8853 _LT_TAGVAR(compiler, $1)=$CC
8854 _LT_TAGVAR(LD, $1)="$LD"
8855 _LT_CC_BASENAME([$compiler])
8857 # Go did not exist at the time GCC didn't implicitly link libc in.
8858 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8860 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8861 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8862 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8864 if test -n "$compiler"; then
8865 _LT_COMPILER_NO_RTTI($1)
8866 _LT_COMPILER_PIC($1)
8867 _LT_COMPILER_C_O($1)
8868 _LT_COMPILER_FILE_LOCKS($1)
8869 _LT_LINKER_SHLIBS($1)
8870 _LT_LINKER_HARDCODE_LIBPATH($1)
8879 CFLAGS=$lt_save_CFLAGS
8880 ])# _LT_LANG_GO_CONFIG
8883 # _LT_LANG_RC_CONFIG([TAG])
8884 # -------------------------
8885 # Ensure that the configuration variables for the Windows resource compiler
8886 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8887 # to write the compiler configuration to `libtool'.
8888 m4_defun([_LT_LANG_RC_CONFIG],
8889 [AC_REQUIRE([LT_PROG_RC])dnl
8892 # Source file extension for RC test sources.
8895 # Object file extension for compiled RC test sources.
8897 _LT_TAGVAR(objext, $1)=$objext
8899 # Code to be used in simple compile tests
8900 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8902 # Code to be used in simple link tests
8903 lt_simple_link_test_code="$lt_simple_compile_test_code"
8905 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8908 # save warnings/boilerplate of simple test code
8909 _LT_COMPILER_BOILERPLATE
8910 _LT_LINKER_BOILERPLATE
8912 # Allow CC to be a program name with arguments.
8914 lt_save_CFLAGS=$CFLAGS
8920 _LT_TAGVAR(compiler, $1)=$CC
8921 _LT_CC_BASENAME([$compiler])
8922 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8924 if test -n "$compiler"; then
8932 CFLAGS=$lt_save_CFLAGS
8933 ])# _LT_LANG_RC_CONFIG
8938 AC_DEFUN([LT_PROG_GCJ],
8939 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8940 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8941 [AC_CHECK_TOOL(GCJ, gcj,)
8942 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8943 AC_SUBST(GCJFLAGS)])])[]dnl
8947 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8948 dnl aclocal-1.4 backwards compatibility:
8949 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8954 AC_DEFUN([LT_PROG_GO],
8955 [AC_CHECK_TOOL(GOC, gccgo,)
8961 AC_DEFUN([LT_PROG_RC],
8962 [AC_CHECK_TOOL(RC, windres,)
8966 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8967 dnl aclocal-1.4 backwards compatibility:
8968 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8973 # If we don't have a new enough Autoconf to choose the best grep
8974 # available, choose the one first in the user's PATH.
8975 m4_defun([_LT_DECL_EGREP],
8976 [AC_REQUIRE([AC_PROG_EGREP])dnl
8977 AC_REQUIRE([AC_PROG_FGREP])dnl
8978 test -z "$GREP" && GREP=grep
8979 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8980 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8981 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8982 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8989 # If we don't have a new enough Autoconf to choose the best objdump
8990 # available, choose the one first in the user's PATH.
8991 m4_defun([_LT_DECL_OBJDUMP],
8992 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8993 test -z "$OBJDUMP" && OBJDUMP=objdump
8994 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9000 # Ensure DLLTOOL variable is set.
9001 m4_defun([_LT_DECL_DLLTOOL],
9002 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9003 test -z "$DLLTOOL" && DLLTOOL=dlltool
9004 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9010 # Check for a fully-functional sed program, that truncates
9011 # as few characters as possible. Prefer GNU sed if found.
9012 m4_defun([_LT_DECL_SED],
9014 test -z "$SED" && SED=sed
9015 Xsed="$SED -e 1s/^X//"
9016 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9017 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9018 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9021 m4_ifndef([AC_PROG_SED], [
9022 # NOTE: This macro has been submitted for inclusion into #
9023 # GNU Autoconf as AC_PROG_SED. When it is available in #
9024 # a released version of Autoconf we should remove this #
9025 # macro and use it instead. #
9027 m4_defun([AC_PROG_SED],
9028 [AC_MSG_CHECKING([for a sed that does not truncate output])
9029 AC_CACHE_VAL(lt_cv_path_SED,
9030 [# Loop through the user's path and test for sed and gsed.
9031 # Then use that list of sed's as ones to test for truncation.
9032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9036 test -z "$as_dir" && as_dir=.
9037 for lt_ac_prog in sed gsed; do
9038 for ac_exec_ext in '' $ac_executable_extensions; do
9039 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9040 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9048 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9049 # along with /bin/sed that truncates output.
9050 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9051 test ! -f $lt_ac_sed && continue
9052 cat /dev/null > conftest.in
9054 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9055 # Check for GNU sed and select it if it is found.
9056 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9057 lt_cv_path_SED=$lt_ac_sed
9061 cat conftest.in conftest.in >conftest.tmp
9062 mv conftest.tmp conftest.in
9063 cp conftest.in conftest.nl
9065 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9066 cmp -s conftest.out conftest.nl || break
9067 # 10000 chars as input seems more than enough
9068 test $lt_ac_count -gt 10 && break
9069 lt_ac_count=`expr $lt_ac_count + 1`
9070 if test $lt_ac_count -gt $lt_ac_max; then
9071 lt_ac_max=$lt_ac_count
9072 lt_cv_path_SED=$lt_ac_sed
9079 AC_MSG_RESULT([$SED])
9084 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9085 dnl aclocal-1.4 backwards compatibility:
9086 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9089 # _LT_CHECK_SHELL_FEATURES
9090 # ------------------------
9091 # Find out whether the shell is Bourne or XSI compatible,
9092 # or has some other useful features.
9093 m4_defun([_LT_CHECK_SHELL_FEATURES],
9094 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9095 # Try some XSI features
9098 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9100 && eval 'test $(( 1 + 1 )) -eq 2 \
9101 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9103 AC_MSG_RESULT([$xsi_shell])
9104 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9106 AC_MSG_CHECKING([whether the shell understands "+="])
9108 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9110 && lt_shell_append=yes
9111 AC_MSG_RESULT([$lt_shell_append])
9112 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9114 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9119 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9121 # test EBCDIC or ASCII
9122 case `echo X|tr X '\101'` in
9123 A) # ASCII based system
9124 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9125 lt_SP2NL='tr \040 \012'
9126 lt_NL2SP='tr \015\012 \040\040'
9128 *) # EBCDIC based system
9129 lt_SP2NL='tr \100 \n'
9130 lt_NL2SP='tr \r\n \100\100'
9133 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9134 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9135 ])# _LT_CHECK_SHELL_FEATURES
9138 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9139 # ------------------------------------------------------
9140 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9141 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9142 m4_defun([_LT_PROG_FUNCTION_REPLACE],
9144 sed -e '/^$1 ()$/,/^} # $1 /c\
9147 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
9148 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9149 && mv -f "$cfgfile.tmp" "$cfgfile" \
9150 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9151 test 0 -eq $? || _lt_function_replace_fail=:
9155 # _LT_PROG_REPLACE_SHELLFNS
9156 # -------------------------
9157 # Replace existing portable implementations of several shell functions with
9158 # equivalent extended shell implementations where those features are available..
9159 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9160 [if test x"$xsi_shell" = xyes; then
9161 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9163 */*) func_dirname_result="${1%/*}${2}" ;;
9164 * ) func_dirname_result="${3}" ;;
9167 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9168 func_basename_result="${1##*/}"])
9170 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9172 */*) func_dirname_result="${1%/*}${2}" ;;
9173 * ) func_dirname_result="${3}" ;;
9175 func_basename_result="${1##*/}"])
9177 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9178 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9179 # positional parameters, so assign one to ordinary parameter first.
9180 func_stripname_result=${3}
9181 func_stripname_result=${func_stripname_result#"${1}"}
9182 func_stripname_result=${func_stripname_result%"${2}"}])
9184 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9185 func_split_long_opt_name=${1%%=*}
9186 func_split_long_opt_arg=${1#*=}])
9188 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9189 func_split_short_opt_arg=${1#??}
9190 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9192 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9194 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9195 *) func_lo2o_result=${1} ;;
9198 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
9200 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
9202 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
9205 if test x"$lt_shell_append" = xyes; then
9206 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
9208 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9209 func_quote_for_eval "${2}"
9210 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9211 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9213 # Save a `func_append' function call where possible by direct use of '+='
9214 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9215 && mv -f "$cfgfile.tmp" "$cfgfile" \
9216 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9217 test 0 -eq $? || _lt_function_replace_fail=:
9219 # Save a `func_append' function call even when '+=' is not available
9220 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9221 && mv -f "$cfgfile.tmp" "$cfgfile" \
9222 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9223 test 0 -eq $? || _lt_function_replace_fail=:
9226 if test x"$_lt_function_replace_fail" = x":"; then
9227 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9231 # _LT_PATH_CONVERSION_FUNCTIONS
9232 # -----------------------------
9233 # Determine which file name conversion functions should be used by
9234 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
9235 # for certain cross-compile configurations and native mingw.
9236 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9237 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9238 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9239 AC_MSG_CHECKING([how to convert $build file names to $host format])
9240 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9244 *-*-mingw* ) # actually msys
9245 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9248 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9250 * ) # otherwise, assume *nix
9251 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9257 *-*-mingw* ) # actually msys
9258 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9261 lt_cv_to_host_file_cmd=func_convert_file_noop
9263 * ) # otherwise, assume *nix
9264 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9268 * ) # unhandled hosts (and "normal" native builds)
9269 lt_cv_to_host_file_cmd=func_convert_file_noop
9273 to_host_file_cmd=$lt_cv_to_host_file_cmd
9274 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9275 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9276 [0], [convert $build file names to $host format])dnl
9278 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9279 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9280 [#assume ordinary cross tools, or native build.
9281 lt_cv_to_tool_file_cmd=func_convert_file_noop
9285 *-*-mingw* ) # actually msys
9286 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9292 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9293 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9294 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9295 [0], [convert $build files to toolchain format])dnl
9296 ])# _LT_PATH_CONVERSION_FUNCTIONS
9298 # Helper functions for option handling. -*- Autoconf -*-
9300 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9302 # Written by Gary V. Vaughan, 2004
9304 # This file is free software; the Free Software Foundation gives
9305 # unlimited permission to copy and/or distribute it, with or without
9306 # modifications, as long as this notice is preserved.
9308 # serial 7 ltoptions.m4
9310 # This is to help aclocal find these macros, as it can't see m4_define.
9311 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9314 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9315 # ------------------------------------------
9316 m4_define([_LT_MANGLE_OPTION],
9317 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9320 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9321 # ---------------------------------------
9322 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9323 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9325 m4_define([_LT_SET_OPTION],
9326 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9327 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9328 _LT_MANGLE_DEFUN([$1], [$2]),
9329 [m4_warning([Unknown $1 option `$2'])])[]dnl
9333 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9334 # ------------------------------------------------------------
9335 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9336 m4_define([_LT_IF_OPTION],
9337 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9340 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9341 # -------------------------------------------------------
9342 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9344 m4_define([_LT_UNLESS_OPTIONS],
9345 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9346 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9347 [m4_define([$0_found])])])[]dnl
9348 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9353 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9354 # ----------------------------------------
9355 # OPTION-LIST is a space-separated list of Libtool options associated
9356 # with MACRO-NAME. If any OPTION has a matching handler declared with
9357 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9358 # the unknown option and exit.
9359 m4_defun([_LT_SET_OPTIONS],
9361 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9362 [_LT_SET_OPTION([$1], _LT_Option)])
9364 m4_if([$1],[LT_INIT],[
9366 dnl Simply set some default values (i.e off) if boolean options were not
9368 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9370 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9373 dnl If no reference was made to various pairs of opposing options, then
9374 dnl we run the default mode handler for the pair. For example, if neither
9375 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9376 dnl archives by default:
9377 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9378 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9379 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9380 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9381 [_LT_ENABLE_FAST_INSTALL])
9387 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9388 # -----------------------------------------
9389 m4_define([_LT_MANGLE_DEFUN],
9390 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9393 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9394 # -----------------------------------------------
9395 m4_define([LT_OPTION_DEFINE],
9396 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9397 ])# LT_OPTION_DEFINE
9402 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9405 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9406 [_LT_SET_OPTION([LT_INIT], [dlopen])
9407 AC_DIAGNOSE([obsolete],
9408 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9409 put the `dlopen' option into LT_INIT's first parameter.])
9412 dnl aclocal-1.4 backwards compatibility:
9413 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9418 # Declare package support for building win32 dll's.
9419 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9420 [enable_win32_dll=yes
9423 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9424 AC_CHECK_TOOL(AS, as, false)
9425 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9426 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9430 test -z "$AS" && AS=as
9431 _LT_DECL([], [AS], [1], [Assembler program])dnl
9433 test -z "$DLLTOOL" && DLLTOOL=dlltool
9434 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9436 test -z "$OBJDUMP" && OBJDUMP=objdump
9437 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9440 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9441 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9442 _LT_SET_OPTION([LT_INIT], [win32-dll])
9443 AC_DIAGNOSE([obsolete],
9444 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9445 put the `win32-dll' option into LT_INIT's first parameter.])
9448 dnl aclocal-1.4 backwards compatibility:
9449 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9452 # _LT_ENABLE_SHARED([DEFAULT])
9453 # ----------------------------
9454 # implement the --enable-shared flag, and supports the `shared' and
9455 # `disable-shared' LT_INIT options.
9456 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9457 m4_define([_LT_ENABLE_SHARED],
9458 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9459 AC_ARG_ENABLE([shared],
9460 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9461 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9462 [p=${PACKAGE-default}
9464 yes) enable_shared=yes ;;
9465 no) enable_shared=no ;;
9468 # Look at the argument we got. We use all the common list separators.
9469 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9470 for pkg in $enableval; do
9472 if test "X$pkg" = "X$p"; then
9479 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9481 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9482 [Whether or not to build shared libraries])
9483 ])# _LT_ENABLE_SHARED
9485 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9486 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9489 AC_DEFUN([AC_ENABLE_SHARED],
9490 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9493 AC_DEFUN([AC_DISABLE_SHARED],
9494 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9497 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9498 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9500 dnl aclocal-1.4 backwards compatibility:
9501 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9502 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9506 # _LT_ENABLE_STATIC([DEFAULT])
9507 # ----------------------------
9508 # implement the --enable-static flag, and support the `static' and
9509 # `disable-static' LT_INIT options.
9510 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9511 m4_define([_LT_ENABLE_STATIC],
9512 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9513 AC_ARG_ENABLE([static],
9514 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9515 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9516 [p=${PACKAGE-default}
9518 yes) enable_static=yes ;;
9519 no) enable_static=no ;;
9522 # Look at the argument we got. We use all the common list separators.
9523 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9524 for pkg in $enableval; do
9526 if test "X$pkg" = "X$p"; then
9533 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9535 _LT_DECL([build_old_libs], [enable_static], [0],
9536 [Whether or not to build static libraries])
9537 ])# _LT_ENABLE_STATIC
9539 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9540 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9543 AC_DEFUN([AC_ENABLE_STATIC],
9544 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9547 AC_DEFUN([AC_DISABLE_STATIC],
9548 [_LT_SET_OPTION([LT_INIT], [disable-static])
9551 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9552 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9554 dnl aclocal-1.4 backwards compatibility:
9555 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9556 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9560 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9561 # ----------------------------------
9562 # implement the --enable-fast-install flag, and support the `fast-install'
9563 # and `disable-fast-install' LT_INIT options.
9564 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9565 m4_define([_LT_ENABLE_FAST_INSTALL],
9566 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9567 AC_ARG_ENABLE([fast-install],
9568 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9569 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9570 [p=${PACKAGE-default}
9572 yes) enable_fast_install=yes ;;
9573 no) enable_fast_install=no ;;
9575 enable_fast_install=no
9576 # Look at the argument we got. We use all the common list separators.
9577 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9578 for pkg in $enableval; do
9580 if test "X$pkg" = "X$p"; then
9581 enable_fast_install=yes
9587 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9589 _LT_DECL([fast_install], [enable_fast_install], [0],
9590 [Whether or not to optimize for fast installation])dnl
9591 ])# _LT_ENABLE_FAST_INSTALL
9593 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9594 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9597 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9598 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9599 AC_DIAGNOSE([obsolete],
9600 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9601 the `fast-install' option into LT_INIT's first parameter.])
9604 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9605 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9606 AC_DIAGNOSE([obsolete],
9607 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9608 the `disable-fast-install' option into LT_INIT's first parameter.])
9611 dnl aclocal-1.4 backwards compatibility:
9612 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9613 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9616 # _LT_WITH_PIC([MODE])
9617 # --------------------
9618 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9620 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9621 m4_define([_LT_WITH_PIC],
9623 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9624 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9625 [lt_p=${PACKAGE-default}
9627 yes|no) pic_mode=$withval ;;
9630 # Look at the argument we got. We use all the common list separators.
9631 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9632 for lt_pkg in $withval; do
9634 if test "X$lt_pkg" = "X$lt_p"; then
9643 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9645 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9648 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9649 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9652 AU_DEFUN([AC_LIBTOOL_PICMODE],
9653 [_LT_SET_OPTION([LT_INIT], [pic-only])
9654 AC_DIAGNOSE([obsolete],
9655 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9656 put the `pic-only' option into LT_INIT's first parameter.])
9659 dnl aclocal-1.4 backwards compatibility:
9660 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9663 m4_define([_LTDL_MODE], [])
9664 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9665 [m4_define([_LTDL_MODE], [nonrecursive])])
9666 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9667 [m4_define([_LTDL_MODE], [recursive])])
9668 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9669 [m4_define([_LTDL_MODE], [subproject])])
9671 m4_define([_LTDL_TYPE], [])
9672 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9673 [m4_define([_LTDL_TYPE], [installable])])
9674 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9675 [m4_define([_LTDL_TYPE], [convenience])])
9677 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9679 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9680 # Written by Gary V. Vaughan, 2004
9682 # This file is free software; the Free Software Foundation gives
9683 # unlimited permission to copy and/or distribute it, with or without
9684 # modifications, as long as this notice is preserved.
9686 # serial 6 ltsugar.m4
9688 # This is to help aclocal find these macros, as it can't see m4_define.
9689 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9692 # lt_join(SEP, ARG1, [ARG2...])
9693 # -----------------------------
9694 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9695 # associated separator.
9696 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9697 # versions in m4sugar had bugs.
9698 m4_define([lt_join],
9699 [m4_if([$#], [1], [],
9701 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9702 m4_define([_lt_join],
9703 [m4_if([$#$2], [2], [],
9704 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9710 # Manipulate m4 lists.
9711 # These macros are necessary as long as will still need to support
9712 # Autoconf-2.59 which quotes differently.
9713 m4_define([lt_car], [[$1]])
9715 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9717 [m4_dquote(m4_shift($@))])])
9718 m4_define([lt_unquote], $1)
9721 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9722 # ------------------------------------------
9723 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9724 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9725 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9726 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9727 # than defined and empty).
9729 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9730 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9731 m4_define([lt_append],
9733 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9737 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9738 # ----------------------------------------------------------
9739 # Produce a SEP delimited list of all paired combinations of elements of
9740 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9741 # has the form PREFIXmINFIXSUFFIXn.
9742 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9743 m4_define([lt_combine],
9744 [m4_if(m4_eval([$# > 3]), [1],
9745 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9746 [[m4_foreach([_Lt_prefix], [$2],
9747 [m4_foreach([_Lt_suffix],
9748 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9749 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9752 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9753 # -----------------------------------------------------------------------
9754 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9755 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9756 m4_define([lt_if_append_uniq],
9758 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9759 [lt_append([$1], [$2], [$3])$4],
9761 [lt_append([$1], [$2], [$3])$4])])
9764 # lt_dict_add(DICT, KEY, VALUE)
9765 # -----------------------------
9766 m4_define([lt_dict_add],
9767 [m4_define([$1($2)], [$3])])
9770 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9771 # --------------------------------------------
9772 m4_define([lt_dict_add_subkey],
9773 [m4_define([$1($2:$3)], [$4])])
9776 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9777 # ----------------------------------
9778 m4_define([lt_dict_fetch],
9780 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9781 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9784 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9785 # -----------------------------------------------------------------
9786 m4_define([lt_if_dict_fetch],
9787 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9792 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9793 # --------------------------------------------------------------
9794 m4_define([lt_dict_filter],
9795 [m4_if([$5], [], [],
9796 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9797 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9798 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9801 # ltversion.m4 -- version numbers -*- Autoconf -*-
9803 # Copyright (C) 2004 Free Software Foundation, Inc.
9804 # Written by Scott James Remnant, 2004
9806 # This file is free software; the Free Software Foundation gives
9807 # unlimited permission to copy and/or distribute it, with or without
9808 # modifications, as long as this notice is preserved.
9812 # serial 3337 ltversion.m4
9813 # This file is part of GNU Libtool
9815 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9816 m4_define([LT_PACKAGE_REVISION], [1.3337])
9818 AC_DEFUN([LTVERSION_VERSION],
9819 [macro_version='2.4.2'
9820 macro_revision='1.3337'
9821 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9822 _LT_DECL(, macro_revision, 0)
9825 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9827 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9828 # Written by Scott James Remnant, 2004.
9830 # This file is free software; the Free Software Foundation gives
9831 # unlimited permission to copy and/or distribute it, with or without
9832 # modifications, as long as this notice is preserved.
9834 # serial 5 lt~obsolete.m4
9836 # These exist entirely to fool aclocal when bootstrapping libtool.
9838 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9839 # which have later been changed to m4_define as they aren't part of the
9840 # exported API, or moved to Autoconf or Automake where they belong.
9842 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9843 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9844 # using a macro with the same name in our local m4/libtool.m4 it'll
9845 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9846 # and doesn't know about Autoconf macros at all.)
9848 # So we provide this file, which has a silly filename so it's always
9849 # included after everything else. This provides aclocal with the
9850 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9851 # because those macros already exist, or will be overwritten later.
9852 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9854 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9855 # Yes, that means every name once taken will need to remain here until
9856 # we give up compatibility with versions before 1.7, at which point
9857 # we need to keep only those names which we still refer to.
9859 # This is to help aclocal find these macros, as it can't see m4_define.
9860 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9862 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9863 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9864 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9865 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9866 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9867 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9868 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9869 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9870 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9871 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9872 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9873 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9874 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9875 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9876 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9877 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9878 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9879 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9880 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9881 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9882 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9883 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9884 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9885 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9886 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9887 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9888 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9889 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9890 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9891 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9892 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9893 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9894 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9895 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9896 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9897 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9898 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9899 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9900 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9901 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9902 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9903 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9904 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9905 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9906 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9907 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9908 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9909 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9910 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9911 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9912 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9913 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9914 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9915 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9916 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9917 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9918 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9919 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9920 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9921 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9922 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9924 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9925 # serial 1 (pkg-config-0.24)
9927 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9929 # This program is free software; you can redistribute it and/or modify
9930 # it under the terms of the GNU General Public License as published by
9931 # the Free Software Foundation; either version 2 of the License, or
9932 # (at your option) any later version.
9934 # This program is distributed in the hope that it will be useful, but
9935 # WITHOUT ANY WARRANTY; without even the implied warranty of
9936 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9937 # General Public License for more details.
9939 # You should have received a copy of the GNU General Public License
9940 # along with this program; if not, write to the Free Software
9941 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9943 # As a special exception to the GNU General Public License, if you
9944 # distribute this file as part of a program that contains a
9945 # configuration script generated by Autoconf, you may include it under
9946 # the same distribution terms that you use for the rest of that program.
9948 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9949 # ----------------------------------
9950 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9951 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9952 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9953 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9954 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9955 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9956 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9958 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9959 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9961 if test -n "$PKG_CONFIG"; then
9962 _pkg_min_version=m4_default([$1], [0.9.0])
9963 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9964 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9965 AC_MSG_RESULT([yes])
9971 ])# PKG_PROG_PKG_CONFIG
9973 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9975 # Check to see whether a particular set of modules exists. Similar
9976 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9978 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9979 # only at the first occurence in configure.ac, so if the first place
9980 # it's called might be skipped (such as if it is within an "if", you
9981 # have to call PKG_CHECK_EXISTS manually
9982 # --------------------------------------------------------------
9983 AC_DEFUN([PKG_CHECK_EXISTS],
9984 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9985 if test -n "$PKG_CONFIG" && \
9986 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9987 m4_default([$2], [:])
9988 m4_ifvaln([$3], [else
9992 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9993 # ---------------------------------------------
9994 m4_define([_PKG_CONFIG],
9995 [if test -n "$$1"; then
9997 elif test -n "$PKG_CONFIG"; then
9998 PKG_CHECK_EXISTS([$3],
9999 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
10000 test "x$?" != "x0" && pkg_failed=yes ],
10007 # _PKG_SHORT_ERRORS_SUPPORTED
10008 # -----------------------------
10009 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10010 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10011 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10012 _pkg_short_errors_supported=yes
10014 _pkg_short_errors_supported=no
10016 ])# _PKG_SHORT_ERRORS_SUPPORTED
10019 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10020 # [ACTION-IF-NOT-FOUND])
10023 # Note that if there is a possibility the first call to
10024 # PKG_CHECK_MODULES might not happen, you should be sure to include an
10025 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10028 # --------------------------------------------------------------
10029 AC_DEFUN([PKG_CHECK_MODULES],
10030 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10031 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10032 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10035 AC_MSG_CHECKING([for $1])
10037 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10038 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
10040 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10041 and $1[]_LIBS to avoid the need to call pkg-config.
10042 See the pkg-config man page for more details.])
10044 if test $pkg_failed = yes; then
10045 AC_MSG_RESULT([no])
10046 _PKG_SHORT_ERRORS_SUPPORTED
10047 if test $_pkg_short_errors_supported = yes; then
10048 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
10050 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
10052 # Put the nasty error message in config.log where it belongs
10053 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10055 m4_default([$4], [AC_MSG_ERROR(
10056 [Package requirements ($2) were not met:
10060 Consider adjusting the PKG_CONFIG_PATH environment variable if you
10061 installed software in a non-standard prefix.
10065 elif test $pkg_failed = untried; then
10066 AC_MSG_RESULT([no])
10067 m4_default([$4], [AC_MSG_FAILURE(
10068 [The pkg-config script could not be found or is too old. Make sure it
10069 is in your PATH or set the PKG_CONFIG environment variable to the full
10070 path to pkg-config.
10074 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10077 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10078 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10079 AC_MSG_RESULT([yes])
10082 ])# PKG_CHECK_MODULES
10085 # PKG_INSTALLDIR(DIRECTORY)
10086 # -------------------------
10087 # Substitutes the variable pkgconfigdir as the location where a module
10088 # should install pkg-config .pc files. By default the directory is
10089 # $libdir/pkgconfig, but the default can be changed by passing
10090 # DIRECTORY. The user can override through the --with-pkgconfigdir
10092 AC_DEFUN([PKG_INSTALLDIR],
10093 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
10094 m4_pushdef([pkg_description],
10095 [pkg-config installation directory @<:@]pkg_default[@:>@])
10096 AC_ARG_WITH([pkgconfigdir],
10097 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
10098 [with_pkgconfigdir=]pkg_default)
10099 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
10100 m4_popdef([pkg_default])
10101 m4_popdef([pkg_description])
10102 ]) dnl PKG_INSTALLDIR
10105 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
10106 # -------------------------
10107 # Substitutes the variable noarch_pkgconfigdir as the location where a
10108 # module should install arch-independent pkg-config .pc files. By
10109 # default the directory is $datadir/pkgconfig, but the default can be
10110 # changed by passing DIRECTORY. The user can override through the
10111 # --with-noarch-pkgconfigdir parameter.
10112 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
10113 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
10114 m4_pushdef([pkg_description],
10115 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
10116 AC_ARG_WITH([noarch-pkgconfigdir],
10117 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
10118 [with_noarch_pkgconfigdir=]pkg_default)
10119 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
10120 m4_popdef([pkg_default])
10121 m4_popdef([pkg_description])
10122 ]) dnl PKG_NOARCH_INSTALLDIR
10125 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
10126 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10127 # -------------------------------------------
10128 # Retrieves the value of the pkg-config variable for the given module.
10129 AC_DEFUN([PKG_CHECK_VAR],
10130 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10131 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
10133 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
10134 AS_VAR_COPY([$1], [pkg_cv_][$1])
10136 AS_VAR_IF([$1], [""], [$5], [$4])dnl
10139 # Configure paths for GLIB
10140 # Owen Taylor 1997-2001
10142 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
10143 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
10144 dnl gthread, or gio is specified in MODULES, pass to pkg-config
10146 AC_DEFUN([AM_PATH_GLIB_2_0],
10148 dnl Get the cflags and libraries from pkg-config
10150 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
10151 , enable_glibtest=yes)
10153 pkg_config_args=glib-2.0
10158 pkg_config_args="$pkg_config_args gmodule-2.0"
10161 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
10164 pkg_config_args="$pkg_config_args gobject-2.0"
10167 pkg_config_args="$pkg_config_args gthread-2.0"
10170 pkg_config_args="$pkg_config_args $module-2.0"
10175 PKG_PROG_PKG_CONFIG([0.16])
10179 if test "x$PKG_CONFIG" = x ; then
10184 min_glib_version=ifelse([$1], ,2.0.0,$1)
10185 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
10187 if test x$PKG_CONFIG != xno ; then
10188 ## don't try to run the test against uninstalled libtool libs
10189 if $PKG_CONFIG --uninstalled $pkg_config_args; then
10190 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
10194 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
10201 if test x"$no_glib" = x ; then
10202 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
10203 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
10204 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
10205 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
10207 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
10208 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
10209 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
10210 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10211 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
10212 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10213 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
10214 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10215 if test "x$enable_glibtest" = "xyes" ; then
10216 ac_save_CFLAGS="$CFLAGS"
10217 ac_save_LIBS="$LIBS"
10218 CFLAGS="$CFLAGS $GLIB_CFLAGS"
10219 LIBS="$GLIB_LIBS $LIBS"
10221 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
10222 dnl checks the results of pkg-config to some extent)
10224 rm -f conf.glibtest
10228 #include <stdlib.h>
10233 unsigned int major, minor, micro;
10235 fclose (fopen ("conf.glibtest", "w"));
10237 if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) {
10238 printf("%s, bad version string\n", "$min_glib_version");
10242 if ((glib_major_version != $glib_config_major_version) ||
10243 (glib_minor_version != $glib_config_minor_version) ||
10244 (glib_micro_version != $glib_config_micro_version))
10246 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
10247 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
10248 glib_major_version, glib_minor_version, glib_micro_version);
10249 printf ("*** was found! If pkg-config was correct, then it is best\n");
10250 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
10251 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
10252 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
10253 printf("*** required on your system.\n");
10254 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
10255 printf("*** to point to the correct configuration files\n");
10257 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
10258 (glib_minor_version != GLIB_MINOR_VERSION) ||
10259 (glib_micro_version != GLIB_MICRO_VERSION))
10261 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
10262 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
10263 printf("*** library (version %d.%d.%d)\n",
10264 glib_major_version, glib_minor_version, glib_micro_version);
10268 if ((glib_major_version > major) ||
10269 ((glib_major_version == major) && (glib_minor_version > minor)) ||
10270 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
10276 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
10277 glib_major_version, glib_minor_version, glib_micro_version);
10278 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
10279 major, minor, micro);
10280 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
10282 printf("*** If you have already installed a sufficiently new version, this error\n");
10283 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
10284 printf("*** being found. The easiest way to fix this is to remove the old version\n");
10285 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
10286 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
10287 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
10288 printf("*** so that the correct libraries are found at run-time))\n");
10293 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10294 CFLAGS="$ac_save_CFLAGS"
10295 LIBS="$ac_save_LIBS"
10298 if test "x$no_glib" = x ; then
10299 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
10300 ifelse([$2], , :, [$2])
10303 if test "$PKG_CONFIG" = "no" ; then
10304 echo "*** A new enough version of pkg-config was not found."
10305 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
10307 if test -f conf.glibtest ; then
10310 echo "*** Could not run GLIB test program, checking why..."
10311 ac_save_CFLAGS="$CFLAGS"
10312 ac_save_LIBS="$LIBS"
10313 CFLAGS="$CFLAGS $GLIB_CFLAGS"
10314 LIBS="$LIBS $GLIB_LIBS"
10318 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
10319 [ echo "*** The test program compiled, but did not run. This usually means"
10320 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
10321 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
10322 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10323 echo "*** to the installed location Also, make sure you have run ldconfig if that"
10324 echo "*** is required on your system"
10326 echo "*** If you have an old version installed, it is best to remove it, although"
10327 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
10328 [ echo "*** The test program failed to compile or link. See the file config.log for the"
10329 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
10330 CFLAGS="$ac_save_CFLAGS"
10331 LIBS="$ac_save_LIBS"
10339 GLIB_COMPILE_RESOURCES=""
10340 ifelse([$3], , :, [$3])
10342 AC_SUBST(GLIB_CFLAGS)
10343 AC_SUBST(GLIB_LIBS)
10344 AC_SUBST(GLIB_GENMARSHAL)
10345 AC_SUBST(GOBJECT_QUERY)
10346 AC_SUBST(GLIB_MKENUMS)
10347 AC_SUBST(GLIB_COMPILE_RESOURCES)
10348 rm -f conf.glibtest
10351 dnl GNOME_CODE_COVERAGE
10353 dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
10354 dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
10355 dnl (program or library) which should be built with code coverage support.
10356 dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
10357 dnl Makefile; and $enable_code_coverage which can be used in subsequent
10358 dnl configure output.
10360 dnl Note that all optimisation flags in CFLAGS must be disabled when code
10361 dnl coverage is enabled.
10363 dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
10364 dnl This file is licenced under LGPLv2.1+.
10368 dnl GNOME_CODE_COVERAGE
10371 dnl @GNOME_CODE_COVERAGE_RULES@
10372 dnl my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
10373 dnl my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
10375 dnl This results in a “check-code-coverage” rule being added to any Makefile.am
10376 dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
10377 dnl configured with --enable-code-coverage). Running `make check-code-coverage`
10378 dnl in that directory will run the module’s test suite (`make check`) and build
10379 dnl a code coverage report detailing the code which was touched, then print the
10380 dnl URI for the report.
10382 AC_DEFUN([GNOME_CODE_COVERAGE],[
10383 dnl Check for --enable-code-coverage
10384 AC_MSG_CHECKING([whether to build with code coverage support])
10385 AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
10386 AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
10387 AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
10388 AC_MSG_RESULT($enable_code_coverage)
10390 AS_IF([ test "$enable_code_coverage" = "yes" ], [
10391 dnl Check if gcc is being used
10392 AS_IF([ test "$GCC" = "no" ], [
10393 AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
10396 # List of supported lcov versions.
10397 lcov_version_list="1.6 1.7 1.8 1.9 1.10"
10399 AC_CHECK_PROG([LCOV], [lcov], [lcov])
10400 AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
10402 AS_IF([ test "$LCOV" ], [
10403 AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
10404 gnome_cv_lcov_version=invalid
10405 lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
10406 for lcov_check_version in $lcov_version_list; do
10407 if test "$lcov_version" = "$lcov_check_version"; then
10408 gnome_cv_lcov_version="$lcov_check_version (ok)"
10413 lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
10414 AC_MSG_ERROR([$lcov_msg])
10417 case $gnome_cv_lcov_version in
10419 lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
10420 AC_MSG_ERROR([$lcov_msg])
10425 AS_IF([ test -z "$GENHTML" ], [
10426 AC_MSG_ERROR([Could not find genhtml from the lcov package])
10429 dnl Build the code coverage flags
10430 CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
10431 CODE_COVERAGE_LDFLAGS="-lgcov"
10433 AC_SUBST([CODE_COVERAGE_CFLAGS])
10434 AC_SUBST([CODE_COVERAGE_LDFLAGS])
10437 GNOME_CODE_COVERAGE_RULES='
10441 # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
10442 # (Default: $(top_builddir))
10443 # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
10444 # by lcov for code coverage. (Default:
10445 # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
10446 # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
10447 # reports to be created. (Default:
10448 # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
10449 # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
10451 # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
10452 # instance. (Default: empty)
10453 # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
10455 # The generated report will be titled using the $(PACKAGE_NAME) and
10456 # $(PACKAGE_VERSION). In order to add the current git hash to the title,
10457 # use the git-version-gen script, available online.
10459 # Optional variables
10460 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
10461 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
10462 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
10463 CODE_COVERAGE_LCOV_OPTIONS ?=
10464 CODE_COVERAGE_GENHTML_OPTIONS ?=
10465 CODE_COVERAGE_IGNORE_PATTERN ?=
10467 code_coverage_quiet = $(code_coverage_quiet_$(V))
10468 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
10469 code_coverage_quiet_0 = --quiet
10471 # Use recursive makes in order to ignore errors during check
10472 check-code-coverage:
10473 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10474 -$(MAKE) $(AM_MAKEFLAGS) -k check
10475 $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
10477 @echo "Need to reconfigure with --enable-code-coverage"
10480 # Capture code coverage data
10481 code-coverage-capture: code-coverage-capture-hook
10482 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10483 $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
10484 $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
10485 -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
10486 LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
10487 @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
10489 @echo "Need to reconfigure with --enable-code-coverage"
10492 # Hook rule executed before code-coverage-capture, overridable by the user
10493 code-coverage-capture-hook:
10495 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10496 clean: code-coverage-clean
10497 code-coverage-clean:
10498 -$(LCOV) --directory $(top_builddir) -z
10499 -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10500 -find . -name "*.gcda" -o -name "*.gcov" -delete
10504 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10506 DISTCHECK_CONFIGURE_FLAGS ?=
10507 DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
10509 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
10512 AC_SUBST([GNOME_CODE_COVERAGE_RULES])
10513 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
10516 # gnome-compiler-flags.m4
10521 dnl GNOME_COMPILE_WARNINGS
10522 dnl Turn on many useful compiler warnings and substitute the result into
10524 dnl For now, only works on GCC
10525 dnl Pass the default value of the --enable-compile-warnings configure option as
10526 dnl the first argument to the macro, defaulting to 'yes'.
10527 dnl Additional warning/error flags can be passed as an optional second argument.
10529 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
10530 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
10531 dnl ******************************
10532 dnl More compiler warnings
10533 dnl ******************************
10535 AC_ARG_ENABLE(compile-warnings,
10536 AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
10537 [Turn on compiler warnings]),,
10538 [enable_compile_warnings="m4_default([$1],[yes])"])
10540 if test "x$GCC" != xyes; then
10541 enable_compile_warnings=no
10545 realsave_CFLAGS="$CFLAGS"
10547 dnl These are warning flags that aren't marked as fatal. Can be
10548 dnl overridden on a per-project basis with -Wno-foo.
10549 base_warn_flags=" \
10551 -Wstrict-prototypes \
10555 dnl These compiler flags typically indicate very broken or suspicious
10556 dnl code. Some of them such as implicit-function-declaration are
10557 dnl just not default because gcc compiles a lot of legacy code.
10558 dnl We choose to make this set into explicit errors.
10559 base_error_flags=" \
10560 -Werror=missing-prototypes \
10561 -Werror=implicit-function-declaration \
10562 -Werror=pointer-arith \
10563 -Werror=init-self \
10564 -Werror=format-security \
10566 -Werror=missing-include-dirs \
10569 dnl Additional warning or error flags provided by the module author to
10570 dnl allow stricter standards to be imposed on a per-module basis.
10571 dnl The author can pass -W or -Werror flags here as they see fit.
10572 additional_flags="m4_default([$2],[])"
10574 case "$enable_compile_warnings" in
10579 warning_flags="-Wall"
10582 warning_flags="$base_warn_flags $base_error_flags $additional_flags"
10585 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
10589 if test "$enable_compile_warnings" = "error" ; then
10590 warning_flags="$warning_flags -Werror"
10593 dnl Check whether GCC supports the warning options
10594 for option in $warning_flags; do
10595 save_CFLAGS="$CFLAGS"
10596 CFLAGS="$CFLAGS $option"
10597 AC_MSG_CHECKING([whether gcc understands $option])
10598 AC_TRY_COMPILE([], [],
10601 CFLAGS="$save_CFLAGS"
10602 AC_MSG_RESULT([$has_option])
10603 if test $has_option = yes; then
10604 tested_warning_flags="$tested_warning_flags $option"
10610 CFLAGS="$realsave_CFLAGS"
10611 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
10612 AC_MSG_RESULT($tested_warning_flags)
10614 AC_ARG_ENABLE(iso-c,
10615 AS_HELP_STRING([--enable-iso-c],
10616 [Try to warn if code is not ISO C ]),,
10619 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
10621 if test "x$enable_iso_c" != "xno"; then
10622 if test "x$GCC" = "xyes"; then
10623 case " $CFLAGS " in
10624 *[\ \ ]-ansi[\ \ ]*) ;;
10625 *) complCFLAGS="$complCFLAGS -ansi" ;;
10627 case " $CFLAGS " in
10628 *[\ \ ]-pedantic[\ \ ]*) ;;
10629 *) complCFLAGS="$complCFLAGS -pedantic" ;;
10633 AC_MSG_RESULT($complCFLAGS)
10635 WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
10636 AC_SUBST(WARN_CFLAGS)
10639 dnl For C++, do basically the same thing.
10641 AC_DEFUN([GNOME_CXX_WARNINGS],[
10642 AC_ARG_ENABLE(cxx-warnings,
10643 AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
10644 [Turn on compiler warnings.]),,
10645 [enable_cxx_warnings="m4_default([$1],[minimum])"])
10647 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
10649 if test "x$GXX" != xyes; then
10650 enable_cxx_warnings=no
10652 if test "x$enable_cxx_warnings" != "xno"; then
10653 if test "x$GXX" = "xyes"; then
10654 case " $CXXFLAGS " in
10655 *[\ \ ]-Wall[\ \ ]*) ;;
10656 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
10659 ## -W is not all that useful. And it cannot be controlled
10660 ## with individual -Wno-xxx flags, unlike -Wall
10661 if test "x$enable_cxx_warnings" = "xyes"; then
10662 warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
10666 AC_MSG_RESULT($warnCXXFLAGS)
10668 AC_ARG_ENABLE(iso-cxx,
10669 AS_HELP_STRING([--enable-iso-cxx],
10670 [Try to warn if code is not ISO C++ ]),,
10671 [enable_iso_cxx=no])
10673 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
10675 if test "x$enable_iso_cxx" != "xno"; then
10676 if test "x$GXX" = "xyes"; then
10677 case " $CXXFLAGS " in
10678 *[\ \ ]-ansi[\ \ ]*) ;;
10679 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
10682 case " $CXXFLAGS " in
10683 *[\ \ ]-pedantic[\ \ ]*) ;;
10684 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
10688 AC_MSG_RESULT($complCXXFLAGS)
10690 WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
10691 AC_SUBST(WARN_CXXFLAGS)