1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 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_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.11'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.11.1], [],
38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too. Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.11.1])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
60 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
68 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory. The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run. This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
79 # fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 # fails if $ac_aux_dir is absolute,
82 # fails when called from a subdirectory in a VPATH build with
83 # a relative $ac_aux_dir
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir. In an in-source build this is usually
87 # harmless because $srcdir is `.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 # MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH. The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
111 # AM_CONDITIONAL -*- Autoconf -*-
113 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114 # 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.
122 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
123 # -------------------------------------
124 # Define a conditional.
125 AC_DEFUN([AM_CONDITIONAL],
127 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
128 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129 AC_SUBST([$1_TRUE])dnl
130 AC_SUBST([$1_FALSE])dnl
131 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
132 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
133 m4_define([_AM_COND_VALUE_$1], [$2])dnl
141 AC_CONFIG_COMMANDS_PRE(
142 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143 AC_MSG_ERROR([[conditional "$1" was never defined.
144 Usually this means the macro was only invoked conditionally.]])
147 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148 # Free Software Foundation, Inc.
150 # This file is free software; the Free Software Foundation
151 # gives unlimited permission to copy and/or distribute it,
152 # with or without modifications, as long as this notice is preserved.
156 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157 # written in clear, in which case automake, when reading aclocal.m4,
158 # will think it sees a *use*, and therefore will trigger all it's
159 # C support machinery. Also note that it means that autoscan, seeing
160 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
163 # _AM_DEPENDENCIES(NAME)
164 # ----------------------
165 # See how the compiler implements dependency checking.
166 # NAME is "CC", "CXX", "GCJ", or "OBJC".
167 # We try a few techniques and use that to set a single cache variable.
169 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171 # dependency, and given that the user is not expected to run this macro,
172 # just rely on AC_PROG_CC.
173 AC_DEFUN([_AM_DEPENDENCIES],
174 [AC_REQUIRE([AM_SET_DEPDIR])dnl
175 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177 AC_REQUIRE([AM_DEP_TRACK])dnl
179 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
180 [$1], CXX, [depcc="$CXX" am_compiler_list=],
181 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182 [$1], UPC, [depcc="$UPC" am_compiler_list=],
183 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
184 [depcc="$$1" am_compiler_list=])
186 AC_CACHE_CHECK([dependency style of $depcc],
187 [am_cv_$1_dependencies_compiler_type],
188 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189 # We make a subdir and do the tests there. Otherwise we can end up
190 # making bogus files that we don't know about and never remove. For
191 # instance it was reported that on HP-UX the gcc test will end up
192 # making a dummy file named `D' -- because `-MD' means `put the output
195 # Copy depcomp to subdir because otherwise we won't find it if we're
196 # using a relative directory.
197 cp "$am_depcomp" conftest.dir
199 # We will build objects and dependencies in a subdirectory because
200 # it helps to detect inapplicable dependency modes. For instance
201 # both Tru64's cc and ICC support -MD to output dependencies as a
202 # side effect of compilation, but ICC will put the dependencies in
203 # the current directory while Tru64 will put them in the object
207 am_cv_$1_dependencies_compiler_type=none
208 if test "$am_compiler_list" = ""; then
209 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
213 [case " $depcc " in #(
214 *\ -arch\ *\ -arch\ *) am__universal=true ;;
217 [case " $depcc " in #(
218 *\ -arch\ *\ -arch\ *) am__universal=true ;;
221 for depmode in $am_compiler_list; do
222 # Setup a source with many dependencies, because some compilers
223 # like to wrap large dependency lists on column 80 (with \), and
224 # we should not choose a depcomp mode which is confused by this.
226 # We need to recreate these files for each test, as the compiler may
227 # overwrite some of them when testing with obscure command lines.
228 # This happens at least with the AIX C compiler.
230 for i in 1 2 3 4 5 6; do
231 echo '#include "conftst'$i'.h"' >> sub/conftest.c
232 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233 # Solaris 8's {/usr,}/bin/sh.
234 touch sub/conftst$i.h
236 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
238 # We check with `-c' and `-o' for the sake of the "dashmstdout"
239 # mode. It turns out that the SunPro C++ compiler does not properly
240 # handle `-M -o', and we need to detect this. Also, some Intel
241 # versions had trouble with output in subdirs
242 am__obj=sub/conftest.${OBJEXT-o}
243 am__minus_obj="-o $am__obj"
246 # This depmode causes a compiler race in universal mode.
247 test "$am__universal" = false || continue
250 # after this tag, mechanisms are not by side-effect, so they'll
251 # only be used when explicitly requested
252 if test "x$enable_dependency_tracking" = xyes; then
258 msvisualcpp | msvcmsys)
259 # This compiler won't grok `-c -o', but also, the minuso test has
260 # not run yet. These depmodes are late enough in the game, and
261 # so weak that their functioning should not be impacted.
262 am__obj=conftest.${OBJEXT-o}
267 if depmode=$depmode \
268 source=sub/conftest.c object=$am__obj \
269 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271 >/dev/null 2>conftest.err &&
272 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276 # icc doesn't choke on unknown options, it will just issue warnings
277 # or remarks (even with -Werror). So we grep stderr for any message
278 # that says an option was ignored or not supported.
279 # When given -MP, icc 7.0 and 7.1 complain thusly:
280 # icc: Command line warning: ignoring option '-M'; no argument required
281 # The diagnosis changed in icc 8.0:
282 # icc: Command line remark: option '-MP' not supported
283 if (grep 'ignoring option' conftest.err ||
284 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285 am_cv_$1_dependencies_compiler_type=$depmode
294 am_cv_$1_dependencies_compiler_type=none
297 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298 AM_CONDITIONAL([am__fastdep$1], [
299 test "x$enable_dependency_tracking" != xno \
300 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
306 # Choose a directory name for dependency files.
307 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
308 AC_DEFUN([AM_SET_DEPDIR],
309 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
316 AC_DEFUN([AM_DEP_TRACK],
317 [AC_ARG_ENABLE(dependency-tracking,
318 [ --disable-dependency-tracking speeds up one-time build
319 --enable-dependency-tracking do not reject slow dependency extractors])
320 if test "x$enable_dependency_tracking" != xno; then
321 am_depcomp="$ac_aux_dir/depcomp"
324 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325 AC_SUBST([AMDEPBACKSLASH])dnl
326 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329 # Generate code to set up dependency tracking. -*- Autoconf -*-
331 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332 # Free Software Foundation, Inc.
334 # This file is free software; the Free Software Foundation
335 # gives unlimited permission to copy and/or distribute it,
336 # with or without modifications, as long as this notice is preserved.
340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
341 # ------------------------------
342 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344 # Autoconf 2.62 quotes --file arguments for eval, but not when files
345 # are listed without --file. Let's play safe and only enable the eval
346 # if we detect the quoting.
347 case $CONFIG_FILES in
348 *\'*) eval set x "$CONFIG_FILES" ;;
349 *) set x $CONFIG_FILES ;;
354 # Strip MF so we end up with the name of the file.
355 mf=`echo "$mf" | sed -e 's/:.*$//'`
356 # Check whether this is an Automake generated Makefile or not.
357 # We used to match only the files named `Makefile.in', but
358 # some people rename them; so instead we look at the file content.
359 # Grep'ing the first line is not enough: some people post-process
360 # each Makefile.in and add a new line on top of each file to say so.
361 # Grep'ing the whole file is not good either: AIX grep has a line
362 # limit of 2048, but all sed's we know have understand at least 4000.
363 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364 dirpart=`AS_DIRNAME("$mf")`
368 # Extract the definition of DEPDIR, am__include, and am__quote
369 # from the Makefile without running `make'.
370 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371 test -z "$DEPDIR" && continue
372 am__include=`sed -n 's/^am__include = //p' < "$mf"`
373 test -z "am__include" && continue
374 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375 # When using ansi2knr, U may be empty or an underscore; expand it
376 U=`sed -n 's/^U = //p' < "$mf"`
377 # Find all dependency output files, they are included files with
378 # $(DEPDIR) in their names. We invoke sed twice because it is the
379 # simplest approach to changing $(DEPDIR) to its actual value in the
381 for file in `sed -n "
382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384 # Make sure the directory exists.
385 test -f "$dirpart/$file" && continue
386 fdir=`AS_DIRNAME(["$file"])`
387 AS_MKDIR_P([$dirpart/$fdir])
388 # echo "creating $dirpart/$file"
389 echo '# dummy' > "$dirpart/$file"
393 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
396 # AM_OUTPUT_DEPENDENCY_COMMANDS
397 # -----------------------------
398 # This macro should only be invoked once -- use via AC_REQUIRE.
400 # This code is only required when automatic dependency tracking
401 # is enabled. FIXME. This creates each `.P' file that we will
402 # need in order to bootstrap the dependency handling code.
403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404 [AC_CONFIG_COMMANDS([depfiles],
405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
409 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410 # Free Software Foundation, Inc.
412 # This file is free software; the Free Software Foundation
413 # gives unlimited permission to copy and/or distribute it,
414 # with or without modifications, as long as this notice is preserved.
418 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
419 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
421 # Do all the work for Automake. -*- Autoconf -*-
423 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
426 # This file is free software; the Free Software Foundation
427 # gives unlimited permission to copy and/or distribute it,
428 # with or without modifications, as long as this notice is preserved.
432 # This macro actually does too much. Some checks are only needed if
433 # your package does certain things. But this isn't really a big deal.
435 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436 # AM_INIT_AUTOMAKE([OPTIONS])
437 # -----------------------------------------------
438 # The call with PACKAGE and VERSION arguments is the old style
439 # call (pre autoconf-2.50), which is being phased out. PACKAGE
440 # and VERSION should now be passed to AC_INIT and removed from
441 # the call to AM_INIT_AUTOMAKE.
442 # We support both call styles for the transition. After
443 # the next Automake release, Autoconf can make the AC_INIT
444 # arguments mandatory, and then we can depend on a new Autoconf
445 # release and drop the old call support.
446 AC_DEFUN([AM_INIT_AUTOMAKE],
447 [AC_PREREQ([2.62])dnl
448 dnl Autoconf wants to disallow AM_ names. We explicitly allow
449 dnl the ones we care about.
450 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452 AC_REQUIRE([AC_PROG_INSTALL])dnl
453 if test "`cd $srcdir && pwd`" != "`pwd`"; then
454 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455 # is not polluted with repeated "-I."
456 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457 # test to see if srcdir already configured
458 if test -f $srcdir/config.status; then
459 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
463 # test whether we have cygpath
464 if test -z "$CYGPATH_W"; then
465 if (cygpath --version) >/dev/null 2>/dev/null; then
466 CYGPATH_W='cygpath -w'
471 AC_SUBST([CYGPATH_W])
473 # Define the identity of the package.
474 dnl Distinguish between old-style and new-style calls.
476 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477 AC_SUBST([PACKAGE], [$1])dnl
478 AC_SUBST([VERSION], [$2])],
479 [_AM_SET_OPTIONS([$1])dnl
480 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
486 _AM_IF_OPTION([no-define],,
487 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
490 # Some tools Automake needs.
491 AC_REQUIRE([AM_SANITY_CHECK])dnl
492 AC_REQUIRE([AC_ARG_PROGRAM])dnl
493 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494 AM_MISSING_PROG(AUTOCONF, autoconf)
495 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496 AM_MISSING_PROG(AUTOHEADER, autoheader)
497 AM_MISSING_PROG(MAKEINFO, makeinfo)
498 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
501 # We need awk for the "check" target. The system "awk" is bad on
503 AC_REQUIRE([AC_PROG_AWK])dnl
504 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
506 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508 [_AM_PROG_TAR([v7])])])
509 _AM_IF_OPTION([no-dependencies],,
510 [AC_PROVIDE_IFELSE([AC_PROG_CC],
511 [_AM_DEPENDENCIES(CC)],
512 [define([AC_PROG_CC],
513 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514 AC_PROVIDE_IFELSE([AC_PROG_CXX],
515 [_AM_DEPENDENCIES(CXX)],
516 [define([AC_PROG_CXX],
517 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
519 [_AM_DEPENDENCIES(OBJC)],
520 [define([AC_PROG_OBJC],
521 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
523 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
526 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527 AC_CONFIG_COMMANDS_PRE(dnl
528 [m4_provide_if([_AM_COMPILER_EXEEXT],
529 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
532 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
533 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534 dnl mangled by Autoconf and run in a shell conditional statement.
535 m4_define([_AC_COMPILER_EXEEXT],
536 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
539 # When config.status generates a header, we must update the stamp-h file.
540 # This file resides in the same directory as the config header
541 # that is generated. The stamp files are numbered to have different names.
543 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544 # loop where config.status creates the headers, so we can generate
545 # our stamp files there.
546 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547 [# Compute $1's index in $config_headers.
550 for _am_header in $config_headers :; do
552 $_am_arg | $_am_arg:* )
555 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
558 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
560 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
562 # This file is free software; the Free Software Foundation
563 # gives unlimited permission to copy and/or distribute it,
564 # with or without modifications, as long as this notice is preserved.
568 # Define $install_sh.
569 AC_DEFUN([AM_PROG_INSTALL_SH],
570 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571 if test x"${install_sh}" != xset; then
574 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
576 install_sh="\${SHELL} $am_aux_dir/install-sh"
579 AC_SUBST(install_sh)])
581 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
583 # This file is free software; the Free Software Foundation
584 # gives unlimited permission to copy and/or distribute it,
585 # with or without modifications, as long as this notice is preserved.
589 # Check whether the underlying file-system supports filenames
590 # with a leading dot. For instance MS-DOS doesn't.
591 AC_DEFUN([AM_SET_LEADING_DOT],
592 [rm -rf .tst 2>/dev/null
593 mkdir .tst 2>/dev/null
594 if test -d .tst; then
599 rmdir .tst 2>/dev/null
600 AC_SUBST([am__leading_dot])])
602 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
605 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606 # Free Software Foundation, Inc.
608 # This file is free software; the Free Software Foundation
609 # gives unlimited permission to copy and/or distribute it,
610 # with or without modifications, as long as this notice is preserved.
614 # AM_MAINTAINER_MODE([DEFAULT-MODE])
615 # ----------------------------------
616 # Control maintainer-specific portions of Makefiles.
617 # Default is to disable them, unless `enable' is passed literally.
618 # For symmetry, `disable' may be passed as well. Anyway, the user
619 # can override the default with the --enable/--disable switch.
620 AC_DEFUN([AM_MAINTAINER_MODE],
621 [m4_case(m4_default([$1], [disable]),
622 [enable], [m4_define([am_maintainer_other], [disable])],
623 [disable], [m4_define([am_maintainer_other], [enable])],
624 [m4_define([am_maintainer_other], [enable])
625 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628 AC_ARG_ENABLE([maintainer-mode],
629 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
630 (and sometimes confusing) to the casual installer],
631 [USE_MAINTAINER_MODE=$enableval],
632 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635 MAINT=$MAINTAINER_MODE_TRUE
640 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
642 # Check to see how 'make' treats includes. -*- Autoconf -*-
644 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
646 # This file is free software; the Free Software Foundation
647 # gives unlimited permission to copy and/or distribute it,
648 # with or without modifications, as long as this notice is preserved.
654 # Check to see how make treats includes.
655 AC_DEFUN([AM_MAKE_INCLUDE],
656 [am_make=${MAKE-make}
657 cat > confinc << 'END'
659 @echo this is the am__doit target
662 # If we don't find an include directive, just comment out the code.
663 AC_MSG_CHECKING([for style of include used by $am_make])
667 # First try GNU make style include.
668 echo "include confinc" > confmf
669 # Ignore all kinds of additional output from `make'.
670 case `$am_make -s -f confmf 2> /dev/null` in #(
671 *the\ am__doit\ target*)
677 # Now try BSD make style include.
678 if test "$am__include" = "#"; then
679 echo '.include "confinc"' > confmf
680 case `$am_make -s -f confmf 2> /dev/null` in #(
681 *the\ am__doit\ target*)
688 AC_SUBST([am__include])
689 AC_SUBST([am__quote])
690 AC_MSG_RESULT([$_am_result])
694 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
696 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697 # Free Software Foundation, Inc.
699 # This file is free software; the Free Software Foundation
700 # gives unlimited permission to copy and/or distribute it,
701 # with or without modifications, as long as this notice is preserved.
705 # AM_MISSING_PROG(NAME, PROGRAM)
706 # ------------------------------
707 AC_DEFUN([AM_MISSING_PROG],
708 [AC_REQUIRE([AM_MISSING_HAS_RUN])
709 $1=${$1-"${am_missing_run}$2"}
715 # Define MISSING if not defined so far and test if it supports --run.
716 # If it does, set am_missing_run to use it, otherwise, to nothing.
717 AC_DEFUN([AM_MISSING_HAS_RUN],
718 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719 AC_REQUIRE_AUX_FILE([missing])dnl
720 if test x"${MISSING+set}" != xset; then
723 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
725 MISSING="\${SHELL} $am_aux_dir/missing" ;;
728 # Use eval to expand $SHELL
729 if eval "$MISSING --run true"; then
730 am_missing_run="$MISSING --run "
733 AC_MSG_WARN([`missing' script is too old or missing])
737 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
739 # This file is free software; the Free Software Foundation
740 # gives unlimited permission to copy and/or distribute it,
741 # with or without modifications, as long as this notice is preserved.
745 # Check for `mkdir -p'.
746 AC_DEFUN([AM_PROG_MKDIR_P],
747 [AC_PREREQ([2.60])dnl
748 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
749 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
750 dnl while keeping a definition of mkdir_p for backward compatibility.
751 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753 dnl Makefile.ins that do not define MKDIR_P, so we do our own
754 dnl adjustment using top_builddir (which is defined more often than
756 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
758 [[\\/$]]* | ?:[[\\/]]*) ;;
759 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
763 # Helper functions for option handling. -*- Autoconf -*-
765 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
773 # _AM_MANGLE_OPTION(NAME)
774 # -----------------------
775 AC_DEFUN([_AM_MANGLE_OPTION],
776 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
778 # _AM_SET_OPTION(NAME)
779 # ------------------------------
780 # Set option NAME. Presently that only means defining a flag for this option.
781 AC_DEFUN([_AM_SET_OPTION],
782 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
784 # _AM_SET_OPTIONS(OPTIONS)
785 # ----------------------------------
786 # OPTIONS is a space-separated list of Automake options.
787 AC_DEFUN([_AM_SET_OPTIONS],
788 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
790 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791 # -------------------------------------------
792 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793 AC_DEFUN([_AM_IF_OPTION],
794 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
796 # Check to make sure that the build environment is sane. -*- Autoconf -*-
798 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799 # Free Software Foundation, Inc.
801 # This file is free software; the Free Software Foundation
802 # gives unlimited permission to copy and/or distribute it,
803 # with or without modifications, as long as this notice is preserved.
809 AC_DEFUN([AM_SANITY_CHECK],
810 [AC_MSG_CHECKING([whether build environment is sane])
813 echo timestamp > conftest.file
814 # Reject unsafe characters in $srcdir or the absolute working directory
815 # name. Accept space and tab only in the latter.
819 *[[\\\"\#\$\&\'\`$am_lf]]*)
820 AC_MSG_ERROR([unsafe absolute working directory name]);;
823 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
824 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
827 # Do `set' in a subshell so we don't clobber the current shell's
828 # arguments. Must try -L first in case configure is actually a
829 # symlink; some systems play weird games with the mod time of symlinks
830 # (eg FreeBSD returns the mod time of the symlink's containing
833 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834 if test "$[*]" = "X"; then
836 set X `ls -t "$srcdir/configure" conftest.file`
839 if test "$[*]" != "X $srcdir/configure conftest.file" \
840 && test "$[*]" != "X conftest.file $srcdir/configure"; then
842 # If neither matched, then we have a broken ls. This can happen
843 # if, for instance, CONFIG_SHELL is bash and it inherits a
844 # broken ls alias from the environment. This has actually
845 # happened. Such a system could not be considered "sane".
846 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
847 alias in your environment])
850 test "$[2]" = conftest.file
856 AC_MSG_ERROR([newly created file is older than distributed files!
857 Check your system clock])
861 # Copyright (C) 2009 Free Software Foundation, Inc.
863 # This file is free software; the Free Software Foundation
864 # gives unlimited permission to copy and/or distribute it,
865 # with or without modifications, as long as this notice is preserved.
869 # AM_SILENT_RULES([DEFAULT])
870 # --------------------------
871 # Enable less verbose build rules; with the default set to DEFAULT
872 # (`yes' being less verbose, `no' or empty being verbose).
873 AC_DEFUN([AM_SILENT_RULES],
874 [AC_ARG_ENABLE([silent-rules],
875 [ --enable-silent-rules less verbose build output (undo: `make V=1')
876 --disable-silent-rules verbose build output (undo: `make V=0')])
877 case $enable_silent_rules in
878 yes) AM_DEFAULT_VERBOSITY=0;;
879 no) AM_DEFAULT_VERBOSITY=1;;
880 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
882 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
884 AC_SUBST([AM_BACKSLASH])dnl
885 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
888 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
890 # This file is free software; the Free Software Foundation
891 # gives unlimited permission to copy and/or distribute it,
892 # with or without modifications, as long as this notice is preserved.
894 # AM_PROG_INSTALL_STRIP
895 # ---------------------
896 # One issue with vendor `install' (even GNU) is that you can't
897 # specify the program used to strip binaries. This is especially
898 # annoying in cross-compiling environments, where the build's strip
899 # is unlikely to handle the host's binaries.
900 # Fortunately install-sh will honor a STRIPPROG variable, so we
901 # always use install-sh in `make install-strip', and initialize
902 # STRIPPROG with the value of the STRIP variable (set by the user).
903 AC_DEFUN([AM_PROG_INSTALL_STRIP],
904 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905 # Installed binaries are usually stripped using `strip' when the user
906 # run `make install-strip'. However `strip' might not be the right
907 # tool to use in cross-compilation environments, therefore Automake
908 # will honor the `STRIP' environment variable to overrule this program.
909 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910 if test "$cross_compiling" != no; then
911 AC_CHECK_TOOL([STRIP], [strip], :)
913 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914 AC_SUBST([INSTALL_STRIP_PROGRAM])])
916 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
918 # This file is free software; the Free Software Foundation
919 # gives unlimited permission to copy and/or distribute it,
920 # with or without modifications, as long as this notice is preserved.
924 # _AM_SUBST_NOTMAKE(VARIABLE)
925 # ---------------------------
926 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927 # This macro is traced by Automake.
928 AC_DEFUN([_AM_SUBST_NOTMAKE])
930 # AM_SUBST_NOTMAKE(VARIABLE)
931 # ---------------------------
932 # Public sister of _AM_SUBST_NOTMAKE.
933 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
935 # Check how to create a tarball. -*- Autoconf -*-
937 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
939 # This file is free software; the Free Software Foundation
940 # gives unlimited permission to copy and/or distribute it,
941 # with or without modifications, as long as this notice is preserved.
945 # _AM_PROG_TAR(FORMAT)
946 # --------------------
947 # Check how to create a tarball in format FORMAT.
948 # FORMAT should be one of `v7', `ustar', or `pax'.
950 # Substitute a variable $(am__tar) that is a command
951 # writing to stdout a FORMAT-tarball containing the directory
953 # tardir=directory && $(am__tar) > result.tar
955 # Substitute a variable $(am__untar) that extract such
956 # a tarball read from stdin.
957 # $(am__untar) < result.tar
958 AC_DEFUN([_AM_PROG_TAR],
959 [# Always define AMTAR for backward compatibility.
960 AM_MISSING_PROG([AMTAR], [tar])
962 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963 [m4_case([$1], [ustar],, [pax],,
964 [m4_fatal([Unknown tar format])])
965 AC_MSG_CHECKING([how to create a $1 tar archive])
966 # Loop over all known methods to create a tar archive until one works.
967 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
969 # Do not fold the above two line into one, because Tru64 sh and
970 # Solaris sh will not grok spaces in the rhs of `-'.
971 for _am_tool in $_am_tools
975 for _am_tar in tar gnutar gtar;
977 AM_RUN_LOG([$_am_tar --version]) && break
979 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981 am__untar="$_am_tar -xf -"
984 # Must skip GNU tar: if it does not support --format= it doesn't create
985 # ustar tarball either.
986 (tar --version) >/dev/null 2>&1 && continue
987 am__tar='tar chf - "$$tardir"'
988 am__tar_='tar chf - "$tardir"'
992 am__tar='pax -L -x $1 -w "$$tardir"'
993 am__tar_='pax -L -x $1 -w "$tardir"'
997 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999 am__untar='cpio -i -H $1 -d'
1008 # If the value was cached, stop now. We just wanted to have am__tar
1009 # and am__untar set.
1010 test -n "${am_cv_prog_tar_$1}" && break
1012 # tar/untar a dummy directory, and stop if the command works
1015 echo GrepMe > conftest.dir/file
1016 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1018 if test -s conftest.tar; then
1019 AM_RUN_LOG([$am__untar <conftest.tar])
1020 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1025 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1028 AC_SUBST([am__untar])
1031 dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1033 dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
1035 dnl Permission is hereby granted, free of charge, to any person obtaining a
1036 dnl copy of this software and associated documentation files (the "Software"),
1037 dnl to deal in the Software without restriction, including without limitation
1038 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039 dnl and/or sell copies of the Software, and to permit persons to whom the
1040 dnl Software is furnished to do so, subject to the following conditions:
1042 dnl The above copyright notice and this permission notice (including the next
1043 dnl paragraph) shall be included in all copies or substantial portions of the
1046 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1049 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052 dnl DEALINGS IN THE SOFTWARE.
1054 # XORG_MACROS_VERSION(required-version)
1055 # -------------------------------------
1056 # Minimum version: 1.1.0
1058 # If you're using a macro added in Version 1.1 or newer, include this in
1059 # your configure.ac with the minimum required version, such as:
1060 # XORG_MACROS_VERSION(1.1)
1062 # To ensure that this macro is defined, also add:
1063 # m4_ifndef([XORG_MACROS_VERSION],
1064 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1067 # See the "minimum version" comment for each macro you use to see what
1068 # version you require.
1069 m4_defun([XORG_MACROS_VERSION],[
1070 m4_define([vers_have], [1.10.0])
1071 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073 m4_if(m4_cmp(maj_have, maj_needed), 0,,
1074 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075 m4_if(m4_version_compare(vers_have, [$1]), -1,
1076 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077 m4_undefine([vers_have])
1078 m4_undefine([maj_have])
1079 m4_undefine([maj_needed])
1080 ]) # XORG_MACROS_VERSION
1082 # XORG_PROG_RAWCPP()
1083 # ------------------
1084 # Minimum version: 1.0.0
1086 # Find cpp program and necessary flags for use in pre-processing text files
1087 # such as man pages and config files
1088 AC_DEFUN([XORG_PROG_RAWCPP],[
1089 AC_REQUIRE([AC_PROG_CPP])
1090 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
1091 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1093 # Check for flag to avoid builtin definitions - assumes unix is predefined,
1094 # which is not the best choice for supporting other OS'es, but covers most
1095 # of the ones we need for now.
1096 AC_MSG_CHECKING([if $RAWCPP requires -undef])
1097 AC_LANG_CONFTEST([Does cpp redefine unix ?])
1098 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1101 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1103 AC_MSG_RESULT([yes])
1104 # under Cygwin unix is still defined even with -undef
1105 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106 RAWCPPFLAGS="-undef -ansi"
1107 AC_MSG_RESULT([yes, with -ansi])
1109 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
1112 rm -f conftest.$ac_ext
1114 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115 AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
1116 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1119 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1120 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121 AC_MSG_RESULT([yes])
1123 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
1126 rm -f conftest.$ac_ext
1127 AC_SUBST(RAWCPPFLAGS)
1128 ]) # XORG_PROG_RAWCPP
1130 # XORG_MANPAGE_SECTIONS()
1131 # -----------------------
1132 # Minimum version: 1.0.0
1134 # Determine which sections man pages go in for the different man page types
1135 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136 # Not sure if there's any better way than just hardcoding by OS name.
1137 # Override default settings by setting environment variables
1138 # Added MAN_SUBSTS in version 1.8
1139 # Added AC_PROG_SED in version 1.8
1141 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1142 AC_REQUIRE([AC_CANONICAL_HOST])
1143 AC_REQUIRE([AC_PROG_SED])
1145 if test x$APP_MAN_SUFFIX = x ; then
1148 if test x$APP_MAN_DIR = x ; then
1149 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1152 if test x$LIB_MAN_SUFFIX = x ; then
1155 if test x$LIB_MAN_DIR = x ; then
1156 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1159 if test x$FILE_MAN_SUFFIX = x ; then
1161 solaris*) FILE_MAN_SUFFIX=4 ;;
1162 *) FILE_MAN_SUFFIX=5 ;;
1165 if test x$FILE_MAN_DIR = x ; then
1166 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1169 if test x$MISC_MAN_SUFFIX = x ; then
1171 solaris*) MISC_MAN_SUFFIX=5 ;;
1172 *) MISC_MAN_SUFFIX=7 ;;
1175 if test x$MISC_MAN_DIR = x ; then
1176 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1179 if test x$DRIVER_MAN_SUFFIX = x ; then
1181 solaris*) DRIVER_MAN_SUFFIX=7 ;;
1182 *) DRIVER_MAN_SUFFIX=4 ;;
1185 if test x$DRIVER_MAN_DIR = x ; then
1186 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1189 if test x$ADMIN_MAN_SUFFIX = x ; then
1191 solaris*) ADMIN_MAN_SUFFIX=1m ;;
1192 *) ADMIN_MAN_SUFFIX=8 ;;
1195 if test x$ADMIN_MAN_DIR = x ; then
1196 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1200 AC_SUBST([APP_MAN_SUFFIX])
1201 AC_SUBST([LIB_MAN_SUFFIX])
1202 AC_SUBST([FILE_MAN_SUFFIX])
1203 AC_SUBST([MISC_MAN_SUFFIX])
1204 AC_SUBST([DRIVER_MAN_SUFFIX])
1205 AC_SUBST([ADMIN_MAN_SUFFIX])
1206 AC_SUBST([APP_MAN_DIR])
1207 AC_SUBST([LIB_MAN_DIR])
1208 AC_SUBST([FILE_MAN_DIR])
1209 AC_SUBST([MISC_MAN_DIR])
1210 AC_SUBST([DRIVER_MAN_DIR])
1211 AC_SUBST([ADMIN_MAN_DIR])
1213 XORG_MAN_PAGE="X Version 11"
1214 AC_SUBST([XORG_MAN_PAGE])
1216 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1217 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1218 -e 's|__xservername__|Xorg|g' \
1219 -e 's|__xconfigfile__|xorg.conf|g' \
1220 -e 's|__projectroot__|\$(prefix)|g' \
1221 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1222 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1223 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1224 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1225 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1226 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1227 AC_SUBST([MAN_SUBSTS])
1229 ]) # XORG_MANPAGE_SECTIONS
1231 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1232 # ------------------------
1233 # Minimum version: 1.7.0
1235 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1236 # provided by xorg-sgml-doctools, if installed.
1237 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1238 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1240 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1241 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1243 [if test x"$cross_compiling" != x"yes" ; then
1244 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1245 [XORG_SGML_PATH=$prefix/share/sgml])
1249 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1250 # the path and the name of the doc stylesheet
1251 if test "x$XORG_SGML_PATH" != "x" ; then
1252 AC_MSG_RESULT([$XORG_SGML_PATH])
1253 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1254 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1259 AC_SUBST(XORG_SGML_PATH)
1260 AC_SUBST(STYLESHEET_SRCDIR)
1261 AC_SUBST(XSL_STYLESHEET)
1262 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1263 ]) # XORG_CHECK_SGML_DOCTOOLS
1265 # XORG_CHECK_LINUXDOC
1266 # -------------------
1267 # Minimum version: 1.0.0
1269 # Defines the variable MAKE_TEXT if the necessary tools and
1270 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1271 # Whether or not the necessary tools and files are found can be checked
1272 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
1273 AC_DEFUN([XORG_CHECK_LINUXDOC],[
1274 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1275 AC_REQUIRE([XORG_WITH_PS2PDF])
1277 AC_PATH_PROG(LINUXDOC, linuxdoc)
1279 AC_MSG_CHECKING([whether to build documentation])
1281 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1287 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1289 AC_MSG_RESULT([$BUILDDOC])
1291 AC_MSG_CHECKING([whether to build pdf documentation])
1293 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1299 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1301 AC_MSG_RESULT([$BUILDPDFDOC])
1303 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1304 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1306 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
1312 ]) # XORG_CHECK_LINUXDOC
1314 # XORG_CHECK_DOCBOOK
1315 # -------------------
1316 # Minimum version: 1.0.0
1318 # Checks for the ability to build output formats from SGML DocBook source.
1319 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1320 # indicates whether the necessary tools and files are found and, if set,
1321 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
1322 AC_DEFUN([XORG_CHECK_DOCBOOK],[
1323 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1330 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1331 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1332 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1333 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1335 AC_MSG_CHECKING([whether to build text documentation])
1336 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1337 test x$BUILD_TXTDOC != xno; then
1340 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1341 AC_MSG_RESULT([$BUILDTXTDOC])
1343 AC_MSG_CHECKING([whether to build PDF documentation])
1344 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1345 test x$BUILD_PDFDOC != xno; then
1348 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1349 AC_MSG_RESULT([$BUILDPDFDOC])
1351 AC_MSG_CHECKING([whether to build PostScript documentation])
1352 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1353 test x$BUILD_PSDOC != xno; then
1356 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1357 AC_MSG_RESULT([$BUILDPSDOC])
1359 AC_MSG_CHECKING([whether to build HTML documentation])
1360 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1361 test x$BUILD_HTMLDOC != xno; then
1364 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1365 AC_MSG_RESULT([$BUILDHTMLDOC])
1367 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1368 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1369 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1370 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1376 ]) # XORG_CHECK_DOCBOOK
1378 # XORG_WITH_XMLTO([MIN-VERSION])
1380 # Minimum version: 1.5.0
1382 # Documentation tools are not always available on all platforms and sometimes
1383 # not at the appropriate level. This macro enables a module to test for the
1384 # presence of the tool and obtain it's path in separate variables. Coupled with
1385 # the --with-xmlto option, it allows maximum flexibilty in making decisions
1386 # as whether or not to use the xmlto package.
1388 # Interface to module:
1389 # HAVE_XMLTO: used in makefiles to conditionally generate documentation
1390 # XMLTO: returns the path of the xmlto program found
1391 # returns the path set by the user in the environment
1392 # --with-xmlto: 'yes' user instructs the module to use xmlto
1393 # 'no' user instructs the module not to use xmlto
1395 # Added in version 1.10.0
1396 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1397 # xmlto for text output requires either lynx, links, or w3m browsers
1399 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1401 AC_DEFUN([XORG_WITH_XMLTO],[
1402 AC_ARG_VAR([XMLTO], [Path to xmlto command])
1404 AS_HELP_STRING([--with-xmlto],
1405 [Use xmlto to regenerate documentation (default: yes, if installed)]),
1406 [use_xmlto=$withval], [use_xmlto=auto])
1408 if test "x$use_xmlto" = x"auto"; then
1409 AC_PATH_PROG([XMLTO], [xmlto])
1410 if test "x$XMLTO" = "x"; then
1411 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1416 elif test "x$use_xmlto" = x"yes" ; then
1417 AC_PATH_PROG([XMLTO], [xmlto])
1418 if test "x$XMLTO" = "x"; then
1419 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1422 elif test "x$use_xmlto" = x"no" ; then
1423 if test "x$XMLTO" != "x"; then
1424 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1428 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1431 # Test for a minimum version of xmlto, if provided.
1433 [if test "$have_xmlto" = yes; then
1434 # scrape the xmlto version
1435 AC_MSG_CHECKING([the xmlto version])
1436 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1437 AC_MSG_RESULT([$xmlto_version])
1438 AS_VERSION_COMPARE([$xmlto_version], [$1],
1439 [if test "x$use_xmlto" = xauto; then
1440 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1443 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1447 # Test for the ability of xmlto to generate a text target
1449 cat > conftest.xml << "EOF"
1451 AS_IF([test "$have_xmlto" = yes],
1452 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1453 [have_xmlto_text=yes],
1454 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1456 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1457 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1458 ]) # XORG_WITH_XMLTO
1460 # XORG_WITH_ASCIIDOC([MIN-VERSION])
1462 # Minimum version: 1.5.0
1464 # Documentation tools are not always available on all platforms and sometimes
1465 # not at the appropriate level. This macro enables a module to test for the
1466 # presence of the tool and obtain it's path in separate variables. Coupled with
1467 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
1468 # as whether or not to use the asciidoc package.
1470 # Interface to module:
1471 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1472 # ASCIIDOC: returns the path of the asciidoc program found
1473 # returns the path set by the user in the environment
1474 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
1475 # 'no' user instructs the module not to use asciidoc
1477 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1479 AC_DEFUN([XORG_WITH_ASCIIDOC],[
1480 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1481 AC_ARG_WITH(asciidoc,
1482 AS_HELP_STRING([--with-asciidoc],
1483 [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1484 [use_asciidoc=$withval], [use_asciidoc=auto])
1486 if test "x$use_asciidoc" = x"auto"; then
1487 AC_PATH_PROG([ASCIIDOC], [asciidoc])
1488 if test "x$ASCIIDOC" = "x"; then
1489 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1494 elif test "x$use_asciidoc" = x"yes" ; then
1495 AC_PATH_PROG([ASCIIDOC], [asciidoc])
1496 if test "x$ASCIIDOC" = "x"; then
1497 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1500 elif test "x$use_asciidoc" = x"no" ; then
1501 if test "x$ASCIIDOC" != "x"; then
1502 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1506 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1509 [if test "$have_asciidoc" = yes; then
1510 # scrape the asciidoc version
1511 AC_MSG_CHECKING([the asciidoc version])
1512 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1513 AC_MSG_RESULT([$asciidoc_version])
1514 AS_VERSION_COMPARE([$asciidoc_version], [$1],
1515 [if test "x$use_asciidoc" = xauto; then
1516 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1519 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1522 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1523 ]) # XORG_WITH_ASCIIDOC
1525 # XORG_WITH_DOXYGEN([MIN-VERSION])
1526 # --------------------------------
1527 # Minimum version: 1.5.0
1529 # Documentation tools are not always available on all platforms and sometimes
1530 # not at the appropriate level. This macro enables a module to test for the
1531 # presence of the tool and obtain it's path in separate variables. Coupled with
1532 # the --with-doxygen option, it allows maximum flexibilty in making decisions
1533 # as whether or not to use the doxygen package.
1535 # Interface to module:
1536 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1537 # DOXYGEN: returns the path of the doxygen program found
1538 # returns the path set by the user in the environment
1539 # --with-doxygen: 'yes' user instructs the module to use doxygen
1540 # 'no' user instructs the module not to use doxygen
1542 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1544 AC_DEFUN([XORG_WITH_DOXYGEN],[
1545 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1546 AC_ARG_WITH(doxygen,
1547 AS_HELP_STRING([--with-doxygen],
1548 [Use doxygen to regenerate documentation (default: yes, if installed)]),
1549 [use_doxygen=$withval], [use_doxygen=auto])
1551 if test "x$use_doxygen" = x"auto"; then
1552 AC_PATH_PROG([DOXYGEN], [doxygen])
1553 if test "x$DOXYGEN" = "x"; then
1554 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1559 elif test "x$use_doxygen" = x"yes" ; then
1560 AC_PATH_PROG([DOXYGEN], [doxygen])
1561 if test "x$DOXYGEN" = "x"; then
1562 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1565 elif test "x$use_doxygen" = x"no" ; then
1566 if test "x$DOXYGEN" != "x"; then
1567 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1571 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1574 [if test "$have_doxygen" = yes; then
1575 # scrape the doxygen version
1576 AC_MSG_CHECKING([the doxygen version])
1577 doxygen_version=`$DOXYGEN --version 2>/dev/null`
1578 AC_MSG_RESULT([$doxygen_version])
1579 AS_VERSION_COMPARE([$doxygen_version], [$1],
1580 [if test "x$use_doxygen" = xauto; then
1581 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1584 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1587 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1588 ]) # XORG_WITH_DOXYGEN
1592 # Minimum version: 1.6.0
1594 # Documentation tools are not always available on all platforms and sometimes
1595 # not at the appropriate level. This macro enables a module to test for the
1596 # presence of the tool and obtain it's path in separate variables. Coupled with
1597 # the --with-groff option, it allows maximum flexibilty in making decisions
1598 # as whether or not to use the groff package.
1600 # Interface to module:
1601 # HAVE_GROFF: used in makefiles to conditionally generate documentation
1602 # HAVE_GROFF_MM: the memorandum macros (-mm) package
1603 # HAVE_GROFF_MS: the -ms macros package
1604 # GROFF: returns the path of the groff program found
1605 # returns the path set by the user in the environment
1606 # --with-groff: 'yes' user instructs the module to use groff
1607 # 'no' user instructs the module not to use groff
1609 # Added in version 1.9.0:
1610 # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1611 # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1612 # psselect from the psutils package.
1613 # the ghostcript package. Refer to the grohtml man pages
1615 # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1617 # OS and distros often splits groff in a basic and full package, the former
1618 # having the groff program and the later having devices, fonts and macros
1619 # Checking for the groff executable is not enough.
1621 # If macros are missing, we cannot assume that groff is useless, so we don't
1622 # unset HAVE_GROFF or GROFF env variables.
1623 # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1625 AC_DEFUN([XORG_WITH_GROFF],[
1626 AC_ARG_VAR([GROFF], [Path to groff command])
1628 AS_HELP_STRING([--with-groff],
1629 [Use groff to regenerate documentation (default: yes, if installed)]),
1630 [use_groff=$withval], [use_groff=auto])
1632 if test "x$use_groff" = x"auto"; then
1633 AC_PATH_PROG([GROFF], [groff])
1634 if test "x$GROFF" = "x"; then
1635 AC_MSG_WARN([groff not found - documentation targets will be skipped])
1640 elif test "x$use_groff" = x"yes" ; then
1641 AC_PATH_PROG([GROFF], [groff])
1642 if test "x$GROFF" = "x"; then
1643 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1646 elif test "x$use_groff" = x"no" ; then
1647 if test "x$GROFF" != "x"; then
1648 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1652 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1655 # We have groff, test for the presence of the macro packages
1656 if test "x$have_groff" = x"yes"; then
1657 AC_MSG_CHECKING([for ${GROFF} -ms macros])
1658 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1663 AC_MSG_RESULT([$groff_ms_works])
1664 AC_MSG_CHECKING([for ${GROFF} -mm macros])
1665 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1670 AC_MSG_RESULT([$groff_mm_works])
1673 # We have groff, test for HTML dependencies, one command per package
1674 if test "x$have_groff" = x"yes"; then
1675 AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1676 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1677 AC_PATH_PROG(PSSELECT_PATH, [psselect])
1678 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1682 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1686 # Set Automake conditionals for Makefiles
1687 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1688 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1689 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1690 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1691 ]) # XORG_WITH_GROFF
1695 # Minimum version: 1.6.0
1697 # Documentation tools are not always available on all platforms and sometimes
1698 # not at the appropriate level. This macro enables a module to test for the
1699 # presence of the tool and obtain it's path in separate variables. Coupled with
1700 # the --with-fop option, it allows maximum flexibilty in making decisions
1701 # as whether or not to use the fop package.
1703 # Interface to module:
1704 # HAVE_FOP: used in makefiles to conditionally generate documentation
1705 # FOP: returns the path of the fop program found
1706 # returns the path set by the user in the environment
1707 # --with-fop: 'yes' user instructs the module to use fop
1708 # 'no' user instructs the module not to use fop
1710 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1712 AC_DEFUN([XORG_WITH_FOP],[
1713 AC_ARG_VAR([FOP], [Path to fop command])
1715 AS_HELP_STRING([--with-fop],
1716 [Use fop to regenerate documentation (default: yes, if installed)]),
1717 [use_fop=$withval], [use_fop=auto])
1719 if test "x$use_fop" = x"auto"; then
1720 AC_PATH_PROG([FOP], [fop])
1721 if test "x$FOP" = "x"; then
1722 AC_MSG_WARN([fop not found - documentation targets will be skipped])
1727 elif test "x$use_fop" = x"yes" ; then
1728 AC_PATH_PROG([FOP], [fop])
1729 if test "x$FOP" = "x"; then
1730 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1733 elif test "x$use_fop" = x"no" ; then
1734 if test "x$FOP" != "x"; then
1735 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1739 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1741 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1746 # Minimum version: 1.6.0
1748 # Documentation tools are not always available on all platforms and sometimes
1749 # not at the appropriate level. This macro enables a module to test for the
1750 # presence of the tool and obtain it's path in separate variables. Coupled with
1751 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1752 # as whether or not to use the ps2pdf package.
1754 # Interface to module:
1755 # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
1756 # PS2PDF: returns the path of the ps2pdf program found
1757 # returns the path set by the user in the environment
1758 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1759 # 'no' user instructs the module not to use ps2pdf
1761 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1763 AC_DEFUN([XORG_WITH_PS2PDF],[
1764 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1766 AS_HELP_STRING([--with-ps2pdf],
1767 [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1768 [use_ps2pdf=$withval], [use_ps2pdf=auto])
1770 if test "x$use_ps2pdf" = x"auto"; then
1771 AC_PATH_PROG([PS2PDF], [ps2pdf])
1772 if test "x$PS2PDF" = "x"; then
1773 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1778 elif test "x$use_ps2pdf" = x"yes" ; then
1779 AC_PATH_PROG([PS2PDF], [ps2pdf])
1780 if test "x$PS2PDF" = "x"; then
1781 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1784 elif test "x$use_ps2pdf" = x"no" ; then
1785 if test "x$PS2PDF" != "x"; then
1786 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1790 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1792 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1793 ]) # XORG_WITH_PS2PDF
1795 # XORG_ENABLE_DOCS (enable_docs=yes)
1797 # Minimum version: 1.6.0
1799 # Documentation tools are not always available on all platforms and sometimes
1800 # not at the appropriate level. This macro enables a builder to skip all
1801 # documentation targets except traditional man pages.
1802 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1803 # maximum flexibilty in controlling documentation building.
1805 # XORG_WITH_XMLTO --with-xmlto
1806 # XORG_WITH_ASCIIDOC --with-asciidoc
1807 # XORG_WITH_DOXYGEN --with-doxygen
1808 # XORG_WITH_FOP --with-fop
1809 # XORG_WITH_GROFF --with-groff
1810 # XORG_WITH_PS2PDF --with-ps2pdf
1812 # Interface to module:
1813 # ENABLE_DOCS: used in makefiles to conditionally generate documentation
1814 # --enable-docs: 'yes' user instructs the module to generate docs
1815 # 'no' user instructs the module not to generate docs
1816 # parm1: specify the default value, yes or no.
1818 AC_DEFUN([XORG_ENABLE_DOCS],[
1820 if test "x$default" = x ; then
1824 AS_HELP_STRING([--enable-docs],
1825 [Enable building the documentation (default: yes)]),
1826 [build_docs=$enableval], [build_docs=$default])
1827 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1828 AC_MSG_CHECKING([whether to build documentation])
1829 AC_MSG_RESULT([$build_docs])
1830 ]) # XORG_ENABLE_DOCS
1832 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1834 # Minimum version: 1.6.0
1836 # This macro enables a builder to skip all developer documentation.
1837 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1838 # maximum flexibilty in controlling documentation building.
1840 # XORG_WITH_XMLTO --with-xmlto
1841 # XORG_WITH_ASCIIDOC --with-asciidoc
1842 # XORG_WITH_DOXYGEN --with-doxygen
1843 # XORG_WITH_FOP --with-fop
1844 # XORG_WITH_GROFF --with-groff
1845 # XORG_WITH_PS2PDF --with-ps2pdf
1847 # Interface to module:
1848 # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
1849 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
1850 # 'no' user instructs the module not to generate developer docs
1851 # parm1: specify the default value, yes or no.
1853 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1855 if test "x$devel_default" = x ; then
1858 AC_ARG_ENABLE(devel-docs,
1859 AS_HELP_STRING([--enable-devel-docs],
1860 [Enable building the developer documentation (default: yes)]),
1861 [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1862 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1863 AC_MSG_CHECKING([whether to build developer documentation])
1864 AC_MSG_RESULT([$build_devel_docs])
1865 ]) # XORG_ENABLE_DEVEL_DOCS
1867 # XORG_ENABLE_SPECS (enable_specs=yes)
1869 # Minimum version: 1.6.0
1871 # This macro enables a builder to skip all functional specification targets.
1872 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1873 # maximum flexibilty in controlling documentation building.
1875 # XORG_WITH_XMLTO --with-xmlto
1876 # XORG_WITH_ASCIIDOC --with-asciidoc
1877 # XORG_WITH_DOXYGEN --with-doxygen
1878 # XORG_WITH_FOP --with-fop
1879 # XORG_WITH_GROFF --with-groff
1880 # XORG_WITH_PS2PDF --with-ps2pdf
1882 # Interface to module:
1883 # ENABLE_SPECS: used in makefiles to conditionally generate specs
1884 # --enable-specs: 'yes' user instructs the module to generate specs
1885 # 'no' user instructs the module not to generate specs
1886 # parm1: specify the default value, yes or no.
1888 AC_DEFUN([XORG_ENABLE_SPECS],[
1890 if test "x$spec_default" = x ; then
1893 AC_ARG_ENABLE(specs,
1894 AS_HELP_STRING([--enable-specs],
1895 [Enable building the specs (default: yes)]),
1896 [build_specs=$enableval], [build_specs=$spec_default])
1897 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1898 AC_MSG_CHECKING([whether to build functional specifications])
1899 AC_MSG_RESULT([$build_specs])
1900 ]) # XORG_ENABLE_SPECS
1902 # XORG_CHECK_MALLOC_ZERO
1903 # ----------------------
1904 # Minimum version: 1.0.0
1906 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1907 # malloc(0) returns NULL. Packages should add one of these cflags to
1908 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1909 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1910 AC_ARG_ENABLE(malloc0returnsnull,
1911 AS_HELP_STRING([--enable-malloc0returnsnull],
1912 [malloc(0) returns NULL (default: auto)]),
1913 [MALLOC_ZERO_RETURNS_NULL=$enableval],
1914 [MALLOC_ZERO_RETURNS_NULL=auto])
1916 AC_MSG_CHECKING([whether malloc(0) returns NULL])
1917 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1923 char *m0, *r0, *c0, *p;
1928 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1930 [MALLOC_ZERO_RETURNS_NULL=yes],
1931 [MALLOC_ZERO_RETURNS_NULL=no],
1932 [MALLOC_ZERO_RETURNS_NULL=yes])
1934 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1936 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1937 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1938 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1939 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1941 MALLOC_ZERO_CFLAGS=""
1942 XMALLOC_ZERO_CFLAGS=""
1943 XTMALLOC_ZERO_CFLAGS=""
1946 AC_SUBST([MALLOC_ZERO_CFLAGS])
1947 AC_SUBST([XMALLOC_ZERO_CFLAGS])
1948 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1949 ]) # XORG_CHECK_MALLOC_ZERO
1953 # Minimum version: 1.1.0
1955 # This macro enables the use of a tool that flags some suspicious and
1956 # non-portable constructs (likely to be bugs) in C language source code.
1957 # It will attempt to locate the tool and use appropriate options.
1958 # There are various lint type tools on different platforms.
1960 # Interface to module:
1961 # LINT: returns the path to the tool found on the platform
1962 # or the value set to LINT on the configure cmd line
1963 # also an Automake conditional
1964 # LINT_FLAGS: an Automake variable with appropriate flags
1966 # --with-lint: 'yes' user instructs the module to use lint
1967 # 'no' user instructs the module not to use lint (default)
1969 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1970 # If the user sets the value of LINT_FLAGS, they are used verbatim.
1972 AC_DEFUN([XORG_WITH_LINT],[
1974 AC_ARG_VAR([LINT], [Path to a lint-style command])
1975 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1976 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1977 [Use a lint-style source code checker (default: disabled)])],
1978 [use_lint=$withval], [use_lint=no])
1980 # Obtain platform specific info like program name and options
1981 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
1983 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1985 lint_options="-badflag"
1987 *freebsd* | *netbsd*)
1989 lint_options="-u -b"
1993 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1997 # Test for the presence of the program (either guessed by the code or spelled out by the user)
1998 if test "x$use_lint" = x"yes" ; then
1999 AC_PATH_PROG([LINT], [$lint_name])
2000 if test "x$LINT" = "x"; then
2001 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2003 elif test "x$use_lint" = x"no" ; then
2004 if test "x$LINT" != "x"; then
2005 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2008 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2011 # User supplied flags override default flags
2012 if test "x$LINT_FLAGS" != "x"; then
2013 lint_options=$LINT_FLAGS
2016 AC_SUBST([LINT_FLAGS],[$lint_options])
2017 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2021 # XORG_LINT_LIBRARY(LIBNAME)
2022 # --------------------------
2023 # Minimum version: 1.1.0
2025 # Sets up flags for building lint libraries for checking programs that call
2026 # functions in the library.
2028 # Interface to module:
2029 # LINTLIB - Automake variable with the name of lint library file to make
2030 # MAKE_LINT_LIB - Automake conditional
2032 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
2033 # - 'no' user instructs the module not to create a lint library (default)
2035 AC_DEFUN([XORG_LINT_LIBRARY],[
2036 AC_REQUIRE([XORG_WITH_LINT])
2037 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2038 [Create lint library (default: disabled)])],
2039 [make_lint_lib=$enableval], [make_lint_lib=no])
2041 if test "x$make_lint_lib" = x"yes" ; then
2043 if test "x$LINT" = "x"; then
2044 AC_MSG_ERROR([Cannot make lint library without --with-lint])
2046 elif test "x$make_lint_lib" != x"no" ; then
2047 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2051 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2053 ]) # XORG_LINT_LIBRARY
2057 # Minimum version: 1.2.0
2059 # Defines CWARNFLAGS to enable C compiler warnings.
2061 AC_DEFUN([XORG_CWARNFLAGS], [
2062 AC_REQUIRE([AC_PROG_CC_C99])
2063 if test "x$GCC" = xyes ; then
2064 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2065 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2066 -Wbad-function-cast -Wformat=2"
2067 case `$CC -dumpversion` in
2069 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2073 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2074 if test "x$SUNCC" = "xyes"; then
2078 AC_SUBST(CWARNFLAGS)
2079 ]) # XORG_CWARNFLAGS
2081 # XORG_STRICT_OPTION
2082 # -----------------------
2083 # Minimum version: 1.3.0
2085 # Add configure option to enable strict compilation
2086 AC_DEFUN([XORG_STRICT_OPTION], [
2087 # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2088 AC_REQUIRE([AC_PROG_CC_C99])
2089 AC_REQUIRE([XORG_CWARNFLAGS])
2091 AC_ARG_ENABLE(strict-compilation,
2092 AS_HELP_STRING([--enable-strict-compilation],
2093 [Enable all warnings from compiler and make them errors (default: disabled)]),
2094 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2095 if test "x$STRICT_COMPILE" = "xyes"; then
2096 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2097 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2098 if test "x$GCC" = xyes ; then
2099 STRICT_CFLAGS="-pedantic -Werror"
2100 elif test "x$SUNCC" = "xyes"; then
2101 STRICT_CFLAGS="-errwarn"
2102 elif test "x$INTELCC" = "xyes"; then
2103 STRICT_CFLAGS="-Werror"
2106 CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2107 AC_SUBST([CWARNFLAGS])
2108 ]) # XORG_STRICT_OPTION
2110 # XORG_DEFAULT_OPTIONS
2111 # --------------------
2112 # Minimum version: 1.3.0
2114 # Defines default options for X.Org modules.
2116 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2117 AC_REQUIRE([AC_PROG_INSTALL])
2120 XORG_RELEASE_VERSION
2123 XORG_MANPAGE_SECTIONS
2124 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2125 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2126 ]) # XORG_DEFAULT_OPTIONS
2130 # Minimum version: 1.4.0
2132 # Defines the variable INSTALL_CMD as the command to copy
2133 # INSTALL from $prefix/share/util-macros.
2135 AC_DEFUN([XORG_INSTALL], [
2136 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2137 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2138 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2139 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2140 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2141 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2142 AC_SUBST([INSTALL_CMD])
2144 dnl Copyright 2005 Red Hat, Inc
2146 dnl Permission to use, copy, modify, distribute, and sell this software and its
2147 dnl documentation for any purpose is hereby granted without fee, provided that
2148 dnl the above copyright notice appear in all copies and that both that
2149 dnl copyright notice and this permission notice appear in supporting
2152 dnl The above copyright notice and this permission notice shall be included
2153 dnl in all copies or substantial portions of the Software.
2155 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2156 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2157 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2158 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2159 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2160 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2161 dnl OTHER DEALINGS IN THE SOFTWARE.
2163 dnl Except as contained in this notice, the name of the copyright holders shall
2164 dnl not be used in advertising or otherwise to promote the sale, use or
2165 dnl other dealings in this Software without prior written authorization
2166 dnl from the copyright holders.
2169 # XORG_RELEASE_VERSION
2170 # --------------------
2171 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2173 AC_DEFUN([XORG_RELEASE_VERSION],[
2174 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2175 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2176 [Major version of this package])
2177 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2178 if test "x$PVM" = "x"; then
2181 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2183 [Minor version of this package])
2184 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2185 if test "x$PVP" = "x"; then
2188 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2190 [Patch version of this package])
2195 # Minimum version: 1.2.0
2197 # Defines the variable CHANGELOG_CMD as the command to generate
2198 # ChangeLog from git.
2201 AC_DEFUN([XORG_CHANGELOG], [
2202 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2203 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2204 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2205 echo 'git directory not found: installing possibly empty changelog.' >&2)"
2206 AC_SUBST([CHANGELOG_CMD])
2209 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2211 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2213 # This program is free software; you can redistribute it and/or modify
2214 # it under the terms of the GNU General Public License as published by
2215 # the Free Software Foundation; either version 2 of the License, or
2216 # (at your option) any later version.
2218 # This program is distributed in the hope that it will be useful, but
2219 # WITHOUT ANY WARRANTY; without even the implied warranty of
2220 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2221 # General Public License for more details.
2223 # You should have received a copy of the GNU General Public License
2224 # along with this program; if not, write to the Free Software
2225 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2227 # As a special exception to the GNU General Public License, if you
2228 # distribute this file as part of a program that contains a
2229 # configuration script generated by Autoconf, you may include it under
2230 # the same distribution terms that you use for the rest of that program.
2232 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2233 # ----------------------------------
2234 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2235 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2236 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2237 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2238 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2239 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2241 if test -n "$PKG_CONFIG"; then
2242 _pkg_min_version=m4_default([$1], [0.9.0])
2243 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2244 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2245 AC_MSG_RESULT([yes])
2252 ])# PKG_PROG_PKG_CONFIG
2254 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2256 # Check to see whether a particular set of modules exists. Similar
2257 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2260 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
2261 # this or PKG_CHECK_MODULES is called, or make sure to call
2262 # PKG_CHECK_EXISTS manually
2263 # --------------------------------------------------------------
2264 AC_DEFUN([PKG_CHECK_EXISTS],
2265 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2266 if test -n "$PKG_CONFIG" && \
2267 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2268 m4_ifval([$2], [$2], [:])
2269 m4_ifvaln([$3], [else
2274 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2275 # ---------------------------------------------
2276 m4_define([_PKG_CONFIG],
2277 [if test -n "$$1"; then
2279 elif test -n "$PKG_CONFIG"; then
2280 PKG_CHECK_EXISTS([$3],
2281 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2288 # _PKG_SHORT_ERRORS_SUPPORTED
2289 # -----------------------------
2290 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2291 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2292 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2293 _pkg_short_errors_supported=yes
2295 _pkg_short_errors_supported=no
2297 ])# _PKG_SHORT_ERRORS_SUPPORTED
2300 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2301 # [ACTION-IF-NOT-FOUND])
2304 # Note that if there is a possibility the first call to
2305 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2306 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2309 # --------------------------------------------------------------
2310 AC_DEFUN([PKG_CHECK_MODULES],
2311 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2312 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2313 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2316 AC_MSG_CHECKING([for $1])
2318 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2319 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2321 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2322 and $1[]_LIBS to avoid the need to call pkg-config.
2323 See the pkg-config man page for more details.])
2325 if test $pkg_failed = yes; then
2326 _PKG_SHORT_ERRORS_SUPPORTED
2327 if test $_pkg_short_errors_supported = yes; then
2328 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2330 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2332 # Put the nasty error message in config.log where it belongs
2333 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2335 ifelse([$4], , [AC_MSG_ERROR(dnl
2336 [Package requirements ($2) were not met:
2340 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2341 installed software in a non-standard prefix.
2345 [AC_MSG_RESULT([no])
2347 elif test $pkg_failed = untried; then
2348 ifelse([$4], , [AC_MSG_FAILURE(dnl
2349 [The pkg-config script could not be found or is too old. Make sure it
2350 is in your PATH or set the PKG_CONFIG environment variable to the full
2355 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2358 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2359 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2360 AC_MSG_RESULT([yes])
2361 ifelse([$3], , :, [$3])
2363 ])# PKG_CHECK_MODULES
2365 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2367 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2368 # 2006, 2007, 2008 Free Software Foundation, Inc.
2369 # Written by Gordon Matzigkeit, 1996
2371 # This file is free software; the Free Software Foundation gives
2372 # unlimited permission to copy and/or distribute it, with or without
2373 # modifications, as long as this notice is preserved.
2375 m4_define([_LT_COPYING], [dnl
2376 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2377 # 2006, 2007, 2008 Free Software Foundation, Inc.
2378 # Written by Gordon Matzigkeit, 1996
2380 # This file is part of GNU Libtool.
2382 # GNU Libtool is free software; you can redistribute it and/or
2383 # modify it under the terms of the GNU General Public License as
2384 # published by the Free Software Foundation; either version 2 of
2385 # the License, or (at your option) any later version.
2387 # As a special exception to the GNU General Public License,
2388 # if you distribute this file as part of a program or library that
2389 # is built using GNU Libtool, you may include this file under the
2390 # same distribution terms that you use for the rest of that program.
2392 # GNU Libtool is distributed in the hope that it will be useful,
2393 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2394 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2395 # GNU General Public License for more details.
2397 # You should have received a copy of the GNU General Public License
2398 # along with GNU Libtool; see the file COPYING. If not, a copy
2399 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2400 # obtained by writing to the Free Software Foundation, Inc.,
2401 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2407 # LT_PREREQ(VERSION)
2408 # ------------------
2409 # Complain and exit if this libtool version is less that VERSION.
2410 m4_defun([LT_PREREQ],
2411 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2413 [m4_fatal([Libtool version $1 or higher is required],
2418 # _LT_CHECK_BUILDDIR
2419 # ------------------
2420 # Complain if the absolute build directory name contains unusual characters
2421 m4_defun([_LT_CHECK_BUILDDIR],
2424 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2429 # LT_INIT([OPTIONS])
2430 # ------------------
2432 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2433 AC_BEFORE([$0], [LT_LANG])dnl
2434 AC_BEFORE([$0], [LT_OUTPUT])dnl
2435 AC_BEFORE([$0], [LTDL_INIT])dnl
2436 m4_require([_LT_CHECK_BUILDDIR])dnl
2438 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2439 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2440 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2441 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2442 dnl unless we require an AC_DEFUNed macro:
2443 AC_REQUIRE([LTOPTIONS_VERSION])dnl
2444 AC_REQUIRE([LTSUGAR_VERSION])dnl
2445 AC_REQUIRE([LTVERSION_VERSION])dnl
2446 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2447 m4_require([_LT_PROG_LTMAIN])dnl
2450 _LT_SET_OPTIONS([$0], [$1])
2452 # This can be used to rebuild libtool when needed
2453 LIBTOOL_DEPS="$ltmain"
2455 # Always use our own libtool.
2456 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2457 AC_SUBST(LIBTOOL)dnl
2462 m4_define([LT_INIT])
2466 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2467 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2468 dnl aclocal-1.4 backwards compatibility:
2469 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2470 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2473 # _LT_CC_BASENAME(CC)
2474 # -------------------
2475 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2476 m4_defun([_LT_CC_BASENAME],
2477 [for cc_temp in $1""; do
2479 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2480 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2485 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2489 # _LT_FILEUTILS_DEFAULTS
2490 # ----------------------
2491 # It is okay to use these file commands and assume they have been set
2492 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2493 m4_defun([_LT_FILEUTILS_DEFAULTS],
2497 ])# _LT_FILEUTILS_DEFAULTS
2502 m4_defun([_LT_SETUP],
2503 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2504 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2505 _LT_DECL([], [host_alias], [0], [The host system])dnl
2506 _LT_DECL([], [host], [0])dnl
2507 _LT_DECL([], [host_os], [0])dnl
2509 _LT_DECL([], [build_alias], [0], [The build system])dnl
2510 _LT_DECL([], [build], [0])dnl
2511 _LT_DECL([], [build_os], [0])dnl
2513 AC_REQUIRE([AC_PROG_CC])dnl
2514 AC_REQUIRE([LT_PATH_LD])dnl
2515 AC_REQUIRE([LT_PATH_NM])dnl
2517 AC_REQUIRE([AC_PROG_LN_S])dnl
2518 test -z "$LN_S" && LN_S="ln -s"
2519 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2521 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2522 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2523 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2525 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2526 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2527 m4_require([_LT_CMD_RELOAD])dnl
2528 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2529 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2530 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2532 _LT_CONFIG_LIBTOOL_INIT([
2533 # See if we are running on zsh, and set the options which allow our
2534 # commands through without removal of \ escapes INIT.
2535 if test -n "\${ZSH_VERSION+set}" ; then
2536 setopt NO_GLOB_SUBST
2539 if test -n "${ZSH_VERSION+set}" ; then
2540 setopt NO_GLOB_SUBST
2545 m4_require([_LT_TAG_COMPILER])dnl
2546 _LT_PROG_ECHO_BACKSLASH
2550 # AIX sometimes has problems with the GCC collect2 program. For some
2551 # reason, if we set the COLLECT_NAMES environment variable, the problems
2552 # vanish in a puff of smoke.
2553 if test "X${COLLECT_NAMES+set}" != Xset; then
2555 export COLLECT_NAMES
2560 # Sed substitution that helps us do robust quoting. It backslashifies
2561 # metacharacters that are still active within double-quoted strings.
2562 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2564 # Same as above, but do not quote variable references.
2565 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2567 # Sed substitution to delay expansion of an escaped shell variable in a
2568 # double_quote_subst'ed string.
2569 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2571 # Sed substitution to delay expansion of an escaped single quote.
2572 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2574 # Sed substitution to avoid accidental globbing in evaled expressions
2575 no_glob_subst='s/\*/\\\*/g'
2579 can_build_shared=yes
2581 # All known linkers require a `.a' archive for static linking (except MSVC,
2582 # which needs '.lib').
2585 with_gnu_ld="$lt_cv_prog_gnu_ld"
2588 old_CFLAGS="$CFLAGS"
2590 # Set sane defaults for various variables
2591 test -z "$CC" && CC=cc
2592 test -z "$LTCC" && LTCC=$CC
2593 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2594 test -z "$LD" && LD=ld
2595 test -z "$ac_objext" && ac_objext=o
2597 _LT_CC_BASENAME([$compiler])
2599 # Only perform the check for file, if the check method requires it
2600 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2601 case $deplibs_check_method in
2603 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2609 # Use C for the default configuration in the libtool script
2610 LT_SUPPORTED_TAG([CC])
2612 _LT_LANG_DEFAULT_CONFIG
2619 # Note that this code is called both from `configure', and `config.status'
2620 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2621 # `config.status' has no value for ac_aux_dir unless we are using Automake,
2622 # so we pass a copy along to make sure it has a sensible value anyway.
2623 m4_defun([_LT_PROG_LTMAIN],
2624 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2625 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2626 ltmain="$ac_aux_dir/ltmain.sh"
2631 # So that we can recreate a full libtool script including additional
2632 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2633 # in macros and then make a single call at the end using the `libtool'
2637 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2638 # ----------------------------------------
2639 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2640 m4_define([_LT_CONFIG_LIBTOOL_INIT],
2642 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2647 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2650 # _LT_CONFIG_LIBTOOL([COMMANDS])
2651 # ------------------------------
2652 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2653 m4_define([_LT_CONFIG_LIBTOOL],
2655 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2660 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2663 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2664 # -----------------------------------------------------
2665 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2666 [_LT_CONFIG_LIBTOOL([$1])
2667 _LT_CONFIG_LIBTOOL_INIT([$2])
2671 # _LT_FORMAT_COMMENT([COMMENT])
2672 # -----------------------------
2673 # Add leading comment marks to the start of each line, and a trailing
2674 # full-stop to the whole comment if one is not present already.
2675 m4_define([_LT_FORMAT_COMMENT],
2677 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2678 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2685 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2686 # -------------------------------------------------------------------
2687 # CONFIGNAME is the name given to the value in the libtool script.
2688 # VARNAME is the (base) name used in the configure script.
2689 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2690 # VARNAME. Any other value will be used directly.
2691 m4_define([_LT_DECL],
2692 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2693 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2694 [m4_ifval([$1], [$1], [$2])])
2695 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2697 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2698 lt_dict_add_subkey([lt_decl_dict], [$2],
2699 [tagged?], [m4_ifval([$5], [yes], [no])])])
2703 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2704 # --------------------------------------------------------
2705 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2708 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2709 # ------------------------------------------------
2710 m4_define([lt_decl_tag_varnames],
2711 [_lt_decl_filter([tagged?], [yes], $@)])
2714 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2715 # ---------------------------------------------------------
2716 m4_define([_lt_decl_filter],
2718 [0], [m4_fatal([$0: too few arguments: $#])],
2719 [1], [m4_fatal([$0: too few arguments: $#: $1])],
2720 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2721 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2722 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2726 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2727 # --------------------------------------------------
2728 m4_define([lt_decl_quote_varnames],
2729 [_lt_decl_filter([value], [1], $@)])
2732 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2733 # ---------------------------------------------------
2734 m4_define([lt_decl_dquote_varnames],
2735 [_lt_decl_filter([value], [2], $@)])
2738 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2739 # ---------------------------------------------------
2740 m4_define([lt_decl_varnames_tagged],
2741 [m4_assert([$# <= 2])dnl
2742 _$0(m4_quote(m4_default([$1], [[, ]])),
2743 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2744 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2745 m4_define([_lt_decl_varnames_tagged],
2746 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2749 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2750 # ------------------------------------------------
2751 m4_define([lt_decl_all_varnames],
2752 [_$0(m4_quote(m4_default([$1], [[, ]])),
2754 m4_quote(lt_decl_varnames),
2755 m4_quote(m4_shift($@))))[]dnl
2757 m4_define([_lt_decl_all_varnames],
2758 [lt_join($@, lt_decl_varnames_tagged([$1],
2759 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2763 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2764 # ------------------------------------
2765 # Quote a variable value, and forward it to `config.status' so that its
2766 # declaration there will have the same value as in `configure'. VARNAME
2767 # must have a single quote delimited value for this to work.
2768 m4_define([_LT_CONFIG_STATUS_DECLARE],
2769 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2772 # _LT_CONFIG_STATUS_DECLARATIONS
2773 # ------------------------------
2774 # We delimit libtool config variables with single quotes, so when
2775 # we write them to config.status, we have to be sure to quote all
2776 # embedded single quotes properly. In configure, this macro expands
2777 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2779 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2780 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2781 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2782 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2787 # Output comment and list of tags supported by the script
2788 m4_defun([_LT_LIBTOOL_TAGS],
2789 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2790 available_tags="_LT_TAGS"dnl
2794 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2795 # -----------------------------------
2796 # Extract the dictionary values for VARNAME (optionally with TAG) and
2797 # expand to a commented shell variable setting:
2799 # # Some comment about what VAR is for.
2800 # visible_name=$lt_internal_name
2801 m4_define([_LT_LIBTOOL_DECLARE],
2802 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2803 [description])))[]dnl
2804 m4_pushdef([_libtool_name],
2805 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2806 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2807 [0], [_libtool_name=[$]$1],
2808 [1], [_libtool_name=$lt_[]$1],
2809 [2], [_libtool_name=$lt_[]$1],
2810 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2811 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2815 # _LT_LIBTOOL_CONFIG_VARS
2816 # -----------------------
2817 # Produce commented declarations of non-tagged libtool config variables
2818 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2819 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2820 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2821 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2822 [m4_foreach([_lt_var],
2823 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2824 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2827 # _LT_LIBTOOL_TAG_VARS(TAG)
2828 # -------------------------
2829 m4_define([_LT_LIBTOOL_TAG_VARS],
2830 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2831 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2834 # _LT_TAGVAR(VARNAME, [TAGNAME])
2835 # ------------------------------
2836 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2839 # _LT_CONFIG_COMMANDS
2840 # -------------------
2841 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2842 # variables for single and double quote escaping we saved from calls
2843 # to _LT_DECL, we can put quote escaped variables declarations
2844 # into `config.status', and then the shell code to quote escape them in
2845 # for loops in `config.status'. Finally, any additional code accumulated
2846 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2847 m4_defun([_LT_CONFIG_COMMANDS],
2848 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2849 dnl If the libtool generation code has been placed in $CONFIG_LT,
2850 dnl instead of duplicating it all over again into config.status,
2851 dnl then we will have config.status run $CONFIG_LT later, so it
2852 dnl needs to know what name is stored there:
2853 [AC_CONFIG_COMMANDS([libtool],
2854 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2855 dnl If the libtool generation code is destined for config.status,
2856 dnl expand the accumulated commands and init code now:
2857 [AC_CONFIG_COMMANDS([libtool],
2858 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2859 ])#_LT_CONFIG_COMMANDS
2863 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2866 # The HP-UX ksh and POSIX shell print the target directory to stdout
2868 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2870 sed_quote_subst='$sed_quote_subst'
2871 double_quote_subst='$double_quote_subst'
2872 delay_variable_subst='$delay_variable_subst'
2873 _LT_CONFIG_STATUS_DECLARATIONS
2875 LTCFLAGS='$LTCFLAGS'
2876 compiler='$compiler_DEFAULT'
2878 # Quote evaled strings.
2879 for var in lt_decl_all_varnames([[ \
2880 ]], lt_decl_quote_varnames); do
2881 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2882 *[[\\\\\\\`\\"\\\$]]*)
2883 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2886 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2891 # Double-quote double-evaled strings.
2892 for var in lt_decl_all_varnames([[ \
2893 ]], lt_decl_dquote_varnames); do
2894 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2895 *[[\\\\\\\`\\"\\\$]]*)
2896 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2899 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2904 # Fix-up fallback echo if it was mangled by the above quoting rules.
2906 *'\\\[$]0 --fallback-echo"')dnl "
2907 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2911 _LT_OUTPUT_LIBTOOL_INIT
2917 # This macro allows early generation of the libtool script (before
2918 # AC_OUTPUT is called), incase it is used in configure for compilation
2920 AC_DEFUN([LT_OUTPUT],
2921 [: ${CONFIG_LT=./config.lt}
2922 AC_MSG_NOTICE([creating $CONFIG_LT])
2923 cat >"$CONFIG_LT" <<_LTEOF
2925 # Generated by $as_me.
2926 # Run this file to recreate a libtool stub with the current configuration.
2929 SHELL=\${CONFIG_SHELL-$SHELL}
2932 cat >>"$CONFIG_LT" <<\_LTEOF
2936 exec AS_MESSAGE_FD>&1
2937 exec AS_MESSAGE_LOG_FD>>config.log
2940 AS_BOX([Running $as_me.])
2941 } >&AS_MESSAGE_LOG_FD
2944 \`$as_me' creates a local libtool stub from the current configuration,
2945 for use in further configure time tests before the real libtool is
2948 Usage: $[0] [[OPTIONS]]
2950 -h, --help print this help, then exit
2951 -V, --version print version number, then exit
2952 -q, --quiet do not print progress messages
2953 -d, --debug don't remove temporary files
2955 Report bugs to <bug-libtool@gnu.org>."
2958 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2959 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2960 configured by $[0], generated by m4_PACKAGE_STRING.
2962 Copyright (C) 2008 Free Software Foundation, Inc.
2963 This config.lt script is free software; the Free Software Foundation
2964 gives unlimited permision to copy, distribute and modify it."
2966 while test $[#] != 0
2969 --version | --v* | -V )
2970 echo "$lt_cl_version"; exit 0 ;;
2971 --help | --h* | -h )
2972 echo "$lt_cl_help"; exit 0 ;;
2973 --debug | --d* | -d )
2975 --quiet | --q* | --silent | --s* | -q )
2978 -*) AC_MSG_ERROR([unrecognized option: $[1]
2979 Try \`$[0] --help' for more information.]) ;;
2981 *) AC_MSG_ERROR([unrecognized argument: $[1]
2982 Try \`$[0] --help' for more information.]) ;;
2987 if $lt_cl_silent; then
2988 exec AS_MESSAGE_FD>/dev/null
2992 cat >>"$CONFIG_LT" <<_LTEOF
2993 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2996 cat >>"$CONFIG_LT" <<\_LTEOF
2997 AC_MSG_NOTICE([creating $ofile])
2998 _LT_OUTPUT_LIBTOOL_COMMANDS
3001 chmod +x "$CONFIG_LT"
3003 # configure is writing to config.log, but config.lt does its own redirection,
3004 # appending to config.log, which fails on DOS, as config.log is still kept
3005 # open by configure. Here we exec the FD to /dev/null, effectively closing
3006 # config.log, so it can be properly (re)opened and appended to by config.lt.
3007 if test "$no_create" != yes; then
3009 test "$silent" = yes &&
3010 lt_config_lt_args="$lt_config_lt_args --quiet"
3011 exec AS_MESSAGE_LOG_FD>/dev/null
3012 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3013 exec AS_MESSAGE_LOG_FD>>config.log
3014 $lt_cl_success || AS_EXIT(1)
3021 # If TAG is the built-in tag, create an initial libtool script with a
3022 # default configuration from the untagged config vars. Otherwise add code
3023 # to config.status for appending the configuration named by TAG from the
3024 # matching tagged config vars.
3025 m4_defun([_LT_CONFIG],
3026 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3027 _LT_CONFIG_SAVE_COMMANDS([
3028 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3029 m4_if(_LT_TAG, [C], [
3030 # See if we are running on zsh, and set the options which allow our
3031 # commands through without removal of \ escapes.
3032 if test -n "${ZSH_VERSION+set}" ; then
3033 setopt NO_GLOB_SUBST
3037 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3040 cat <<_LT_EOF >> "$cfgfile"
3043 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3044 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3045 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3046 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3051 # ### BEGIN LIBTOOL CONFIG
3052 _LT_LIBTOOL_CONFIG_VARS
3053 _LT_LIBTOOL_TAG_VARS
3054 # ### END LIBTOOL CONFIG
3060 cat <<\_LT_EOF >> "$cfgfile"
3061 # AIX sometimes has problems with the GCC collect2 program. For some
3062 # reason, if we set the COLLECT_NAMES environment variable, the problems
3063 # vanish in a puff of smoke.
3064 if test "X${COLLECT_NAMES+set}" != Xset; then
3066 export COLLECT_NAMES
3074 # We use sed instead of cat because bash on DJGPP gets confused if
3075 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3076 # text mode, it properly converts lines to CR/LF. This bash problem
3077 # is reportedly fixed, but why not run on old versions too?
3078 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3079 || (rm -f "$cfgfile"; exit 1)
3081 _LT_PROG_XSI_SHELLFNS
3083 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3084 || (rm -f "$cfgfile"; exit 1)
3086 mv -f "$cfgfile" "$ofile" ||
3087 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3090 [cat <<_LT_EOF >> "$ofile"
3092 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3093 dnl in a comment (ie after a #).
3094 # ### BEGIN LIBTOOL TAG CONFIG: $1
3095 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
3096 # ### END LIBTOOL TAG CONFIG: $1
3103 TIMESTAMP='$TIMESTAMP'
3105 ofile='$ofile'], [])
3106 ])dnl /_LT_CONFIG_SAVE_COMMANDS
3110 # LT_SUPPORTED_TAG(TAG)
3111 # ---------------------
3112 # Trace this macro to discover what tags are supported by the libtool
3113 # --tag option, using:
3114 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
3115 AC_DEFUN([LT_SUPPORTED_TAG], [])
3118 # C support is built-in for now
3119 m4_define([_LT_LANG_C_enabled], [])
3120 m4_define([_LT_TAGS], [])
3125 # Enable libtool support for the given language if not already enabled.
3127 [AC_BEFORE([$0], [LT_OUTPUT])dnl
3130 [C++], [_LT_LANG(CXX)],
3131 [Java], [_LT_LANG(GCJ)],
3132 [Fortran 77], [_LT_LANG(F77)],
3133 [Fortran], [_LT_LANG(FC)],
3134 [Windows Resource], [_LT_LANG(RC)],
3135 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3137 [m4_fatal([$0: unsupported language: "$1"])])])dnl
3141 # _LT_LANG(LANGNAME)
3142 # ------------------
3143 m4_defun([_LT_LANG],
3144 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
3145 [LT_SUPPORTED_TAG([$1])dnl
3146 m4_append([_LT_TAGS], [$1 ])dnl
3147 m4_define([_LT_LANG_]$1[_enabled], [])dnl
3148 _LT_LANG_$1_CONFIG($1)])dnl
3152 # _LT_LANG_DEFAULT_CONFIG
3153 # -----------------------
3154 m4_defun([_LT_LANG_DEFAULT_CONFIG],
3155 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
3157 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3159 AC_PROVIDE_IFELSE([AC_PROG_F77],
3161 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3163 AC_PROVIDE_IFELSE([AC_PROG_FC],
3165 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3167 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3168 dnl pulling things in needlessly.
3169 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3171 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3173 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3175 [m4_ifdef([AC_PROG_GCJ],
3176 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3177 m4_ifdef([A][M_PROG_GCJ],
3178 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3179 m4_ifdef([LT_PROG_GCJ],
3180 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3182 AC_PROVIDE_IFELSE([LT_PROG_RC],
3184 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3185 ])# _LT_LANG_DEFAULT_CONFIG
3188 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3189 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3190 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3191 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3192 dnl aclocal-1.4 backwards compatibility:
3193 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3194 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3195 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3196 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3201 m4_defun([_LT_TAG_COMPILER],
3202 [AC_REQUIRE([AC_PROG_CC])dnl
3204 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3205 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3206 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3207 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3209 # If no C compiler was specified, use CC.
3212 # If no C compiler flags were specified, use CFLAGS.
3213 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3215 # Allow CC to be a program name with arguments.
3217 ])# _LT_TAG_COMPILER
3220 # _LT_COMPILER_BOILERPLATE
3221 # ------------------------
3222 # Check for compiler boilerplate output or warnings with
3223 # the simple compiler test code.
3224 m4_defun([_LT_COMPILER_BOILERPLATE],
3225 [m4_require([_LT_DECL_SED])dnl
3226 ac_outfile=conftest.$ac_objext
3227 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3228 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3229 _lt_compiler_boilerplate=`cat conftest.err`
3231 ])# _LT_COMPILER_BOILERPLATE
3234 # _LT_LINKER_BOILERPLATE
3235 # ----------------------
3236 # Check for linker boilerplate output or warnings with
3237 # the simple link test code.
3238 m4_defun([_LT_LINKER_BOILERPLATE],
3239 [m4_require([_LT_DECL_SED])dnl
3240 ac_outfile=conftest.$ac_objext
3241 echo "$lt_simple_link_test_code" >conftest.$ac_ext
3242 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3243 _lt_linker_boilerplate=`cat conftest.err`
3245 ])# _LT_LINKER_BOILERPLATE
3247 # _LT_REQUIRED_DARWIN_CHECKS
3248 # -------------------------
3249 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3251 rhapsody* | darwin*)
3252 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3253 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3254 AC_CHECK_TOOL([LIPO], [lipo], [:])
3255 AC_CHECK_TOOL([OTOOL], [otool], [:])
3256 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3257 _LT_DECL([], [DSYMUTIL], [1],
3258 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3259 _LT_DECL([], [NMEDIT], [1],
3260 [Tool to change global to local symbols on Mac OS X])
3261 _LT_DECL([], [LIPO], [1],
3262 [Tool to manipulate fat objects and archives on Mac OS X])
3263 _LT_DECL([], [OTOOL], [1],
3264 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3265 _LT_DECL([], [OTOOL64], [1],
3266 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3268 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3269 [lt_cv_apple_cc_single_mod=no
3270 if test -z "${LT_MULTI_MODULE}"; then
3271 # By default we will add the -single_module flag. You can override
3272 # by either setting the environment variable LT_MULTI_MODULE
3273 # non-empty at configure time, or by adding -multi_module to the
3275 rm -rf libconftest.dylib*
3276 echo "int foo(void){return 1;}" > conftest.c
3277 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3278 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3279 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3280 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3282 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3283 lt_cv_apple_cc_single_mod=yes
3285 cat conftest.err >&AS_MESSAGE_LOG_FD
3287 rm -rf libconftest.dylib*
3290 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3291 [lt_cv_ld_exported_symbols_list],
3292 [lt_cv_ld_exported_symbols_list=no
3293 save_LDFLAGS=$LDFLAGS
3294 echo "_main" > conftest.sym
3295 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3296 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3297 [lt_cv_ld_exported_symbols_list=yes],
3298 [lt_cv_ld_exported_symbols_list=no])
3299 LDFLAGS="$save_LDFLAGS"
3302 rhapsody* | darwin1.[[012]])
3303 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3305 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3306 darwin*) # darwin 5.x on
3307 # if running on 10.5 or later, the deployment target defaults
3308 # to the OS version, if on x86, and 10.4, the deployment
3309 # target defaults to 10.4. Don't you love it?
3310 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3311 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3312 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3314 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3316 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3320 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3321 _lt_dar_single_mod='$single_module'
3323 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3324 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3326 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3328 if test "$DSYMUTIL" != ":"; then
3329 _lt_dsymutil='~$DSYMUTIL $lib || :'
3338 # _LT_DARWIN_LINKER_FEATURES
3339 # --------------------------
3340 # Checks for linker and compiler features on darwin
3341 m4_defun([_LT_DARWIN_LINKER_FEATURES],
3343 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3344 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3345 _LT_TAGVAR(hardcode_direct, $1)=no
3346 _LT_TAGVAR(hardcode_automatic, $1)=yes
3347 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3348 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3349 _LT_TAGVAR(link_all_deplibs, $1)=yes
3350 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3351 case $cc_basename in
3352 ifort*) _lt_dar_can_shared=yes ;;
3353 *) _lt_dar_can_shared=$GCC ;;
3355 if test "$_lt_dar_can_shared" = "yes"; then
3356 output_verbose_link_cmd=echo
3357 _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}"
3358 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3359 _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}"
3360 _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}"
3362 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3363 _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}"
3364 _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}"
3368 _LT_TAGVAR(ld_shlibs, $1)=no
3372 # _LT_SYS_MODULE_PATH_AIX
3373 # -----------------------
3374 # Links a minimal program and checks the executable
3375 # for the system default hardcoded library path. In most cases,
3376 # this is /usr/lib:/lib, but when the MPI compilers are used
3377 # the location of the communication and MPI libs are included too.
3378 # If we don't find anything, use the default library path according
3379 # to the aix ld manual.
3380 m4_defun([_LT_SYS_MODULE_PATH_AIX],
3381 [m4_require([_LT_DECL_SED])dnl
3382 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3383 lt_aix_libpath_sed='
3384 /Import File Strings/,/^$/ {
3390 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3391 # Check for a 64-bit object if we didn't find anything.
3392 if test -z "$aix_libpath"; then
3393 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3395 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3396 ])# _LT_SYS_MODULE_PATH_AIX
3399 # _LT_SHELL_INIT(ARG)
3400 # -------------------
3401 m4_define([_LT_SHELL_INIT],
3402 [ifdef([AC_DIVERSION_NOTICE],
3403 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3404 [AC_DIVERT_PUSH(NOTICE)])
3410 # _LT_PROG_ECHO_BACKSLASH
3411 # -----------------------
3412 # Add some code to the start of the generated configure script which
3413 # will find an echo command which doesn't interpret backslashes.
3414 m4_defun([_LT_PROG_ECHO_BACKSLASH],
3416 # Check that we are running under the correct shell.
3417 SHELL=${CONFIG_SHELL-/bin/sh}
3421 # Remove one level of quotation (which was required for Make).
3422 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3426 ECHO=${lt_ECHO-echo}
3427 if test "X[$]1" = X--no-reexec; then
3428 # Discard the --no-reexec flag, and continue.
3430 elif test "X[$]1" = X--fallback-echo; then
3431 # Avoid inline document here, it may be left over
3433 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
3434 # Yippee, $ECHO works!
3437 # Restart under the correct shell.
3438 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3441 if test "X[$]1" = X--fallback-echo; then
3442 # used as fallback echo
3450 # The HP-UX ksh and POSIX shell print the target directory to stdout
3452 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3454 if test -z "$lt_ECHO"; then
3455 if test "X${echo_test_string+set}" != Xset; then
3456 # find a string as large as possible, as long as the shell can cope with it
3457 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3458 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3459 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
3460 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
3467 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3468 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3469 test "X$echo_testing_string" = "X$echo_test_string"; then
3472 # The Solaris, AIX, and Digital Unix default echo programs unquote
3473 # backslashes. This makes it impossible to quote backslashes using
3474 # echo "$something" | sed 's/\\/\\\\/g'
3476 # So, first we look for a working echo in the user's PATH.
3478 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3479 for dir in $PATH /usr/ucb; do
3481 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3482 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3483 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3484 test "X$echo_testing_string" = "X$echo_test_string"; then
3491 if test "X$ECHO" = Xecho; then
3492 # We didn't find a better echo, so look for alternatives.
3493 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
3494 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
3495 test "X$echo_testing_string" = "X$echo_test_string"; then
3496 # This shell has a builtin print -r that does the trick.
3498 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
3499 test "X$CONFIG_SHELL" != X/bin/ksh; then
3500 # If we have ksh, try running configure again with it.
3501 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3502 export ORIGINAL_CONFIG_SHELL
3503 CONFIG_SHELL=/bin/ksh
3505 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3509 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3510 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3511 test "X$echo_testing_string" = "X$echo_test_string"; then
3512 # Cool, printf works
3514 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3515 test "X$echo_testing_string" = 'X\t' &&
3516 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3517 test "X$echo_testing_string" = "X$echo_test_string"; then
3518 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3520 SHELL="$CONFIG_SHELL"
3522 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3523 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3524 test "X$echo_testing_string" = 'X\t' &&
3525 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3526 test "X$echo_testing_string" = "X$echo_test_string"; then
3527 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3529 # maybe with a smaller string...
3532 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3533 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
3540 if test "$prev" != 'sed 50q "[$]0"'; then
3541 echo_test_string=`eval $prev`
3542 export echo_test_string
3543 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3545 # Oops. We lost completely, so just stick with echo.
3554 # Copy echo and quote the copy suitably for passing to libtool from
3555 # the Makefile, instead of quoting the original, which is used later.
3557 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3558 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3563 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3564 _LT_DECL([], [ECHO], [1],
3565 [An echo program that does not interpret backslashes])
3566 ])# _LT_PROG_ECHO_BACKSLASH
3571 m4_defun([_LT_ENABLE_LOCK],
3572 [AC_ARG_ENABLE([libtool-lock],
3573 [AS_HELP_STRING([--disable-libtool-lock],
3574 [avoid locking (might break parallel builds)])])
3575 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3577 # Some flags need to be propagated to the compiler or linker for good
3581 # Find out which ABI we are using.
3582 echo 'int i;' > conftest.$ac_ext
3583 if AC_TRY_EVAL(ac_compile); then
3584 case `/usr/bin/file conftest.$ac_objext` in
3596 # Find out which ABI we are using.
3597 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3598 if AC_TRY_EVAL(ac_compile); then
3599 if test "$lt_cv_prog_gnu_ld" = yes; then
3600 case `/usr/bin/file conftest.$ac_objext` in
3602 LD="${LD-ld} -melf32bsmip"
3605 LD="${LD-ld} -melf32bmipn32"
3608 LD="${LD-ld} -melf64bmip"
3612 case `/usr/bin/file conftest.$ac_objext` in
3628 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3629 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3630 # Find out which ABI we are using.
3631 echo 'int i;' > conftest.$ac_ext
3632 if AC_TRY_EVAL(ac_compile); then
3633 case `/usr/bin/file conftest.o` in
3636 x86_64-*kfreebsd*-gnu)
3637 LD="${LD-ld} -m elf_i386_fbsd"
3640 LD="${LD-ld} -m elf_i386"
3642 ppc64-*linux*|powerpc64-*linux*)
3643 LD="${LD-ld} -m elf32ppclinux"
3646 LD="${LD-ld} -m elf_s390"
3649 LD="${LD-ld} -m elf32_sparc"
3655 x86_64-*kfreebsd*-gnu)
3656 LD="${LD-ld} -m elf_x86_64_fbsd"
3659 LD="${LD-ld} -m elf_x86_64"
3661 ppc*-*linux*|powerpc*-*linux*)
3662 LD="${LD-ld} -m elf64ppc"
3664 s390*-*linux*|s390*-*tpf*)
3665 LD="${LD-ld} -m elf64_s390"
3668 LD="${LD-ld} -m elf64_sparc"
3678 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3679 SAVE_CFLAGS="$CFLAGS"
3680 CFLAGS="$CFLAGS -belf"
3681 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3683 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3685 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3686 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3687 CFLAGS="$SAVE_CFLAGS"
3691 # Find out which ABI we are using.
3692 echo 'int i;' > conftest.$ac_ext
3693 if AC_TRY_EVAL(ac_compile); then
3694 case `/usr/bin/file conftest.o` in
3696 case $lt_cv_prog_gnu_ld in
3697 yes*) LD="${LD-ld} -m elf64_sparc" ;;
3699 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3711 need_locks="$enable_libtool_lock"
3715 # _LT_CMD_OLD_ARCHIVE
3716 # -------------------
3717 m4_defun([_LT_CMD_OLD_ARCHIVE],
3718 [AC_CHECK_TOOL(AR, ar, false)
3719 test -z "$AR" && AR=ar
3720 test -z "$AR_FLAGS" && AR_FLAGS=cru
3721 _LT_DECL([], [AR], [1], [The archiver])
3722 _LT_DECL([], [AR_FLAGS], [1])
3724 AC_CHECK_TOOL(STRIP, strip, :)
3725 test -z "$STRIP" && STRIP=:
3726 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3728 AC_CHECK_TOOL(RANLIB, ranlib, :)
3729 test -z "$RANLIB" && RANLIB=:
3730 _LT_DECL([], [RANLIB], [1],
3731 [Commands used to install an old-style archive])
3733 # Determine commands to create old-style static archives.
3734 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3735 old_postinstall_cmds='chmod 644 $oldlib'
3736 old_postuninstall_cmds=
3738 if test -n "$RANLIB"; then
3741 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3744 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3747 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3749 _LT_DECL([], [old_postinstall_cmds], [2])
3750 _LT_DECL([], [old_postuninstall_cmds], [2])
3751 _LT_TAGDECL([], [old_archive_cmds], [2],
3752 [Commands used to build an old-style archive])
3753 ])# _LT_CMD_OLD_ARCHIVE
3756 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3757 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3758 # ----------------------------------------------------------------
3759 # Check whether the given compiler option works
3760 AC_DEFUN([_LT_COMPILER_OPTION],
3761 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3762 m4_require([_LT_DECL_SED])dnl
3763 AC_CACHE_CHECK([$1], [$2],
3765 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3766 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3767 lt_compiler_flag="$3"
3768 # Insert the option either (1) after the last *FLAGS variable, or
3769 # (2) before a word containing "conftest.", or (3) at the end.
3770 # Note that $ac_compile itself does not contain backslashes and begins
3771 # with a dollar sign (not a hyphen), so the echo should work correctly.
3772 # The option is referenced via a variable to avoid confusing sed.
3773 lt_compile=`echo "$ac_compile" | $SED \
3774 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3775 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3776 -e 's:$: $lt_compiler_flag:'`
3777 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3778 (eval "$lt_compile" 2>conftest.err)
3780 cat conftest.err >&AS_MESSAGE_LOG_FD
3781 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3782 if (exit $ac_status) && test -s "$ac_outfile"; then
3783 # The compiler can only warn and ignore the option if not recognized
3784 # So say no if there are warnings other than the usual output.
3785 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3786 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3787 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3794 if test x"[$]$2" = xyes; then
3795 m4_if([$5], , :, [$5])
3797 m4_if([$6], , :, [$6])
3799 ])# _LT_COMPILER_OPTION
3802 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3803 dnl aclocal-1.4 backwards compatibility:
3804 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3807 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3808 # [ACTION-SUCCESS], [ACTION-FAILURE])
3809 # ----------------------------------------------------
3810 # Check whether the given linker option works
3811 AC_DEFUN([_LT_LINKER_OPTION],
3812 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3813 m4_require([_LT_DECL_SED])dnl
3814 AC_CACHE_CHECK([$1], [$2],
3816 save_LDFLAGS="$LDFLAGS"
3817 LDFLAGS="$LDFLAGS $3"
3818 echo "$lt_simple_link_test_code" > conftest.$ac_ext
3819 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3820 # The linker can only warn and ignore the option if not recognized
3821 # So say no if there are warnings
3822 if test -s conftest.err; then
3823 # Append any errors to the config.log.
3824 cat conftest.err 1>&AS_MESSAGE_LOG_FD
3825 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3826 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3827 if diff conftest.exp conftest.er2 >/dev/null; then
3835 LDFLAGS="$save_LDFLAGS"
3838 if test x"[$]$2" = xyes; then
3839 m4_if([$4], , :, [$4])
3841 m4_if([$5], , :, [$5])
3843 ])# _LT_LINKER_OPTION
3846 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3847 dnl aclocal-1.4 backwards compatibility:
3848 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3853 AC_DEFUN([LT_CMD_MAX_LEN],
3854 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3855 # find the maximum length of command line arguments
3856 AC_MSG_CHECKING([the maximum length of command line arguments])
3857 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3863 # On DJGPP, this test can blow up pretty badly due to problems in libc
3864 # (any single argument exceeding 2000 bytes causes a buffer overrun
3865 # during glob expansion). Even if it were fixed, the result of this
3866 # check would be larger than it should be.
3867 lt_cv_sys_max_cmd_len=12288; # 12K is about right
3871 # Under GNU Hurd, this test is not required because there is
3872 # no limit to the length of command line arguments.
3873 # Libtool will interpret -1 as no limit whatsoever
3874 lt_cv_sys_max_cmd_len=-1;
3877 cygwin* | mingw* | cegcc*)
3878 # On Win9x/ME, this test blows up -- it succeeds, but takes
3879 # about 5 minutes as the teststring grows exponentially.
3880 # Worse, since 9x/ME are not pre-emptively multitasking,
3881 # you end up with a "frozen" computer, even though with patience
3882 # the test eventually succeeds (with a max line length of 256k).
3883 # Instead, let's just punt: use the minimum linelength reported by
3884 # all of the supported platforms: 8192 (on NT/2K/XP).
3885 lt_cv_sys_max_cmd_len=8192;
3889 # On AmigaOS with pdksh, this test takes hours, literally.
3890 # So we just punt and use a minimum line length of 8192.
3891 lt_cv_sys_max_cmd_len=8192;
3894 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3895 # This has been around since 386BSD, at least. Likely further.
3896 if test -x /sbin/sysctl; then
3897 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3898 elif test -x /usr/sbin/sysctl; then
3899 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3901 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3903 # And add a safety zone
3904 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3905 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3909 # We know the value 262144 and hardcode it with a safety zone (like BSD)
3910 lt_cv_sys_max_cmd_len=196608
3914 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3915 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3916 # nice to cause kernel panics so lets avoid the loop below.
3917 # First set a reasonable default.
3918 lt_cv_sys_max_cmd_len=16384
3920 if test -x /sbin/sysconfig; then
3921 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3922 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3927 lt_cv_sys_max_cmd_len=102400
3929 sysv5* | sco5v6* | sysv4.2uw2*)
3930 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3931 if test -n "$kargmax"; then
3932 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3934 lt_cv_sys_max_cmd_len=32768
3938 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3939 if test -n "$lt_cv_sys_max_cmd_len"; then
3940 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3941 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3943 # Make teststring a little bigger before we do anything with it.
3944 # a 1K string should be a reasonable start.
3945 for i in 1 2 3 4 5 6 7 8 ; do
3946 teststring=$teststring$teststring
3948 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3949 # If test is not a shell built-in, we'll probably end up computing a
3950 # maximum length that is only half of the actual maximum length, but
3952 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3953 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3954 test $i != 17 # 1/2 MB should be enough
3957 teststring=$teststring$teststring
3959 # Only check the string length outside the loop.
3960 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3962 # Add a significant safety factor because C++ compilers can tack on
3963 # massive amounts of additional arguments before passing them to the
3964 # linker. It appears as though 1/2 is a usable value.
3965 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3970 if test -n $lt_cv_sys_max_cmd_len ; then
3971 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3975 max_cmd_len=$lt_cv_sys_max_cmd_len
3976 _LT_DECL([], [max_cmd_len], [0],
3977 [What is the maximum length of a command?])
3981 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3982 dnl aclocal-1.4 backwards compatibility:
3983 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3988 m4_defun([_LT_HEADER_DLFCN],
3989 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3990 ])# _LT_HEADER_DLFCN
3993 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3994 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3995 # ----------------------------------------------------------------
3996 m4_defun([_LT_TRY_DLOPEN_SELF],
3997 [m4_require([_LT_HEADER_DLFCN])dnl
3998 if test "$cross_compiling" = yes; then :
4001 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4002 lt_status=$lt_dlunknown
4003 cat > conftest.$ac_ext <<_LT_EOF
4004 [#line __oline__ "configure"
4005 #include "confdefs.h"
4014 # define LT_DLGLOBAL RTLD_GLOBAL
4017 # define LT_DLGLOBAL DL_GLOBAL
4019 # define LT_DLGLOBAL 0
4023 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4024 find out it does not work in some platform. */
4025 #ifndef LT_DLLAZY_OR_NOW
4027 # define LT_DLLAZY_OR_NOW RTLD_LAZY
4030 # define LT_DLLAZY_OR_NOW DL_LAZY
4033 # define LT_DLLAZY_OR_NOW RTLD_NOW
4036 # define LT_DLLAZY_OR_NOW DL_NOW
4038 # define LT_DLLAZY_OR_NOW 0
4045 void fnord() { int i=42;}
4048 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4049 int status = $lt_dlunknown;
4053 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
4054 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4055 /* dlclose (self); */
4063 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4064 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4067 x$lt_dlno_uscore) $1 ;;
4068 x$lt_dlneed_uscore) $2 ;;
4069 x$lt_dlunknown|x*) $3 ;;
4072 # compilation failed
4077 ])# _LT_TRY_DLOPEN_SELF
4080 # LT_SYS_DLOPEN_SELF
4081 # ------------------
4082 AC_DEFUN([LT_SYS_DLOPEN_SELF],
4083 [m4_require([_LT_HEADER_DLFCN])dnl
4084 if test "x$enable_dlopen" != xyes; then
4085 enable_dlopen=unknown
4086 enable_dlopen_self=unknown
4087 enable_dlopen_self_static=unknown
4094 lt_cv_dlopen="load_add_on"
4096 lt_cv_dlopen_self=yes
4099 mingw* | pw32* | cegcc*)
4100 lt_cv_dlopen="LoadLibrary"
4105 lt_cv_dlopen="dlopen"
4110 # if libdl is installed we need to link against it
4111 AC_CHECK_LIB([dl], [dlopen],
4112 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4115 lt_cv_dlopen_self=yes
4120 AC_CHECK_FUNC([shl_load],
4121 [lt_cv_dlopen="shl_load"],
4122 [AC_CHECK_LIB([dld], [shl_load],
4123 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4124 [AC_CHECK_FUNC([dlopen],
4125 [lt_cv_dlopen="dlopen"],
4126 [AC_CHECK_LIB([dl], [dlopen],
4127 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4128 [AC_CHECK_LIB([svld], [dlopen],
4129 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4130 [AC_CHECK_LIB([dld], [dld_link],
4131 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4140 if test "x$lt_cv_dlopen" != xno; then
4146 case $lt_cv_dlopen in
4148 save_CPPFLAGS="$CPPFLAGS"
4149 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4151 save_LDFLAGS="$LDFLAGS"
4152 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4155 LIBS="$lt_cv_dlopen_libs $LIBS"
4157 AC_CACHE_CHECK([whether a program can dlopen itself],
4158 lt_cv_dlopen_self, [dnl
4159 _LT_TRY_DLOPEN_SELF(
4160 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4161 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4164 if test "x$lt_cv_dlopen_self" = xyes; then
4165 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4166 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4167 lt_cv_dlopen_self_static, [dnl
4168 _LT_TRY_DLOPEN_SELF(
4169 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4170 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
4174 CPPFLAGS="$save_CPPFLAGS"
4175 LDFLAGS="$save_LDFLAGS"
4180 case $lt_cv_dlopen_self in
4181 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4182 *) enable_dlopen_self=unknown ;;
4185 case $lt_cv_dlopen_self_static in
4186 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4187 *) enable_dlopen_self_static=unknown ;;
4190 _LT_DECL([dlopen_support], [enable_dlopen], [0],
4191 [Whether dlopen is supported])
4192 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4193 [Whether dlopen of programs is supported])
4194 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4195 [Whether dlopen of statically linked programs is supported])
4196 ])# LT_SYS_DLOPEN_SELF
4199 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4200 dnl aclocal-1.4 backwards compatibility:
4201 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4204 # _LT_COMPILER_C_O([TAGNAME])
4205 # ---------------------------
4206 # Check to see if options -c and -o are simultaneously supported by compiler.
4207 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
4208 m4_defun([_LT_COMPILER_C_O],
4209 [m4_require([_LT_DECL_SED])dnl
4210 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4211 m4_require([_LT_TAG_COMPILER])dnl
4212 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4213 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4214 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4215 $RM -r conftest 2>/dev/null
4219 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4221 lt_compiler_flag="-o out/conftest2.$ac_objext"
4222 # Insert the option either (1) after the last *FLAGS variable, or
4223 # (2) before a word containing "conftest.", or (3) at the end.
4224 # Note that $ac_compile itself does not contain backslashes and begins
4225 # with a dollar sign (not a hyphen), so the echo should work correctly.
4226 lt_compile=`echo "$ac_compile" | $SED \
4227 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4228 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4229 -e 's:$: $lt_compiler_flag:'`
4230 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4231 (eval "$lt_compile" 2>out/conftest.err)
4233 cat out/conftest.err >&AS_MESSAGE_LOG_FD
4234 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4235 if (exit $ac_status) && test -s out/conftest2.$ac_objext
4237 # The compiler can only warn and ignore the option if not recognized
4238 # So say no if there are warnings
4239 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
4240 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4241 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4242 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4245 chmod u+w . 2>&AS_MESSAGE_LOG_FD
4247 # SGI C++ compiler will create directory out/ii_files/ for
4248 # template instantiation
4249 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4250 $RM out/* && rmdir out
4255 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4256 [Does compiler simultaneously support -c and -o options?])
4257 ])# _LT_COMPILER_C_O
4260 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
4261 # ----------------------------------
4262 # Check to see if we can do hard links to lock some files if needed
4263 m4_defun([_LT_COMPILER_FILE_LOCKS],
4264 [m4_require([_LT_ENABLE_LOCK])dnl
4265 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4266 _LT_COMPILER_C_O([$1])
4268 hard_links="nottested"
4269 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4270 # do not overwrite the value of need_locks provided by the user
4271 AC_MSG_CHECKING([if we can lock with hard links])
4274 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4276 ln conftest.a conftest.b 2>&5 || hard_links=no
4277 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4278 AC_MSG_RESULT([$hard_links])
4279 if test "$hard_links" = no; then
4280 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4286 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4287 ])# _LT_COMPILER_FILE_LOCKS
4292 m4_defun([_LT_CHECK_OBJDIR],
4293 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4294 [rm -f .libs 2>/dev/null
4295 mkdir .libs 2>/dev/null
4296 if test -d .libs; then
4299 # MS-DOS does not allow filenames that begin with a dot.
4302 rmdir .libs 2>/dev/null])
4303 objdir=$lt_cv_objdir
4304 _LT_DECL([], [objdir], [0],
4305 [The name of the directory that contains temporary libtool files])dnl
4306 m4_pattern_allow([LT_OBJDIR])dnl
4307 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4308 [Define to the sub-directory in which libtool stores uninstalled libraries.])
4309 ])# _LT_CHECK_OBJDIR
4312 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4313 # --------------------------------------
4314 # Check hardcoding attributes.
4315 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4316 [AC_MSG_CHECKING([how to hardcode library paths into programs])
4317 _LT_TAGVAR(hardcode_action, $1)=
4318 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4319 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4320 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4322 # We can hardcode non-existent directories.
4323 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4324 # If the only mechanism to avoid hardcoding is shlibpath_var, we
4325 # have to relink, otherwise we might link with an installed library
4326 # when we should be linking with a yet-to-be-installed one
4327 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4328 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4329 # Linking always hardcodes the temporary library directory.
4330 _LT_TAGVAR(hardcode_action, $1)=relink
4332 # We can link without hardcoding, and we can hardcode nonexisting dirs.
4333 _LT_TAGVAR(hardcode_action, $1)=immediate
4336 # We cannot hardcode anything, or else we can only hardcode existing
4338 _LT_TAGVAR(hardcode_action, $1)=unsupported
4340 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4342 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4343 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4344 # Fast installation is not supported
4345 enable_fast_install=no
4346 elif test "$shlibpath_overrides_runpath" = yes ||
4347 test "$enable_shared" = no; then
4348 # Fast installation is not necessary
4349 enable_fast_install=needless
4351 _LT_TAGDECL([], [hardcode_action], [0],
4352 [How to hardcode a shared library path into an executable])
4353 ])# _LT_LINKER_HARDCODE_LIBPATH
4358 m4_defun([_LT_CMD_STRIPLIB],
4359 [m4_require([_LT_DECL_EGREP])
4362 AC_MSG_CHECKING([whether stripping libraries is possible])
4363 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4364 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4365 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4366 AC_MSG_RESULT([yes])
4368 # FIXME - insert some real tests, host_os isn't really good enough
4371 if test -n "$STRIP" ; then
4372 striplib="$STRIP -x"
4373 old_striplib="$STRIP -S"
4374 AC_MSG_RESULT([yes])
4384 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4385 _LT_DECL([], [striplib], [1])
4386 ])# _LT_CMD_STRIPLIB
4389 # _LT_SYS_DYNAMIC_LINKER([TAG])
4390 # -----------------------------
4391 # PORTME Fill in your ld.so characteristics
4392 m4_defun([_LT_SYS_DYNAMIC_LINKER],
4393 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4394 m4_require([_LT_DECL_EGREP])dnl
4395 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4396 m4_require([_LT_DECL_OBJDUMP])dnl
4397 m4_require([_LT_DECL_SED])dnl
4398 AC_MSG_CHECKING([dynamic linker characteristics])
4401 if test "$GCC" = yes; then
4403 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4404 *) lt_awk_arg="/^libraries:/" ;;
4406 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4407 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
4408 # if the path contains ";" then we assume it to be the separator
4409 # otherwise default to the standard path separator (i.e. ":") - it is
4410 # assumed that no part of a normal pathname contains ";" but that should
4411 # okay in the real world where ";" in dirpaths is itself problematic.
4412 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4414 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4416 # Ok, now we have the path, separated by spaces, we can step through it
4417 # and add multilib dir if necessary.
4418 lt_tmp_lt_search_path_spec=
4419 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4420 for lt_sys_path in $lt_search_path_spec; do
4421 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4422 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4424 test -d "$lt_sys_path" && \
4425 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4428 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
4429 BEGIN {RS=" "; FS="/|\n";} {
4432 for (lt_i = NF; lt_i > 0; lt_i--) {
4433 if ($lt_i != "" && $lt_i != ".") {
4434 if ($lt_i == "..") {
4437 if (lt_count == 0) {
4438 lt_foo="/" $lt_i lt_foo;
4445 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4446 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4448 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
4450 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4453 libname_spec='lib$name'
4461 shlibpath_overrides_runpath=unknown
4463 dynamic_linker="$host_os ld.so"
4464 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4465 need_lib_prefix=unknown
4466 hardcode_into_libs=no
4468 # when you set need_version to no, make sure it does not cause -set_version
4469 # flags to be left without arguments
4470 need_version=unknown
4475 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4476 shlibpath_var=LIBPATH
4478 # AIX 3 has no versioning support, so we append a major version to the name.
4479 soname_spec='${libname}${release}${shared_ext}$major'
4486 hardcode_into_libs=yes
4487 if test "$host_cpu" = ia64; then
4488 # AIX 5 supports IA64
4489 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4490 shlibpath_var=LD_LIBRARY_PATH
4492 # With GCC up to 2.95.x, collect2 would create an import file
4493 # for dependence libraries. The import file would start with
4494 # the line `#! .'. This would cause the generated library to
4495 # depend on `.', always an invalid library. This was fixed in
4496 # development snapshots of GCC prior to 3.0.
4498 aix4 | aix4.[[01]] | aix4.[[01]].*)
4499 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4501 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4508 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4509 # soname into executable. Probably we can add versioning support to
4510 # collect2, so additional links can be useful in future.
4511 if test "$aix_use_runtimelinking" = yes; then
4512 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4513 # instead of lib<name>.a to let people know that these are not
4514 # typical AIX shared libraries.
4515 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4517 # We preserve .a as extension for shared libraries through AIX4.2
4518 # and later when we are not doing run time linking.
4519 library_names_spec='${libname}${release}.a $libname.a'
4520 soname_spec='${libname}${release}${shared_ext}$major'
4522 shlibpath_var=LIBPATH
4529 # Since July 2007 AmigaOS4 officially supports .so libraries.
4530 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4534 library_names_spec='$libname.ixlibrary $libname.a'
4535 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4536 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4542 library_names_spec='${libname}${shared_ext}'
4543 dynamic_linker="$host_os ld.so"
4544 shlibpath_var=LIBRARY_PATH
4550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4551 soname_spec='${libname}${release}${shared_ext}$major'
4552 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4553 shlibpath_var=LD_LIBRARY_PATH
4554 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4555 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4556 # the default ld.so.conf also contains /usr/contrib/lib and
4557 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4558 # libtool to hard-code these into programs
4561 cygwin* | mingw* | pw32* | cegcc*)
4562 version_type=windows
4567 case $GCC,$host_os in
4568 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4569 library_names_spec='$libname.dll.a'
4570 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4571 postinstall_cmds='base_file=`basename \${file}`~
4572 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4573 dldir=$destdir/`dirname \$dlpath`~
4574 test -d \$dldir || mkdir -p \$dldir~
4575 $install_prog $dir/$dlname \$dldir/$dlname~
4576 chmod a+x \$dldir/$dlname~
4577 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4578 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4580 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4581 dlpath=$dir/\$dldll~
4583 shlibpath_overrides_runpath=yes
4587 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4588 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4589 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4592 # MinGW DLLs use traditional 'lib' prefix
4593 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4594 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4595 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4596 # It is most probably a Windows format PATH printed by
4597 # mingw gcc, but we are running on Cygwin. Gcc prints its search
4598 # path with ; separators, and with drive letters. We can handle the
4599 # drive letters (cygwin fileutils understands them), so leave them,
4600 # especially as we might pass files found there to a mingw objdump,
4601 # which wouldn't understand a cygwinified path. Ahh.
4602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4608 # pw32 DLLs use 'pw' prefix rather than 'lib'
4609 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4615 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4618 dynamic_linker='Win32 ld.exe'
4619 # FIXME: first we should search . and the directory the executable is in
4623 darwin* | rhapsody*)
4624 dynamic_linker="$host_os dyld"
4628 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4629 soname_spec='${libname}${release}${major}$shared_ext'
4630 shlibpath_overrides_runpath=yes
4631 shlibpath_var=DYLD_LIBRARY_PATH
4632 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4634 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4635 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4643 soname_spec='${libname}${release}${shared_ext}$major'
4644 shlibpath_var=LD_LIBRARY_PATH
4651 freebsd* | dragonfly*)
4652 # DragonFly does not have aout. When/if they implement a new
4653 # versioning mechanism, adjust this.
4654 if test -x /usr/bin/objformat; then
4655 objformat=`/usr/bin/objformat`
4658 freebsd[[123]]*) objformat=aout ;;
4662 version_type=freebsd-$objformat
4663 case $version_type in
4665 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4670 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4674 shlibpath_var=LD_LIBRARY_PATH
4677 shlibpath_overrides_runpath=yes
4679 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4680 shlibpath_overrides_runpath=yes
4681 hardcode_into_libs=yes
4683 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4684 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4685 shlibpath_overrides_runpath=no
4686 hardcode_into_libs=yes
4688 *) # from 4.6 on, and DragonFly
4689 shlibpath_overrides_runpath=yes
4690 hardcode_into_libs=yes
4699 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4700 soname_spec='${libname}${release}${shared_ext}$major'
4701 shlibpath_var=LD_LIBRARY_PATH
4702 hardcode_into_libs=yes
4705 hpux9* | hpux10* | hpux11*)
4706 # Give a soname corresponding to the major version so that dld.sl refuses to
4707 # link against other versions.
4714 hardcode_into_libs=yes
4715 dynamic_linker="$host_os dld.so"
4716 shlibpath_var=LD_LIBRARY_PATH
4717 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4719 soname_spec='${libname}${release}${shared_ext}$major'
4720 if test "X$HPUX_IA64_MODE" = X32; then
4721 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4723 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4725 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4729 hardcode_into_libs=yes
4730 dynamic_linker="$host_os dld.sl"
4731 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4732 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4733 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4734 soname_spec='${libname}${release}${shared_ext}$major'
4735 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4736 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4740 dynamic_linker="$host_os dld.sl"
4741 shlibpath_var=SHLIB_PATH
4742 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4744 soname_spec='${libname}${release}${shared_ext}$major'
4747 # HP-UX runs *really* slowly unless shared libraries are mode 555.
4748 postinstall_cmds='chmod 555 $lib'
4755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4756 soname_spec='${libname}${release}${shared_ext}$major'
4757 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4758 shlibpath_var=LD_LIBRARY_PATH
4759 shlibpath_overrides_runpath=no
4760 hardcode_into_libs=yes
4763 irix5* | irix6* | nonstopux*)
4765 nonstopux*) version_type=nonstopux ;;
4767 if test "$lt_cv_prog_gnu_ld" = yes; then
4775 soname_spec='${libname}${release}${shared_ext}$major'
4776 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4778 irix5* | nonstopux*)
4782 case $LD in # libtool.m4 will add one of these switches to LD
4783 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4784 libsuff= shlibsuff= libmagic=32-bit;;
4785 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4786 libsuff=32 shlibsuff=N32 libmagic=N32;;
4787 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4788 libsuff=64 shlibsuff=64 libmagic=64-bit;;
4789 *) libsuff= shlibsuff= libmagic=never-match;;
4793 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4794 shlibpath_overrides_runpath=no
4795 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4796 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4797 hardcode_into_libs=yes
4800 # No shared lib support for Linux oldld, aout, or coff.
4801 linux*oldld* | linux*aout* | linux*coff*)
4805 # This must be Linux ELF.
4806 linux* | k*bsd*-gnu)
4810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4811 soname_spec='${libname}${release}${shared_ext}$major'
4812 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4813 shlibpath_var=LD_LIBRARY_PATH
4814 shlibpath_overrides_runpath=no
4815 # Some binutils ld are patched to set DT_RUNPATH
4816 save_LDFLAGS=$LDFLAGS
4818 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4819 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4820 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4821 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4822 [shlibpath_overrides_runpath=yes])])
4823 LDFLAGS=$save_LDFLAGS
4826 # This implies no fast_install, which is unacceptable.
4827 # Some rework will be needed to allow for fast_install
4828 # before this can be enabled.
4829 hardcode_into_libs=yes
4831 # Append ld.so.conf contents to the search path
4832 if test -f /etc/ld.so.conf; then
4833 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;/^$/d' | tr '\n' ' '`
4834 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4837 # We used to test for /lib/ld.so.1 and disable shared libraries on
4838 # powerpc, because MkLinux only supported shared libraries with the
4839 # GNU dynamic linker. Since this was broken with cross compilers,
4840 # most powerpc-linux boxes support dynamic linking these days and
4841 # people can always --disable-shared, the test was removed, and we
4842 # assume the GNU/Linux dynamic linker is in use.
4843 dynamic_linker='GNU/Linux ld.so'
4850 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4851 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4852 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4853 dynamic_linker='NetBSD (a.out) ld.so'
4855 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4856 soname_spec='${libname}${release}${shared_ext}$major'
4857 dynamic_linker='NetBSD ld.elf_so'
4859 shlibpath_var=LD_LIBRARY_PATH
4860 shlibpath_overrides_runpath=yes
4861 hardcode_into_libs=yes
4866 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4867 shlibpath_var=LD_LIBRARY_PATH
4868 shlibpath_overrides_runpath=yes
4875 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4876 soname_spec='${libname}${release}${shared_ext}$major'
4877 shlibpath_var=LD_LIBRARY_PATH
4878 shlibpath_overrides_runpath=no
4879 hardcode_into_libs=yes
4880 dynamic_linker='ldqnx.so'
4885 sys_lib_dlsearch_path_spec="/usr/lib"
4887 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4889 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4890 *) need_version=no ;;
4892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4893 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4894 shlibpath_var=LD_LIBRARY_PATH
4895 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4897 openbsd2.[[89]] | openbsd2.[[89]].*)
4898 shlibpath_overrides_runpath=no
4901 shlibpath_overrides_runpath=yes
4905 shlibpath_overrides_runpath=yes
4910 libname_spec='$name'
4913 library_names_spec='$libname${shared_ext} $libname.a'
4914 dynamic_linker='OS/2 ld.exe'
4915 shlibpath_var=LIBPATH
4918 osf3* | osf4* | osf5*)
4922 soname_spec='${libname}${release}${shared_ext}$major'
4923 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4924 shlibpath_var=LD_LIBRARY_PATH
4925 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4926 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4937 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4938 soname_spec='${libname}${release}${shared_ext}$major'
4939 shlibpath_var=LD_LIBRARY_PATH
4940 shlibpath_overrides_runpath=yes
4941 hardcode_into_libs=yes
4942 # ldd complains unless libraries are executable
4943 postinstall_cmds='chmod +x $lib'
4948 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4949 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4950 shlibpath_var=LD_LIBRARY_PATH
4951 shlibpath_overrides_runpath=yes
4952 if test "$with_gnu_ld" = yes; then
4960 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4961 soname_spec='${libname}${release}${shared_ext}$major'
4962 shlibpath_var=LD_LIBRARY_PATH
4963 case $host_vendor in
4965 shlibpath_overrides_runpath=no
4967 runpath_var=LD_RUN_PATH
4975 shlibpath_overrides_runpath=no
4976 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4982 if test -d /usr/nec ;then
4984 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4985 soname_spec='$libname${shared_ext}.$major'
4986 shlibpath_var=LD_LIBRARY_PATH
4990 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4991 version_type=freebsd-elf
4994 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4995 soname_spec='${libname}${release}${shared_ext}$major'
4996 shlibpath_var=LD_LIBRARY_PATH
4997 shlibpath_overrides_runpath=yes
4998 hardcode_into_libs=yes
4999 if test "$with_gnu_ld" = yes; then
5000 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5002 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5005 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5009 sys_lib_dlsearch_path_spec='/usr/lib'
5013 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
5017 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5018 shlibpath_var=LD_LIBRARY_PATH
5019 shlibpath_overrides_runpath=no
5020 hardcode_into_libs=yes
5025 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5026 soname_spec='${libname}${release}${shared_ext}$major'
5027 shlibpath_var=LD_LIBRARY_PATH
5034 AC_MSG_RESULT([$dynamic_linker])
5035 test "$dynamic_linker" = no && can_build_shared=no
5037 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5038 if test "$GCC" = yes; then
5039 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5042 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5043 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5045 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5046 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5049 _LT_DECL([], [variables_saved_for_relink], [1],
5050 [Variables whose values should be saved in libtool wrapper scripts and
5051 restored at link time])
5052 _LT_DECL([], [need_lib_prefix], [0],
5053 [Do we need the "lib" prefix for modules?])
5054 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5055 _LT_DECL([], [version_type], [0], [Library versioning type])
5056 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
5057 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5058 _LT_DECL([], [shlibpath_overrides_runpath], [0],
5059 [Is shlibpath searched before the hard-coded library search path?])
5060 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5061 _LT_DECL([], [library_names_spec], [1],
5062 [[List of archive names. First name is the real one, the rest are links.
5063 The last name is the one that the linker finds with -lNAME]])
5064 _LT_DECL([], [soname_spec], [1],
5065 [[The coded name of the library, if different from the real name]])
5066 _LT_DECL([], [postinstall_cmds], [2],
5067 [Command to use after installation of a shared archive])
5068 _LT_DECL([], [postuninstall_cmds], [2],
5069 [Command to use after uninstallation of a shared archive])
5070 _LT_DECL([], [finish_cmds], [2],
5071 [Commands used to finish a libtool library installation in a directory])
5072 _LT_DECL([], [finish_eval], [1],
5073 [[As "finish_cmds", except a single script fragment to be evaled but
5075 _LT_DECL([], [hardcode_into_libs], [0],
5076 [Whether we should hardcode library paths into libraries])
5077 _LT_DECL([], [sys_lib_search_path_spec], [2],
5078 [Compile-time system search path for libraries])
5079 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5080 [Run-time system search path for libraries])
5081 ])# _LT_SYS_DYNAMIC_LINKER
5084 # _LT_PATH_TOOL_PREFIX(TOOL)
5085 # --------------------------
5086 # find a file program which can recognize shared library
5087 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5088 [m4_require([_LT_DECL_EGREP])dnl
5089 AC_MSG_CHECKING([for $1])
5090 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5092 [[\\/*] | ?:[\\/]*])
5093 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5096 lt_save_MAGIC_CMD="$MAGIC_CMD"
5097 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5098 dnl $ac_dummy forces splitting on constant user-supplied paths.
5099 dnl POSIX.2 word splitting is done only on the output of word expansions,
5100 dnl not every word. This closes a longstanding sh security hole.
5101 ac_dummy="m4_if([$2], , $PATH, [$2])"
5102 for ac_dir in $ac_dummy; do
5104 test -z "$ac_dir" && ac_dir=.
5105 if test -f $ac_dir/$1; then
5106 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5107 if test -n "$file_magic_test_file"; then
5108 case $deplibs_check_method in
5110 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5111 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5112 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5113 $EGREP "$file_magic_regex" > /dev/null; then
5118 *** Warning: the command libtool uses to detect shared libraries,
5119 *** $file_magic_cmd, produces output that libtool cannot recognize.
5120 *** The result is that libtool may fail to recognize shared libraries
5121 *** as such. This will affect the creation of libtool libraries that
5122 *** depend on shared libraries, but programs linked with such libtool
5123 *** libraries will work regardless of this problem. Nevertheless, you
5124 *** may want to report the problem to your system manager and/or to
5125 *** bug-libtool@gnu.org
5135 MAGIC_CMD="$lt_save_MAGIC_CMD"
5138 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5139 if test -n "$MAGIC_CMD"; then
5140 AC_MSG_RESULT($MAGIC_CMD)
5144 _LT_DECL([], [MAGIC_CMD], [0],
5145 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5146 ])# _LT_PATH_TOOL_PREFIX
5149 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5150 dnl aclocal-1.4 backwards compatibility:
5151 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5156 # find a file program which can recognize a shared library
5157 m4_defun([_LT_PATH_MAGIC],
5158 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5159 if test -z "$lt_cv_path_MAGIC_CMD"; then
5160 if test -n "$ac_tool_prefix"; then
5161 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5171 # find the pathname to the GNU or non-GNU linker
5172 AC_DEFUN([LT_PATH_LD],
5173 [AC_REQUIRE([AC_PROG_CC])dnl
5174 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5175 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5176 m4_require([_LT_DECL_SED])dnl
5177 m4_require([_LT_DECL_EGREP])dnl
5179 AC_ARG_WITH([gnu-ld],
5180 [AS_HELP_STRING([--with-gnu-ld],
5181 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
5182 [test "$withval" = no || with_gnu_ld=yes],
5183 [with_gnu_ld=no])dnl
5186 if test "$GCC" = yes; then
5187 # Check if gcc -print-prog-name=ld gives a path.
5188 AC_MSG_CHECKING([for ld used by $CC])
5191 # gcc leaves a trailing carriage return which upsets mingw
5192 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5194 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5197 # Accept absolute paths.
5198 [[\\/]]* | ?:[[\\/]]*)
5199 re_direlt='/[[^/]][[^/]]*/\.\./'
5200 # Canonicalize the pathname of ld
5201 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5202 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5203 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5205 test -z "$LD" && LD="$ac_prog"
5208 # If it fails, then pretend we aren't using GCC.
5212 # If it is relative, then search for the first ld in PATH.
5216 elif test "$with_gnu_ld" = yes; then
5217 AC_MSG_CHECKING([for GNU ld])
5219 AC_MSG_CHECKING([for non-GNU ld])
5221 AC_CACHE_VAL(lt_cv_path_LD,
5222 [if test -z "$LD"; then
5223 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5224 for ac_dir in $PATH; do
5226 test -z "$ac_dir" && ac_dir=.
5227 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5228 lt_cv_path_LD="$ac_dir/$ac_prog"
5229 # Check to see if the program is GNU ld. I'd rather use --version,
5230 # but apparently some variants of GNU ld only accept -v.
5231 # Break only if it was the GNU/non-GNU ld that we prefer.
5232 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5233 *GNU* | *'with BFD'*)
5234 test "$with_gnu_ld" != no && break
5237 test "$with_gnu_ld" != yes && break
5244 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5247 if test -n "$LD"; then
5252 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5256 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5260 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5261 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5262 dnl aclocal-1.4 backwards compatibility:
5263 dnl AC_DEFUN([AM_PROG_LD], [])
5264 dnl AC_DEFUN([AC_PROG_LD], [])
5269 m4_defun([_LT_PATH_LD_GNU],
5270 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5271 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5272 case `$LD -v 2>&1 </dev/null` in
5273 *GNU* | *'with BFD'*)
5274 lt_cv_prog_gnu_ld=yes
5277 lt_cv_prog_gnu_ld=no
5280 with_gnu_ld=$lt_cv_prog_gnu_ld
5286 # find reload flag for linker
5287 # -- PORTME Some linkers may need a different reload flag.
5288 m4_defun([_LT_CMD_RELOAD],
5289 [AC_CACHE_CHECK([for $LD option to reload object files],
5290 lt_cv_ld_reload_flag,
5291 [lt_cv_ld_reload_flag='-r'])
5292 reload_flag=$lt_cv_ld_reload_flag
5293 case $reload_flag in
5295 *) reload_flag=" $reload_flag" ;;
5297 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5300 if test "$GCC" = yes; then
5301 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5303 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5307 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5308 _LT_DECL([], [reload_cmds], [2])dnl
5312 # _LT_CHECK_MAGIC_METHOD
5313 # ----------------------
5314 # how to check for library dependencies
5315 # -- PORTME fill in with the dynamic library characteristics
5316 m4_defun([_LT_CHECK_MAGIC_METHOD],
5317 [m4_require([_LT_DECL_EGREP])
5318 m4_require([_LT_DECL_OBJDUMP])
5319 AC_CACHE_CHECK([how to recognize dependent libraries],
5320 lt_cv_deplibs_check_method,
5321 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5322 lt_cv_file_magic_test_file=
5323 lt_cv_deplibs_check_method='unknown'
5324 # Need to set the preceding variable on all platforms that support
5325 # interlibrary dependencies.
5326 # 'none' -- dependencies not supported.
5327 # `unknown' -- same as none, but documents that we really don't know.
5328 # 'pass_all' -- all dependencies passed with no checks.
5329 # 'test_compile' -- check by making test program.
5330 # 'file_magic [[regex]]' -- check by looking for files in library path
5331 # which responds to the $file_magic_cmd with a given extended regex.
5332 # If you have `file' or equivalent on your system and you're not sure
5333 # whether `pass_all' will *always* work, you probably want this one.
5337 lt_cv_deplibs_check_method=pass_all
5341 lt_cv_deplibs_check_method=pass_all
5345 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5346 lt_cv_file_magic_cmd='/usr/bin/file -L'
5347 lt_cv_file_magic_test_file=/shlib/libc.so
5351 # func_win32_libid is a shell function defined in ltmain.sh
5352 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5353 lt_cv_file_magic_cmd='func_win32_libid'
5357 # Base MSYS/MinGW do not provide the 'file' command needed by
5358 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5359 # unless we find 'file', for example because we are cross-compiling.
5360 if ( file / ) >/dev/null 2>&1; then
5361 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5362 lt_cv_file_magic_cmd='func_win32_libid'
5364 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5365 lt_cv_file_magic_cmd='$OBJDUMP -f'
5370 # use the weaker test based on 'objdump'. See mingw*.
5371 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5372 lt_cv_file_magic_cmd='$OBJDUMP -f'
5375 darwin* | rhapsody*)
5376 lt_cv_deplibs_check_method=pass_all
5379 freebsd* | dragonfly*)
5380 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5383 # Not sure whether the presence of OpenBSD here was a mistake.
5384 # Let's accept both of them until this is cleared up.
5385 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5386 lt_cv_file_magic_cmd=/usr/bin/file
5387 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5391 lt_cv_deplibs_check_method=pass_all
5396 lt_cv_deplibs_check_method=pass_all
5399 hpux10.20* | hpux11*)
5400 lt_cv_file_magic_cmd=/usr/bin/file
5403 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5404 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5407 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
5408 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5411 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5412 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5418 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5419 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5422 irix5* | irix6* | nonstopux*)
5424 *-32|*"-32 ") libmagic=32-bit;;
5425 *-n32|*"-n32 ") libmagic=N32;;
5426 *-64|*"-64 ") libmagic=64-bit;;
5427 *) libmagic=never-match;;
5429 lt_cv_deplibs_check_method=pass_all
5432 # This must be Linux ELF.
5433 linux* | k*bsd*-gnu)
5434 lt_cv_deplibs_check_method=pass_all
5438 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5439 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5441 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5446 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5447 lt_cv_file_magic_cmd=/usr/bin/file
5448 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5452 lt_cv_deplibs_check_method=pass_all
5456 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5457 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5459 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5463 osf3* | osf4* | osf5*)
5464 lt_cv_deplibs_check_method=pass_all
5468 lt_cv_deplibs_check_method=pass_all
5472 lt_cv_deplibs_check_method=pass_all
5475 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5476 lt_cv_deplibs_check_method=pass_all
5480 case $host_vendor in
5482 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]]'
5483 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5486 lt_cv_deplibs_check_method=pass_all
5489 lt_cv_file_magic_cmd='/bin/file'
5490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5493 lt_cv_file_magic_cmd='/bin/file'
5494 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5495 lt_cv_file_magic_test_file=/lib/libc.so
5498 lt_cv_deplibs_check_method=pass_all
5501 lt_cv_deplibs_check_method=pass_all
5507 lt_cv_deplibs_check_method=pass_all
5511 file_magic_cmd=$lt_cv_file_magic_cmd
5512 deplibs_check_method=$lt_cv_deplibs_check_method
5513 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5515 _LT_DECL([], [deplibs_check_method], [1],
5516 [Method to check whether dependent libraries are shared objects])
5517 _LT_DECL([], [file_magic_cmd], [1],
5518 [Command to use when deplibs_check_method == "file_magic"])
5519 ])# _LT_CHECK_MAGIC_METHOD
5524 # find the pathname to a BSD- or MS-compatible name lister
5525 AC_DEFUN([LT_PATH_NM],
5526 [AC_REQUIRE([AC_PROG_CC])dnl
5527 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5528 [if test -n "$NM"; then
5529 # Let the user override the test.
5532 lt_nm_to_check="${ac_tool_prefix}nm"
5533 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5534 lt_nm_to_check="$lt_nm_to_check nm"
5536 for lt_tmp_nm in $lt_nm_to_check; do
5537 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5538 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5540 test -z "$ac_dir" && ac_dir=.
5541 tmp_nm="$ac_dir/$lt_tmp_nm"
5542 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5543 # Check to see if the nm accepts a BSD-compat flag.
5544 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5545 # nm: unknown option "B" ignored
5546 # Tru64's nm complains that /dev/null is an invalid object file
5547 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5548 */dev/null* | *'Invalid file or object type'*)
5549 lt_cv_path_NM="$tmp_nm -B"
5553 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5555 lt_cv_path_NM="$tmp_nm -p"
5559 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5560 continue # so that we can try to find one that supports BSD flags
5569 : ${lt_cv_path_NM=no}
5571 if test "$lt_cv_path_NM" != "no"; then
5574 # Didn't find any BSD compatible name lister, look for dumpbin.
5575 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
5577 if test "$DUMPBIN" != ":"; then
5581 test -z "$NM" && NM=nm
5583 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5585 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5586 [lt_cv_nm_interface="BSD nm"
5587 echo "int some_variable = 0;" > conftest.$ac_ext
5588 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5589 (eval "$ac_compile" 2>conftest.err)
5590 cat conftest.err >&AS_MESSAGE_LOG_FD
5591 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5592 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5593 cat conftest.err >&AS_MESSAGE_LOG_FD
5594 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
5595 cat conftest.out >&AS_MESSAGE_LOG_FD
5596 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5597 lt_cv_nm_interface="MS dumpbin"
5603 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5604 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5605 dnl aclocal-1.4 backwards compatibility:
5606 dnl AC_DEFUN([AM_PROG_NM], [])
5607 dnl AC_DEFUN([AC_PROG_NM], [])
5612 # check for math library
5613 AC_DEFUN([LT_LIB_M],
5614 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5617 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5618 # These system don't have libm, or don't need it
5621 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5622 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5625 AC_CHECK_LIB(m, cos, LIBM="-lm")
5632 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5633 dnl aclocal-1.4 backwards compatibility:
5634 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5637 # _LT_COMPILER_NO_RTTI([TAGNAME])
5638 # -------------------------------
5639 m4_defun([_LT_COMPILER_NO_RTTI],
5640 [m4_require([_LT_TAG_COMPILER])dnl
5642 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5644 if test "$GCC" = yes; then
5645 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5647 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5648 lt_cv_prog_compiler_rtti_exceptions,
5649 [-fno-rtti -fno-exceptions], [],
5650 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5652 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5653 [Compiler flag to turn off builtin functions])
5654 ])# _LT_COMPILER_NO_RTTI
5657 # _LT_CMD_GLOBAL_SYMBOLS
5658 # ----------------------
5659 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5660 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5661 AC_REQUIRE([AC_PROG_CC])dnl
5662 AC_REQUIRE([LT_PATH_NM])dnl
5663 AC_REQUIRE([LT_PATH_LD])dnl
5664 m4_require([_LT_DECL_SED])dnl
5665 m4_require([_LT_DECL_EGREP])dnl
5666 m4_require([_LT_TAG_COMPILER])dnl
5668 # Check for command to grab the raw symbol name followed by C symbol from nm.
5669 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5670 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5672 # These are sane defaults that work on at least a few old systems.
5673 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5675 # Character class describing NM global symbol codes.
5676 symcode='[[BCDEGRST]]'
5678 # Regexp to match symbols that can be accessed directly from C.
5679 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5681 # Define system-specific variables.
5686 cygwin* | mingw* | pw32* | cegcc*)
5687 symcode='[[ABCDGISTW]]'
5690 if test "$host_cpu" = ia64; then
5691 symcode='[[ABCDEGRST]]'
5695 symcode='[[BCDEGRST]]'
5698 symcode='[[BCDEGQRST]]'
5709 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5713 symcode='[[DFNSTU]]'
5717 # If we're using GNU nm, then use its standard symbol codes.
5718 case `$NM -V 2>&1` in
5719 *GNU* | *'with BFD'*)
5720 symcode='[[ABCDGIRSTW]]' ;;
5723 # Transform an extracted symbol line into a proper C declaration.
5724 # Some systems (esp. on ia64) link data and code symbols differently,
5725 # so use this general approach.
5726 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5728 # Transform an extracted symbol line into symbol name and symbol address
5729 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5730 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'"
5732 # Handle CRLF in mingw tool chain
5736 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5740 # Try without a prefix underscore, then with it.
5741 for ac_symprfx in "" "_"; do
5743 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5744 symxfrm="\\1 $ac_symprfx\\2 \\2"
5746 # Write the raw and C identifiers.
5747 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5748 # Fake it for dumpbin and say T for any non-static function
5749 # and D for any global variable.
5750 # Also find C++ and __fastcall symbols from MSVC++,
5751 # which start with @ or ?.
5752 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5753 " {last_section=section; section=\$ 3};"\
5754 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5755 " \$ 0!~/External *\|/{next};"\
5756 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5757 " {if(hide[section]) next};"\
5758 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5759 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5760 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5761 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5762 " ' prfx=^$ac_symprfx]"
5764 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5767 # Check to see that the pipe works correctly.
5771 cat > conftest.$ac_ext <<_LT_EOF
5776 void nm_test_func(void);
5777 void nm_test_func(void){}
5781 int main(){nm_test_var='a';nm_test_func();return(0);}
5784 if AC_TRY_EVAL(ac_compile); then
5785 # Now try to grab the symbols.
5787 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5788 # Try sorting and uniquifying the output.
5789 if sort "$nlist" | uniq > "$nlist"T; then
5790 mv -f "$nlist"T "$nlist"
5795 # Make sure that we snagged all the symbols we need.
5796 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5797 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5798 cat <<_LT_EOF > conftest.$ac_ext
5804 # Now generate the symbol file.
5805 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5807 cat <<_LT_EOF >> conftest.$ac_ext
5809 /* The mapping between symbol names and symbols. */
5814 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5816 { "@PROGRAM@", (void *) 0 },
5818 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5819 cat <<\_LT_EOF >> conftest.$ac_ext
5823 /* This works around a problem in FreeBSD linker */
5824 #ifdef FREEBSD_WORKAROUND
5825 static const void *lt_preloaded_setup() {
5826 return lt__PROGRAM__LTX_preloaded_symbols;
5834 # Now try linking the two files.
5835 mv conftest.$ac_objext conftstm.$ac_objext
5836 lt_save_LIBS="$LIBS"
5837 lt_save_CFLAGS="$CFLAGS"
5838 LIBS="conftstm.$ac_objext"
5839 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5840 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5843 LIBS="$lt_save_LIBS"
5844 CFLAGS="$lt_save_CFLAGS"
5846 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5849 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5852 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5855 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5856 cat conftest.$ac_ext >&5
5858 rm -rf conftest* conftst*
5860 # Do not use the global_symbol_pipe unless it works.
5861 if test "$pipe_works" = yes; then
5864 lt_cv_sys_global_symbol_pipe=
5868 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5869 lt_cv_sys_global_symbol_to_cdecl=
5871 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5872 AC_MSG_RESULT(failed)
5877 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5878 [Take the output of nm and produce a listing of raw symbols and C names])
5879 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5880 [Transform the output of nm in a proper C declaration])
5881 _LT_DECL([global_symbol_to_c_name_address],
5882 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5883 [Transform the output of nm in a C name address pair])
5884 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5885 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5886 [Transform the output of nm in a C name address pair when lib prefix is needed])
5887 ]) # _LT_CMD_GLOBAL_SYMBOLS
5890 # _LT_COMPILER_PIC([TAGNAME])
5891 # ---------------------------
5892 m4_defun([_LT_COMPILER_PIC],
5893 [m4_require([_LT_TAG_COMPILER])dnl
5894 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5895 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5896 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5898 AC_MSG_CHECKING([for $compiler option to produce PIC])
5899 m4_if([$1], [CXX], [
5900 # C++ specific cases for pic, static, wl, etc.
5901 if test "$GXX" = yes; then
5902 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5903 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5907 # All AIX code is PIC.
5908 if test "$host_cpu" = ia64; then
5909 # AIX 5 now supports IA64 processor
5910 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5917 # see comment about AmigaOS4 .so support
5918 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5921 # FIXME: we need at least 68020 code to build shared libraries, but
5922 # adding the `-m68020' flag to GCC prevents building anything better,
5924 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5929 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5930 # PIC is the default for these OSes.
5932 mingw* | cygwin* | os2* | pw32* | cegcc*)
5933 # This hack is so that the source file can tell whether it is being
5934 # built for inclusion in a dll (and should export symbols for example).
5935 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5936 # (--disable-auto-import) libraries
5937 m4_if([$1], [GCJ], [],
5938 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5940 darwin* | rhapsody*)
5941 # PIC is the default on this platform
5942 # Common symbols not allowed in MH_DYLIB files
5943 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5946 # DJGPP does not support shared libraries at all
5947 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5950 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5951 # Instead, we relocate shared libraries at runtime.
5954 if test -d /usr/nec; then
5955 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5959 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5960 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5961 # sets the default TLS model and affects inlining.
5966 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5971 # QNX uses GNU C++, but need to define -shared option too, otherwise
5973 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5976 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5982 # All AIX code is PIC.
5983 if test "$host_cpu" = ia64; then
5984 # AIX 5 now supports IA64 processor
5985 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5987 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5991 case $cc_basename in
5993 # Green Hills C++ Compiler
5994 # _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"
5999 case $cc_basename in
6001 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6004 # Green Hills C++ Compiler
6005 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6011 freebsd* | dragonfly*)
6012 # FreeBSD uses GNU C++
6014 hpux9* | hpux10* | hpux11*)
6015 case $cc_basename in
6017 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6018 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6019 if test "$host_cpu" != ia64; then
6020 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6024 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6025 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6040 # This is c89, which is MS Visual C++ (no shared libs)
6041 # Anyone wants to do a port?
6043 irix5* | irix6* | nonstopux*)
6044 case $cc_basename in
6046 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6047 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6048 # CC pic flag -KPIC is the default.
6054 linux* | k*bsd*-gnu)
6055 case $cc_basename in
6058 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6059 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6062 # old Intel C++ for x86_64 which still supported -KPIC.
6063 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6064 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6065 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6068 # Intel C++, used to be incompatible with GCC.
6069 # ICC 10 doesn't accept -KPIC any more.
6070 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6071 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6072 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6075 # Portland Group C++ compiler
6076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6077 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6078 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6082 # Make sure the PIC flag is empty. It appears that all Alpha
6083 # Linux and Compaq Tru64 Unix objects are PIC.
6084 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6085 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6090 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6091 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6094 case `$CC -V 2>&1 | sed 5q` in
6097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6098 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6099 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6110 case $cc_basename in
6112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6121 # QNX uses GNU C++, but need to define -shared option too, otherwise
6123 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6125 osf3* | osf4* | osf5*)
6126 case $cc_basename in
6128 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6131 # Rational C++ 2.4.1
6132 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6135 # Digital/Compaq C++
6136 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6137 # Make sure the PIC flag is empty. It appears that all Alpha
6138 # Linux and Compaq Tru64 Unix objects are PIC.
6139 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6140 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6149 case $cc_basename in
6151 # Sun C++ 4.2, 5.x and Centerline C++
6152 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6153 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6154 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6157 # Green Hills C++ Compiler
6158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6165 case $cc_basename in
6168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6169 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6179 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6180 case $cc_basename in
6182 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6183 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6184 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6189 case $cc_basename in
6191 # NonStop-UX NCC 3.20
6192 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6201 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6207 if test "$GCC" = yes; then
6208 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6209 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6213 # All AIX code is PIC.
6214 if test "$host_cpu" = ia64; then
6215 # AIX 5 now supports IA64 processor
6216 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6223 # see comment about AmigaOS4 .so support
6224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6227 # FIXME: we need at least 68020 code to build shared libraries, but
6228 # adding the `-m68020' flag to GCC prevents building anything better,
6230 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6235 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6236 # PIC is the default for these OSes.
6239 mingw* | cygwin* | pw32* | os2* | cegcc*)
6240 # This hack is so that the source file can tell whether it is being
6241 # built for inclusion in a dll (and should export symbols for example).
6242 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6243 # (--disable-auto-import) libraries
6244 m4_if([$1], [GCJ], [],
6245 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6248 darwin* | rhapsody*)
6249 # PIC is the default on this platform
6250 # Common symbols not allowed in MH_DYLIB files
6251 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6255 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6256 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6257 # sets the default TLS model and affects inlining.
6263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6269 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6270 # Instead, we relocate shared libraries at runtime.
6274 # Just because we use GCC doesn't mean we suddenly get shared libraries
6275 # on systems that don't support them.
6276 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6281 # QNX uses GNU C++, but need to define -shared option too, otherwise
6283 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6287 if test -d /usr/nec; then
6288 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6293 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6297 # PORTME Check for flag to pass linker flags through the system compiler.
6300 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6301 if test "$host_cpu" = ia64; then
6302 # AIX 5 now supports IA64 processor
6303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6305 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6309 mingw* | cygwin* | pw32* | os2* | cegcc*)
6310 # This hack is so that the source file can tell whether it is being
6311 # built for inclusion in a dll (and should export symbols for example).
6312 m4_if([$1], [GCJ], [],
6313 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6316 hpux9* | hpux10* | hpux11*)
6317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6318 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6328 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6329 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6332 irix5* | irix6* | nonstopux*)
6333 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6334 # PIC (with -KPIC) is the default.
6335 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6338 linux* | k*bsd*-gnu)
6339 case $cc_basename in
6340 # old Intel for x86_64 which still supported -KPIC.
6342 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6343 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6344 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6346 # icc used to be incompatible with GCC.
6347 # ICC 10 doesn't accept -KPIC any more.
6349 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6351 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6353 # Lahey Fortran 8.1.
6355 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6356 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6357 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6359 pgcc* | pgf77* | pgf90* | pgf95*)
6360 # Portland Group compilers (*not* the Pentium gcc compiler,
6361 # which looks to be a dead project)
6362 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6363 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6364 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6368 # All Alpha code is PIC.
6369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6372 # IBM XL C 8.0/Fortran 10.1 on PPC
6373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6378 case `$CC -V 2>&1 | sed 5q` in
6381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6386 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6389 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6402 # QNX uses GNU C++, but need to define -shared option too, otherwise
6404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6407 osf3* | osf4* | osf5*)
6408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6409 # All OSF/1 code is PIC.
6410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6414 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6420 case $cc_basename in
6422 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6424 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6429 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6431 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6434 sysv4 | sysv4.2uw2* | sysv4.3*)
6435 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6436 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6437 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6441 if test -d /usr/nec ;then
6442 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6443 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6447 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6449 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6455 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6464 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6470 # For platforms which do not support PIC, -DPIC is meaningless:
6472 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6475 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6478 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6479 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6480 [How to pass a linker flag through the compiler])
6483 # Check to make sure the PIC flag actually works.
6485 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6486 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6487 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6488 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6489 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6491 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6493 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6494 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6496 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6497 [Additional compiler flags for building library objects])
6500 # Check to make sure the static flag actually works.
6502 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6503 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6504 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6505 $lt_tmp_static_flag,
6507 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6508 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6509 [Compiler flag to prevent dynamic linking])
6510 ])# _LT_COMPILER_PIC
6513 # _LT_LINKER_SHLIBS([TAGNAME])
6514 # ----------------------------
6515 # See if the linker supports building shared libraries.
6516 m4_defun([_LT_LINKER_SHLIBS],
6517 [AC_REQUIRE([LT_PATH_LD])dnl
6518 AC_REQUIRE([LT_PATH_NM])dnl
6519 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6520 m4_require([_LT_DECL_EGREP])dnl
6521 m4_require([_LT_DECL_SED])dnl
6522 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6523 m4_require([_LT_TAG_COMPILER])dnl
6524 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6525 m4_if([$1], [CXX], [
6526 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6529 # If we're using GNU nm, then we don't want the "-C" option.
6530 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6531 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6532 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6534 _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'
6538 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6540 cygwin* | mingw* | cegcc*)
6541 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6544 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6547 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6550 _LT_TAGVAR(allow_undefined_flag, $1)=
6551 _LT_TAGVAR(always_export_symbols, $1)=no
6552 _LT_TAGVAR(archive_cmds, $1)=
6553 _LT_TAGVAR(archive_expsym_cmds, $1)=
6554 _LT_TAGVAR(compiler_needs_object, $1)=no
6555 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6556 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6557 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6558 _LT_TAGVAR(hardcode_automatic, $1)=no
6559 _LT_TAGVAR(hardcode_direct, $1)=no
6560 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6561 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6562 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6563 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6564 _LT_TAGVAR(hardcode_minus_L, $1)=no
6565 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6566 _LT_TAGVAR(inherit_rpath, $1)=no
6567 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6568 _LT_TAGVAR(module_cmds, $1)=
6569 _LT_TAGVAR(module_expsym_cmds, $1)=
6570 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6571 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6572 _LT_TAGVAR(thread_safe_flag_spec, $1)=
6573 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6574 # include_expsyms should be a list of space-separated symbols to be *always*
6575 # included in the symbol list
6576 _LT_TAGVAR(include_expsyms, $1)=
6577 # exclude_expsyms can be an extended regexp of symbols to exclude
6578 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6579 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6580 # as well as any symbol that contains `d'.
6581 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6582 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6583 # platforms (ab)use it in PIC code, but their linkers get confused if
6584 # the symbol is explicitly referenced. Since portable code cannot
6585 # rely on this symbol name, it's probably fine to never include it in
6586 # preloaded symbol tables.
6587 # Exclude shared library initialization/finalization symbols.
6588 dnl Note also adjust exclude_expsyms for C++ above.
6589 extract_expsyms_cmds=
6592 cygwin* | mingw* | pw32* | cegcc*)
6593 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6594 # When not using gcc, we currently assume that we are using
6595 # Microsoft Visual C++.
6596 if test "$GCC" != yes; then
6601 # we just hope/assume this is gcc and not c89 (= MSVC++)
6609 _LT_TAGVAR(ld_shlibs, $1)=yes
6610 if test "$with_gnu_ld" = yes; then
6611 # If archive_cmds runs LD, not CC, wlarc should be empty
6614 # Set some defaults for GNU ld with shared library support. These
6615 # are reset later if shared libraries are not supported. Putting them
6616 # here allows them to be overridden if necessary.
6617 runpath_var=LD_RUN_PATH
6618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6619 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6620 # ancient GNU ld didn't support --whole-archive et. al.
6621 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6622 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6624 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6626 supports_anon_versioning=no
6627 case `$LD -v 2>&1` in
6628 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6629 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6630 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6631 *\ 2.11.*) ;; # other 2.11 versions
6632 *) supports_anon_versioning=yes ;;
6635 # See if GNU ld supports shared libraries.
6638 # On AIX/PPC, the GNU linker is very broken
6639 if test "$host_cpu" != ia64; then
6640 _LT_TAGVAR(ld_shlibs, $1)=no
6643 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6644 *** to be unable to reliably create shared libraries on AIX.
6645 *** Therefore, libtool is disabling shared libraries support. If you
6646 *** really care for shared libraries, you may want to modify your PATH
6647 *** so that a non-GNU linker is found, and then restart.
6656 # see comment about AmigaOS4 .so support
6657 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6658 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6661 _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)'
6662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6663 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6669 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6670 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6671 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6672 # support --undefined. This deserves some investigation. FIXME
6673 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6675 _LT_TAGVAR(ld_shlibs, $1)=no
6679 cygwin* | mingw* | pw32* | cegcc*)
6680 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6681 # as there is no search path for DLLs.
6682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6683 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6684 _LT_TAGVAR(always_export_symbols, $1)=no
6685 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6686 _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'
6688 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6689 _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'
6690 # If the export-symbols file already is a .def file (1st line
6691 # is EXPORTS), use it as is; otherwise, prepend...
6692 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6693 cp $export_symbols $output_objdir/$soname.def;
6695 echo EXPORTS > $output_objdir/$soname.def;
6696 cat $export_symbols >> $output_objdir/$soname.def;
6698 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6700 _LT_TAGVAR(ld_shlibs, $1)=no
6705 _LT_TAGVAR(hardcode_direct, $1)=no
6706 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6707 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6708 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6709 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6710 # Instead, shared libraries are loaded at an image base (0x10000000 by
6711 # default) and relocated if they conflict, which is a slow very memory
6712 # consuming and fragmenting process. To avoid this, we pick a random,
6713 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6714 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6715 _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'
6716 _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'
6719 gnu* | linux* | tpf* | k*bsd*-gnu)
6721 if test "$host_os" = linux-dietlibc; then
6722 case $cc_basename in
6723 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6726 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6727 && test "$tmp_diet" = no
6730 tmp_sharedflag='-shared'
6731 case $cc_basename,$host_cpu in
6732 pgcc*) # Portland Group C compiler
6733 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6734 tmp_addflag=' $pic_flag'
6736 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6737 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6738 tmp_addflag=' $pic_flag -Mnomain' ;;
6739 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6740 tmp_addflag=' -i_dynamic' ;;
6741 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6742 tmp_addflag=' -i_dynamic -nofor_main' ;;
6743 ifc* | ifort*) # Intel Fortran compiler
6744 tmp_addflag=' -nofor_main' ;;
6745 lf95*) # Lahey Fortran 8.1
6746 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6747 tmp_sharedflag='--shared' ;;
6748 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6749 tmp_sharedflag='-qmkshrobj'
6752 case `$CC -V 2>&1 | sed 5q` in
6753 *Sun\ C*) # Sun C 5.9
6754 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6755 _LT_TAGVAR(compiler_needs_object, $1)=yes
6756 tmp_sharedflag='-G' ;;
6757 *Sun\ F*) # Sun Fortran 8.3
6758 tmp_sharedflag='-G' ;;
6760 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6762 if test "x$supports_anon_versioning" = xyes; then
6763 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6764 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6765 echo "local: *; };" >> $output_objdir/$libname.ver~
6766 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6769 case $cc_basename in
6771 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6772 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6773 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6774 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6775 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6776 if test "x$supports_anon_versioning" = xyes; then
6777 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6778 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6779 echo "local: *; };" >> $output_objdir/$libname.ver~
6780 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6785 _LT_TAGVAR(ld_shlibs, $1)=no
6790 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6791 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6795 _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'
6800 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6801 _LT_TAGVAR(ld_shlibs, $1)=no
6804 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6805 *** create shared libraries on Solaris systems. Therefore, libtool
6806 *** is disabling shared libraries support. We urge you to upgrade GNU
6807 *** binutils to release 2.9.1 or newer. Another option is to modify
6808 *** your PATH or compiler configuration so that the native linker is
6809 *** used, and then restart.
6812 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6813 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6814 _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'
6816 _LT_TAGVAR(ld_shlibs, $1)=no
6820 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6821 case `$LD -v 2>&1` in
6822 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6823 _LT_TAGVAR(ld_shlibs, $1)=no
6826 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6827 *** reliably create shared libraries on SCO systems. Therefore, libtool
6828 *** is disabling shared libraries support. We urge you to upgrade GNU
6829 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6830 *** your PATH or compiler configuration so that the native linker is
6831 *** used, and then restart.
6836 # For security reasons, it is highly recommended that you always
6837 # use absolute paths for naming shared libraries, and exclude the
6838 # DT_RUNPATH tag from executables and libraries. But doing so
6839 # requires that you compile everything twice, which is a pain.
6840 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6841 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6843 _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'
6845 _LT_TAGVAR(ld_shlibs, $1)=no
6852 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6854 _LT_TAGVAR(hardcode_direct, $1)=yes
6855 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6859 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6860 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6861 _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'
6863 _LT_TAGVAR(ld_shlibs, $1)=no
6868 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6870 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6871 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6872 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6875 # PORTME fill in a description of your system's linker (not GNU ld)
6878 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6879 _LT_TAGVAR(always_export_symbols, $1)=yes
6880 _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'
6881 # Note: this linker hardcodes the directories in LIBPATH if there
6882 # are no directories specified by -L.
6883 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6884 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6885 # Neither direct hardcoding nor static linking is supported with a
6887 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6892 if test "$host_cpu" = ia64; then
6893 # On IA64, the linker does run time linking by default, so we don't
6894 # have to do anything special.
6895 aix_use_runtimelinking=no
6896 exp_sym_flag='-Bexport'
6899 # If we're using GNU nm, then we don't want the "-C" option.
6900 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6901 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6902 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6904 _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'
6906 aix_use_runtimelinking=no
6908 # Test if we are trying to use run time linking or normal
6909 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6910 # need to do runtime linking.
6911 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6912 for ld_flag in $LDFLAGS; do
6913 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6914 aix_use_runtimelinking=yes
6921 exp_sym_flag='-bexport'
6922 no_entry_flag='-bnoentry'
6925 # When large executables or shared objects are built, AIX ld can
6926 # have problems creating the table of contents. If linking a library
6927 # or program results in "error TOC overflow" add -mminimal-toc to
6928 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6929 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6931 _LT_TAGVAR(archive_cmds, $1)=''
6932 _LT_TAGVAR(hardcode_direct, $1)=yes
6933 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6934 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6935 _LT_TAGVAR(link_all_deplibs, $1)=yes
6936 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6938 if test "$GCC" = yes; then
6939 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6940 # We only want to do this on AIX 4.2 and lower, the check
6941 # below for broken collect2 doesn't work under 4.3+
6942 collect2name=`${CC} -print-prog-name=collect2`
6943 if test -f "$collect2name" &&
6944 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6946 # We have reworked collect2
6949 # We have old collect2
6950 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6951 # It fails to find uninstalled libraries when the uninstalled
6952 # path is not listed in the libpath. Setting hardcode_minus_L
6953 # to unsupported forces relinking
6954 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6955 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6956 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6960 shared_flag='-shared'
6961 if test "$aix_use_runtimelinking" = yes; then
6962 shared_flag="$shared_flag "'${wl}-G'
6966 if test "$host_cpu" = ia64; then
6967 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6968 # chokes on -Wl,-G. The following line is correct:
6971 if test "$aix_use_runtimelinking" = yes; then
6972 shared_flag='${wl}-G'
6974 shared_flag='${wl}-bM:SRE'
6979 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6980 # It seems that -bexpall does not export symbols beginning with
6981 # underscore (_), so it is better to generate a list of symbols to export.
6982 _LT_TAGVAR(always_export_symbols, $1)=yes
6983 if test "$aix_use_runtimelinking" = yes; then
6984 # Warning - without using the other runtime loading flags (-brtl),
6985 # -berok will link without error, but may produce a broken library.
6986 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6987 # Determine the default libpath from the value encoded in an
6989 _LT_SYS_MODULE_PATH_AIX
6990 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6991 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6993 if test "$host_cpu" = ia64; then
6994 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6995 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6996 _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"
6998 # Determine the default libpath from the value encoded in an
7000 _LT_SYS_MODULE_PATH_AIX
7001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7002 # Warning - without using the other run time loading flags,
7003 # -berok will link without error, but may produce a broken library.
7004 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7005 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7006 # Exported symbols can be pulled into shared objects from archives
7007 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7008 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7009 # This is similar to how AIX traditionally builds its shared libraries.
7010 _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'
7018 # see comment about AmigaOS4 .so support
7019 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7020 _LT_TAGVAR(archive_expsym_cmds, $1)=''
7023 _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)'
7024 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7025 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7031 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7034 cygwin* | mingw* | pw32* | cegcc*)
7035 # When not using gcc, we currently assume that we are using
7036 # Microsoft Visual C++.
7037 # hardcode_libdir_flag_spec is actually meaningless, as there is
7038 # no search path for DLLs.
7039 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7040 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7041 # Tell ltmain to make .lib files, not .a files.
7043 # Tell ltmain to make .dll files, not .so files.
7045 # FIXME: Setting linknames here is a bad hack.
7046 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
7047 # The linker will automatically build a .lib file if we build a DLL.
7048 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7049 # FIXME: Should let the user specify the lib program.
7050 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7051 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7052 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7055 darwin* | rhapsody*)
7056 _LT_DARWIN_LINKER_FEATURES($1)
7060 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7062 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7066 _LT_TAGVAR(ld_shlibs, $1)=no
7069 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7070 # support. Future versions do this automatically, but an explicit c++rt0.o
7071 # does not break anything, and helps significantly (at the cost of a little
7074 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7076 _LT_TAGVAR(hardcode_direct, $1)=yes
7077 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7080 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7082 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7083 _LT_TAGVAR(hardcode_direct, $1)=yes
7084 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7085 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7088 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7089 freebsd* | dragonfly*)
7090 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7091 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7092 _LT_TAGVAR(hardcode_direct, $1)=yes
7093 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7097 if test "$GCC" = yes; then
7098 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7100 _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'
7102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7103 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7104 _LT_TAGVAR(hardcode_direct, $1)=yes
7106 # hardcode_minus_L: Not really in the search PATH,
7107 # but as the default location of the library.
7108 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7109 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7113 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7114 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7116 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7118 if test "$with_gnu_ld" = no; then
7119 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7120 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7121 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7122 _LT_TAGVAR(hardcode_direct, $1)=yes
7123 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7124 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7125 # hardcode_minus_L: Not really in the search PATH,
7126 # but as the default location of the library.
7127 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7132 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7135 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7147 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7150 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7153 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7157 if test "$with_gnu_ld" = no; then
7158 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7159 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7163 _LT_TAGVAR(hardcode_direct, $1)=no
7164 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7167 _LT_TAGVAR(hardcode_direct, $1)=yes
7168 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7169 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7171 # hardcode_minus_L: Not really in the search PATH,
7172 # but as the default location of the library.
7173 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7179 irix5* | irix6* | nonstopux*)
7180 if test "$GCC" = yes; then
7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7182 # Try to use the -exported_symbol ld option, if it does not
7183 # work, assume that -exports_file does not work either and
7184 # implicitly export all symbols.
7185 save_LDFLAGS="$LDFLAGS"
7186 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7187 AC_LINK_IFELSE(int foo(void) {},
7188 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7190 LDFLAGS="$save_LDFLAGS"
7192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7193 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7195 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7197 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7198 _LT_TAGVAR(inherit_rpath, $1)=yes
7199 _LT_TAGVAR(link_all_deplibs, $1)=yes
7203 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7204 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7206 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7208 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7209 _LT_TAGVAR(hardcode_direct, $1)=yes
7210 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7214 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7215 _LT_TAGVAR(hardcode_direct, $1)=yes
7216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7217 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7218 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7225 if test -f /usr/libexec/ld.so; then
7226 _LT_TAGVAR(hardcode_direct, $1)=yes
7227 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7228 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7229 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7230 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7231 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7233 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7236 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7237 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7241 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7247 _LT_TAGVAR(ld_shlibs, $1)=no
7252 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7253 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7254 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7255 _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'
7256 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7260 if test "$GCC" = yes; then
7261 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7262 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7264 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7267 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7269 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7272 osf4* | osf5*) # as osf3* with the addition of -msym flag
7273 if test "$GCC" = yes; then
7274 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7275 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7278 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7279 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7280 _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~
7281 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7283 # Both c and cxx compiler support -rpath directly
7284 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7286 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7287 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7291 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7292 if test "$GCC" = yes; then
7294 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7295 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7296 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7298 case `$CC -V 2>&1` in
7301 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7302 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7303 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7307 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7308 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7309 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7313 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7314 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7316 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7318 # The compiler driver will combine and reorder linker options,
7319 # but understands `-z linker_flag'. GCC discards it without `$wl',
7320 # but is careful enough not to reorder.
7321 # Supported since Solaris 2.6 (maybe 2.5.1?)
7322 if test "$GCC" = yes; then
7323 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7325 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7329 _LT_TAGVAR(link_all_deplibs, $1)=yes
7333 if test "x$host_vendor" = xsequent; then
7334 # Use $CC to link under sequent, because it throws in some extra .o
7335 # files that make .init and .fini sections work.
7336 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7338 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7340 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7341 _LT_TAGVAR(hardcode_direct, $1)=yes
7342 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7343 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7347 case $host_vendor in
7349 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7350 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7353 ## LD is ld it makes a PLAMLIB
7354 ## CC just makes a GrossModule.
7355 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7356 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7357 _LT_TAGVAR(hardcode_direct, $1)=no
7360 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7361 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7364 runpath_var='LD_RUN_PATH'
7365 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7369 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7370 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7371 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7375 if test -d /usr/nec; then
7376 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7377 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7378 runpath_var=LD_RUN_PATH
7379 hardcode_runpath_var=yes
7380 _LT_TAGVAR(ld_shlibs, $1)=yes
7384 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7385 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7386 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7387 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7388 runpath_var='LD_RUN_PATH'
7390 if test "$GCC" = yes; then
7391 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7392 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7394 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7395 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7399 sysv5* | sco3.2v5* | sco5v6*)
7400 # Note: We can NOT use -z defs as we might desire, because we do not
7401 # link with -lc, and that would cause any symbols used from libc to
7402 # always be unresolved, which means just about no library would
7403 # ever link correctly. If we're not using GNU ld we use -z text
7404 # though, which does catch some bad symbols but isn't as heavy-handed
7406 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7407 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7408 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7409 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7411 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7412 _LT_TAGVAR(link_all_deplibs, $1)=yes
7413 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7414 runpath_var='LD_RUN_PATH'
7416 if test "$GCC" = yes; then
7417 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7418 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7420 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7421 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7426 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7427 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7428 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7432 _LT_TAGVAR(ld_shlibs, $1)=no
7436 if test x$host_vendor = xsni; then
7438 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7439 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7445 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7446 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7448 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7450 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7451 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7452 _LT_DECL([], [extract_expsyms_cmds], [2],
7453 [The commands to extract the exported symbol list from a shared archive])
7456 # Do we need to explicitly link libc?
7458 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7460 # Assume -lc should be added
7461 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7463 if test "$enable_shared" = yes && test "$GCC" = yes; then
7464 case $_LT_TAGVAR(archive_cmds, $1) in
7466 # FIXME: we may have to deal with multi-command sequences.
7469 # Test whether the compiler implicitly links with -lc since on some
7470 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7471 # to ld, don't add -lc before -lgcc.
7472 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7474 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7476 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7479 libobjs=conftest.$ac_objext
7481 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7482 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7488 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7489 _LT_TAGVAR(allow_undefined_flag, $1)=
7490 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7492 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7494 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7496 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7498 cat conftest.err 1>&5
7501 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7508 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7509 [Whether or not to add -lc for building shared libraries])
7510 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7511 [enable_shared_with_static_runtimes], [0],
7512 [Whether or not to disallow shared libs when runtime libs are static])
7513 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7514 [Compiler flag to allow reflexive dlopens])
7515 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7516 [Compiler flag to generate shared objects directly from archives])
7517 _LT_TAGDECL([], [compiler_needs_object], [1],
7518 [Whether the compiler copes with passing no objects directly])
7519 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7520 [Create an old-style archive from a shared archive])
7521 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7522 [Create a temporary old-style archive to link instead of a shared archive])
7523 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7524 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7525 _LT_TAGDECL([], [module_cmds], [2],
7526 [Commands used to build a loadable module if different from building
7528 _LT_TAGDECL([], [module_expsym_cmds], [2])
7529 _LT_TAGDECL([], [with_gnu_ld], [1],
7530 [Whether we are building with GNU ld or not])
7531 _LT_TAGDECL([], [allow_undefined_flag], [1],
7532 [Flag that allows shared libraries with undefined symbols to be built])
7533 _LT_TAGDECL([], [no_undefined_flag], [1],
7534 [Flag that enforces no undefined symbols])
7535 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7536 [Flag to hardcode $libdir into a binary during linking.
7537 This must work even if $libdir does not exist])
7538 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7539 [[If ld is used when linking, flag to hardcode $libdir into a binary
7540 during linking. This must work even if $libdir does not exist]])
7541 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7542 [Whether we need a single "-rpath" flag with a separated argument])
7543 _LT_TAGDECL([], [hardcode_direct], [0],
7544 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7545 DIR into the resulting binary])
7546 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7547 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7548 DIR into the resulting binary and the resulting library dependency is
7549 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7550 library is relocated])
7551 _LT_TAGDECL([], [hardcode_minus_L], [0],
7552 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7553 into the resulting binary])
7554 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7555 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7556 into the resulting binary])
7557 _LT_TAGDECL([], [hardcode_automatic], [0],
7558 [Set to "yes" if building a shared library automatically hardcodes DIR
7559 into the library and all subsequent libraries and executables linked
7561 _LT_TAGDECL([], [inherit_rpath], [0],
7562 [Set to yes if linker adds runtime paths of dependent libraries
7563 to runtime path list])
7564 _LT_TAGDECL([], [link_all_deplibs], [0],
7565 [Whether libtool must link a program against all its dependency libraries])
7566 _LT_TAGDECL([], [fix_srcfile_path], [1],
7567 [Fix the shell variable $srcfile for the compiler])
7568 _LT_TAGDECL([], [always_export_symbols], [0],
7569 [Set to "yes" if exported symbols are required])
7570 _LT_TAGDECL([], [export_symbols_cmds], [2],
7571 [The commands to list exported symbols])
7572 _LT_TAGDECL([], [exclude_expsyms], [1],
7573 [Symbols that should not be listed in the preloaded symbols])
7574 _LT_TAGDECL([], [include_expsyms], [1],
7575 [Symbols that must always be exported])
7576 _LT_TAGDECL([], [prelink_cmds], [2],
7577 [Commands necessary for linking programs (against libraries) with templates])
7578 _LT_TAGDECL([], [file_list_spec], [1],
7579 [Specify filename containing input files])
7580 dnl FIXME: Not yet implemented
7581 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7582 dnl [Compiler flag to generate thread safe objects])
7583 ])# _LT_LINKER_SHLIBS
7586 # _LT_LANG_C_CONFIG([TAG])
7587 # ------------------------
7588 # Ensure that the configuration variables for a C compiler are suitably
7589 # defined. These variables are subsequently used by _LT_CONFIG to write
7590 # the compiler configuration to `libtool'.
7591 m4_defun([_LT_LANG_C_CONFIG],
7592 [m4_require([_LT_DECL_EGREP])dnl
7596 # Source file extension for C test sources.
7599 # Object file extension for compiled C test sources.
7601 _LT_TAGVAR(objext, $1)=$objext
7603 # Code to be used in simple compile tests
7604 lt_simple_compile_test_code="int some_variable = 0;"
7606 # Code to be used in simple link tests
7607 lt_simple_link_test_code='int main(){return(0);}'
7610 # Save the default compiler, since it gets overwritten when the other
7611 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7612 compiler_DEFAULT=$CC
7614 # save warnings/boilerplate of simple test code
7615 _LT_COMPILER_BOILERPLATE
7616 _LT_LINKER_BOILERPLATE
7618 if test -n "$compiler"; then
7619 _LT_COMPILER_NO_RTTI($1)
7620 _LT_COMPILER_PIC($1)
7621 _LT_COMPILER_C_O($1)
7622 _LT_COMPILER_FILE_LOCKS($1)
7623 _LT_LINKER_SHLIBS($1)
7624 _LT_SYS_DYNAMIC_LINKER($1)
7625 _LT_LINKER_HARDCODE_LIBPATH($1)
7629 # Report which library types will actually be built
7630 AC_MSG_CHECKING([if libtool supports shared libraries])
7631 AC_MSG_RESULT([$can_build_shared])
7633 AC_MSG_CHECKING([whether to build shared libraries])
7634 test "$can_build_shared" = "no" && enable_shared=no
7636 # On AIX, shared libraries and static libraries use the same namespace, and
7637 # are all built from PIC.
7640 test "$enable_shared" = yes && enable_static=no
7641 if test -n "$RANLIB"; then
7642 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7643 postinstall_cmds='$RANLIB $lib'
7648 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7649 test "$enable_shared" = yes && enable_static=no
7653 AC_MSG_RESULT([$enable_shared])
7655 AC_MSG_CHECKING([whether to build static libraries])
7656 # Make sure either enable_shared or enable_static is yes.
7657 test "$enable_shared" = yes || enable_static=yes
7658 AC_MSG_RESULT([$enable_static])
7664 ])# _LT_LANG_C_CONFIG
7669 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7670 # compiler, we have our own version here.
7671 m4_defun([_LT_PROG_CXX],
7673 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7675 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7676 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7677 (test "X$CXX" != "Xg++"))) ; then
7680 _lt_caught_CXX_error=yes
7682 popdef([AC_MSG_ERROR])
7685 dnl aclocal-1.4 backwards compatibility:
7686 dnl AC_DEFUN([_LT_PROG_CXX], [])
7689 # _LT_LANG_CXX_CONFIG([TAG])
7690 # --------------------------
7691 # Ensure that the configuration variables for a C++ compiler are suitably
7692 # defined. These variables are subsequently used by _LT_CONFIG to write
7693 # the compiler configuration to `libtool'.
7694 m4_defun([_LT_LANG_CXX_CONFIG],
7695 [AC_REQUIRE([_LT_PROG_CXX])dnl
7696 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7697 m4_require([_LT_DECL_EGREP])dnl
7700 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7701 _LT_TAGVAR(allow_undefined_flag, $1)=
7702 _LT_TAGVAR(always_export_symbols, $1)=no
7703 _LT_TAGVAR(archive_expsym_cmds, $1)=
7704 _LT_TAGVAR(compiler_needs_object, $1)=no
7705 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7706 _LT_TAGVAR(hardcode_direct, $1)=no
7707 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7709 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7710 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7711 _LT_TAGVAR(hardcode_minus_L, $1)=no
7712 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7713 _LT_TAGVAR(hardcode_automatic, $1)=no
7714 _LT_TAGVAR(inherit_rpath, $1)=no
7715 _LT_TAGVAR(module_cmds, $1)=
7716 _LT_TAGVAR(module_expsym_cmds, $1)=
7717 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7718 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7719 _LT_TAGVAR(no_undefined_flag, $1)=
7720 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7721 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7723 # Source file extension for C++ test sources.
7726 # Object file extension for compiled C++ test sources.
7728 _LT_TAGVAR(objext, $1)=$objext
7730 # No sense in running all these tests if we already determined that
7731 # the CXX compiler isn't working. Some variables (like enable_shared)
7732 # are currently assumed to apply to all compilers on this platform,
7733 # and will be corrupted by setting them based on a non-working compiler.
7734 if test "$_lt_caught_CXX_error" != yes; then
7735 # Code to be used in simple compile tests
7736 lt_simple_compile_test_code="int some_variable = 0;"
7738 # Code to be used in simple link tests
7739 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7741 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7744 # save warnings/boilerplate of simple test code
7745 _LT_COMPILER_BOILERPLATE
7746 _LT_LINKER_BOILERPLATE
7748 # Allow CC to be a program name with arguments.
7753 lt_save_with_gnu_ld=$with_gnu_ld
7754 lt_save_path_LD=$lt_cv_path_LD
7755 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7756 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7758 $as_unset lt_cv_prog_gnu_ld
7760 if test -n "${lt_cv_path_LDCXX+set}"; then
7761 lt_cv_path_LD=$lt_cv_path_LDCXX
7763 $as_unset lt_cv_path_LD
7765 test -z "${LDCXX+set}" || LD=$LDCXX
7768 _LT_TAGVAR(compiler, $1)=$CC
7769 _LT_CC_BASENAME([$compiler])
7771 if test -n "$compiler"; then
7772 # We don't want -fno-exception when compiling C++ code, so set the
7773 # no_builtin_flag separately
7774 if test "$GXX" = yes; then
7775 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7777 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7780 if test "$GXX" = yes; then
7781 # Set up default GNU C++ configuration
7785 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7786 # archiving commands below assume that GNU ld is being used.
7787 if test "$with_gnu_ld" = yes; then
7788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7789 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7791 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7792 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7794 # If archive_cmds runs LD, not CC, wlarc should be empty
7795 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7796 # investigate it a little bit more. (MM)
7799 # ancient GNU ld didn't support --whole-archive et. al.
7800 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7801 $GREP 'no-whole-archive' > /dev/null; then
7802 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7804 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7810 # A generic and very simple default shared library creation
7811 # command for GNU C++ for the case where it uses the native
7812 # linker, instead of GNU ld. If possible, this setting should
7813 # overridden to take advantage of the native linker features on
7814 # the platform it is being used on.
7815 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7818 # Commands to make compiler produce verbose output that lists
7819 # what "hidden" libraries, object files and flags are used when
7820 # linking a shared library.
7821 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7829 # PORTME: fill in a description of your system's C++ link characteristics
7830 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7831 _LT_TAGVAR(ld_shlibs, $1)=yes
7834 # FIXME: insert proper C++ library support
7835 _LT_TAGVAR(ld_shlibs, $1)=no
7838 if test "$host_cpu" = ia64; then
7839 # On IA64, the linker does run time linking by default, so we don't
7840 # have to do anything special.
7841 aix_use_runtimelinking=no
7842 exp_sym_flag='-Bexport'
7845 aix_use_runtimelinking=no
7847 # Test if we are trying to use run time linking or normal
7848 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7849 # need to do runtime linking.
7850 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7851 for ld_flag in $LDFLAGS; do
7854 aix_use_runtimelinking=yes
7862 exp_sym_flag='-bexport'
7863 no_entry_flag='-bnoentry'
7866 # When large executables or shared objects are built, AIX ld can
7867 # have problems creating the table of contents. If linking a library
7868 # or program results in "error TOC overflow" add -mminimal-toc to
7869 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7870 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7872 _LT_TAGVAR(archive_cmds, $1)=''
7873 _LT_TAGVAR(hardcode_direct, $1)=yes
7874 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7875 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7876 _LT_TAGVAR(link_all_deplibs, $1)=yes
7877 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7879 if test "$GXX" = yes; then
7880 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7881 # We only want to do this on AIX 4.2 and lower, the check
7882 # below for broken collect2 doesn't work under 4.3+
7883 collect2name=`${CC} -print-prog-name=collect2`
7884 if test -f "$collect2name" &&
7885 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7887 # We have reworked collect2
7890 # We have old collect2
7891 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7892 # It fails to find uninstalled libraries when the uninstalled
7893 # path is not listed in the libpath. Setting hardcode_minus_L
7894 # to unsupported forces relinking
7895 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7896 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7897 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7900 shared_flag='-shared'
7901 if test "$aix_use_runtimelinking" = yes; then
7902 shared_flag="$shared_flag "'${wl}-G'
7906 if test "$host_cpu" = ia64; then
7907 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7908 # chokes on -Wl,-G. The following line is correct:
7911 if test "$aix_use_runtimelinking" = yes; then
7912 shared_flag='${wl}-G'
7914 shared_flag='${wl}-bM:SRE'
7919 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7920 # It seems that -bexpall does not export symbols beginning with
7921 # underscore (_), so it is better to generate a list of symbols to
7923 _LT_TAGVAR(always_export_symbols, $1)=yes
7924 if test "$aix_use_runtimelinking" = yes; then
7925 # Warning - without using the other runtime loading flags (-brtl),
7926 # -berok will link without error, but may produce a broken library.
7927 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7928 # Determine the default libpath from the value encoded in an empty
7930 _LT_SYS_MODULE_PATH_AIX
7931 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7933 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7935 if test "$host_cpu" = ia64; then
7936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7937 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7938 _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"
7940 # Determine the default libpath from the value encoded in an
7942 _LT_SYS_MODULE_PATH_AIX
7943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7944 # Warning - without using the other run time loading flags,
7945 # -berok will link without error, but may produce a broken library.
7946 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7947 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7948 # Exported symbols can be pulled into shared objects from archives
7949 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7950 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7951 # This is similar to how AIX traditionally builds its shared
7953 _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'
7959 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7960 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7961 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7962 # support --undefined. This deserves some investigation. FIXME
7963 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7965 _LT_TAGVAR(ld_shlibs, $1)=no
7970 case $cc_basename in
7972 # FIXME: insert proper C++ library support
7973 _LT_TAGVAR(ld_shlibs, $1)=no
7978 cygwin* | mingw* | pw32* | cegcc*)
7979 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7980 # as there is no search path for DLLs.
7981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7982 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7983 _LT_TAGVAR(always_export_symbols, $1)=no
7984 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7986 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7987 _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'
7988 # If the export-symbols file already is a .def file (1st line
7989 # is EXPORTS), use it as is; otherwise, prepend...
7990 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7991 cp $export_symbols $output_objdir/$soname.def;
7993 echo EXPORTS > $output_objdir/$soname.def;
7994 cat $export_symbols >> $output_objdir/$soname.def;
7996 $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'
7998 _LT_TAGVAR(ld_shlibs, $1)=no
8001 darwin* | rhapsody*)
8002 _LT_DARWIN_LINKER_FEATURES($1)
8006 case $cc_basename in
8008 # FIXME: insert proper C++ library support
8009 _LT_TAGVAR(ld_shlibs, $1)=no
8012 # Green Hills C++ Compiler
8013 # FIXME: insert proper C++ library support
8014 _LT_TAGVAR(ld_shlibs, $1)=no
8017 # FIXME: insert proper C++ library support
8018 _LT_TAGVAR(ld_shlibs, $1)=no
8024 # C++ shared libraries reported to be fairly broken before
8026 _LT_TAGVAR(ld_shlibs, $1)=no
8030 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8033 freebsd* | dragonfly*)
8034 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8036 _LT_TAGVAR(ld_shlibs, $1)=yes
8043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8044 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8045 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8046 _LT_TAGVAR(hardcode_direct, $1)=yes
8047 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8048 # but as the default
8049 # location of the library.
8051 case $cc_basename in
8053 # FIXME: insert proper C++ library support
8054 _LT_TAGVAR(ld_shlibs, $1)=no
8057 _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'
8058 # Commands to make compiler produce verbose output that lists
8059 # what "hidden" libraries, object files and flags are used when
8060 # linking a shared library.
8062 # There doesn't appear to be a way to prevent this compiler from
8063 # explicitly linking system object files so we need to strip them
8064 # from the output so that they don't get included in the library
8066 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8069 if test "$GXX" = yes; then
8070 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8072 # FIXME: insert proper C++ library support
8073 _LT_TAGVAR(ld_shlibs, $1)=no
8080 if test $with_gnu_ld = no; then
8081 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8082 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8088 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8094 _LT_TAGVAR(hardcode_direct, $1)=no
8095 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8098 _LT_TAGVAR(hardcode_direct, $1)=yes
8099 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8100 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8101 # but as the default
8102 # location of the library.
8106 case $cc_basename in
8108 # FIXME: insert proper C++ library support
8109 _LT_TAGVAR(ld_shlibs, $1)=no
8114 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8117 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8120 _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'
8123 # Commands to make compiler produce verbose output that lists
8124 # what "hidden" libraries, object files and flags are used when
8125 # linking a shared library.
8127 # There doesn't appear to be a way to prevent this compiler from
8128 # explicitly linking system object files so we need to strip them
8129 # from the output so that they don't get included in the library
8131 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8134 if test "$GXX" = yes; then
8135 if test $with_gnu_ld = no; then
8138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8144 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8149 # FIXME: insert proper C++ library support
8150 _LT_TAGVAR(ld_shlibs, $1)=no
8157 _LT_TAGVAR(hardcode_direct, $1)=no
8158 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8159 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8160 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8161 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8162 # Instead, shared libraries are loaded at an image base (0x10000000 by
8163 # default) and relocated if they conflict, which is a slow very memory
8164 # consuming and fragmenting process. To avoid this, we pick a random,
8165 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8166 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8167 _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'
8168 _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'
8171 case $cc_basename in
8174 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8176 # Archives containing C++ object files must be created using
8177 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8178 # necessary to make sure instantiated templates are included
8180 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8183 if test "$GXX" = yes; then
8184 if test "$with_gnu_ld" = no; then
8185 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8187 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
8190 _LT_TAGVAR(link_all_deplibs, $1)=yes
8193 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8194 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8195 _LT_TAGVAR(inherit_rpath, $1)=yes
8198 linux* | k*bsd*-gnu)
8199 case $cc_basename in
8201 # Kuck and Associates, Inc. (KAI) C++ Compiler
8203 # KCC will only create a shared library if the output file
8204 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8205 # to its proper name (with version) after linking.
8206 _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'
8207 _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'
8208 # Commands to make compiler produce verbose output that lists
8209 # what "hidden" libraries, object files and flags are used when
8210 # linking a shared library.
8212 # There doesn't appear to be a way to prevent this compiler from
8213 # explicitly linking system object files so we need to strip them
8214 # from the output so that they don't get included in the library
8216 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8219 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8221 # Archives containing C++ object files must be created using
8222 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8223 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8228 # version 8.0 and above of icpc choke on multiply defined symbols
8229 # if we add $predep_objects and $postdep_objects, however 7.1 and
8230 # earlier do not add the objects themselves.
8231 case `$CC -V 2>&1` in
8233 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8234 _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'
8236 *) # Version 8.0 or newer
8239 ia64*) tmp_idyn=' -i_dynamic';;
8241 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8242 _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'
8245 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8246 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8247 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8248 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8251 # Portland Group C++ compiler
8253 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
8254 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8256 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8257 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
8258 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8260 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8261 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
8263 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8265 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8266 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8267 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8269 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8270 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8272 *) # Version 6 will use weak symbols
8273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8274 _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'
8278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8279 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8280 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8284 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8285 _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'
8287 runpath_var=LD_RUN_PATH
8288 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8289 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8291 # Commands to make compiler produce verbose output that lists
8292 # what "hidden" libraries, object files and flags are used when
8293 # linking a shared library.
8295 # There doesn't appear to be a way to prevent this compiler from
8296 # explicitly linking system object files so we need to strip them
8297 # from the output so that they don't get included in the library
8299 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8302 # IBM XL 8.0 on PPC, with GNU ld
8303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8304 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8305 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8306 if test "x$supports_anon_versioning" = xyes; then
8307 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8308 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8309 echo "local: *; };" >> $output_objdir/$libname.ver~
8310 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8314 case `$CC -V 2>&1 | sed 5q` in
8317 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8318 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8319 _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'
8320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8321 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8322 _LT_TAGVAR(compiler_needs_object, $1)=yes
8324 # Not sure whether something based on
8325 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8327 output_verbose_link_cmd='echo'
8329 # Archives containing C++ object files must be created using
8330 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8331 # necessary to make sure instantiated templates are included
8333 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8341 # FIXME: insert proper C++ library support
8342 _LT_TAGVAR(ld_shlibs, $1)=no
8346 # FIXME: insert proper C++ library support
8347 _LT_TAGVAR(ld_shlibs, $1)=no
8351 case $cc_basename in
8353 # FIXME: insert proper C++ library support
8354 _LT_TAGVAR(ld_shlibs, $1)=no
8357 # FIXME: insert proper C++ library support
8358 _LT_TAGVAR(ld_shlibs, $1)=no
8364 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8365 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8368 _LT_TAGVAR(hardcode_direct, $1)=yes
8369 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8371 # Workaround some broken pre-1.5 toolchains
8372 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8376 _LT_TAGVAR(ld_shlibs, $1)=yes
8380 # C++ shared libraries are fairly broken
8381 _LT_TAGVAR(ld_shlibs, $1)=no
8385 if test -f /usr/libexec/ld.so; then
8386 _LT_TAGVAR(hardcode_direct, $1)=yes
8387 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8388 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8389 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8391 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8392 _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'
8393 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8394 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8396 output_verbose_link_cmd=echo
8398 _LT_TAGVAR(ld_shlibs, $1)=no
8402 osf3* | osf4* | osf5*)
8403 case $cc_basename in
8405 # Kuck and Associates, Inc. (KAI) C++ Compiler
8407 # KCC will only create a shared library if the output file
8408 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8409 # to its proper name (with version) after linking.
8410 _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'
8412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8413 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8415 # Archives containing C++ object files must be created using
8416 # the KAI C++ compiler.
8418 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8419 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8423 # Rational C++ 2.4.1
8424 # FIXME: insert proper C++ library support
8425 _LT_TAGVAR(ld_shlibs, $1)=no
8430 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8431 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8432 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8435 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8437 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8438 echo "-hidden">> $lib.exp~
8439 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
8441 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8445 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8447 # Commands to make compiler produce verbose output that lists
8448 # what "hidden" libraries, object files and flags are used when
8449 # linking a shared library.
8451 # There doesn't appear to be a way to prevent this compiler from
8452 # explicitly linking system object files so we need to strip them
8453 # from the output so that they don't get included in the library
8455 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8458 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8459 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8462 _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8465 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8470 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8472 # Commands to make compiler produce verbose output that lists
8473 # what "hidden" libraries, object files and flags are used when
8474 # linking a shared library.
8475 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8478 # FIXME: insert proper C++ library support
8479 _LT_TAGVAR(ld_shlibs, $1)=no
8486 # FIXME: insert proper C++ library support
8487 _LT_TAGVAR(ld_shlibs, $1)=no
8491 case $cc_basename in
8494 # FIXME: insert proper C++ library support
8495 _LT_TAGVAR(ld_shlibs, $1)=no
8499 # FIXME: insert proper C++ library support
8500 _LT_TAGVAR(ld_shlibs, $1)=no
8503 # FIXME: insert proper C++ library support
8504 _LT_TAGVAR(ld_shlibs, $1)=no
8510 case $cc_basename in
8512 # Sun C++ 4.2, 5.x and Centerline C++
8513 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8514 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8515 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8516 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8517 $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'
8519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8520 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8522 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8524 # The compiler driver will combine and reorder linker options,
8525 # but understands `-z linker_flag'.
8526 # Supported since Solaris 2.6 (maybe 2.5.1?)
8527 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8530 _LT_TAGVAR(link_all_deplibs, $1)=yes
8532 output_verbose_link_cmd='echo'
8534 # Archives containing C++ object files must be created using
8535 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8536 # necessary to make sure instantiated templates are included
8538 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8541 # Green Hills C++ Compiler
8542 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8544 # The C++ compiler must be used to create the archive.
8545 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8548 # GNU C++ compiler with Solaris linker
8549 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8550 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8551 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8552 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8553 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8554 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8556 # Commands to make compiler produce verbose output that lists
8557 # what "hidden" libraries, object files and flags are used when
8558 # linking a shared library.
8559 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8561 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8563 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8564 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8565 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8567 # Commands to make compiler produce verbose output that lists
8568 # what "hidden" libraries, object files and flags are used when
8569 # linking a shared library.
8570 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8573 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8575 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8577 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8585 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8586 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8587 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8588 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8589 runpath_var='LD_RUN_PATH'
8591 case $cc_basename in
8593 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8594 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8597 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8598 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8603 sysv5* | sco3.2v5* | sco5v6*)
8604 # Note: We can NOT use -z defs as we might desire, because we do not
8605 # link with -lc, and that would cause any symbols used from libc to
8606 # always be unresolved, which means just about no library would
8607 # ever link correctly. If we're not using GNU ld we use -z text
8608 # though, which does catch some bad symbols but isn't as heavy-handed
8610 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8611 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8612 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8613 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8614 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8615 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8616 _LT_TAGVAR(link_all_deplibs, $1)=yes
8617 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8618 runpath_var='LD_RUN_PATH'
8620 case $cc_basename in
8622 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8623 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8626 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8627 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8633 case $cc_basename in
8635 # NonStop-UX NCC 3.20
8636 # FIXME: insert proper C++ library support
8637 _LT_TAGVAR(ld_shlibs, $1)=no
8640 # FIXME: insert proper C++ library support
8641 _LT_TAGVAR(ld_shlibs, $1)=no
8647 # FIXME: insert proper C++ library support
8648 _LT_TAGVAR(ld_shlibs, $1)=no
8652 # FIXME: insert proper C++ library support
8653 _LT_TAGVAR(ld_shlibs, $1)=no
8657 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8658 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8660 _LT_TAGVAR(GCC, $1)="$GXX"
8661 _LT_TAGVAR(LD, $1)="$LD"
8664 ## There is no encapsulation within the following macros, do not change
8665 ## the running order or otherwise move them around unless you know exactly
8666 ## what you are doing...
8667 _LT_SYS_HIDDEN_LIBDEPS($1)
8668 _LT_COMPILER_PIC($1)
8669 _LT_COMPILER_C_O($1)
8670 _LT_COMPILER_FILE_LOCKS($1)
8671 _LT_LINKER_SHLIBS($1)
8672 _LT_SYS_DYNAMIC_LINKER($1)
8673 _LT_LINKER_HARDCODE_LIBPATH($1)
8676 fi # test -n "$compiler"
8682 with_gnu_ld=$lt_save_with_gnu_ld
8683 lt_cv_path_LDCXX=$lt_cv_path_LD
8684 lt_cv_path_LD=$lt_save_path_LD
8685 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8686 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8687 fi # test "$_lt_caught_CXX_error" != yes
8690 ])# _LT_LANG_CXX_CONFIG
8693 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8694 # ---------------------------------
8695 # Figure out "hidden" library dependencies from verbose
8696 # compiler output when linking a shared library.
8697 # Parse the compiler output and extract the necessary
8698 # objects, libraries and library flags.
8699 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8700 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8701 # Dependencies to place before and after the object being linked:
8702 _LT_TAGVAR(predep_objects, $1)=
8703 _LT_TAGVAR(postdep_objects, $1)=
8704 _LT_TAGVAR(predeps, $1)=
8705 _LT_TAGVAR(postdeps, $1)=
8706 _LT_TAGVAR(compiler_lib_search_path, $1)=
8708 dnl we can't use the lt_simple_compile_test_code here,
8709 dnl because it contains code intended for an executable,
8710 dnl not a library. It's possible we should let each
8711 dnl tag define a new lt_????_link_test_code variable,
8712 dnl but it's only used here...
8713 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8715 void foo (void) { a = 0; }
8717 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8721 Foo (void) { a = 0; }
8726 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8734 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8742 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8745 public void bar (void) {
8751 dnl Parse the compiler output and extract the necessary
8752 dnl objects, libraries and library flags.
8753 if AC_TRY_EVAL(ac_compile); then
8754 # Parse the compiler output and extract the necessary
8755 # objects, libraries and library flags.
8757 # Sentinel used to keep track of whether or not we are before
8758 # the conftest object file.
8759 pre_test_object_deps_done=no
8761 for p in `eval "$output_verbose_link_cmd"`; do
8765 # Some compilers place space between "-{L,R}" and the path.
8767 if test $p = "-L" ||
8768 test $p = "-R"; then
8775 if test "$pre_test_object_deps_done" = no; then
8778 # Internal compiler library paths should come after those
8779 # provided the user. The postdeps already come after the
8780 # user supplied libs so there is no need to process them.
8781 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8782 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8784 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8787 # The "-l" case would never come before the object being
8788 # linked, so don't bother handling this case.
8791 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8792 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8794 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8800 # This assumes that the test object file only shows up
8801 # once in the compiler output.
8802 if test "$p" = "conftest.$objext"; then
8803 pre_test_object_deps_done=yes
8807 if test "$pre_test_object_deps_done" = no; then
8808 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8809 _LT_TAGVAR(predep_objects, $1)="$p"
8811 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8814 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8815 _LT_TAGVAR(postdep_objects, $1)="$p"
8817 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8822 *) ;; # Ignore the rest.
8830 echo "libtool.m4: error: problem compiling $1 test program"
8833 $RM -f confest.$objext
8835 # PORTME: override above test on systems where it is broken
8839 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8840 # hack all around it, let's just trust "g++" to DTRT.
8841 _LT_TAGVAR(predep_objects,$1)=
8842 _LT_TAGVAR(postdep_objects,$1)=
8843 _LT_TAGVAR(postdeps,$1)=
8847 case `$CC -V 2>&1 | sed 5q` in
8851 # The more standards-conforming stlport4 library is
8852 # incompatible with the Cstd library. Avoid specifying
8853 # it if it's in CXXFLAGS. Ignore libCrun as
8854 # -library=stlport4 depends on it.
8855 case " $CXX $CXXFLAGS " in
8856 *" -library=stlport4 "*)
8857 solaris_use_stlport4=yes
8861 if test "$solaris_use_stlport4" != yes; then
8862 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8869 case $cc_basename in
8871 # The more standards-conforming stlport4 library is
8872 # incompatible with the Cstd library. Avoid specifying
8873 # it if it's in CXXFLAGS. Ignore libCrun as
8874 # -library=stlport4 depends on it.
8875 case " $CXX $CXXFLAGS " in
8876 *" -library=stlport4 "*)
8877 solaris_use_stlport4=yes
8881 # Adding this requires a known-good setup of shared libraries for
8882 # Sun compiler versions before 5.6, else PIC objects from an old
8883 # archive will be linked into the output, leading to subtle bugs.
8884 if test "$solaris_use_stlport4" != yes; then
8885 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8893 case " $_LT_TAGVAR(postdeps, $1) " in
8894 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8896 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8897 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8898 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8900 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8901 [The directories searched by this compiler when creating a shared library])
8902 _LT_TAGDECL([], [predep_objects], [1],
8903 [Dependencies to place before and after the objects being linked to
8904 create a shared library])
8905 _LT_TAGDECL([], [postdep_objects], [1])
8906 _LT_TAGDECL([], [predeps], [1])
8907 _LT_TAGDECL([], [postdeps], [1])
8908 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8909 [The library search path used internally by the compiler when linking
8911 ])# _LT_SYS_HIDDEN_LIBDEPS
8916 # Since AC_PROG_F77 is broken, in that it returns the empty string
8917 # if there is no fortran compiler, we have our own version here.
8918 m4_defun([_LT_PROG_F77],
8920 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8922 if test -z "$F77" || test "X$F77" = "Xno"; then
8925 popdef([AC_MSG_ERROR])
8928 dnl aclocal-1.4 backwards compatibility:
8929 dnl AC_DEFUN([_LT_PROG_F77], [])
8932 # _LT_LANG_F77_CONFIG([TAG])
8933 # --------------------------
8934 # Ensure that the configuration variables for a Fortran 77 compiler are
8935 # suitably defined. These variables are subsequently used by _LT_CONFIG
8936 # to write the compiler configuration to `libtool'.
8937 m4_defun([_LT_LANG_F77_CONFIG],
8938 [AC_REQUIRE([_LT_PROG_F77])dnl
8939 AC_LANG_PUSH(Fortran 77)
8941 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8942 _LT_TAGVAR(allow_undefined_flag, $1)=
8943 _LT_TAGVAR(always_export_symbols, $1)=no
8944 _LT_TAGVAR(archive_expsym_cmds, $1)=
8945 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8946 _LT_TAGVAR(hardcode_direct, $1)=no
8947 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8949 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8950 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8951 _LT_TAGVAR(hardcode_minus_L, $1)=no
8952 _LT_TAGVAR(hardcode_automatic, $1)=no
8953 _LT_TAGVAR(inherit_rpath, $1)=no
8954 _LT_TAGVAR(module_cmds, $1)=
8955 _LT_TAGVAR(module_expsym_cmds, $1)=
8956 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8957 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8958 _LT_TAGVAR(no_undefined_flag, $1)=
8959 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8960 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8962 # Source file extension for f77 test sources.
8965 # Object file extension for compiled f77 test sources.
8967 _LT_TAGVAR(objext, $1)=$objext
8969 # No sense in running all these tests if we already determined that
8970 # the F77 compiler isn't working. Some variables (like enable_shared)
8971 # are currently assumed to apply to all compilers on this platform,
8972 # and will be corrupted by setting them based on a non-working compiler.
8973 if test "$_lt_disable_F77" != yes; then
8974 # Code to be used in simple compile tests
8975 lt_simple_compile_test_code="\
8981 # Code to be used in simple link tests
8982 lt_simple_link_test_code="\
8987 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8990 # save warnings/boilerplate of simple test code
8991 _LT_COMPILER_BOILERPLATE
8992 _LT_LINKER_BOILERPLATE
8994 # Allow CC to be a program name with arguments.
8999 _LT_TAGVAR(compiler, $1)=$CC
9000 _LT_CC_BASENAME([$compiler])
9002 if test -n "$compiler"; then
9003 AC_MSG_CHECKING([if libtool supports shared libraries])
9004 AC_MSG_RESULT([$can_build_shared])
9006 AC_MSG_CHECKING([whether to build shared libraries])
9007 test "$can_build_shared" = "no" && enable_shared=no
9009 # On AIX, shared libraries and static libraries use the same namespace, and
9010 # are all built from PIC.
9013 test "$enable_shared" = yes && enable_static=no
9014 if test -n "$RANLIB"; then
9015 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9016 postinstall_cmds='$RANLIB $lib'
9020 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9021 test "$enable_shared" = yes && enable_static=no
9025 AC_MSG_RESULT([$enable_shared])
9027 AC_MSG_CHECKING([whether to build static libraries])
9028 # Make sure either enable_shared or enable_static is yes.
9029 test "$enable_shared" = yes || enable_static=yes
9030 AC_MSG_RESULT([$enable_static])
9032 _LT_TAGVAR(GCC, $1)="$G77"
9033 _LT_TAGVAR(LD, $1)="$LD"
9036 ## There is no encapsulation within the following macros, do not change
9037 ## the running order or otherwise move them around unless you know exactly
9038 ## what you are doing...
9039 _LT_COMPILER_PIC($1)
9040 _LT_COMPILER_C_O($1)
9041 _LT_COMPILER_FILE_LOCKS($1)
9042 _LT_LINKER_SHLIBS($1)
9043 _LT_SYS_DYNAMIC_LINKER($1)
9044 _LT_LINKER_HARDCODE_LIBPATH($1)
9047 fi # test -n "$compiler"
9051 fi # test "$_lt_disable_F77" != yes
9054 ])# _LT_LANG_F77_CONFIG
9059 # Since AC_PROG_FC is broken, in that it returns the empty string
9060 # if there is no fortran compiler, we have our own version here.
9061 m4_defun([_LT_PROG_FC],
9063 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
9065 if test -z "$FC" || test "X$FC" = "Xno"; then
9068 popdef([AC_MSG_ERROR])
9071 dnl aclocal-1.4 backwards compatibility:
9072 dnl AC_DEFUN([_LT_PROG_FC], [])
9075 # _LT_LANG_FC_CONFIG([TAG])
9076 # -------------------------
9077 # Ensure that the configuration variables for a Fortran compiler are
9078 # suitably defined. These variables are subsequently used by _LT_CONFIG
9079 # to write the compiler configuration to `libtool'.
9080 m4_defun([_LT_LANG_FC_CONFIG],
9081 [AC_REQUIRE([_LT_PROG_FC])dnl
9082 AC_LANG_PUSH(Fortran)
9084 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9085 _LT_TAGVAR(allow_undefined_flag, $1)=
9086 _LT_TAGVAR(always_export_symbols, $1)=no
9087 _LT_TAGVAR(archive_expsym_cmds, $1)=
9088 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9089 _LT_TAGVAR(hardcode_direct, $1)=no
9090 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9091 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9092 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9093 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9094 _LT_TAGVAR(hardcode_minus_L, $1)=no
9095 _LT_TAGVAR(hardcode_automatic, $1)=no
9096 _LT_TAGVAR(inherit_rpath, $1)=no
9097 _LT_TAGVAR(module_cmds, $1)=
9098 _LT_TAGVAR(module_expsym_cmds, $1)=
9099 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9100 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9101 _LT_TAGVAR(no_undefined_flag, $1)=
9102 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9103 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9105 # Source file extension for fc test sources.
9106 ac_ext=${ac_fc_srcext-f}
9108 # Object file extension for compiled fc test sources.
9110 _LT_TAGVAR(objext, $1)=$objext
9112 # No sense in running all these tests if we already determined that
9113 # the FC compiler isn't working. Some variables (like enable_shared)
9114 # are currently assumed to apply to all compilers on this platform,
9115 # and will be corrupted by setting them based on a non-working compiler.
9116 if test "$_lt_disable_FC" != yes; then
9117 # Code to be used in simple compile tests
9118 lt_simple_compile_test_code="\
9124 # Code to be used in simple link tests
9125 lt_simple_link_test_code="\
9130 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9133 # save warnings/boilerplate of simple test code
9134 _LT_COMPILER_BOILERPLATE
9135 _LT_LINKER_BOILERPLATE
9137 # Allow CC to be a program name with arguments.
9142 GCC=$ac_cv_fc_compiler_gnu
9144 _LT_TAGVAR(compiler, $1)=$CC
9145 _LT_CC_BASENAME([$compiler])
9147 if test -n "$compiler"; then
9148 AC_MSG_CHECKING([if libtool supports shared libraries])
9149 AC_MSG_RESULT([$can_build_shared])
9151 AC_MSG_CHECKING([whether to build shared libraries])
9152 test "$can_build_shared" = "no" && enable_shared=no
9154 # On AIX, shared libraries and static libraries use the same namespace, and
9155 # are all built from PIC.
9158 test "$enable_shared" = yes && enable_static=no
9159 if test -n "$RANLIB"; then
9160 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9161 postinstall_cmds='$RANLIB $lib'
9165 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9166 test "$enable_shared" = yes && enable_static=no
9170 AC_MSG_RESULT([$enable_shared])
9172 AC_MSG_CHECKING([whether to build static libraries])
9173 # Make sure either enable_shared or enable_static is yes.
9174 test "$enable_shared" = yes || enable_static=yes
9175 AC_MSG_RESULT([$enable_static])
9177 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9178 _LT_TAGVAR(LD, $1)="$LD"
9181 ## There is no encapsulation within the following macros, do not change
9182 ## the running order or otherwise move them around unless you know exactly
9183 ## what you are doing...
9184 _LT_SYS_HIDDEN_LIBDEPS($1)
9185 _LT_COMPILER_PIC($1)
9186 _LT_COMPILER_C_O($1)
9187 _LT_COMPILER_FILE_LOCKS($1)
9188 _LT_LINKER_SHLIBS($1)
9189 _LT_SYS_DYNAMIC_LINKER($1)
9190 _LT_LINKER_HARDCODE_LIBPATH($1)
9193 fi # test -n "$compiler"
9197 fi # test "$_lt_disable_FC" != yes
9200 ])# _LT_LANG_FC_CONFIG
9203 # _LT_LANG_GCJ_CONFIG([TAG])
9204 # --------------------------
9205 # Ensure that the configuration variables for the GNU Java Compiler compiler
9206 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9207 # to write the compiler configuration to `libtool'.
9208 m4_defun([_LT_LANG_GCJ_CONFIG],
9209 [AC_REQUIRE([LT_PROG_GCJ])dnl
9212 # Source file extension for Java test sources.
9215 # Object file extension for compiled Java test sources.
9217 _LT_TAGVAR(objext, $1)=$objext
9219 # Code to be used in simple compile tests
9220 lt_simple_compile_test_code="class foo {}"
9222 # Code to be used in simple link tests
9223 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9225 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9228 # save warnings/boilerplate of simple test code
9229 _LT_COMPILER_BOILERPLATE
9230 _LT_LINKER_BOILERPLATE
9232 # Allow CC to be a program name with arguments.
9238 _LT_TAGVAR(compiler, $1)=$CC
9239 _LT_TAGVAR(LD, $1)="$LD"
9240 _LT_CC_BASENAME([$compiler])
9242 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9243 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9245 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9247 if test -n "$compiler"; then
9248 _LT_COMPILER_NO_RTTI($1)
9249 _LT_COMPILER_PIC($1)
9250 _LT_COMPILER_C_O($1)
9251 _LT_COMPILER_FILE_LOCKS($1)
9252 _LT_LINKER_SHLIBS($1)
9253 _LT_LINKER_HARDCODE_LIBPATH($1)
9262 ])# _LT_LANG_GCJ_CONFIG
9265 # _LT_LANG_RC_CONFIG([TAG])
9266 # -------------------------
9267 # Ensure that the configuration variables for the Windows resource compiler
9268 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9269 # to write the compiler configuration to `libtool'.
9270 m4_defun([_LT_LANG_RC_CONFIG],
9271 [AC_REQUIRE([LT_PROG_RC])dnl
9274 # Source file extension for RC test sources.
9277 # Object file extension for compiled RC test sources.
9279 _LT_TAGVAR(objext, $1)=$objext
9281 # Code to be used in simple compile tests
9282 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9284 # Code to be used in simple link tests
9285 lt_simple_link_test_code="$lt_simple_compile_test_code"
9287 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9290 # save warnings/boilerplate of simple test code
9291 _LT_COMPILER_BOILERPLATE
9292 _LT_LINKER_BOILERPLATE
9294 # Allow CC to be a program name with arguments.
9300 _LT_TAGVAR(compiler, $1)=$CC
9301 _LT_CC_BASENAME([$compiler])
9302 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9304 if test -n "$compiler"; then
9312 ])# _LT_LANG_RC_CONFIG
9317 AC_DEFUN([LT_PROG_GCJ],
9318 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9319 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9320 [AC_CHECK_TOOL(GCJ, gcj,)
9321 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9322 AC_SUBST(GCJFLAGS)])])[]dnl
9326 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9327 dnl aclocal-1.4 backwards compatibility:
9328 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9333 AC_DEFUN([LT_PROG_RC],
9334 [AC_CHECK_TOOL(RC, windres,)
9338 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9339 dnl aclocal-1.4 backwards compatibility:
9340 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9345 # If we don't have a new enough Autoconf to choose the best grep
9346 # available, choose the one first in the user's PATH.
9347 m4_defun([_LT_DECL_EGREP],
9348 [AC_REQUIRE([AC_PROG_EGREP])dnl
9349 AC_REQUIRE([AC_PROG_FGREP])dnl
9350 test -z "$GREP" && GREP=grep
9351 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9352 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9353 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9354 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9361 # If we don't have a new enough Autoconf to choose the best objdump
9362 # available, choose the one first in the user's PATH.
9363 m4_defun([_LT_DECL_OBJDUMP],
9364 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9365 test -z "$OBJDUMP" && OBJDUMP=objdump
9366 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9373 # Check for a fully-functional sed program, that truncates
9374 # as few characters as possible. Prefer GNU sed if found.
9375 m4_defun([_LT_DECL_SED],
9377 test -z "$SED" && SED=sed
9378 Xsed="$SED -e 1s/^X//"
9379 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9380 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9381 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9384 m4_ifndef([AC_PROG_SED], [
9385 # NOTE: This macro has been submitted for inclusion into #
9386 # GNU Autoconf as AC_PROG_SED. When it is available in #
9387 # a released version of Autoconf we should remove this #
9388 # macro and use it instead. #
9390 m4_defun([AC_PROG_SED],
9391 [AC_MSG_CHECKING([for a sed that does not truncate output])
9392 AC_CACHE_VAL(lt_cv_path_SED,
9393 [# Loop through the user's path and test for sed and gsed.
9394 # Then use that list of sed's as ones to test for truncation.
9395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9399 test -z "$as_dir" && as_dir=.
9400 for lt_ac_prog in sed gsed; do
9401 for ac_exec_ext in '' $ac_executable_extensions; do
9402 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9403 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9411 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9412 # along with /bin/sed that truncates output.
9413 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9414 test ! -f $lt_ac_sed && continue
9415 cat /dev/null > conftest.in
9417 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9418 # Check for GNU sed and select it if it is found.
9419 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9420 lt_cv_path_SED=$lt_ac_sed
9424 cat conftest.in conftest.in >conftest.tmp
9425 mv conftest.tmp conftest.in
9426 cp conftest.in conftest.nl
9428 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9429 cmp -s conftest.out conftest.nl || break
9430 # 10000 chars as input seems more than enough
9431 test $lt_ac_count -gt 10 && break
9432 lt_ac_count=`expr $lt_ac_count + 1`
9433 if test $lt_ac_count -gt $lt_ac_max; then
9434 lt_ac_max=$lt_ac_count
9435 lt_cv_path_SED=$lt_ac_sed
9442 AC_MSG_RESULT([$SED])
9447 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9448 dnl aclocal-1.4 backwards compatibility:
9449 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9452 # _LT_CHECK_SHELL_FEATURES
9453 # ------------------------
9454 # Find out whether the shell is Bourne or XSI compatible,
9455 # or has some other useful features.
9456 m4_defun([_LT_CHECK_SHELL_FEATURES],
9457 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9458 # Try some XSI features
9461 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9463 && eval 'test $(( 1 + 1 )) -eq 2 \
9464 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9466 AC_MSG_RESULT([$xsi_shell])
9467 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9469 AC_MSG_CHECKING([whether the shell understands "+="])
9471 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9473 && lt_shell_append=yes
9474 AC_MSG_RESULT([$lt_shell_append])
9475 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9477 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9482 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9484 # test EBCDIC or ASCII
9485 case `echo X|tr X '\101'` in
9486 A) # ASCII based system
9487 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9488 lt_SP2NL='tr \040 \012'
9489 lt_NL2SP='tr \015\012 \040\040'
9491 *) # EBCDIC based system
9492 lt_SP2NL='tr \100 \n'
9493 lt_NL2SP='tr \r\n \100\100'
9496 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9497 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9498 ])# _LT_CHECK_SHELL_FEATURES
9501 # _LT_PROG_XSI_SHELLFNS
9502 # ---------------------
9503 # Bourne and XSI compatible variants of some useful shell functions.
9504 m4_defun([_LT_PROG_XSI_SHELLFNS],
9507 cat << \_LT_EOF >> "$cfgfile"
9509 # func_dirname file append nondir_replacement
9510 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
9511 # otherwise set result to NONDIR_REPLACEMENT.
9515 */*) func_dirname_result="${1%/*}${2}" ;;
9516 * ) func_dirname_result="${3}" ;;
9520 # func_basename file
9523 func_basename_result="${1##*/}"
9526 # func_dirname_and_basename file append nondir_replacement
9527 # perform func_basename and func_dirname in a single function
9529 # dirname: Compute the dirname of FILE. If nonempty,
9530 # add APPEND to the result, otherwise set result
9531 # to NONDIR_REPLACEMENT.
9532 # value returned in "$func_dirname_result"
9533 # basename: Compute filename of FILE.
9534 # value retuned in "$func_basename_result"
9535 # Implementation must be kept synchronized with func_dirname
9536 # and func_basename. For efficiency, we do not delegate to
9537 # those functions but instead duplicate the functionality here.
9538 func_dirname_and_basename ()
9541 */*) func_dirname_result="${1%/*}${2}" ;;
9542 * ) func_dirname_result="${3}" ;;
9544 func_basename_result="${1##*/}"
9547 # func_stripname prefix suffix name
9548 # strip PREFIX and SUFFIX off of NAME.
9549 # PREFIX and SUFFIX must not contain globbing or regex special
9550 # characters, hashes, percent signs, but SUFFIX may contain a leading
9551 # dot (in which case that matches only a dot).
9554 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9555 # positional parameters, so assign one to ordinary parameter first.
9556 func_stripname_result=${3}
9557 func_stripname_result=${func_stripname_result#"${1}"}
9558 func_stripname_result=${func_stripname_result%"${2}"}
9564 func_opt_split_opt=${1%%=*}
9565 func_opt_split_arg=${1#*=}
9572 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9573 *) func_lo2o_result=${1} ;;
9577 # func_xform libobj-or-source
9580 func_xform_result=${1%.*}.lo
9583 # func_arith arithmetic-term...
9586 func_arith_result=$(( $[*] ))
9590 # STRING may not start with a hyphen.
9593 func_len_result=${#1}
9598 *) # Bourne compatible functions.
9599 cat << \_LT_EOF >> "$cfgfile"
9601 # func_dirname file append nondir_replacement
9602 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
9603 # otherwise set result to NONDIR_REPLACEMENT.
9606 # Extract subdirectory from the argument.
9607 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9608 if test "X$func_dirname_result" = "X${1}"; then
9609 func_dirname_result="${3}"
9611 func_dirname_result="$func_dirname_result${2}"
9615 # func_basename file
9618 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9621 dnl func_dirname_and_basename
9622 dnl A portable version of this function is already defined in general.m4sh
9623 dnl so there is no need for it here.
9625 # func_stripname prefix suffix name
9626 # strip PREFIX and SUFFIX off of NAME.
9627 # PREFIX and SUFFIX must not contain globbing or regex special
9628 # characters, hashes, percent signs, but SUFFIX may contain a leading
9629 # dot (in which case that matches only a dot).
9630 # func_strip_suffix prefix name
9634 .*) func_stripname_result=`$ECHO "X${3}" \
9635 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9636 *) func_stripname_result=`$ECHO "X${3}" \
9637 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9642 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9643 my_sed_long_arg='1s/^-[[^=]]*=//'
9648 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9649 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9655 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9658 # func_xform libobj-or-source
9661 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9664 # func_arith arithmetic-term...
9667 func_arith_result=`expr "$[@]"`
9671 # STRING may not start with a hyphen.
9674 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9680 case $lt_shell_append in
9682 cat << \_LT_EOF >> "$cfgfile"
9684 # func_append var value
9685 # Append VALUE to the end of shell variable VAR.
9693 cat << \_LT_EOF >> "$cfgfile"
9695 # func_append var value
9696 # Append VALUE to the end of shell variable VAR.
9699 eval "$[1]=\$$[1]\$[2]"
9707 # Helper functions for option handling. -*- Autoconf -*-
9709 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9710 # Written by Gary V. Vaughan, 2004
9712 # This file is free software; the Free Software Foundation gives
9713 # unlimited permission to copy and/or distribute it, with or without
9714 # modifications, as long as this notice is preserved.
9716 # serial 6 ltoptions.m4
9718 # This is to help aclocal find these macros, as it can't see m4_define.
9719 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9722 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9723 # ------------------------------------------
9724 m4_define([_LT_MANGLE_OPTION],
9725 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9728 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9729 # ---------------------------------------
9730 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9731 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9733 m4_define([_LT_SET_OPTION],
9734 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9735 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9736 _LT_MANGLE_DEFUN([$1], [$2]),
9737 [m4_warning([Unknown $1 option `$2'])])[]dnl
9741 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9742 # ------------------------------------------------------------
9743 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9744 m4_define([_LT_IF_OPTION],
9745 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9748 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9749 # -------------------------------------------------------
9750 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9752 m4_define([_LT_UNLESS_OPTIONS],
9753 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9754 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9755 [m4_define([$0_found])])])[]dnl
9756 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9761 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9762 # ----------------------------------------
9763 # OPTION-LIST is a space-separated list of Libtool options associated
9764 # with MACRO-NAME. If any OPTION has a matching handler declared with
9765 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9766 # the unknown option and exit.
9767 m4_defun([_LT_SET_OPTIONS],
9769 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9770 [_LT_SET_OPTION([$1], _LT_Option)])
9772 m4_if([$1],[LT_INIT],[
9774 dnl Simply set some default values (i.e off) if boolean options were not
9776 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9778 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9781 dnl If no reference was made to various pairs of opposing options, then
9782 dnl we run the default mode handler for the pair. For example, if neither
9783 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9784 dnl archives by default:
9785 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9786 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9787 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9788 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9789 [_LT_ENABLE_FAST_INSTALL])
9795 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9796 # -----------------------------------------
9797 m4_define([_LT_MANGLE_DEFUN],
9798 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9801 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9802 # -----------------------------------------------
9803 m4_define([LT_OPTION_DEFINE],
9804 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9805 ])# LT_OPTION_DEFINE
9810 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9813 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9814 [_LT_SET_OPTION([LT_INIT], [dlopen])
9815 AC_DIAGNOSE([obsolete],
9816 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9817 put the `dlopen' option into LT_INIT's first parameter.])
9820 dnl aclocal-1.4 backwards compatibility:
9821 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9826 # Declare package support for building win32 dll's.
9827 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9828 [enable_win32_dll=yes
9831 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9832 AC_CHECK_TOOL(AS, as, false)
9833 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9834 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9838 test -z "$AS" && AS=as
9839 _LT_DECL([], [AS], [0], [Assembler program])dnl
9841 test -z "$DLLTOOL" && DLLTOOL=dlltool
9842 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9844 test -z "$OBJDUMP" && OBJDUMP=objdump
9845 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9848 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9849 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9850 _LT_SET_OPTION([LT_INIT], [win32-dll])
9851 AC_DIAGNOSE([obsolete],
9852 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9853 put the `win32-dll' option into LT_INIT's first parameter.])
9856 dnl aclocal-1.4 backwards compatibility:
9857 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9860 # _LT_ENABLE_SHARED([DEFAULT])
9861 # ----------------------------
9862 # implement the --enable-shared flag, and supports the `shared' and
9863 # `disable-shared' LT_INIT options.
9864 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9865 m4_define([_LT_ENABLE_SHARED],
9866 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9867 AC_ARG_ENABLE([shared],
9868 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9869 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9870 [p=${PACKAGE-default}
9872 yes) enable_shared=yes ;;
9873 no) enable_shared=no ;;
9876 # Look at the argument we got. We use all the common list separators.
9877 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9878 for pkg in $enableval; do
9880 if test "X$pkg" = "X$p"; then
9887 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9889 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9890 [Whether or not to build shared libraries])
9891 ])# _LT_ENABLE_SHARED
9893 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9894 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9897 AC_DEFUN([AC_ENABLE_SHARED],
9898 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9901 AC_DEFUN([AC_DISABLE_SHARED],
9902 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9905 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9906 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9908 dnl aclocal-1.4 backwards compatibility:
9909 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9910 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9914 # _LT_ENABLE_STATIC([DEFAULT])
9915 # ----------------------------
9916 # implement the --enable-static flag, and support the `static' and
9917 # `disable-static' LT_INIT options.
9918 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9919 m4_define([_LT_ENABLE_STATIC],
9920 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9921 AC_ARG_ENABLE([static],
9922 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9923 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9924 [p=${PACKAGE-default}
9926 yes) enable_static=yes ;;
9927 no) enable_static=no ;;
9930 # Look at the argument we got. We use all the common list separators.
9931 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9932 for pkg in $enableval; do
9934 if test "X$pkg" = "X$p"; then
9941 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9943 _LT_DECL([build_old_libs], [enable_static], [0],
9944 [Whether or not to build static libraries])
9945 ])# _LT_ENABLE_STATIC
9947 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9948 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9951 AC_DEFUN([AC_ENABLE_STATIC],
9952 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9955 AC_DEFUN([AC_DISABLE_STATIC],
9956 [_LT_SET_OPTION([LT_INIT], [disable-static])
9959 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9960 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9962 dnl aclocal-1.4 backwards compatibility:
9963 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9964 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9968 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9969 # ----------------------------------
9970 # implement the --enable-fast-install flag, and support the `fast-install'
9971 # and `disable-fast-install' LT_INIT options.
9972 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9973 m4_define([_LT_ENABLE_FAST_INSTALL],
9974 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9975 AC_ARG_ENABLE([fast-install],
9976 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9977 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9978 [p=${PACKAGE-default}
9980 yes) enable_fast_install=yes ;;
9981 no) enable_fast_install=no ;;
9983 enable_fast_install=no
9984 # Look at the argument we got. We use all the common list separators.
9985 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9986 for pkg in $enableval; do
9988 if test "X$pkg" = "X$p"; then
9989 enable_fast_install=yes
9995 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9997 _LT_DECL([fast_install], [enable_fast_install], [0],
9998 [Whether or not to optimize for fast installation])dnl
9999 ])# _LT_ENABLE_FAST_INSTALL
10001 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10002 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10005 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10006 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10007 AC_DIAGNOSE([obsolete],
10008 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10009 the `fast-install' option into LT_INIT's first parameter.])
10012 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10013 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10014 AC_DIAGNOSE([obsolete],
10015 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10016 the `disable-fast-install' option into LT_INIT's first parameter.])
10019 dnl aclocal-1.4 backwards compatibility:
10020 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10021 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10024 # _LT_WITH_PIC([MODE])
10025 # --------------------
10026 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
10028 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
10029 m4_define([_LT_WITH_PIC],
10030 [AC_ARG_WITH([pic],
10031 [AS_HELP_STRING([--with-pic],
10032 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10033 [pic_mode="$withval"],
10034 [pic_mode=default])
10036 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10038 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10041 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10042 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10045 AU_DEFUN([AC_LIBTOOL_PICMODE],
10046 [_LT_SET_OPTION([LT_INIT], [pic-only])
10047 AC_DIAGNOSE([obsolete],
10048 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10049 put the `pic-only' option into LT_INIT's first parameter.])
10052 dnl aclocal-1.4 backwards compatibility:
10053 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10056 m4_define([_LTDL_MODE], [])
10057 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10058 [m4_define([_LTDL_MODE], [nonrecursive])])
10059 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10060 [m4_define([_LTDL_MODE], [recursive])])
10061 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10062 [m4_define([_LTDL_MODE], [subproject])])
10064 m4_define([_LTDL_TYPE], [])
10065 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10066 [m4_define([_LTDL_TYPE], [installable])])
10067 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10068 [m4_define([_LTDL_TYPE], [convenience])])
10070 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
10072 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10073 # Written by Gary V. Vaughan, 2004
10075 # This file is free software; the Free Software Foundation gives
10076 # unlimited permission to copy and/or distribute it, with or without
10077 # modifications, as long as this notice is preserved.
10079 # serial 6 ltsugar.m4
10081 # This is to help aclocal find these macros, as it can't see m4_define.
10082 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10085 # lt_join(SEP, ARG1, [ARG2...])
10086 # -----------------------------
10087 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10088 # associated separator.
10089 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10090 # versions in m4sugar had bugs.
10091 m4_define([lt_join],
10092 [m4_if([$#], [1], [],
10094 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10095 m4_define([_lt_join],
10096 [m4_if([$#$2], [2], [],
10097 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10103 # Manipulate m4 lists.
10104 # These macros are necessary as long as will still need to support
10105 # Autoconf-2.59 which quotes differently.
10106 m4_define([lt_car], [[$1]])
10107 m4_define([lt_cdr],
10108 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10110 [m4_dquote(m4_shift($@))])])
10111 m4_define([lt_unquote], $1)
10114 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10115 # ------------------------------------------
10116 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10117 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10118 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10119 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10120 # than defined and empty).
10122 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10123 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10124 m4_define([lt_append],
10126 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10130 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10131 # ----------------------------------------------------------
10132 # Produce a SEP delimited list of all paired combinations of elements of
10133 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
10134 # has the form PREFIXmINFIXSUFFIXn.
10135 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10136 m4_define([lt_combine],
10137 [m4_if(m4_eval([$# > 3]), [1],
10138 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10139 [[m4_foreach([_Lt_prefix], [$2],
10140 [m4_foreach([_Lt_suffix],
10141 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10142 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10145 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10146 # -----------------------------------------------------------------------
10147 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10148 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10149 m4_define([lt_if_append_uniq],
10151 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10152 [lt_append([$1], [$2], [$3])$4],
10154 [lt_append([$1], [$2], [$3])$4])])
10157 # lt_dict_add(DICT, KEY, VALUE)
10158 # -----------------------------
10159 m4_define([lt_dict_add],
10160 [m4_define([$1($2)], [$3])])
10163 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10164 # --------------------------------------------
10165 m4_define([lt_dict_add_subkey],
10166 [m4_define([$1($2:$3)], [$4])])
10169 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10170 # ----------------------------------
10171 m4_define([lt_dict_fetch],
10173 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10174 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10177 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10178 # -----------------------------------------------------------------
10179 m4_define([lt_if_dict_fetch],
10180 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10185 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10186 # --------------------------------------------------------------
10187 m4_define([lt_dict_filter],
10188 [m4_if([$5], [], [],
10189 [lt_join(m4_quote(m4_default([$4], [[, ]])),
10190 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10191 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10194 # ltversion.m4 -- version numbers -*- Autoconf -*-
10196 # Copyright (C) 2004 Free Software Foundation, Inc.
10197 # Written by Scott James Remnant, 2004
10199 # This file is free software; the Free Software Foundation gives
10200 # unlimited permission to copy and/or distribute it, with or without
10201 # modifications, as long as this notice is preserved.
10203 # Generated from ltversion.in.
10205 # serial 3017 ltversion.m4
10206 # This file is part of GNU Libtool
10208 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
10209 m4_define([LT_PACKAGE_REVISION], [1.3017])
10211 AC_DEFUN([LTVERSION_VERSION],
10212 [macro_version='2.2.6b'
10213 macro_revision='1.3017'
10214 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10215 _LT_DECL(, macro_revision, 0)
10218 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
10220 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
10221 # Written by Scott James Remnant, 2004.
10223 # This file is free software; the Free Software Foundation gives
10224 # unlimited permission to copy and/or distribute it, with or without
10225 # modifications, as long as this notice is preserved.
10227 # serial 4 lt~obsolete.m4
10229 # These exist entirely to fool aclocal when bootstrapping libtool.
10231 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10232 # which have later been changed to m4_define as they aren't part of the
10233 # exported API, or moved to Autoconf or Automake where they belong.
10235 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
10236 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10237 # using a macro with the same name in our local m4/libtool.m4 it'll
10238 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10239 # and doesn't know about Autoconf macros at all.)
10241 # So we provide this file, which has a silly filename so it's always
10242 # included after everything else. This provides aclocal with the
10243 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10244 # because those macros already exist, or will be overwritten later.
10245 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10247 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10248 # Yes, that means every name once taken will need to remain here until
10249 # we give up compatibility with versions before 1.7, at which point
10250 # we need to keep only those names which we still refer to.
10252 # This is to help aclocal find these macros, as it can't see m4_define.
10253 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10255 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10256 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
10257 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10258 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
10259 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10260 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
10261 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
10262 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10263 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
10264 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10265 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
10266 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10267 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10268 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10269 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10270 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10271 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
10272 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10273 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10274 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
10275 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
10276 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10277 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10278 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10279 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10280 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10281 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10282 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10283 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
10284 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
10285 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
10286 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10287 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10288 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
10289 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
10290 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10291 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10292 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
10293 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10294 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
10295 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
10296 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
10297 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
10298 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10299 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10300 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10301 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10302 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10303 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10304 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10305 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10306 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10307 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10308 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10309 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])