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.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
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 # Do all the work for Automake. -*- Autoconf -*-
411 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
420 # This macro actually does too much. Some checks are only needed if
421 # your package does certain things. But this isn't really a big deal.
423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424 # AM_INIT_AUTOMAKE([OPTIONS])
425 # -----------------------------------------------
426 # The call with PACKAGE and VERSION arguments is the old style
427 # call (pre autoconf-2.50), which is being phased out. PACKAGE
428 # and VERSION should now be passed to AC_INIT and removed from
429 # the call to AM_INIT_AUTOMAKE.
430 # We support both call styles for the transition. After
431 # the next Automake release, Autoconf can make the AC_INIT
432 # arguments mandatory, and then we can depend on a new Autoconf
433 # release and drop the old call support.
434 AC_DEFUN([AM_INIT_AUTOMAKE],
435 [AC_PREREQ([2.62])dnl
436 dnl Autoconf wants to disallow AM_ names. We explicitly allow
437 dnl the ones we care about.
438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440 AC_REQUIRE([AC_PROG_INSTALL])dnl
441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
442 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443 # is not polluted with repeated "-I."
444 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445 # test to see if srcdir already configured
446 if test -f $srcdir/config.status; then
447 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451 # test whether we have cygpath
452 if test -z "$CYGPATH_W"; then
453 if (cygpath --version) >/dev/null 2>/dev/null; then
454 CYGPATH_W='cygpath -w'
459 AC_SUBST([CYGPATH_W])
461 # Define the identity of the package.
462 dnl Distinguish between old-style and new-style calls.
464 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 AC_SUBST([PACKAGE], [$1])dnl
466 AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474 _AM_IF_OPTION([no-define],,
475 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
478 # Some tools Automake needs.
479 AC_REQUIRE([AM_SANITY_CHECK])dnl
480 AC_REQUIRE([AC_ARG_PROGRAM])dnl
481 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482 AM_MISSING_PROG(AUTOCONF, autoconf)
483 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484 AM_MISSING_PROG(AUTOHEADER, autoheader)
485 AM_MISSING_PROG(MAKEINFO, makeinfo)
486 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489 # We need awk for the "check" target. The system "awk" is bad on
491 AC_REQUIRE([AC_PROG_AWK])dnl
492 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496 [_AM_PROG_TAR([v7])])])
497 _AM_IF_OPTION([no-dependencies],,
498 [AC_PROVIDE_IFELSE([AC_PROG_CC],
499 [_AM_DEPENDENCIES(CC)],
500 [define([AC_PROG_CC],
501 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502 AC_PROVIDE_IFELSE([AC_PROG_CXX],
503 [_AM_DEPENDENCIES(CXX)],
504 [define([AC_PROG_CXX],
505 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507 [_AM_DEPENDENCIES(OBJC)],
508 [define([AC_PROG_OBJC],
509 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
511 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
514 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515 AC_CONFIG_COMMANDS_PRE(dnl
516 [m4_provide_if([_AM_COMPILER_EXEEXT],
517 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
520 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
521 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522 dnl mangled by Autoconf and run in a shell conditional statement.
523 m4_define([_AC_COMPILER_EXEEXT],
524 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
527 # When config.status generates a header, we must update the stamp-h file.
528 # This file resides in the same directory as the config header
529 # that is generated. The stamp files are numbered to have different names.
531 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532 # loop where config.status creates the headers, so we can generate
533 # our stamp files there.
534 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535 [# Compute $1's index in $config_headers.
538 for _am_header in $config_headers :; do
540 $_am_arg | $_am_arg:* )
543 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
546 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
548 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
550 # This file is free software; the Free Software Foundation
551 # gives unlimited permission to copy and/or distribute it,
552 # with or without modifications, as long as this notice is preserved.
556 # Define $install_sh.
557 AC_DEFUN([AM_PROG_INSTALL_SH],
558 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559 if test x"${install_sh}" != xset; then
562 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
564 install_sh="\${SHELL} $am_aux_dir/install-sh"
567 AC_SUBST(install_sh)])
569 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
571 # This file is free software; the Free Software Foundation
572 # gives unlimited permission to copy and/or distribute it,
573 # with or without modifications, as long as this notice is preserved.
577 # Check whether the underlying file-system supports filenames
578 # with a leading dot. For instance MS-DOS doesn't.
579 AC_DEFUN([AM_SET_LEADING_DOT],
580 [rm -rf .tst 2>/dev/null
581 mkdir .tst 2>/dev/null
582 if test -d .tst; then
587 rmdir .tst 2>/dev/null
588 AC_SUBST([am__leading_dot])])
590 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
593 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594 # Free Software Foundation, Inc.
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
602 # AM_MAINTAINER_MODE([DEFAULT-MODE])
603 # ----------------------------------
604 # Control maintainer-specific portions of Makefiles.
605 # Default is to disable them, unless `enable' is passed literally.
606 # For symmetry, `disable' may be passed as well. Anyway, the user
607 # can override the default with the --enable/--disable switch.
608 AC_DEFUN([AM_MAINTAINER_MODE],
609 [m4_case(m4_default([$1], [disable]),
610 [enable], [m4_define([am_maintainer_other], [disable])],
611 [disable], [m4_define([am_maintainer_other], [enable])],
612 [m4_define([am_maintainer_other], [enable])
613 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616 AC_ARG_ENABLE([maintainer-mode],
617 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
618 (and sometimes confusing) to the casual installer],
619 [USE_MAINTAINER_MODE=$enableval],
620 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623 MAINT=$MAINTAINER_MODE_TRUE
628 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
630 # Check to see how 'make' treats includes. -*- Autoconf -*-
632 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
634 # This file is free software; the Free Software Foundation
635 # gives unlimited permission to copy and/or distribute it,
636 # with or without modifications, as long as this notice is preserved.
642 # Check to see how make treats includes.
643 AC_DEFUN([AM_MAKE_INCLUDE],
644 [am_make=${MAKE-make}
645 cat > confinc << 'END'
647 @echo this is the am__doit target
650 # If we don't find an include directive, just comment out the code.
651 AC_MSG_CHECKING([for style of include used by $am_make])
655 # First try GNU make style include.
656 echo "include confinc" > confmf
657 # Ignore all kinds of additional output from `make'.
658 case `$am_make -s -f confmf 2> /dev/null` in #(
659 *the\ am__doit\ target*)
665 # Now try BSD make style include.
666 if test "$am__include" = "#"; then
667 echo '.include "confinc"' > confmf
668 case `$am_make -s -f confmf 2> /dev/null` in #(
669 *the\ am__doit\ target*)
676 AC_SUBST([am__include])
677 AC_SUBST([am__quote])
678 AC_MSG_RESULT([$_am_result])
682 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
684 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685 # Free Software Foundation, Inc.
687 # This file is free software; the Free Software Foundation
688 # gives unlimited permission to copy and/or distribute it,
689 # with or without modifications, as long as this notice is preserved.
693 # AM_MISSING_PROG(NAME, PROGRAM)
694 # ------------------------------
695 AC_DEFUN([AM_MISSING_PROG],
696 [AC_REQUIRE([AM_MISSING_HAS_RUN])
697 $1=${$1-"${am_missing_run}$2"}
703 # Define MISSING if not defined so far and test if it supports --run.
704 # If it does, set am_missing_run to use it, otherwise, to nothing.
705 AC_DEFUN([AM_MISSING_HAS_RUN],
706 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707 AC_REQUIRE_AUX_FILE([missing])dnl
708 if test x"${MISSING+set}" != xset; then
711 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
713 MISSING="\${SHELL} $am_aux_dir/missing" ;;
716 # Use eval to expand $SHELL
717 if eval "$MISSING --run true"; then
718 am_missing_run="$MISSING --run "
721 AC_MSG_WARN([`missing' script is too old or missing])
725 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
733 # Check for `mkdir -p'.
734 AC_DEFUN([AM_PROG_MKDIR_P],
735 [AC_PREREQ([2.60])dnl
736 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
738 dnl while keeping a definition of mkdir_p for backward compatibility.
739 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741 dnl Makefile.ins that do not define MKDIR_P, so we do our own
742 dnl adjustment using top_builddir (which is defined more often than
744 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
746 [[\\/$]]* | ?:[[\\/]]*) ;;
747 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
751 # Helper functions for option handling. -*- Autoconf -*-
753 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
755 # This file is free software; the Free Software Foundation
756 # gives unlimited permission to copy and/or distribute it,
757 # with or without modifications, as long as this notice is preserved.
761 # _AM_MANGLE_OPTION(NAME)
762 # -----------------------
763 AC_DEFUN([_AM_MANGLE_OPTION],
764 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
766 # _AM_SET_OPTION(NAME)
767 # ------------------------------
768 # Set option NAME. Presently that only means defining a flag for this option.
769 AC_DEFUN([_AM_SET_OPTION],
770 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
772 # _AM_SET_OPTIONS(OPTIONS)
773 # ----------------------------------
774 # OPTIONS is a space-separated list of Automake options.
775 AC_DEFUN([_AM_SET_OPTIONS],
776 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
778 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779 # -------------------------------------------
780 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781 AC_DEFUN([_AM_IF_OPTION],
782 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
784 # Check to make sure that the build environment is sane. -*- Autoconf -*-
786 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787 # Free Software Foundation, Inc.
789 # This file is free software; the Free Software Foundation
790 # gives unlimited permission to copy and/or distribute it,
791 # with or without modifications, as long as this notice is preserved.
797 AC_DEFUN([AM_SANITY_CHECK],
798 [AC_MSG_CHECKING([whether build environment is sane])
801 echo timestamp > conftest.file
802 # Reject unsafe characters in $srcdir or the absolute working directory
803 # name. Accept space and tab only in the latter.
807 *[[\\\"\#\$\&\'\`$am_lf]]*)
808 AC_MSG_ERROR([unsafe absolute working directory name]);;
811 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
812 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
815 # Do `set' in a subshell so we don't clobber the current shell's
816 # arguments. Must try -L first in case configure is actually a
817 # symlink; some systems play weird games with the mod time of symlinks
818 # (eg FreeBSD returns the mod time of the symlink's containing
821 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822 if test "$[*]" = "X"; then
824 set X `ls -t "$srcdir/configure" conftest.file`
827 if test "$[*]" != "X $srcdir/configure conftest.file" \
828 && test "$[*]" != "X conftest.file $srcdir/configure"; then
830 # If neither matched, then we have a broken ls. This can happen
831 # if, for instance, CONFIG_SHELL is bash and it inherits a
832 # broken ls alias from the environment. This has actually
833 # happened. Such a system could not be considered "sane".
834 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
835 alias in your environment])
838 test "$[2]" = conftest.file
844 AC_MSG_ERROR([newly created file is older than distributed files!
845 Check your system clock])
849 # Copyright (C) 2009 Free Software Foundation, Inc.
851 # This file is free software; the Free Software Foundation
852 # gives unlimited permission to copy and/or distribute it,
853 # with or without modifications, as long as this notice is preserved.
857 # AM_SILENT_RULES([DEFAULT])
858 # --------------------------
859 # Enable less verbose build rules; with the default set to DEFAULT
860 # (`yes' being less verbose, `no' or empty being verbose).
861 AC_DEFUN([AM_SILENT_RULES],
862 [AC_ARG_ENABLE([silent-rules],
863 [ --enable-silent-rules less verbose build output (undo: `make V=1')
864 --disable-silent-rules verbose build output (undo: `make V=0')])
865 case $enable_silent_rules in
866 yes) AM_DEFAULT_VERBOSITY=0;;
867 no) AM_DEFAULT_VERBOSITY=1;;
868 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
870 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
872 AC_SUBST([AM_BACKSLASH])dnl
873 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
876 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
882 # AM_PROG_INSTALL_STRIP
883 # ---------------------
884 # One issue with vendor `install' (even GNU) is that you can't
885 # specify the program used to strip binaries. This is especially
886 # annoying in cross-compiling environments, where the build's strip
887 # is unlikely to handle the host's binaries.
888 # Fortunately install-sh will honor a STRIPPROG variable, so we
889 # always use install-sh in `make install-strip', and initialize
890 # STRIPPROG with the value of the STRIP variable (set by the user).
891 AC_DEFUN([AM_PROG_INSTALL_STRIP],
892 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893 # Installed binaries are usually stripped using `strip' when the user
894 # run `make install-strip'. However `strip' might not be the right
895 # tool to use in cross-compilation environments, therefore Automake
896 # will honor the `STRIP' environment variable to overrule this program.
897 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898 if test "$cross_compiling" != no; then
899 AC_CHECK_TOOL([STRIP], [strip], :)
901 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902 AC_SUBST([INSTALL_STRIP_PROGRAM])])
904 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
906 # This file is free software; the Free Software Foundation
907 # gives unlimited permission to copy and/or distribute it,
908 # with or without modifications, as long as this notice is preserved.
912 # _AM_SUBST_NOTMAKE(VARIABLE)
913 # ---------------------------
914 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915 # This macro is traced by Automake.
916 AC_DEFUN([_AM_SUBST_NOTMAKE])
918 # AM_SUBST_NOTMAKE(VARIABLE)
919 # ---------------------------
920 # Public sister of _AM_SUBST_NOTMAKE.
921 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
923 # Check how to create a tarball. -*- Autoconf -*-
925 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
933 # _AM_PROG_TAR(FORMAT)
934 # --------------------
935 # Check how to create a tarball in format FORMAT.
936 # FORMAT should be one of `v7', `ustar', or `pax'.
938 # Substitute a variable $(am__tar) that is a command
939 # writing to stdout a FORMAT-tarball containing the directory
941 # tardir=directory && $(am__tar) > result.tar
943 # Substitute a variable $(am__untar) that extract such
944 # a tarball read from stdin.
945 # $(am__untar) < result.tar
946 AC_DEFUN([_AM_PROG_TAR],
947 [# Always define AMTAR for backward compatibility.
948 AM_MISSING_PROG([AMTAR], [tar])
950 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951 [m4_case([$1], [ustar],, [pax],,
952 [m4_fatal([Unknown tar format])])
953 AC_MSG_CHECKING([how to create a $1 tar archive])
954 # Loop over all known methods to create a tar archive until one works.
955 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
957 # Do not fold the above two line into one, because Tru64 sh and
958 # Solaris sh will not grok spaces in the rhs of `-'.
959 for _am_tool in $_am_tools
963 for _am_tar in tar gnutar gtar;
965 AM_RUN_LOG([$_am_tar --version]) && break
967 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969 am__untar="$_am_tar -xf -"
972 # Must skip GNU tar: if it does not support --format= it doesn't create
973 # ustar tarball either.
974 (tar --version) >/dev/null 2>&1 && continue
975 am__tar='tar chf - "$$tardir"'
976 am__tar_='tar chf - "$tardir"'
980 am__tar='pax -L -x $1 -w "$$tardir"'
981 am__tar_='pax -L -x $1 -w "$tardir"'
985 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987 am__untar='cpio -i -H $1 -d'
996 # If the value was cached, stop now. We just wanted to have am__tar
998 test -n "${am_cv_prog_tar_$1}" && break
1000 # tar/untar a dummy directory, and stop if the command works
1003 echo GrepMe > conftest.dir/file
1004 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1006 if test -s conftest.tar; then
1007 AM_RUN_LOG([$am__untar <conftest.tar])
1008 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1013 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1016 AC_SUBST([am__untar])
1019 m4_include([m4/ax_define_dir.m4])
1020 dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1022 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1024 dnl Permission is hereby granted, free of charge, to any person obtaining a
1025 dnl copy of this software and associated documentation files (the "Software"),
1026 dnl to deal in the Software without restriction, including without limitation
1027 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1028 dnl and/or sell copies of the Software, and to permit persons to whom the
1029 dnl Software is furnished to do so, subject to the following conditions:
1031 dnl The above copyright notice and this permission notice (including the next
1032 dnl paragraph) shall be included in all copies or substantial portions of the
1035 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1036 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1037 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1038 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1039 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1040 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1041 dnl DEALINGS IN THE SOFTWARE.
1043 # XORG_MACROS_VERSION(required-version)
1044 # -------------------------------------
1045 # Minimum version: 1.1.0
1047 # If you're using a macro added in Version 1.1 or newer, include this in
1048 # your configure.ac with the minimum required version, such as:
1049 # XORG_MACROS_VERSION(1.1)
1051 # To ensure that this macro is defined, also add:
1052 # m4_ifndef([XORG_MACROS_VERSION],
1053 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1056 # See the "minimum version" comment for each macro you use to see what
1057 # version you require.
1058 m4_defun([XORG_MACROS_VERSION],[
1059 m4_define([vers_have], [1.10.1])
1060 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1061 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1062 m4_if(m4_cmp(maj_have, maj_needed), 0,,
1063 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1064 m4_if(m4_version_compare(vers_have, [$1]), -1,
1065 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1066 m4_undefine([vers_have])
1067 m4_undefine([maj_have])
1068 m4_undefine([maj_needed])
1069 ]) # XORG_MACROS_VERSION
1071 # XORG_PROG_RAWCPP()
1072 # ------------------
1073 # Minimum version: 1.0.0
1075 # Find cpp program and necessary flags for use in pre-processing text files
1076 # such as man pages and config files
1077 AC_DEFUN([XORG_PROG_RAWCPP],[
1078 AC_REQUIRE([AC_PROG_CPP])
1079 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
1080 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1082 # Check for flag to avoid builtin definitions - assumes unix is predefined,
1083 # which is not the best choice for supporting other OS'es, but covers most
1084 # of the ones we need for now.
1085 AC_MSG_CHECKING([if $RAWCPP requires -undef])
1086 AC_LANG_CONFTEST([Does cpp redefine unix ?])
1087 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1090 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1092 AC_MSG_RESULT([yes])
1093 # under Cygwin unix is still defined even with -undef
1094 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1095 RAWCPPFLAGS="-undef -ansi"
1096 AC_MSG_RESULT([yes, with -ansi])
1098 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
1101 rm -f conftest.$ac_ext
1103 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1104 AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
1105 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1108 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1109 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1110 AC_MSG_RESULT([yes])
1112 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
1115 rm -f conftest.$ac_ext
1116 AC_SUBST(RAWCPPFLAGS)
1117 ]) # XORG_PROG_RAWCPP
1119 # XORG_MANPAGE_SECTIONS()
1120 # -----------------------
1121 # Minimum version: 1.0.0
1123 # Determine which sections man pages go in for the different man page types
1124 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1125 # Not sure if there's any better way than just hardcoding by OS name.
1126 # Override default settings by setting environment variables
1127 # Added MAN_SUBSTS in version 1.8
1128 # Added AC_PROG_SED in version 1.8
1130 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1131 AC_REQUIRE([AC_CANONICAL_HOST])
1132 AC_REQUIRE([AC_PROG_SED])
1134 if test x$APP_MAN_SUFFIX = x ; then
1137 if test x$APP_MAN_DIR = x ; then
1138 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1141 if test x$LIB_MAN_SUFFIX = x ; then
1144 if test x$LIB_MAN_DIR = x ; then
1145 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1148 if test x$FILE_MAN_SUFFIX = x ; then
1150 solaris*) FILE_MAN_SUFFIX=4 ;;
1151 *) FILE_MAN_SUFFIX=5 ;;
1154 if test x$FILE_MAN_DIR = x ; then
1155 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1158 if test x$MISC_MAN_SUFFIX = x ; then
1160 solaris*) MISC_MAN_SUFFIX=5 ;;
1161 *) MISC_MAN_SUFFIX=7 ;;
1164 if test x$MISC_MAN_DIR = x ; then
1165 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1168 if test x$DRIVER_MAN_SUFFIX = x ; then
1170 solaris*) DRIVER_MAN_SUFFIX=7 ;;
1171 *) DRIVER_MAN_SUFFIX=4 ;;
1174 if test x$DRIVER_MAN_DIR = x ; then
1175 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1178 if test x$ADMIN_MAN_SUFFIX = x ; then
1180 solaris*) ADMIN_MAN_SUFFIX=1m ;;
1181 *) ADMIN_MAN_SUFFIX=8 ;;
1184 if test x$ADMIN_MAN_DIR = x ; then
1185 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1189 AC_SUBST([APP_MAN_SUFFIX])
1190 AC_SUBST([LIB_MAN_SUFFIX])
1191 AC_SUBST([FILE_MAN_SUFFIX])
1192 AC_SUBST([MISC_MAN_SUFFIX])
1193 AC_SUBST([DRIVER_MAN_SUFFIX])
1194 AC_SUBST([ADMIN_MAN_SUFFIX])
1195 AC_SUBST([APP_MAN_DIR])
1196 AC_SUBST([LIB_MAN_DIR])
1197 AC_SUBST([FILE_MAN_DIR])
1198 AC_SUBST([MISC_MAN_DIR])
1199 AC_SUBST([DRIVER_MAN_DIR])
1200 AC_SUBST([ADMIN_MAN_DIR])
1202 XORG_MAN_PAGE="X Version 11"
1203 AC_SUBST([XORG_MAN_PAGE])
1205 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1206 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1207 -e 's|__xservername__|Xorg|g' \
1208 -e 's|__xconfigfile__|xorg.conf|g' \
1209 -e 's|__projectroot__|\$(prefix)|g' \
1210 -e 's|__apploaddir__|\$(appdefaultdir)|g' \
1211 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1212 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1213 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1214 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1215 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1216 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1217 AC_SUBST([MAN_SUBSTS])
1219 ]) # XORG_MANPAGE_SECTIONS
1221 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1222 # ------------------------
1223 # Minimum version: 1.7.0
1225 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1226 # provided by xorg-sgml-doctools, if installed.
1227 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1228 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1230 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1231 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1233 [if test x"$cross_compiling" != x"yes" ; then
1234 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1235 [XORG_SGML_PATH=$prefix/share/sgml])
1239 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1240 # the path and the name of the doc stylesheet
1241 if test "x$XORG_SGML_PATH" != "x" ; then
1242 AC_MSG_RESULT([$XORG_SGML_PATH])
1243 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1244 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1249 AC_SUBST(XORG_SGML_PATH)
1250 AC_SUBST(STYLESHEET_SRCDIR)
1251 AC_SUBST(XSL_STYLESHEET)
1252 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1253 ]) # XORG_CHECK_SGML_DOCTOOLS
1255 # XORG_CHECK_LINUXDOC
1256 # -------------------
1257 # Minimum version: 1.0.0
1259 # Defines the variable MAKE_TEXT if the necessary tools and
1260 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1261 # Whether or not the necessary tools and files are found can be checked
1262 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
1263 AC_DEFUN([XORG_CHECK_LINUXDOC],[
1264 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1265 AC_REQUIRE([XORG_WITH_PS2PDF])
1267 AC_PATH_PROG(LINUXDOC, linuxdoc)
1269 AC_MSG_CHECKING([whether to build documentation])
1271 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1277 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1279 AC_MSG_RESULT([$BUILDDOC])
1281 AC_MSG_CHECKING([whether to build pdf documentation])
1283 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1289 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1291 AC_MSG_RESULT([$BUILDPDFDOC])
1293 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1294 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1296 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
1302 ]) # XORG_CHECK_LINUXDOC
1304 # XORG_CHECK_DOCBOOK
1305 # -------------------
1306 # Minimum version: 1.0.0
1308 # Checks for the ability to build output formats from SGML DocBook source.
1309 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1310 # indicates whether the necessary tools and files are found and, if set,
1311 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
1312 AC_DEFUN([XORG_CHECK_DOCBOOK],[
1313 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1320 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1321 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1322 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1323 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1325 AC_MSG_CHECKING([whether to build text documentation])
1326 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1327 test x$BUILD_TXTDOC != xno; then
1330 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1331 AC_MSG_RESULT([$BUILDTXTDOC])
1333 AC_MSG_CHECKING([whether to build PDF documentation])
1334 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1335 test x$BUILD_PDFDOC != xno; then
1338 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1339 AC_MSG_RESULT([$BUILDPDFDOC])
1341 AC_MSG_CHECKING([whether to build PostScript documentation])
1342 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1343 test x$BUILD_PSDOC != xno; then
1346 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1347 AC_MSG_RESULT([$BUILDPSDOC])
1349 AC_MSG_CHECKING([whether to build HTML documentation])
1350 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1351 test x$BUILD_HTMLDOC != xno; then
1354 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1355 AC_MSG_RESULT([$BUILDHTMLDOC])
1357 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1358 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1359 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1360 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1366 ]) # XORG_CHECK_DOCBOOK
1368 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1370 # Minimum version: 1.5.0
1372 # Documentation tools are not always available on all platforms and sometimes
1373 # not at the appropriate level. This macro enables a module to test for the
1374 # presence of the tool and obtain it's path in separate variables. Coupled with
1375 # the --with-xmlto option, it allows maximum flexibilty in making decisions
1376 # as whether or not to use the xmlto package. When DEFAULT is not specified,
1377 # --with-xmlto assumes 'auto'.
1379 # Interface to module:
1380 # HAVE_XMLTO: used in makefiles to conditionally generate documentation
1381 # XMLTO: returns the path of the xmlto program found
1382 # returns the path set by the user in the environment
1383 # --with-xmlto: 'yes' user instructs the module to use xmlto
1384 # 'no' user instructs the module not to use xmlto
1386 # Added in version 1.10.0
1387 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1388 # xmlto for text output requires either lynx, links, or w3m browsers
1390 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1392 AC_DEFUN([XORG_WITH_XMLTO],[
1393 AC_ARG_VAR([XMLTO], [Path to xmlto command])
1394 m4_define([_defopt], m4_default([$2], [auto]))
1396 AS_HELP_STRING([--with-xmlto],
1397 [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1398 [use_xmlto=$withval], [use_xmlto=]_defopt)
1399 m4_undefine([_defopt])
1401 if test "x$use_xmlto" = x"auto"; then
1402 AC_PATH_PROG([XMLTO], [xmlto])
1403 if test "x$XMLTO" = "x"; then
1404 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1409 elif test "x$use_xmlto" = x"yes" ; then
1410 AC_PATH_PROG([XMLTO], [xmlto])
1411 if test "x$XMLTO" = "x"; then
1412 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1415 elif test "x$use_xmlto" = x"no" ; then
1416 if test "x$XMLTO" != "x"; then
1417 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1421 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1424 # Test for a minimum version of xmlto, if provided.
1426 [if test "$have_xmlto" = yes; then
1427 # scrape the xmlto version
1428 AC_MSG_CHECKING([the xmlto version])
1429 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1430 AC_MSG_RESULT([$xmlto_version])
1431 AS_VERSION_COMPARE([$xmlto_version], [$1],
1432 [if test "x$use_xmlto" = xauto; then
1433 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1436 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1440 # Test for the ability of xmlto to generate a text target
1442 cat > conftest.xml << "EOF"
1444 AS_IF([test "$have_xmlto" = yes],
1445 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1446 [have_xmlto_text=yes],
1447 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1449 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1450 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1451 ]) # XORG_WITH_XMLTO
1453 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1455 # Minimum version: 1.5.0
1457 # Documentation tools are not always available on all platforms and sometimes
1458 # not at the appropriate level. This macro enables a module to test for the
1459 # presence of the tool and obtain it's path in separate variables. Coupled with
1460 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
1461 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
1462 # --with-asciidoc assumes 'auto'.
1464 # Interface to module:
1465 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1466 # ASCIIDOC: returns the path of the asciidoc program found
1467 # returns the path set by the user in the environment
1468 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
1469 # 'no' user instructs the module not to use asciidoc
1471 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1473 AC_DEFUN([XORG_WITH_ASCIIDOC],[
1474 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1475 m4_define([_defopt], m4_default([$2], [auto]))
1476 AC_ARG_WITH(asciidoc,
1477 AS_HELP_STRING([--with-asciidoc],
1478 [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1479 [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1480 m4_undefine([_defopt])
1482 if test "x$use_asciidoc" = x"auto"; then
1483 AC_PATH_PROG([ASCIIDOC], [asciidoc])
1484 if test "x$ASCIIDOC" = "x"; then
1485 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1490 elif test "x$use_asciidoc" = x"yes" ; then
1491 AC_PATH_PROG([ASCIIDOC], [asciidoc])
1492 if test "x$ASCIIDOC" = "x"; then
1493 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1496 elif test "x$use_asciidoc" = x"no" ; then
1497 if test "x$ASCIIDOC" != "x"; then
1498 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1502 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1505 [if test "$have_asciidoc" = yes; then
1506 # scrape the asciidoc version
1507 AC_MSG_CHECKING([the asciidoc version])
1508 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1509 AC_MSG_RESULT([$asciidoc_version])
1510 AS_VERSION_COMPARE([$asciidoc_version], [$1],
1511 [if test "x$use_asciidoc" = xauto; then
1512 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1515 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1518 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1519 ]) # XORG_WITH_ASCIIDOC
1521 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1522 # --------------------------------
1523 # Minimum version: 1.5.0
1525 # Documentation tools are not always available on all platforms and sometimes
1526 # not at the appropriate level. This macro enables a module to test for the
1527 # presence of the tool and obtain it's path in separate variables. Coupled with
1528 # the --with-doxygen option, it allows maximum flexibilty in making decisions
1529 # as whether or not to use the doxygen package. When DEFAULT is not specified,
1530 # --with-doxygen assumes 'auto'.
1532 # Interface to module:
1533 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1534 # DOXYGEN: returns the path of the doxygen program found
1535 # returns the path set by the user in the environment
1536 # --with-doxygen: 'yes' user instructs the module to use doxygen
1537 # 'no' user instructs the module not to use doxygen
1539 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1541 AC_DEFUN([XORG_WITH_DOXYGEN],[
1542 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1543 m4_define([_defopt], m4_default([$2], [auto]))
1544 AC_ARG_WITH(doxygen,
1545 AS_HELP_STRING([--with-doxygen],
1546 [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1547 [use_doxygen=$withval], [use_doxygen=]_defopt)
1548 m4_undefine([_defopt])
1550 if test "x$use_doxygen" = x"auto"; then
1551 AC_PATH_PROG([DOXYGEN], [doxygen])
1552 if test "x$DOXYGEN" = "x"; then
1553 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1558 elif test "x$use_doxygen" = x"yes" ; then
1559 AC_PATH_PROG([DOXYGEN], [doxygen])
1560 if test "x$DOXYGEN" = "x"; then
1561 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1564 elif test "x$use_doxygen" = x"no" ; then
1565 if test "x$DOXYGEN" != "x"; then
1566 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1570 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1573 [if test "$have_doxygen" = yes; then
1574 # scrape the doxygen version
1575 AC_MSG_CHECKING([the doxygen version])
1576 doxygen_version=`$DOXYGEN --version 2>/dev/null`
1577 AC_MSG_RESULT([$doxygen_version])
1578 AS_VERSION_COMPARE([$doxygen_version], [$1],
1579 [if test "x$use_doxygen" = xauto; then
1580 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1583 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1586 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1587 ]) # XORG_WITH_DOXYGEN
1589 # XORG_WITH_GROFF([DEFAULT])
1591 # Minimum version: 1.6.0
1593 # Documentation tools are not always available on all platforms and sometimes
1594 # not at the appropriate level. This macro enables a module to test for the
1595 # presence of the tool and obtain it's path in separate variables. Coupled with
1596 # the --with-groff option, it allows maximum flexibilty in making decisions
1597 # as whether or not to use the groff package. When DEFAULT is not specified,
1598 # --with-groff assumes 'auto'.
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])
1627 m4_define([_defopt], m4_default([$1], [auto]))
1629 AS_HELP_STRING([--with-groff],
1630 [Use groff to regenerate documentation (default: ]_defopt[)]),
1631 [use_groff=$withval], [use_groff=]_defopt)
1632 m4_undefine([_defopt])
1634 if test "x$use_groff" = x"auto"; then
1635 AC_PATH_PROG([GROFF], [groff])
1636 if test "x$GROFF" = "x"; then
1637 AC_MSG_WARN([groff not found - documentation targets will be skipped])
1642 elif test "x$use_groff" = x"yes" ; then
1643 AC_PATH_PROG([GROFF], [groff])
1644 if test "x$GROFF" = "x"; then
1645 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1648 elif test "x$use_groff" = x"no" ; then
1649 if test "x$GROFF" != "x"; then
1650 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1654 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1657 # We have groff, test for the presence of the macro packages
1658 if test "x$have_groff" = x"yes"; then
1659 AC_MSG_CHECKING([for ${GROFF} -ms macros])
1660 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1665 AC_MSG_RESULT([$groff_ms_works])
1666 AC_MSG_CHECKING([for ${GROFF} -mm macros])
1667 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1672 AC_MSG_RESULT([$groff_mm_works])
1675 # We have groff, test for HTML dependencies, one command per package
1676 if test "x$have_groff" = x"yes"; then
1677 AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1678 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1679 AC_PATH_PROG(PSSELECT_PATH, [psselect])
1680 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1684 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1688 # Set Automake conditionals for Makefiles
1689 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1690 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1691 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1692 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1693 ]) # XORG_WITH_GROFF
1695 # XORG_WITH_FOP([DEFAULT])
1697 # Minimum version: 1.6.0
1699 # Documentation tools are not always available on all platforms and sometimes
1700 # not at the appropriate level. This macro enables a module to test for the
1701 # presence of the tool and obtain it's path in separate variables. Coupled with
1702 # the --with-fop option, it allows maximum flexibilty in making decisions
1703 # as whether or not to use the fop package. When DEFAULT is not specified,
1704 # --with-fop assumes 'auto'.
1706 # Interface to module:
1707 # HAVE_FOP: used in makefiles to conditionally generate documentation
1708 # FOP: returns the path of the fop program found
1709 # returns the path set by the user in the environment
1710 # --with-fop: 'yes' user instructs the module to use fop
1711 # 'no' user instructs the module not to use fop
1713 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1715 AC_DEFUN([XORG_WITH_FOP],[
1716 AC_ARG_VAR([FOP], [Path to fop command])
1717 m4_define([_defopt], m4_default([$1], [auto]))
1719 AS_HELP_STRING([--with-fop],
1720 [Use fop to regenerate documentation (default: ]_defopt[)]),
1721 [use_fop=$withval], [use_fop=]_defopt)
1722 m4_undefine([_defopt])
1724 if test "x$use_fop" = x"auto"; then
1725 AC_PATH_PROG([FOP], [fop])
1726 if test "x$FOP" = "x"; then
1727 AC_MSG_WARN([fop not found - documentation targets will be skipped])
1732 elif test "x$use_fop" = x"yes" ; then
1733 AC_PATH_PROG([FOP], [fop])
1734 if test "x$FOP" = "x"; then
1735 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1738 elif test "x$use_fop" = x"no" ; then
1739 if test "x$FOP" != "x"; then
1740 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1744 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1746 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1749 # XORG_WITH_PS2PDF([DEFAULT])
1751 # Minimum version: 1.6.0
1753 # Documentation tools are not always available on all platforms and sometimes
1754 # not at the appropriate level. This macro enables a module to test for the
1755 # presence of the tool and obtain it's path in separate variables. Coupled with
1756 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1757 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1758 # --with-ps2pdf assumes 'auto'.
1760 # Interface to module:
1761 # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
1762 # PS2PDF: returns the path of the ps2pdf program found
1763 # returns the path set by the user in the environment
1764 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1765 # 'no' user instructs the module not to use ps2pdf
1767 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1769 AC_DEFUN([XORG_WITH_PS2PDF],[
1770 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1771 m4_define([_defopt], m4_default([$1], [auto]))
1773 AS_HELP_STRING([--with-ps2pdf],
1774 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1775 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1776 m4_undefine([_defopt])
1778 if test "x$use_ps2pdf" = x"auto"; then
1779 AC_PATH_PROG([PS2PDF], [ps2pdf])
1780 if test "x$PS2PDF" = "x"; then
1781 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1786 elif test "x$use_ps2pdf" = x"yes" ; then
1787 AC_PATH_PROG([PS2PDF], [ps2pdf])
1788 if test "x$PS2PDF" = "x"; then
1789 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1792 elif test "x$use_ps2pdf" = x"no" ; then
1793 if test "x$PS2PDF" != "x"; then
1794 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1798 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1800 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1801 ]) # XORG_WITH_PS2PDF
1803 # XORG_ENABLE_DOCS (enable_docs=yes)
1805 # Minimum version: 1.6.0
1807 # Documentation tools are not always available on all platforms and sometimes
1808 # not at the appropriate level. This macro enables a builder to skip all
1809 # documentation targets except traditional man pages.
1810 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1811 # maximum flexibilty in controlling documentation building.
1813 # XORG_WITH_XMLTO --with-xmlto
1814 # XORG_WITH_ASCIIDOC --with-asciidoc
1815 # XORG_WITH_DOXYGEN --with-doxygen
1816 # XORG_WITH_FOP --with-fop
1817 # XORG_WITH_GROFF --with-groff
1818 # XORG_WITH_PS2PDF --with-ps2pdf
1820 # Interface to module:
1821 # ENABLE_DOCS: used in makefiles to conditionally generate documentation
1822 # --enable-docs: 'yes' user instructs the module to generate docs
1823 # 'no' user instructs the module not to generate docs
1824 # parm1: specify the default value, yes or no.
1826 AC_DEFUN([XORG_ENABLE_DOCS],[
1827 m4_define([default], m4_default([$1], [yes]))
1829 AS_HELP_STRING([--enable-docs],
1830 [Enable building the documentation (default: ]default[)]),
1831 [build_docs=$enableval], [build_docs=]default)
1832 m4_undefine([default])
1833 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1834 AC_MSG_CHECKING([whether to build documentation])
1835 AC_MSG_RESULT([$build_docs])
1836 ]) # XORG_ENABLE_DOCS
1838 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1840 # Minimum version: 1.6.0
1842 # This macro enables a builder to skip all developer documentation.
1843 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1844 # maximum flexibilty in controlling documentation building.
1846 # XORG_WITH_XMLTO --with-xmlto
1847 # XORG_WITH_ASCIIDOC --with-asciidoc
1848 # XORG_WITH_DOXYGEN --with-doxygen
1849 # XORG_WITH_FOP --with-fop
1850 # XORG_WITH_GROFF --with-groff
1851 # XORG_WITH_PS2PDF --with-ps2pdf
1853 # Interface to module:
1854 # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
1855 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
1856 # 'no' user instructs the module not to generate developer docs
1857 # parm1: specify the default value, yes or no.
1859 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1860 m4_define([devel_default], m4_default([$1], [yes]))
1861 AC_ARG_ENABLE(devel-docs,
1862 AS_HELP_STRING([--enable-devel-docs],
1863 [Enable building the developer documentation (default: ]devel_default[)]),
1864 [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1865 m4_undefine([devel_default])
1866 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1867 AC_MSG_CHECKING([whether to build developer documentation])
1868 AC_MSG_RESULT([$build_devel_docs])
1869 ]) # XORG_ENABLE_DEVEL_DOCS
1871 # XORG_ENABLE_SPECS (enable_specs=yes)
1873 # Minimum version: 1.6.0
1875 # This macro enables a builder to skip all functional specification targets.
1876 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1877 # maximum flexibilty in controlling documentation building.
1879 # XORG_WITH_XMLTO --with-xmlto
1880 # XORG_WITH_ASCIIDOC --with-asciidoc
1881 # XORG_WITH_DOXYGEN --with-doxygen
1882 # XORG_WITH_FOP --with-fop
1883 # XORG_WITH_GROFF --with-groff
1884 # XORG_WITH_PS2PDF --with-ps2pdf
1886 # Interface to module:
1887 # ENABLE_SPECS: used in makefiles to conditionally generate specs
1888 # --enable-specs: 'yes' user instructs the module to generate specs
1889 # 'no' user instructs the module not to generate specs
1890 # parm1: specify the default value, yes or no.
1892 AC_DEFUN([XORG_ENABLE_SPECS],[
1893 m4_define([spec_default], m4_default([$1], [yes]))
1894 AC_ARG_ENABLE(specs,
1895 AS_HELP_STRING([--enable-specs],
1896 [Enable building the specs (default: ]spec_default[)]),
1897 [build_specs=$enableval], [build_specs=]spec_default)
1898 m4_undefine([spec_default])
1899 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1900 AC_MSG_CHECKING([whether to build functional specifications])
1901 AC_MSG_RESULT([$build_specs])
1902 ]) # XORG_ENABLE_SPECS
1904 # XORG_CHECK_MALLOC_ZERO
1905 # ----------------------
1906 # Minimum version: 1.0.0
1908 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1909 # malloc(0) returns NULL. Packages should add one of these cflags to
1910 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1911 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1912 AC_ARG_ENABLE(malloc0returnsnull,
1913 AS_HELP_STRING([--enable-malloc0returnsnull],
1914 [malloc(0) returns NULL (default: auto)]),
1915 [MALLOC_ZERO_RETURNS_NULL=$enableval],
1916 [MALLOC_ZERO_RETURNS_NULL=auto])
1918 AC_MSG_CHECKING([whether malloc(0) returns NULL])
1919 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1925 char *m0, *r0, *c0, *p;
1930 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1932 [MALLOC_ZERO_RETURNS_NULL=yes],
1933 [MALLOC_ZERO_RETURNS_NULL=no],
1934 [MALLOC_ZERO_RETURNS_NULL=yes])
1936 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1938 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1939 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1940 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1941 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1943 MALLOC_ZERO_CFLAGS=""
1944 XMALLOC_ZERO_CFLAGS=""
1945 XTMALLOC_ZERO_CFLAGS=""
1948 AC_SUBST([MALLOC_ZERO_CFLAGS])
1949 AC_SUBST([XMALLOC_ZERO_CFLAGS])
1950 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1951 ]) # XORG_CHECK_MALLOC_ZERO
1955 # Minimum version: 1.1.0
1957 # This macro enables the use of a tool that flags some suspicious and
1958 # non-portable constructs (likely to be bugs) in C language source code.
1959 # It will attempt to locate the tool and use appropriate options.
1960 # There are various lint type tools on different platforms.
1962 # Interface to module:
1963 # LINT: returns the path to the tool found on the platform
1964 # or the value set to LINT on the configure cmd line
1965 # also an Automake conditional
1966 # LINT_FLAGS: an Automake variable with appropriate flags
1968 # --with-lint: 'yes' user instructs the module to use lint
1969 # 'no' user instructs the module not to use lint (default)
1971 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1972 # If the user sets the value of LINT_FLAGS, they are used verbatim.
1974 AC_DEFUN([XORG_WITH_LINT],[
1976 AC_ARG_VAR([LINT], [Path to a lint-style command])
1977 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1978 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1979 [Use a lint-style source code checker (default: disabled)])],
1980 [use_lint=$withval], [use_lint=no])
1982 # Obtain platform specific info like program name and options
1983 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
1985 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1987 lint_options="-badflag"
1989 *freebsd* | *netbsd*)
1991 lint_options="-u -b"
1995 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1999 # Test for the presence of the program (either guessed by the code or spelled out by the user)
2000 if test "x$use_lint" = x"yes" ; then
2001 AC_PATH_PROG([LINT], [$lint_name])
2002 if test "x$LINT" = "x"; then
2003 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2005 elif test "x$use_lint" = x"no" ; then
2006 if test "x$LINT" != "x"; then
2007 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2010 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2013 # User supplied flags override default flags
2014 if test "x$LINT_FLAGS" != "x"; then
2015 lint_options=$LINT_FLAGS
2018 AC_SUBST([LINT_FLAGS],[$lint_options])
2019 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2023 # XORG_LINT_LIBRARY(LIBNAME)
2024 # --------------------------
2025 # Minimum version: 1.1.0
2027 # Sets up flags for building lint libraries for checking programs that call
2028 # functions in the library.
2030 # Interface to module:
2031 # LINTLIB - Automake variable with the name of lint library file to make
2032 # MAKE_LINT_LIB - Automake conditional
2034 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
2035 # - 'no' user instructs the module not to create a lint library (default)
2037 AC_DEFUN([XORG_LINT_LIBRARY],[
2038 AC_REQUIRE([XORG_WITH_LINT])
2039 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2040 [Create lint library (default: disabled)])],
2041 [make_lint_lib=$enableval], [make_lint_lib=no])
2043 if test "x$make_lint_lib" = x"yes" ; then
2045 if test "x$LINT" = "x"; then
2046 AC_MSG_ERROR([Cannot make lint library without --with-lint])
2048 elif test "x$make_lint_lib" != x"no" ; then
2049 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2053 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2055 ]) # XORG_LINT_LIBRARY
2059 # Minimum version: 1.2.0
2061 # Defines CWARNFLAGS to enable C compiler warnings.
2063 AC_DEFUN([XORG_CWARNFLAGS], [
2064 AC_REQUIRE([AC_PROG_CC_C99])
2065 if test "x$GCC" = xyes ; then
2066 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2067 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2068 -Wbad-function-cast -Wformat=2"
2069 case `$CC -dumpversion` in
2071 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2075 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2076 if test "x$SUNCC" = "xyes"; then
2080 AC_SUBST(CWARNFLAGS)
2081 ]) # XORG_CWARNFLAGS
2083 # XORG_STRICT_OPTION
2084 # -----------------------
2085 # Minimum version: 1.3.0
2087 # Add configure option to enable strict compilation
2088 AC_DEFUN([XORG_STRICT_OPTION], [
2089 # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2090 AC_REQUIRE([AC_PROG_CC_C99])
2091 AC_REQUIRE([XORG_CWARNFLAGS])
2093 AC_ARG_ENABLE(strict-compilation,
2094 AS_HELP_STRING([--enable-strict-compilation],
2095 [Enable all warnings from compiler and make them errors (default: disabled)]),
2096 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2097 if test "x$STRICT_COMPILE" = "xyes"; then
2098 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2099 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2100 if test "x$GCC" = xyes ; then
2101 STRICT_CFLAGS="-pedantic -Werror"
2102 elif test "x$SUNCC" = "xyes"; then
2103 STRICT_CFLAGS="-errwarn"
2104 elif test "x$INTELCC" = "xyes"; then
2105 STRICT_CFLAGS="-Werror"
2108 CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2109 AC_SUBST([CWARNFLAGS])
2110 ]) # XORG_STRICT_OPTION
2112 # XORG_DEFAULT_OPTIONS
2113 # --------------------
2114 # Minimum version: 1.3.0
2116 # Defines default options for X.Org modules.
2118 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2119 AC_REQUIRE([AC_PROG_INSTALL])
2122 XORG_RELEASE_VERSION
2125 XORG_MANPAGE_SECTIONS
2126 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2127 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2128 ]) # XORG_DEFAULT_OPTIONS
2132 # Minimum version: 1.4.0
2134 # Defines the variable INSTALL_CMD as the command to copy
2135 # INSTALL from $prefix/share/util-macros.
2137 AC_DEFUN([XORG_INSTALL], [
2138 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2139 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2140 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2141 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2142 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2143 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2144 AC_SUBST([INSTALL_CMD])
2146 dnl Copyright 2005 Red Hat, Inc
2148 dnl Permission to use, copy, modify, distribute, and sell this software and its
2149 dnl documentation for any purpose is hereby granted without fee, provided that
2150 dnl the above copyright notice appear in all copies and that both that
2151 dnl copyright notice and this permission notice appear in supporting
2154 dnl The above copyright notice and this permission notice shall be included
2155 dnl in all copies or substantial portions of the Software.
2157 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2158 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2159 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2160 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2161 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2162 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2163 dnl OTHER DEALINGS IN THE SOFTWARE.
2165 dnl Except as contained in this notice, the name of the copyright holders shall
2166 dnl not be used in advertising or otherwise to promote the sale, use or
2167 dnl other dealings in this Software without prior written authorization
2168 dnl from the copyright holders.
2171 # XORG_RELEASE_VERSION
2172 # --------------------
2173 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2175 AC_DEFUN([XORG_RELEASE_VERSION],[
2176 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2177 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2178 [Major version of this package])
2179 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2180 if test "x$PVM" = "x"; then
2183 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2185 [Minor version of this package])
2186 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2187 if test "x$PVP" = "x"; then
2190 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2192 [Patch version of this package])
2197 # Minimum version: 1.2.0
2199 # Defines the variable CHANGELOG_CMD as the command to generate
2200 # ChangeLog from git.
2203 AC_DEFUN([XORG_CHANGELOG], [
2204 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2205 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2206 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2207 echo 'git directory not found: installing possibly empty changelog.' >&2)"
2208 AC_SUBST([CHANGELOG_CMD])
2211 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2213 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2215 # This program is free software; you can redistribute it and/or modify
2216 # it under the terms of the GNU General Public License as published by
2217 # the Free Software Foundation; either version 2 of the License, or
2218 # (at your option) any later version.
2220 # This program is distributed in the hope that it will be useful, but
2221 # WITHOUT ANY WARRANTY; without even the implied warranty of
2222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2223 # General Public License for more details.
2225 # You should have received a copy of the GNU General Public License
2226 # along with this program; if not, write to the Free Software
2227 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2229 # As a special exception to the GNU General Public License, if you
2230 # distribute this file as part of a program that contains a
2231 # configuration script generated by Autoconf, you may include it under
2232 # the same distribution terms that you use for the rest of that program.
2234 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2235 # ----------------------------------
2236 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2237 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2238 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2239 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2240 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2241 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2243 if test -n "$PKG_CONFIG"; then
2244 _pkg_min_version=m4_default([$1], [0.9.0])
2245 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2246 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2247 AC_MSG_RESULT([yes])
2254 ])# PKG_PROG_PKG_CONFIG
2256 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2258 # Check to see whether a particular set of modules exists. Similar
2259 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2262 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
2263 # this or PKG_CHECK_MODULES is called, or make sure to call
2264 # PKG_CHECK_EXISTS manually
2265 # --------------------------------------------------------------
2266 AC_DEFUN([PKG_CHECK_EXISTS],
2267 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2268 if test -n "$PKG_CONFIG" && \
2269 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2270 m4_ifval([$2], [$2], [:])
2271 m4_ifvaln([$3], [else
2276 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2277 # ---------------------------------------------
2278 m4_define([_PKG_CONFIG],
2279 [if test -n "$$1"; then
2281 elif test -n "$PKG_CONFIG"; then
2282 PKG_CHECK_EXISTS([$3],
2283 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2290 # _PKG_SHORT_ERRORS_SUPPORTED
2291 # -----------------------------
2292 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2293 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2294 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2295 _pkg_short_errors_supported=yes
2297 _pkg_short_errors_supported=no
2299 ])# _PKG_SHORT_ERRORS_SUPPORTED
2302 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2303 # [ACTION-IF-NOT-FOUND])
2306 # Note that if there is a possibility the first call to
2307 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2308 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2311 # --------------------------------------------------------------
2312 AC_DEFUN([PKG_CHECK_MODULES],
2313 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2314 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2315 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2318 AC_MSG_CHECKING([for $1])
2320 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2321 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2323 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2324 and $1[]_LIBS to avoid the need to call pkg-config.
2325 See the pkg-config man page for more details.])
2327 if test $pkg_failed = yes; then
2328 _PKG_SHORT_ERRORS_SUPPORTED
2329 if test $_pkg_short_errors_supported = yes; then
2330 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2332 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2334 # Put the nasty error message in config.log where it belongs
2335 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2337 ifelse([$4], , [AC_MSG_ERROR(dnl
2338 [Package requirements ($2) were not met:
2342 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2343 installed software in a non-standard prefix.
2347 [AC_MSG_RESULT([no])
2349 elif test $pkg_failed = untried; then
2350 ifelse([$4], , [AC_MSG_FAILURE(dnl
2351 [The pkg-config script could not be found or is too old. Make sure it
2352 is in your PATH or set the PKG_CONFIG environment variable to the full
2357 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2360 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2361 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2362 AC_MSG_RESULT([yes])
2363 ifelse([$3], , :, [$3])
2365 ])# PKG_CHECK_MODULES
2367 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2369 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2370 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2372 # Written by Gordon Matzigkeit, 1996
2374 # This file is free software; the Free Software Foundation gives
2375 # unlimited permission to copy and/or distribute it, with or without
2376 # modifications, as long as this notice is preserved.
2378 m4_define([_LT_COPYING], [dnl
2379 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2380 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2382 # Written by Gordon Matzigkeit, 1996
2384 # This file is part of GNU Libtool.
2386 # GNU Libtool is free software; you can redistribute it and/or
2387 # modify it under the terms of the GNU General Public License as
2388 # published by the Free Software Foundation; either version 2 of
2389 # the License, or (at your option) any later version.
2391 # As a special exception to the GNU General Public License,
2392 # if you distribute this file as part of a program or library that
2393 # is built using GNU Libtool, you may include this file under the
2394 # same distribution terms that you use for the rest of that program.
2396 # GNU Libtool is distributed in the hope that it will be useful,
2397 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2398 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2399 # GNU General Public License for more details.
2401 # You should have received a copy of the GNU General Public License
2402 # along with GNU Libtool; see the file COPYING. If not, a copy
2403 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2404 # obtained by writing to the Free Software Foundation, Inc.,
2405 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2411 # LT_PREREQ(VERSION)
2412 # ------------------
2413 # Complain and exit if this libtool version is less that VERSION.
2414 m4_defun([LT_PREREQ],
2415 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2417 [m4_fatal([Libtool version $1 or higher is required],
2422 # _LT_CHECK_BUILDDIR
2423 # ------------------
2424 # Complain if the absolute build directory name contains unusual characters
2425 m4_defun([_LT_CHECK_BUILDDIR],
2428 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2433 # LT_INIT([OPTIONS])
2434 # ------------------
2436 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2437 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2438 AC_BEFORE([$0], [LT_LANG])dnl
2439 AC_BEFORE([$0], [LT_OUTPUT])dnl
2440 AC_BEFORE([$0], [LTDL_INIT])dnl
2441 m4_require([_LT_CHECK_BUILDDIR])dnl
2443 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2444 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2445 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2446 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2447 dnl unless we require an AC_DEFUNed macro:
2448 AC_REQUIRE([LTOPTIONS_VERSION])dnl
2449 AC_REQUIRE([LTSUGAR_VERSION])dnl
2450 AC_REQUIRE([LTVERSION_VERSION])dnl
2451 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2452 m4_require([_LT_PROG_LTMAIN])dnl
2454 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2457 _LT_SET_OPTIONS([$0], [$1])
2459 # This can be used to rebuild libtool when needed
2460 LIBTOOL_DEPS="$ltmain"
2462 # Always use our own libtool.
2463 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2464 AC_SUBST(LIBTOOL)dnl
2469 m4_define([LT_INIT])
2473 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2474 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2475 dnl aclocal-1.4 backwards compatibility:
2476 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2477 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2480 # _LT_CC_BASENAME(CC)
2481 # -------------------
2482 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2483 m4_defun([_LT_CC_BASENAME],
2484 [for cc_temp in $1""; do
2486 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2487 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2492 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2496 # _LT_FILEUTILS_DEFAULTS
2497 # ----------------------
2498 # It is okay to use these file commands and assume they have been set
2499 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2500 m4_defun([_LT_FILEUTILS_DEFAULTS],
2504 ])# _LT_FILEUTILS_DEFAULTS
2509 m4_defun([_LT_SETUP],
2510 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2511 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2512 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2513 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2515 _LT_DECL([], [host_alias], [0], [The host system])dnl
2516 _LT_DECL([], [host], [0])dnl
2517 _LT_DECL([], [host_os], [0])dnl
2519 _LT_DECL([], [build_alias], [0], [The build system])dnl
2520 _LT_DECL([], [build], [0])dnl
2521 _LT_DECL([], [build_os], [0])dnl
2523 AC_REQUIRE([AC_PROG_CC])dnl
2524 AC_REQUIRE([LT_PATH_LD])dnl
2525 AC_REQUIRE([LT_PATH_NM])dnl
2527 AC_REQUIRE([AC_PROG_LN_S])dnl
2528 test -z "$LN_S" && LN_S="ln -s"
2529 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2531 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2532 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2533 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2535 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2537 m4_require([_LT_CMD_RELOAD])dnl
2538 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2539 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2540 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2542 _LT_CONFIG_LIBTOOL_INIT([
2543 # See if we are running on zsh, and set the options which allow our
2544 # commands through without removal of \ escapes INIT.
2545 if test -n "\${ZSH_VERSION+set}" ; then
2546 setopt NO_GLOB_SUBST
2549 if test -n "${ZSH_VERSION+set}" ; then
2550 setopt NO_GLOB_SUBST
2555 m4_require([_LT_TAG_COMPILER])dnl
2559 # AIX sometimes has problems with the GCC collect2 program. For some
2560 # reason, if we set the COLLECT_NAMES environment variable, the problems
2561 # vanish in a puff of smoke.
2562 if test "X${COLLECT_NAMES+set}" != Xset; then
2564 export COLLECT_NAMES
2571 can_build_shared=yes
2573 # All known linkers require a `.a' archive for static linking (except MSVC,
2574 # which needs '.lib').
2577 with_gnu_ld="$lt_cv_prog_gnu_ld"
2580 old_CFLAGS="$CFLAGS"
2582 # Set sane defaults for various variables
2583 test -z "$CC" && CC=cc
2584 test -z "$LTCC" && LTCC=$CC
2585 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2586 test -z "$LD" && LD=ld
2587 test -z "$ac_objext" && ac_objext=o
2589 _LT_CC_BASENAME([$compiler])
2591 # Only perform the check for file, if the check method requires it
2592 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2593 case $deplibs_check_method in
2595 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2601 # Use C for the default configuration in the libtool script
2602 LT_SUPPORTED_TAG([CC])
2604 _LT_LANG_DEFAULT_CONFIG
2609 # _LT_PREPARE_SED_QUOTE_VARS
2610 # --------------------------
2611 # Define a few sed substitution that help us do robust quoting.
2612 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2613 [# Backslashify metacharacters that are still active within
2614 # double-quoted strings.
2615 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2617 # Same as above, but do not quote variable references.
2618 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2620 # Sed substitution to delay expansion of an escaped shell variable in a
2621 # double_quote_subst'ed string.
2622 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2624 # Sed substitution to delay expansion of an escaped single quote.
2625 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2627 # Sed substitution to avoid accidental globbing in evaled expressions
2628 no_glob_subst='s/\*/\\\*/g'
2633 # Note that this code is called both from `configure', and `config.status'
2634 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2635 # `config.status' has no value for ac_aux_dir unless we are using Automake,
2636 # so we pass a copy along to make sure it has a sensible value anyway.
2637 m4_defun([_LT_PROG_LTMAIN],
2638 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2639 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2640 ltmain="$ac_aux_dir/ltmain.sh"
2645 # So that we can recreate a full libtool script including additional
2646 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2647 # in macros and then make a single call at the end using the `libtool'
2651 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2652 # ----------------------------------------
2653 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2654 m4_define([_LT_CONFIG_LIBTOOL_INIT],
2656 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2661 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2664 # _LT_CONFIG_LIBTOOL([COMMANDS])
2665 # ------------------------------
2666 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2667 m4_define([_LT_CONFIG_LIBTOOL],
2669 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2674 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2677 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2678 # -----------------------------------------------------
2679 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2680 [_LT_CONFIG_LIBTOOL([$1])
2681 _LT_CONFIG_LIBTOOL_INIT([$2])
2685 # _LT_FORMAT_COMMENT([COMMENT])
2686 # -----------------------------
2687 # Add leading comment marks to the start of each line, and a trailing
2688 # full-stop to the whole comment if one is not present already.
2689 m4_define([_LT_FORMAT_COMMENT],
2691 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2692 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2699 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2700 # -------------------------------------------------------------------
2701 # CONFIGNAME is the name given to the value in the libtool script.
2702 # VARNAME is the (base) name used in the configure script.
2703 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2704 # VARNAME. Any other value will be used directly.
2705 m4_define([_LT_DECL],
2706 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2707 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2708 [m4_ifval([$1], [$1], [$2])])
2709 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2711 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2712 lt_dict_add_subkey([lt_decl_dict], [$2],
2713 [tagged?], [m4_ifval([$5], [yes], [no])])])
2717 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2718 # --------------------------------------------------------
2719 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2722 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2723 # ------------------------------------------------
2724 m4_define([lt_decl_tag_varnames],
2725 [_lt_decl_filter([tagged?], [yes], $@)])
2728 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2729 # ---------------------------------------------------------
2730 m4_define([_lt_decl_filter],
2732 [0], [m4_fatal([$0: too few arguments: $#])],
2733 [1], [m4_fatal([$0: too few arguments: $#: $1])],
2734 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2735 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2736 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2740 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2741 # --------------------------------------------------
2742 m4_define([lt_decl_quote_varnames],
2743 [_lt_decl_filter([value], [1], $@)])
2746 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2747 # ---------------------------------------------------
2748 m4_define([lt_decl_dquote_varnames],
2749 [_lt_decl_filter([value], [2], $@)])
2752 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2753 # ---------------------------------------------------
2754 m4_define([lt_decl_varnames_tagged],
2755 [m4_assert([$# <= 2])dnl
2756 _$0(m4_quote(m4_default([$1], [[, ]])),
2757 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2758 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2759 m4_define([_lt_decl_varnames_tagged],
2760 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2763 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2764 # ------------------------------------------------
2765 m4_define([lt_decl_all_varnames],
2766 [_$0(m4_quote(m4_default([$1], [[, ]])),
2768 m4_quote(lt_decl_varnames),
2769 m4_quote(m4_shift($@))))[]dnl
2771 m4_define([_lt_decl_all_varnames],
2772 [lt_join($@, lt_decl_varnames_tagged([$1],
2773 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2777 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2778 # ------------------------------------
2779 # Quote a variable value, and forward it to `config.status' so that its
2780 # declaration there will have the same value as in `configure'. VARNAME
2781 # must have a single quote delimited value for this to work.
2782 m4_define([_LT_CONFIG_STATUS_DECLARE],
2783 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2786 # _LT_CONFIG_STATUS_DECLARATIONS
2787 # ------------------------------
2788 # We delimit libtool config variables with single quotes, so when
2789 # we write them to config.status, we have to be sure to quote all
2790 # embedded single quotes properly. In configure, this macro expands
2791 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2793 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2794 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2795 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2796 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2801 # Output comment and list of tags supported by the script
2802 m4_defun([_LT_LIBTOOL_TAGS],
2803 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2804 available_tags="_LT_TAGS"dnl
2808 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2809 # -----------------------------------
2810 # Extract the dictionary values for VARNAME (optionally with TAG) and
2811 # expand to a commented shell variable setting:
2813 # # Some comment about what VAR is for.
2814 # visible_name=$lt_internal_name
2815 m4_define([_LT_LIBTOOL_DECLARE],
2816 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2817 [description])))[]dnl
2818 m4_pushdef([_libtool_name],
2819 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2820 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2821 [0], [_libtool_name=[$]$1],
2822 [1], [_libtool_name=$lt_[]$1],
2823 [2], [_libtool_name=$lt_[]$1],
2824 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2825 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2829 # _LT_LIBTOOL_CONFIG_VARS
2830 # -----------------------
2831 # Produce commented declarations of non-tagged libtool config variables
2832 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2833 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2834 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2835 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2836 [m4_foreach([_lt_var],
2837 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2838 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2841 # _LT_LIBTOOL_TAG_VARS(TAG)
2842 # -------------------------
2843 m4_define([_LT_LIBTOOL_TAG_VARS],
2844 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2845 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2848 # _LT_TAGVAR(VARNAME, [TAGNAME])
2849 # ------------------------------
2850 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2853 # _LT_CONFIG_COMMANDS
2854 # -------------------
2855 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2856 # variables for single and double quote escaping we saved from calls
2857 # to _LT_DECL, we can put quote escaped variables declarations
2858 # into `config.status', and then the shell code to quote escape them in
2859 # for loops in `config.status'. Finally, any additional code accumulated
2860 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2861 m4_defun([_LT_CONFIG_COMMANDS],
2862 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2863 dnl If the libtool generation code has been placed in $CONFIG_LT,
2864 dnl instead of duplicating it all over again into config.status,
2865 dnl then we will have config.status run $CONFIG_LT later, so it
2866 dnl needs to know what name is stored there:
2867 [AC_CONFIG_COMMANDS([libtool],
2868 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2869 dnl If the libtool generation code is destined for config.status,
2870 dnl expand the accumulated commands and init code now:
2871 [AC_CONFIG_COMMANDS([libtool],
2872 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2873 ])#_LT_CONFIG_COMMANDS
2877 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2880 # The HP-UX ksh and POSIX shell print the target directory to stdout
2882 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2884 sed_quote_subst='$sed_quote_subst'
2885 double_quote_subst='$double_quote_subst'
2886 delay_variable_subst='$delay_variable_subst'
2887 _LT_CONFIG_STATUS_DECLARATIONS
2889 LTCFLAGS='$LTCFLAGS'
2890 compiler='$compiler_DEFAULT'
2892 # A function that is used when there is no print builtin or printf.
2893 func_fallback_echo ()
2895 eval 'cat <<_LTECHO_EOF
2900 # Quote evaled strings.
2901 for var in lt_decl_all_varnames([[ \
2902 ]], lt_decl_quote_varnames); do
2903 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2904 *[[\\\\\\\`\\"\\\$]]*)
2905 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2908 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2913 # Double-quote double-evaled strings.
2914 for var in lt_decl_all_varnames([[ \
2915 ]], lt_decl_dquote_varnames); do
2916 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2917 *[[\\\\\\\`\\"\\\$]]*)
2918 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2921 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2926 _LT_OUTPUT_LIBTOOL_INIT
2929 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2930 # ------------------------------------
2931 # Generate a child script FILE with all initialization necessary to
2932 # reuse the environment learned by the parent script, and make the
2933 # file executable. If COMMENT is supplied, it is inserted after the
2934 # `#!' sequence but before initialization text begins. After this
2935 # macro, additional text can be appended to FILE to form the body of
2936 # the child script. The macro ends with non-zero status if the
2937 # file could not be fully written (such as if the disk is full).
2938 m4_ifdef([AS_INIT_GENERATED],
2939 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2940 [m4_defun([_LT_GENERATED_FILE_INIT],
2941 [m4_require([AS_PREPARE])]dnl
2942 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2944 cat >$1 <<_ASEOF || lt_write_fail=1
2946 # Generated by $as_me.
2948 SHELL=\${CONFIG_SHELL-$SHELL}
2951 cat >>$1 <<\_ASEOF || lt_write_fail=1
2954 exec AS_MESSAGE_FD>&1
2956 test $lt_write_fail = 0 && chmod +x $1[]dnl
2957 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2961 # This macro allows early generation of the libtool script (before
2962 # AC_OUTPUT is called), incase it is used in configure for compilation
2964 AC_DEFUN([LT_OUTPUT],
2965 [: ${CONFIG_LT=./config.lt}
2966 AC_MSG_NOTICE([creating $CONFIG_LT])
2967 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2968 [# Run this file to recreate a libtool stub with the current configuration.])
2970 cat >>"$CONFIG_LT" <<\_LTEOF
2972 exec AS_MESSAGE_LOG_FD>>config.log
2975 AS_BOX([Running $as_me.])
2976 } >&AS_MESSAGE_LOG_FD
2979 \`$as_me' creates a local libtool stub from the current configuration,
2980 for use in further configure time tests before the real libtool is
2983 Usage: $[0] [[OPTIONS]]
2985 -h, --help print this help, then exit
2986 -V, --version print version number, then exit
2987 -q, --quiet do not print progress messages
2988 -d, --debug don't remove temporary files
2990 Report bugs to <bug-libtool@gnu.org>."
2993 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2994 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2995 configured by $[0], generated by m4_PACKAGE_STRING.
2997 Copyright (C) 2010 Free Software Foundation, Inc.
2998 This config.lt script is free software; the Free Software Foundation
2999 gives unlimited permision to copy, distribute and modify it."
3001 while test $[#] != 0
3004 --version | --v* | -V )
3005 echo "$lt_cl_version"; exit 0 ;;
3006 --help | --h* | -h )
3007 echo "$lt_cl_help"; exit 0 ;;
3008 --debug | --d* | -d )
3010 --quiet | --q* | --silent | --s* | -q )
3013 -*) AC_MSG_ERROR([unrecognized option: $[1]
3014 Try \`$[0] --help' for more information.]) ;;
3016 *) AC_MSG_ERROR([unrecognized argument: $[1]
3017 Try \`$[0] --help' for more information.]) ;;
3022 if $lt_cl_silent; then
3023 exec AS_MESSAGE_FD>/dev/null
3027 cat >>"$CONFIG_LT" <<_LTEOF
3028 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3031 cat >>"$CONFIG_LT" <<\_LTEOF
3032 AC_MSG_NOTICE([creating $ofile])
3033 _LT_OUTPUT_LIBTOOL_COMMANDS
3036 chmod +x "$CONFIG_LT"
3038 # configure is writing to config.log, but config.lt does its own redirection,
3039 # appending to config.log, which fails on DOS, as config.log is still kept
3040 # open by configure. Here we exec the FD to /dev/null, effectively closing
3041 # config.log, so it can be properly (re)opened and appended to by config.lt.
3043 test "$silent" = yes &&
3044 lt_config_lt_args="$lt_config_lt_args --quiet"
3045 exec AS_MESSAGE_LOG_FD>/dev/null
3046 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3047 exec AS_MESSAGE_LOG_FD>>config.log
3048 $lt_cl_success || AS_EXIT(1)
3054 # If TAG is the built-in tag, create an initial libtool script with a
3055 # default configuration from the untagged config vars. Otherwise add code
3056 # to config.status for appending the configuration named by TAG from the
3057 # matching tagged config vars.
3058 m4_defun([_LT_CONFIG],
3059 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3060 _LT_CONFIG_SAVE_COMMANDS([
3061 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3062 m4_if(_LT_TAG, [C], [
3063 # See if we are running on zsh, and set the options which allow our
3064 # commands through without removal of \ escapes.
3065 if test -n "${ZSH_VERSION+set}" ; then
3066 setopt NO_GLOB_SUBST
3070 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3073 cat <<_LT_EOF >> "$cfgfile"
3076 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3077 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3078 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3079 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3084 # ### BEGIN LIBTOOL CONFIG
3085 _LT_LIBTOOL_CONFIG_VARS
3086 _LT_LIBTOOL_TAG_VARS
3087 # ### END LIBTOOL CONFIG
3093 cat <<\_LT_EOF >> "$cfgfile"
3094 # AIX sometimes has problems with the GCC collect2 program. For some
3095 # reason, if we set the COLLECT_NAMES environment variable, the problems
3096 # vanish in a puff of smoke.
3097 if test "X${COLLECT_NAMES+set}" != Xset; then
3099 export COLLECT_NAMES
3107 # We use sed instead of cat because bash on DJGPP gets confused if
3108 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3109 # text mode, it properly converts lines to CR/LF. This bash problem
3110 # is reportedly fixed, but why not run on old versions too?
3111 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3112 || (rm -f "$cfgfile"; exit 1)
3114 _LT_PROG_XSI_SHELLFNS
3116 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3117 || (rm -f "$cfgfile"; exit 1)
3119 mv -f "$cfgfile" "$ofile" ||
3120 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3123 [cat <<_LT_EOF >> "$ofile"
3125 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3126 dnl in a comment (ie after a #).
3127 # ### BEGIN LIBTOOL TAG CONFIG: $1
3128 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
3129 # ### END LIBTOOL TAG CONFIG: $1
3136 TIMESTAMP='$TIMESTAMP'
3138 ofile='$ofile'], [])
3139 ])dnl /_LT_CONFIG_SAVE_COMMANDS
3143 # LT_SUPPORTED_TAG(TAG)
3144 # ---------------------
3145 # Trace this macro to discover what tags are supported by the libtool
3146 # --tag option, using:
3147 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
3148 AC_DEFUN([LT_SUPPORTED_TAG], [])
3151 # C support is built-in for now
3152 m4_define([_LT_LANG_C_enabled], [])
3153 m4_define([_LT_TAGS], [])
3158 # Enable libtool support for the given language if not already enabled.
3160 [AC_BEFORE([$0], [LT_OUTPUT])dnl
3163 [C++], [_LT_LANG(CXX)],
3164 [Java], [_LT_LANG(GCJ)],
3165 [Fortran 77], [_LT_LANG(F77)],
3166 [Fortran], [_LT_LANG(FC)],
3167 [Windows Resource], [_LT_LANG(RC)],
3168 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3170 [m4_fatal([$0: unsupported language: "$1"])])])dnl
3174 # _LT_LANG(LANGNAME)
3175 # ------------------
3176 m4_defun([_LT_LANG],
3177 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
3178 [LT_SUPPORTED_TAG([$1])dnl
3179 m4_append([_LT_TAGS], [$1 ])dnl
3180 m4_define([_LT_LANG_]$1[_enabled], [])dnl
3181 _LT_LANG_$1_CONFIG($1)])dnl
3185 # _LT_LANG_DEFAULT_CONFIG
3186 # -----------------------
3187 m4_defun([_LT_LANG_DEFAULT_CONFIG],
3188 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
3190 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3192 AC_PROVIDE_IFELSE([AC_PROG_F77],
3194 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3196 AC_PROVIDE_IFELSE([AC_PROG_FC],
3198 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3200 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3201 dnl pulling things in needlessly.
3202 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3204 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3206 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3208 [m4_ifdef([AC_PROG_GCJ],
3209 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3210 m4_ifdef([A][M_PROG_GCJ],
3211 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3212 m4_ifdef([LT_PROG_GCJ],
3213 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3215 AC_PROVIDE_IFELSE([LT_PROG_RC],
3217 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3218 ])# _LT_LANG_DEFAULT_CONFIG
3221 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3222 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3223 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3224 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3225 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3226 dnl aclocal-1.4 backwards compatibility:
3227 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3228 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3229 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3230 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3231 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3236 m4_defun([_LT_TAG_COMPILER],
3237 [AC_REQUIRE([AC_PROG_CC])dnl
3239 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3240 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3241 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3242 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3244 # If no C compiler was specified, use CC.
3247 # If no C compiler flags were specified, use CFLAGS.
3248 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3250 # Allow CC to be a program name with arguments.
3252 ])# _LT_TAG_COMPILER
3255 # _LT_COMPILER_BOILERPLATE
3256 # ------------------------
3257 # Check for compiler boilerplate output or warnings with
3258 # the simple compiler test code.
3259 m4_defun([_LT_COMPILER_BOILERPLATE],
3260 [m4_require([_LT_DECL_SED])dnl
3261 ac_outfile=conftest.$ac_objext
3262 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3263 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3264 _lt_compiler_boilerplate=`cat conftest.err`
3266 ])# _LT_COMPILER_BOILERPLATE
3269 # _LT_LINKER_BOILERPLATE
3270 # ----------------------
3271 # Check for linker boilerplate output or warnings with
3272 # the simple link test code.
3273 m4_defun([_LT_LINKER_BOILERPLATE],
3274 [m4_require([_LT_DECL_SED])dnl
3275 ac_outfile=conftest.$ac_objext
3276 echo "$lt_simple_link_test_code" >conftest.$ac_ext
3277 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3278 _lt_linker_boilerplate=`cat conftest.err`
3280 ])# _LT_LINKER_BOILERPLATE
3282 # _LT_REQUIRED_DARWIN_CHECKS
3283 # -------------------------
3284 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3286 rhapsody* | darwin*)
3287 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3288 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3289 AC_CHECK_TOOL([LIPO], [lipo], [:])
3290 AC_CHECK_TOOL([OTOOL], [otool], [:])
3291 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3292 _LT_DECL([], [DSYMUTIL], [1],
3293 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3294 _LT_DECL([], [NMEDIT], [1],
3295 [Tool to change global to local symbols on Mac OS X])
3296 _LT_DECL([], [LIPO], [1],
3297 [Tool to manipulate fat objects and archives on Mac OS X])
3298 _LT_DECL([], [OTOOL], [1],
3299 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3300 _LT_DECL([], [OTOOL64], [1],
3301 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3303 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3304 [lt_cv_apple_cc_single_mod=no
3305 if test -z "${LT_MULTI_MODULE}"; then
3306 # By default we will add the -single_module flag. You can override
3307 # by either setting the environment variable LT_MULTI_MODULE
3308 # non-empty at configure time, or by adding -multi_module to the
3310 rm -rf libconftest.dylib*
3311 echo "int foo(void){return 1;}" > conftest.c
3312 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3313 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3314 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3315 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3317 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3318 lt_cv_apple_cc_single_mod=yes
3320 cat conftest.err >&AS_MESSAGE_LOG_FD
3322 rm -rf libconftest.dylib*
3325 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3326 [lt_cv_ld_exported_symbols_list],
3327 [lt_cv_ld_exported_symbols_list=no
3328 save_LDFLAGS=$LDFLAGS
3329 echo "_main" > conftest.sym
3330 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3331 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3332 [lt_cv_ld_exported_symbols_list=yes],
3333 [lt_cv_ld_exported_symbols_list=no])
3334 LDFLAGS="$save_LDFLAGS"
3336 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3337 [lt_cv_ld_force_load=no
3338 cat > conftest.c << _LT_EOF
3339 int forced_loaded() { return 2;}
3341 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3342 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3343 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3344 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3345 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3346 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3347 cat > conftest.c << _LT_EOF
3348 int main() { return 0;}
3350 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3351 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3353 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3354 lt_cv_ld_force_load=yes
3356 cat conftest.err >&AS_MESSAGE_LOG_FD
3358 rm -f conftest.err libconftest.a conftest conftest.c
3359 rm -rf conftest.dSYM
3362 rhapsody* | darwin1.[[012]])
3363 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3365 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3366 darwin*) # darwin 5.x on
3367 # if running on 10.5 or later, the deployment target defaults
3368 # to the OS version, if on x86, and 10.4, the deployment
3369 # target defaults to 10.4. Don't you love it?
3370 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3371 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3372 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3374 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3376 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3380 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3381 _lt_dar_single_mod='$single_module'
3383 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3384 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3386 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3388 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3389 _lt_dsymutil='~$DSYMUTIL $lib || :'
3398 # _LT_DARWIN_LINKER_FEATURES
3399 # --------------------------
3400 # Checks for linker and compiler features on darwin
3401 m4_defun([_LT_DARWIN_LINKER_FEATURES],
3403 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3404 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3405 _LT_TAGVAR(hardcode_direct, $1)=no
3406 _LT_TAGVAR(hardcode_automatic, $1)=yes
3407 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3408 if test "$lt_cv_ld_force_load" = "yes"; then
3409 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
3411 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3413 _LT_TAGVAR(link_all_deplibs, $1)=yes
3414 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3415 case $cc_basename in
3416 ifort*) _lt_dar_can_shared=yes ;;
3417 *) _lt_dar_can_shared=$GCC ;;
3419 if test "$_lt_dar_can_shared" = "yes"; then
3420 output_verbose_link_cmd=func_echo_all
3421 _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}"
3422 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3423 _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}"
3424 _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}"
3426 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3427 _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}"
3428 _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}"
3432 _LT_TAGVAR(ld_shlibs, $1)=no
3436 # _LT_SYS_MODULE_PATH_AIX
3437 # -----------------------
3438 # Links a minimal program and checks the executable
3439 # for the system default hardcoded library path. In most cases,
3440 # this is /usr/lib:/lib, but when the MPI compilers are used
3441 # the location of the communication and MPI libs are included too.
3442 # If we don't find anything, use the default library path according
3443 # to the aix ld manual.
3444 m4_defun([_LT_SYS_MODULE_PATH_AIX],
3445 [m4_require([_LT_DECL_SED])dnl
3446 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3447 lt_aix_libpath_sed='
3448 /Import File Strings/,/^$/ {
3454 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3455 # Check for a 64-bit object if we didn't find anything.
3456 if test -z "$aix_libpath"; then
3457 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3459 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3460 ])# _LT_SYS_MODULE_PATH_AIX
3463 # _LT_SHELL_INIT(ARG)
3464 # -------------------
3465 m4_define([_LT_SHELL_INIT],
3466 [m4_divert_text([M4SH-INIT], [$1
3467 ])])# _LT_SHELL_INIT
3471 # _LT_PROG_ECHO_BACKSLASH
3472 # -----------------------
3473 # Find how we can fake an echo command that does not interpret backslash.
3474 # In particular, with Autoconf 2.60 or later we add some code to the start
3475 # of the generated configure script which will find a shell with a builtin
3476 # printf (which we can use as an echo command).
3477 m4_defun([_LT_PROG_ECHO_BACKSLASH],
3478 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3479 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3480 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3482 AC_MSG_CHECKING([how to print strings])
3483 # Test print first, because it will be a builtin if present.
3484 if test "X`print -r -- -n 2>/dev/null`" = X-n && \
3485 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3487 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3490 # Use this function as a fallback that always works.
3491 func_fallback_echo ()
3493 eval 'cat <<_LTECHO_EOF
3497 ECHO='func_fallback_echo'
3500 # func_echo_all arg...
3501 # Invoke $ECHO with all args, space-separated.
3508 printf*) AC_MSG_RESULT([printf]) ;;
3509 print*) AC_MSG_RESULT([print -r]) ;;
3510 *) AC_MSG_RESULT([cat]) ;;
3513 m4_ifdef([_AS_DETECT_SUGGESTED],
3514 [_AS_DETECT_SUGGESTED([
3515 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3516 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3517 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3518 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3519 PATH=/empty FPATH=/empty; export PATH FPATH
3520 test "X`printf %s $ECHO`" = "X$ECHO" \
3521 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3523 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3524 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3525 ])# _LT_PROG_ECHO_BACKSLASH
3530 m4_defun([_LT_ENABLE_LOCK],
3531 [AC_ARG_ENABLE([libtool-lock],
3532 [AS_HELP_STRING([--disable-libtool-lock],
3533 [avoid locking (might break parallel builds)])])
3534 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3536 # Some flags need to be propagated to the compiler or linker for good
3540 # Find out which ABI we are using.
3541 echo 'int i;' > conftest.$ac_ext
3542 if AC_TRY_EVAL(ac_compile); then
3543 case `/usr/bin/file conftest.$ac_objext` in
3555 # Find out which ABI we are using.
3556 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3557 if AC_TRY_EVAL(ac_compile); then
3558 if test "$lt_cv_prog_gnu_ld" = yes; then
3559 case `/usr/bin/file conftest.$ac_objext` in
3561 LD="${LD-ld} -melf32bsmip"
3564 LD="${LD-ld} -melf32bmipn32"
3567 LD="${LD-ld} -melf64bmip"
3571 case `/usr/bin/file conftest.$ac_objext` in
3587 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3588 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3589 # Find out which ABI we are using.
3590 echo 'int i;' > conftest.$ac_ext
3591 if AC_TRY_EVAL(ac_compile); then
3592 case `/usr/bin/file conftest.o` in
3595 x86_64-*kfreebsd*-gnu)
3596 LD="${LD-ld} -m elf_i386_fbsd"
3599 LD="${LD-ld} -m elf_i386"
3601 ppc64-*linux*|powerpc64-*linux*)
3602 LD="${LD-ld} -m elf32ppclinux"
3605 LD="${LD-ld} -m elf_s390"
3608 LD="${LD-ld} -m elf32_sparc"
3614 x86_64-*kfreebsd*-gnu)
3615 LD="${LD-ld} -m elf_x86_64_fbsd"
3618 LD="${LD-ld} -m elf_x86_64"
3620 ppc*-*linux*|powerpc*-*linux*)
3621 LD="${LD-ld} -m elf64ppc"
3623 s390*-*linux*|s390*-*tpf*)
3624 LD="${LD-ld} -m elf64_s390"
3627 LD="${LD-ld} -m elf64_sparc"
3637 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3638 SAVE_CFLAGS="$CFLAGS"
3639 CFLAGS="$CFLAGS -belf"
3640 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3642 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3644 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3645 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3646 CFLAGS="$SAVE_CFLAGS"
3650 # Find out which ABI we are using.
3651 echo 'int i;' > conftest.$ac_ext
3652 if AC_TRY_EVAL(ac_compile); then
3653 case `/usr/bin/file conftest.o` in
3655 case $lt_cv_prog_gnu_ld in
3656 yes*) LD="${LD-ld} -m elf64_sparc" ;;
3658 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3670 need_locks="$enable_libtool_lock"
3674 # _LT_CMD_OLD_ARCHIVE
3675 # -------------------
3676 m4_defun([_LT_CMD_OLD_ARCHIVE],
3677 [AC_CHECK_TOOL(AR, ar, false)
3678 test -z "$AR" && AR=ar
3679 test -z "$AR_FLAGS" && AR_FLAGS=cru
3680 _LT_DECL([], [AR], [1], [The archiver])
3681 _LT_DECL([], [AR_FLAGS], [1])
3683 AC_CHECK_TOOL(STRIP, strip, :)
3684 test -z "$STRIP" && STRIP=:
3685 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3687 AC_CHECK_TOOL(RANLIB, ranlib, :)
3688 test -z "$RANLIB" && RANLIB=:
3689 _LT_DECL([], [RANLIB], [1],
3690 [Commands used to install an old-style archive])
3692 # Determine commands to create old-style static archives.
3693 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3694 old_postinstall_cmds='chmod 644 $oldlib'
3695 old_postuninstall_cmds=
3697 if test -n "$RANLIB"; then
3700 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3703 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3706 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3711 lock_old_archive_extraction=yes ;;
3713 lock_old_archive_extraction=no ;;
3715 _LT_DECL([], [old_postinstall_cmds], [2])
3716 _LT_DECL([], [old_postuninstall_cmds], [2])
3717 _LT_TAGDECL([], [old_archive_cmds], [2],
3718 [Commands used to build an old-style archive])
3719 _LT_DECL([], [lock_old_archive_extraction], [0],
3720 [Whether to use a lock for old archive extraction])
3721 ])# _LT_CMD_OLD_ARCHIVE
3724 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3725 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3726 # ----------------------------------------------------------------
3727 # Check whether the given compiler option works
3728 AC_DEFUN([_LT_COMPILER_OPTION],
3729 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3730 m4_require([_LT_DECL_SED])dnl
3731 AC_CACHE_CHECK([$1], [$2],
3733 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3734 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3735 lt_compiler_flag="$3"
3736 # Insert the option either (1) after the last *FLAGS variable, or
3737 # (2) before a word containing "conftest.", or (3) at the end.
3738 # Note that $ac_compile itself does not contain backslashes and begins
3739 # with a dollar sign (not a hyphen), so the echo should work correctly.
3740 # The option is referenced via a variable to avoid confusing sed.
3741 lt_compile=`echo "$ac_compile" | $SED \
3742 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3743 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3744 -e 's:$: $lt_compiler_flag:'`
3745 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3746 (eval "$lt_compile" 2>conftest.err)
3748 cat conftest.err >&AS_MESSAGE_LOG_FD
3749 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3750 if (exit $ac_status) && test -s "$ac_outfile"; then
3751 # The compiler can only warn and ignore the option if not recognized
3752 # So say no if there are warnings other than the usual output.
3753 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3754 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3755 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3762 if test x"[$]$2" = xyes; then
3763 m4_if([$5], , :, [$5])
3765 m4_if([$6], , :, [$6])
3767 ])# _LT_COMPILER_OPTION
3770 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3771 dnl aclocal-1.4 backwards compatibility:
3772 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3775 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3776 # [ACTION-SUCCESS], [ACTION-FAILURE])
3777 # ----------------------------------------------------
3778 # Check whether the given linker option works
3779 AC_DEFUN([_LT_LINKER_OPTION],
3780 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3781 m4_require([_LT_DECL_SED])dnl
3782 AC_CACHE_CHECK([$1], [$2],
3784 save_LDFLAGS="$LDFLAGS"
3785 LDFLAGS="$LDFLAGS $3"
3786 echo "$lt_simple_link_test_code" > conftest.$ac_ext
3787 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3788 # The linker can only warn and ignore the option if not recognized
3789 # So say no if there are warnings
3790 if test -s conftest.err; then
3791 # Append any errors to the config.log.
3792 cat conftest.err 1>&AS_MESSAGE_LOG_FD
3793 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3794 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3795 if diff conftest.exp conftest.er2 >/dev/null; then
3803 LDFLAGS="$save_LDFLAGS"
3806 if test x"[$]$2" = xyes; then
3807 m4_if([$4], , :, [$4])
3809 m4_if([$5], , :, [$5])
3811 ])# _LT_LINKER_OPTION
3814 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3815 dnl aclocal-1.4 backwards compatibility:
3816 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3821 AC_DEFUN([LT_CMD_MAX_LEN],
3822 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3823 # find the maximum length of command line arguments
3824 AC_MSG_CHECKING([the maximum length of command line arguments])
3825 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3831 # On DJGPP, this test can blow up pretty badly due to problems in libc
3832 # (any single argument exceeding 2000 bytes causes a buffer overrun
3833 # during glob expansion). Even if it were fixed, the result of this
3834 # check would be larger than it should be.
3835 lt_cv_sys_max_cmd_len=12288; # 12K is about right
3839 # Under GNU Hurd, this test is not required because there is
3840 # no limit to the length of command line arguments.
3841 # Libtool will interpret -1 as no limit whatsoever
3842 lt_cv_sys_max_cmd_len=-1;
3845 cygwin* | mingw* | cegcc*)
3846 # On Win9x/ME, this test blows up -- it succeeds, but takes
3847 # about 5 minutes as the teststring grows exponentially.
3848 # Worse, since 9x/ME are not pre-emptively multitasking,
3849 # you end up with a "frozen" computer, even though with patience
3850 # the test eventually succeeds (with a max line length of 256k).
3851 # Instead, let's just punt: use the minimum linelength reported by
3852 # all of the supported platforms: 8192 (on NT/2K/XP).
3853 lt_cv_sys_max_cmd_len=8192;
3857 # On MiNT this can take a long time and run out of memory.
3858 lt_cv_sys_max_cmd_len=8192;
3862 # On AmigaOS with pdksh, this test takes hours, literally.
3863 # So we just punt and use a minimum line length of 8192.
3864 lt_cv_sys_max_cmd_len=8192;
3867 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3868 # This has been around since 386BSD, at least. Likely further.
3869 if test -x /sbin/sysctl; then
3870 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3871 elif test -x /usr/sbin/sysctl; then
3872 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3874 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3876 # And add a safety zone
3877 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3878 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3882 # We know the value 262144 and hardcode it with a safety zone (like BSD)
3883 lt_cv_sys_max_cmd_len=196608
3887 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3888 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3889 # nice to cause kernel panics so lets avoid the loop below.
3890 # First set a reasonable default.
3891 lt_cv_sys_max_cmd_len=16384
3893 if test -x /sbin/sysconfig; then
3894 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3895 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3900 lt_cv_sys_max_cmd_len=102400
3902 sysv5* | sco5v6* | sysv4.2uw2*)
3903 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3904 if test -n "$kargmax"; then
3905 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3907 lt_cv_sys_max_cmd_len=32768
3911 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3912 if test -n "$lt_cv_sys_max_cmd_len"; then
3913 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3914 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3916 # Make teststring a little bigger before we do anything with it.
3917 # a 1K string should be a reasonable start.
3918 for i in 1 2 3 4 5 6 7 8 ; do
3919 teststring=$teststring$teststring
3921 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3922 # If test is not a shell built-in, we'll probably end up computing a
3923 # maximum length that is only half of the actual maximum length, but
3925 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3926 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3927 test $i != 17 # 1/2 MB should be enough
3930 teststring=$teststring$teststring
3932 # Only check the string length outside the loop.
3933 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3935 # Add a significant safety factor because C++ compilers can tack on
3936 # massive amounts of additional arguments before passing them to the
3937 # linker. It appears as though 1/2 is a usable value.
3938 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3943 if test -n $lt_cv_sys_max_cmd_len ; then
3944 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3948 max_cmd_len=$lt_cv_sys_max_cmd_len
3949 _LT_DECL([], [max_cmd_len], [0],
3950 [What is the maximum length of a command?])
3954 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3955 dnl aclocal-1.4 backwards compatibility:
3956 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3961 m4_defun([_LT_HEADER_DLFCN],
3962 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3963 ])# _LT_HEADER_DLFCN
3966 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3967 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3968 # ----------------------------------------------------------------
3969 m4_defun([_LT_TRY_DLOPEN_SELF],
3970 [m4_require([_LT_HEADER_DLFCN])dnl
3971 if test "$cross_compiling" = yes; then :
3974 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3975 lt_status=$lt_dlunknown
3976 cat > conftest.$ac_ext <<_LT_EOF
3977 [#line $LINENO "configure"
3978 #include "confdefs.h"
3987 # define LT_DLGLOBAL RTLD_GLOBAL
3990 # define LT_DLGLOBAL DL_GLOBAL
3992 # define LT_DLGLOBAL 0
3996 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3997 find out it does not work in some platform. */
3998 #ifndef LT_DLLAZY_OR_NOW
4000 # define LT_DLLAZY_OR_NOW RTLD_LAZY
4003 # define LT_DLLAZY_OR_NOW DL_LAZY
4006 # define LT_DLLAZY_OR_NOW RTLD_NOW
4009 # define LT_DLLAZY_OR_NOW DL_NOW
4011 # define LT_DLLAZY_OR_NOW 0
4018 /* When -fvisbility=hidden is used, assume the code has been annotated
4019 correspondingly for the symbols needed. */
4020 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4021 void fnord () __attribute__((visibility("default")));
4024 void fnord () { int i=42; }
4027 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4028 int status = $lt_dlunknown;
4032 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
4035 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4036 else puts (dlerror ());
4038 /* dlclose (self); */
4046 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4047 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4050 x$lt_dlno_uscore) $1 ;;
4051 x$lt_dlneed_uscore) $2 ;;
4052 x$lt_dlunknown|x*) $3 ;;
4055 # compilation failed
4060 ])# _LT_TRY_DLOPEN_SELF
4063 # LT_SYS_DLOPEN_SELF
4064 # ------------------
4065 AC_DEFUN([LT_SYS_DLOPEN_SELF],
4066 [m4_require([_LT_HEADER_DLFCN])dnl
4067 if test "x$enable_dlopen" != xyes; then
4068 enable_dlopen=unknown
4069 enable_dlopen_self=unknown
4070 enable_dlopen_self_static=unknown
4077 lt_cv_dlopen="load_add_on"
4079 lt_cv_dlopen_self=yes
4082 mingw* | pw32* | cegcc*)
4083 lt_cv_dlopen="LoadLibrary"
4088 lt_cv_dlopen="dlopen"
4093 # if libdl is installed we need to link against it
4094 AC_CHECK_LIB([dl], [dlopen],
4095 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4098 lt_cv_dlopen_self=yes
4103 AC_CHECK_FUNC([shl_load],
4104 [lt_cv_dlopen="shl_load"],
4105 [AC_CHECK_LIB([dld], [shl_load],
4106 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4107 [AC_CHECK_FUNC([dlopen],
4108 [lt_cv_dlopen="dlopen"],
4109 [AC_CHECK_LIB([dl], [dlopen],
4110 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4111 [AC_CHECK_LIB([svld], [dlopen],
4112 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4113 [AC_CHECK_LIB([dld], [dld_link],
4114 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4123 if test "x$lt_cv_dlopen" != xno; then
4129 case $lt_cv_dlopen in
4131 save_CPPFLAGS="$CPPFLAGS"
4132 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4134 save_LDFLAGS="$LDFLAGS"
4135 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4138 LIBS="$lt_cv_dlopen_libs $LIBS"
4140 AC_CACHE_CHECK([whether a program can dlopen itself],
4141 lt_cv_dlopen_self, [dnl
4142 _LT_TRY_DLOPEN_SELF(
4143 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4144 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4147 if test "x$lt_cv_dlopen_self" = xyes; then
4148 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4149 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4150 lt_cv_dlopen_self_static, [dnl
4151 _LT_TRY_DLOPEN_SELF(
4152 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4153 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
4157 CPPFLAGS="$save_CPPFLAGS"
4158 LDFLAGS="$save_LDFLAGS"
4163 case $lt_cv_dlopen_self in
4164 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4165 *) enable_dlopen_self=unknown ;;
4168 case $lt_cv_dlopen_self_static in
4169 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4170 *) enable_dlopen_self_static=unknown ;;
4173 _LT_DECL([dlopen_support], [enable_dlopen], [0],
4174 [Whether dlopen is supported])
4175 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4176 [Whether dlopen of programs is supported])
4177 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4178 [Whether dlopen of statically linked programs is supported])
4179 ])# LT_SYS_DLOPEN_SELF
4182 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4183 dnl aclocal-1.4 backwards compatibility:
4184 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4187 # _LT_COMPILER_C_O([TAGNAME])
4188 # ---------------------------
4189 # Check to see if options -c and -o are simultaneously supported by compiler.
4190 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
4191 m4_defun([_LT_COMPILER_C_O],
4192 [m4_require([_LT_DECL_SED])dnl
4193 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4194 m4_require([_LT_TAG_COMPILER])dnl
4195 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4196 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4197 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4198 $RM -r conftest 2>/dev/null
4202 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4204 lt_compiler_flag="-o out/conftest2.$ac_objext"
4205 # Insert the option either (1) after the last *FLAGS variable, or
4206 # (2) before a word containing "conftest.", or (3) at the end.
4207 # Note that $ac_compile itself does not contain backslashes and begins
4208 # with a dollar sign (not a hyphen), so the echo should work correctly.
4209 lt_compile=`echo "$ac_compile" | $SED \
4210 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4211 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4212 -e 's:$: $lt_compiler_flag:'`
4213 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4214 (eval "$lt_compile" 2>out/conftest.err)
4216 cat out/conftest.err >&AS_MESSAGE_LOG_FD
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4218 if (exit $ac_status) && test -s out/conftest2.$ac_objext
4220 # The compiler can only warn and ignore the option if not recognized
4221 # So say no if there are warnings
4222 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4223 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4224 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4225 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4228 chmod u+w . 2>&AS_MESSAGE_LOG_FD
4230 # SGI C++ compiler will create directory out/ii_files/ for
4231 # template instantiation
4232 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4233 $RM out/* && rmdir out
4238 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4239 [Does compiler simultaneously support -c and -o options?])
4240 ])# _LT_COMPILER_C_O
4243 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
4244 # ----------------------------------
4245 # Check to see if we can do hard links to lock some files if needed
4246 m4_defun([_LT_COMPILER_FILE_LOCKS],
4247 [m4_require([_LT_ENABLE_LOCK])dnl
4248 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4249 _LT_COMPILER_C_O([$1])
4251 hard_links="nottested"
4252 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4253 # do not overwrite the value of need_locks provided by the user
4254 AC_MSG_CHECKING([if we can lock with hard links])
4257 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4259 ln conftest.a conftest.b 2>&5 || hard_links=no
4260 ln conftest.a conftest.b 2>/dev/null && hard_links=no
4261 AC_MSG_RESULT([$hard_links])
4262 if test "$hard_links" = no; then
4263 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4269 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4270 ])# _LT_COMPILER_FILE_LOCKS
4275 m4_defun([_LT_CHECK_OBJDIR],
4276 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4277 [rm -f .libs 2>/dev/null
4278 mkdir .libs 2>/dev/null
4279 if test -d .libs; then
4282 # MS-DOS does not allow filenames that begin with a dot.
4285 rmdir .libs 2>/dev/null])
4286 objdir=$lt_cv_objdir
4287 _LT_DECL([], [objdir], [0],
4288 [The name of the directory that contains temporary libtool files])dnl
4289 m4_pattern_allow([LT_OBJDIR])dnl
4290 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4291 [Define to the sub-directory in which libtool stores uninstalled libraries.])
4292 ])# _LT_CHECK_OBJDIR
4295 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4296 # --------------------------------------
4297 # Check hardcoding attributes.
4298 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4299 [AC_MSG_CHECKING([how to hardcode library paths into programs])
4300 _LT_TAGVAR(hardcode_action, $1)=
4301 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4302 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4303 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4305 # We can hardcode non-existent directories.
4306 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4307 # If the only mechanism to avoid hardcoding is shlibpath_var, we
4308 # have to relink, otherwise we might link with an installed library
4309 # when we should be linking with a yet-to-be-installed one
4310 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4311 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4312 # Linking always hardcodes the temporary library directory.
4313 _LT_TAGVAR(hardcode_action, $1)=relink
4315 # We can link without hardcoding, and we can hardcode nonexisting dirs.
4316 _LT_TAGVAR(hardcode_action, $1)=immediate
4319 # We cannot hardcode anything, or else we can only hardcode existing
4321 _LT_TAGVAR(hardcode_action, $1)=unsupported
4323 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4325 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4326 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4327 # Fast installation is not supported
4328 enable_fast_install=no
4329 elif test "$shlibpath_overrides_runpath" = yes ||
4330 test "$enable_shared" = no; then
4331 # Fast installation is not necessary
4332 enable_fast_install=needless
4334 _LT_TAGDECL([], [hardcode_action], [0],
4335 [How to hardcode a shared library path into an executable])
4336 ])# _LT_LINKER_HARDCODE_LIBPATH
4341 m4_defun([_LT_CMD_STRIPLIB],
4342 [m4_require([_LT_DECL_EGREP])
4345 AC_MSG_CHECKING([whether stripping libraries is possible])
4346 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4347 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4348 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4349 AC_MSG_RESULT([yes])
4351 # FIXME - insert some real tests, host_os isn't really good enough
4354 if test -n "$STRIP" ; then
4355 striplib="$STRIP -x"
4356 old_striplib="$STRIP -S"
4357 AC_MSG_RESULT([yes])
4367 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4368 _LT_DECL([], [striplib], [1])
4369 ])# _LT_CMD_STRIPLIB
4372 # _LT_SYS_DYNAMIC_LINKER([TAG])
4373 # -----------------------------
4374 # PORTME Fill in your ld.so characteristics
4375 m4_defun([_LT_SYS_DYNAMIC_LINKER],
4376 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4377 m4_require([_LT_DECL_EGREP])dnl
4378 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4379 m4_require([_LT_DECL_OBJDUMP])dnl
4380 m4_require([_LT_DECL_SED])dnl
4381 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4382 AC_MSG_CHECKING([dynamic linker characteristics])
4385 if test "$GCC" = yes; then
4387 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4388 *) lt_awk_arg="/^libraries:/" ;;
4391 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4392 *) lt_sed_strip_eq="s,=/,/,g" ;;
4394 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4395 case $lt_search_path_spec in
4397 # if the path contains ";" then we assume it to be the separator
4398 # otherwise default to the standard path separator (i.e. ":") - it is
4399 # assumed that no part of a normal pathname contains ";" but that should
4400 # okay in the real world where ";" in dirpaths is itself problematic.
4401 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4404 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4407 # Ok, now we have the path, separated by spaces, we can step through it
4408 # and add multilib dir if necessary.
4409 lt_tmp_lt_search_path_spec=
4410 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4411 for lt_sys_path in $lt_search_path_spec; do
4412 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4413 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4415 test -d "$lt_sys_path" && \
4416 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4419 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4420 BEGIN {RS=" "; FS="/|\n";} {
4423 for (lt_i = NF; lt_i > 0; lt_i--) {
4424 if ($lt_i != "" && $lt_i != ".") {
4425 if ($lt_i == "..") {
4428 if (lt_count == 0) {
4429 lt_foo="/" $lt_i lt_foo;
4436 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4437 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4439 # AWK program above erroneously prepends '/' to C:/dos/paths
4442 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4443 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4445 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4447 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4450 libname_spec='lib$name'
4458 shlibpath_overrides_runpath=unknown
4460 dynamic_linker="$host_os ld.so"
4461 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4462 need_lib_prefix=unknown
4463 hardcode_into_libs=no
4465 # when you set need_version to no, make sure it does not cause -set_version
4466 # flags to be left without arguments
4467 need_version=unknown
4472 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4473 shlibpath_var=LIBPATH
4475 # AIX 3 has no versioning support, so we append a major version to the name.
4476 soname_spec='${libname}${release}${shared_ext}$major'
4483 hardcode_into_libs=yes
4484 if test "$host_cpu" = ia64; then
4485 # AIX 5 supports IA64
4486 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4487 shlibpath_var=LD_LIBRARY_PATH
4489 # With GCC up to 2.95.x, collect2 would create an import file
4490 # for dependence libraries. The import file would start with
4491 # the line `#! .'. This would cause the generated library to
4492 # depend on `.', always an invalid library. This was fixed in
4493 # development snapshots of GCC prior to 3.0.
4495 aix4 | aix4.[[01]] | aix4.[[01]].*)
4496 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4498 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4505 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4506 # soname into executable. Probably we can add versioning support to
4507 # collect2, so additional links can be useful in future.
4508 if test "$aix_use_runtimelinking" = yes; then
4509 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4510 # instead of lib<name>.a to let people know that these are not
4511 # typical AIX shared libraries.
4512 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4514 # We preserve .a as extension for shared libraries through AIX4.2
4515 # and later when we are not doing run time linking.
4516 library_names_spec='${libname}${release}.a $libname.a'
4517 soname_spec='${libname}${release}${shared_ext}$major'
4519 shlibpath_var=LIBPATH
4526 # Since July 2007 AmigaOS4 officially supports .so libraries.
4527 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4528 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4531 library_names_spec='$libname.ixlibrary $libname.a'
4532 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4533 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4539 library_names_spec='${libname}${shared_ext}'
4540 dynamic_linker="$host_os ld.so"
4541 shlibpath_var=LIBRARY_PATH
4547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4548 soname_spec='${libname}${release}${shared_ext}$major'
4549 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4550 shlibpath_var=LD_LIBRARY_PATH
4551 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4552 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4553 # the default ld.so.conf also contains /usr/contrib/lib and
4554 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4555 # libtool to hard-code these into programs
4558 cygwin* | mingw* | pw32* | cegcc*)
4559 version_type=windows
4564 case $GCC,$host_os in
4565 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4566 library_names_spec='$libname.dll.a'
4567 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4568 postinstall_cmds='base_file=`basename \${file}`~
4569 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4570 dldir=$destdir/`dirname \$dlpath`~
4571 test -d \$dldir || mkdir -p \$dldir~
4572 $install_prog $dir/$dlname \$dldir/$dlname~
4573 chmod a+x \$dldir/$dlname~
4574 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4575 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4577 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4578 dlpath=$dir/\$dldll~
4580 shlibpath_overrides_runpath=yes
4584 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4585 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4587 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4590 # MinGW DLLs use traditional 'lib' prefix
4591 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4594 # pw32 DLLs use 'pw' prefix rather than 'lib'
4595 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4601 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4604 dynamic_linker='Win32 ld.exe'
4605 # FIXME: first we should search . and the directory the executable is in
4609 darwin* | rhapsody*)
4610 dynamic_linker="$host_os dyld"
4614 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4615 soname_spec='${libname}${release}${major}$shared_ext'
4616 shlibpath_overrides_runpath=yes
4617 shlibpath_var=DYLD_LIBRARY_PATH
4618 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4620 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4621 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4629 soname_spec='${libname}${release}${shared_ext}$major'
4630 shlibpath_var=LD_LIBRARY_PATH
4637 freebsd* | dragonfly*)
4638 # DragonFly does not have aout. When/if they implement a new
4639 # versioning mechanism, adjust this.
4640 if test -x /usr/bin/objformat; then
4641 objformat=`/usr/bin/objformat`
4644 freebsd[[123]]*) objformat=aout ;;
4648 version_type=freebsd-$objformat
4649 case $version_type in
4651 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4656 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4660 shlibpath_var=LD_LIBRARY_PATH
4663 shlibpath_overrides_runpath=yes
4665 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4666 shlibpath_overrides_runpath=yes
4667 hardcode_into_libs=yes
4669 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4670 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4671 shlibpath_overrides_runpath=no
4672 hardcode_into_libs=yes
4674 *) # from 4.6 on, and DragonFly
4675 shlibpath_overrides_runpath=yes
4676 hardcode_into_libs=yes
4685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4686 soname_spec='${libname}${release}${shared_ext}$major'
4687 shlibpath_var=LD_LIBRARY_PATH
4688 hardcode_into_libs=yes
4695 dynamic_linker="$host_os runtime_loader"
4696 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4697 soname_spec='${libname}${release}${shared_ext}$major'
4698 shlibpath_var=LIBRARY_PATH
4699 shlibpath_overrides_runpath=yes
4700 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4701 hardcode_into_libs=yes
4704 hpux9* | hpux10* | hpux11*)
4705 # Give a soname corresponding to the major version so that dld.sl refuses to
4706 # link against other versions.
4713 hardcode_into_libs=yes
4714 dynamic_linker="$host_os dld.so"
4715 shlibpath_var=LD_LIBRARY_PATH
4716 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4717 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4718 soname_spec='${libname}${release}${shared_ext}$major'
4719 if test "X$HPUX_IA64_MODE" = X32; then
4720 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4722 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4724 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4728 hardcode_into_libs=yes
4729 dynamic_linker="$host_os dld.sl"
4730 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4731 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4733 soname_spec='${libname}${release}${shared_ext}$major'
4734 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4735 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4739 dynamic_linker="$host_os dld.sl"
4740 shlibpath_var=SHLIB_PATH
4741 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4743 soname_spec='${libname}${release}${shared_ext}$major'
4746 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4747 postinstall_cmds='chmod 555 $lib'
4748 # or fails outright, so override atomically:
4749 install_override_mode=555
4756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4757 soname_spec='${libname}${release}${shared_ext}$major'
4758 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4759 shlibpath_var=LD_LIBRARY_PATH
4760 shlibpath_overrides_runpath=no
4761 hardcode_into_libs=yes
4764 irix5* | irix6* | nonstopux*)
4766 nonstopux*) version_type=nonstopux ;;
4768 if test "$lt_cv_prog_gnu_ld" = yes; then
4776 soname_spec='${libname}${release}${shared_ext}$major'
4777 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4779 irix5* | nonstopux*)
4783 case $LD in # libtool.m4 will add one of these switches to LD
4784 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4785 libsuff= shlibsuff= libmagic=32-bit;;
4786 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4787 libsuff=32 shlibsuff=N32 libmagic=N32;;
4788 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4789 libsuff=64 shlibsuff=64 libmagic=64-bit;;
4790 *) libsuff= shlibsuff= libmagic=never-match;;
4794 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4795 shlibpath_overrides_runpath=no
4796 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4797 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4798 hardcode_into_libs=yes
4801 # No shared lib support for Linux oldld, aout, or coff.
4802 linux*oldld* | linux*aout* | linux*coff*)
4806 # This must be Linux ELF.
4807 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4811 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4812 soname_spec='${libname}${release}${shared_ext}$major'
4813 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4814 shlibpath_var=LD_LIBRARY_PATH
4815 shlibpath_overrides_runpath=no
4817 # Some binutils ld are patched to set DT_RUNPATH
4818 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4819 [lt_cv_shlibpath_overrides_runpath=no
4820 save_LDFLAGS=$LDFLAGS
4822 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4823 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4824 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4825 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4826 [lt_cv_shlibpath_overrides_runpath=yes])])
4827 LDFLAGS=$save_LDFLAGS
4830 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4832 # This implies no fast_install, which is unacceptable.
4833 # Some rework will be needed to allow for fast_install
4834 # before this can be enabled.
4835 hardcode_into_libs=yes
4837 # Append ld.so.conf contents to the search path
4838 if test -f /etc/ld.so.conf; then
4839 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
4840 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4843 # We used to test for /lib/ld.so.1 and disable shared libraries on
4844 # powerpc, because MkLinux only supported shared libraries with the
4845 # GNU dynamic linker. Since this was broken with cross compilers,
4846 # most powerpc-linux boxes support dynamic linking these days and
4847 # people can always --disable-shared, the test was removed, and we
4848 # assume the GNU/Linux dynamic linker is in use.
4849 dynamic_linker='GNU/Linux ld.so'
4856 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4857 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4858 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4859 dynamic_linker='NetBSD (a.out) ld.so'
4861 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4862 soname_spec='${libname}${release}${shared_ext}$major'
4863 dynamic_linker='NetBSD ld.elf_so'
4865 shlibpath_var=LD_LIBRARY_PATH
4866 shlibpath_overrides_runpath=yes
4867 hardcode_into_libs=yes
4872 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4873 shlibpath_var=LD_LIBRARY_PATH
4874 shlibpath_overrides_runpath=yes
4881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4882 soname_spec='${libname}${release}${shared_ext}$major'
4883 shlibpath_var=LD_LIBRARY_PATH
4884 shlibpath_overrides_runpath=no
4885 hardcode_into_libs=yes
4886 dynamic_linker='ldqnx.so'
4891 sys_lib_dlsearch_path_spec="/usr/lib"
4893 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4895 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4896 *) need_version=no ;;
4898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4899 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4900 shlibpath_var=LD_LIBRARY_PATH
4901 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4903 openbsd2.[[89]] | openbsd2.[[89]].*)
4904 shlibpath_overrides_runpath=no
4907 shlibpath_overrides_runpath=yes
4911 shlibpath_overrides_runpath=yes
4916 libname_spec='$name'
4919 library_names_spec='$libname${shared_ext} $libname.a'
4920 dynamic_linker='OS/2 ld.exe'
4921 shlibpath_var=LIBPATH
4924 osf3* | osf4* | osf5*)
4928 soname_spec='${libname}${release}${shared_ext}$major'
4929 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4930 shlibpath_var=LD_LIBRARY_PATH
4931 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4932 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4944 soname_spec='${libname}${release}${shared_ext}$major'
4945 shlibpath_var=LD_LIBRARY_PATH
4946 shlibpath_overrides_runpath=yes
4947 hardcode_into_libs=yes
4948 # ldd complains unless libraries are executable
4949 postinstall_cmds='chmod +x $lib'
4954 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4955 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4956 shlibpath_var=LD_LIBRARY_PATH
4957 shlibpath_overrides_runpath=yes
4958 if test "$with_gnu_ld" = yes; then
4966 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4967 soname_spec='${libname}${release}${shared_ext}$major'
4968 shlibpath_var=LD_LIBRARY_PATH
4969 case $host_vendor in
4971 shlibpath_overrides_runpath=no
4973 runpath_var=LD_RUN_PATH
4981 shlibpath_overrides_runpath=no
4982 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4988 if test -d /usr/nec ;then
4990 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4991 soname_spec='$libname${shared_ext}.$major'
4992 shlibpath_var=LD_LIBRARY_PATH
4996 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4997 version_type=freebsd-elf
5000 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5001 soname_spec='${libname}${release}${shared_ext}$major'
5002 shlibpath_var=LD_LIBRARY_PATH
5003 shlibpath_overrides_runpath=yes
5004 hardcode_into_libs=yes
5005 if test "$with_gnu_ld" = yes; then
5006 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5008 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5011 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5015 sys_lib_dlsearch_path_spec='/usr/lib'
5019 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
5023 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5024 shlibpath_var=LD_LIBRARY_PATH
5025 shlibpath_overrides_runpath=no
5026 hardcode_into_libs=yes
5031 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5032 soname_spec='${libname}${release}${shared_ext}$major'
5033 shlibpath_var=LD_LIBRARY_PATH
5040 AC_MSG_RESULT([$dynamic_linker])
5041 test "$dynamic_linker" = no && can_build_shared=no
5043 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5044 if test "$GCC" = yes; then
5045 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5048 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5049 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5051 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5052 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5055 _LT_DECL([], [variables_saved_for_relink], [1],
5056 [Variables whose values should be saved in libtool wrapper scripts and
5057 restored at link time])
5058 _LT_DECL([], [need_lib_prefix], [0],
5059 [Do we need the "lib" prefix for modules?])
5060 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5061 _LT_DECL([], [version_type], [0], [Library versioning type])
5062 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
5063 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5064 _LT_DECL([], [shlibpath_overrides_runpath], [0],
5065 [Is shlibpath searched before the hard-coded library search path?])
5066 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5067 _LT_DECL([], [library_names_spec], [1],
5068 [[List of archive names. First name is the real one, the rest are links.
5069 The last name is the one that the linker finds with -lNAME]])
5070 _LT_DECL([], [soname_spec], [1],
5071 [[The coded name of the library, if different from the real name]])
5072 _LT_DECL([], [install_override_mode], [1],
5073 [Permission mode override for installation of shared libraries])
5074 _LT_DECL([], [postinstall_cmds], [2],
5075 [Command to use after installation of a shared archive])
5076 _LT_DECL([], [postuninstall_cmds], [2],
5077 [Command to use after uninstallation of a shared archive])
5078 _LT_DECL([], [finish_cmds], [2],
5079 [Commands used to finish a libtool library installation in a directory])
5080 _LT_DECL([], [finish_eval], [1],
5081 [[As "finish_cmds", except a single script fragment to be evaled but
5083 _LT_DECL([], [hardcode_into_libs], [0],
5084 [Whether we should hardcode library paths into libraries])
5085 _LT_DECL([], [sys_lib_search_path_spec], [2],
5086 [Compile-time system search path for libraries])
5087 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5088 [Run-time system search path for libraries])
5089 ])# _LT_SYS_DYNAMIC_LINKER
5092 # _LT_PATH_TOOL_PREFIX(TOOL)
5093 # --------------------------
5094 # find a file program which can recognize shared library
5095 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5096 [m4_require([_LT_DECL_EGREP])dnl
5097 AC_MSG_CHECKING([for $1])
5098 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5100 [[\\/*] | ?:[\\/]*])
5101 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5104 lt_save_MAGIC_CMD="$MAGIC_CMD"
5105 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5106 dnl $ac_dummy forces splitting on constant user-supplied paths.
5107 dnl POSIX.2 word splitting is done only on the output of word expansions,
5108 dnl not every word. This closes a longstanding sh security hole.
5109 ac_dummy="m4_if([$2], , $PATH, [$2])"
5110 for ac_dir in $ac_dummy; do
5112 test -z "$ac_dir" && ac_dir=.
5113 if test -f $ac_dir/$1; then
5114 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5115 if test -n "$file_magic_test_file"; then
5116 case $deplibs_check_method in
5118 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5119 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5120 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5121 $EGREP "$file_magic_regex" > /dev/null; then
5126 *** Warning: the command libtool uses to detect shared libraries,
5127 *** $file_magic_cmd, produces output that libtool cannot recognize.
5128 *** The result is that libtool may fail to recognize shared libraries
5129 *** as such. This will affect the creation of libtool libraries that
5130 *** depend on shared libraries, but programs linked with such libtool
5131 *** libraries will work regardless of this problem. Nevertheless, you
5132 *** may want to report the problem to your system manager and/or to
5133 *** bug-libtool@gnu.org
5143 MAGIC_CMD="$lt_save_MAGIC_CMD"
5146 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5147 if test -n "$MAGIC_CMD"; then
5148 AC_MSG_RESULT($MAGIC_CMD)
5152 _LT_DECL([], [MAGIC_CMD], [0],
5153 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5154 ])# _LT_PATH_TOOL_PREFIX
5157 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5158 dnl aclocal-1.4 backwards compatibility:
5159 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5164 # find a file program which can recognize a shared library
5165 m4_defun([_LT_PATH_MAGIC],
5166 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5167 if test -z "$lt_cv_path_MAGIC_CMD"; then
5168 if test -n "$ac_tool_prefix"; then
5169 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5179 # find the pathname to the GNU or non-GNU linker
5180 AC_DEFUN([LT_PATH_LD],
5181 [AC_REQUIRE([AC_PROG_CC])dnl
5182 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5183 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5184 m4_require([_LT_DECL_SED])dnl
5185 m4_require([_LT_DECL_EGREP])dnl
5186 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5188 AC_ARG_WITH([gnu-ld],
5189 [AS_HELP_STRING([--with-gnu-ld],
5190 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
5191 [test "$withval" = no || with_gnu_ld=yes],
5192 [with_gnu_ld=no])dnl
5195 if test "$GCC" = yes; then
5196 # Check if gcc -print-prog-name=ld gives a path.
5197 AC_MSG_CHECKING([for ld used by $CC])
5200 # gcc leaves a trailing carriage return which upsets mingw
5201 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5203 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5206 # Accept absolute paths.
5207 [[\\/]]* | ?:[[\\/]]*)
5208 re_direlt='/[[^/]][[^/]]*/\.\./'
5209 # Canonicalize the pathname of ld
5210 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5211 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5212 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5214 test -z "$LD" && LD="$ac_prog"
5217 # If it fails, then pretend we aren't using GCC.
5221 # If it is relative, then search for the first ld in PATH.
5225 elif test "$with_gnu_ld" = yes; then
5226 AC_MSG_CHECKING([for GNU ld])
5228 AC_MSG_CHECKING([for non-GNU ld])
5230 AC_CACHE_VAL(lt_cv_path_LD,
5231 [if test -z "$LD"; then
5232 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5233 for ac_dir in $PATH; do
5235 test -z "$ac_dir" && ac_dir=.
5236 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5237 lt_cv_path_LD="$ac_dir/$ac_prog"
5238 # Check to see if the program is GNU ld. I'd rather use --version,
5239 # but apparently some variants of GNU ld only accept -v.
5240 # Break only if it was the GNU/non-GNU ld that we prefer.
5241 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5242 *GNU* | *'with BFD'*)
5243 test "$with_gnu_ld" != no && break
5246 test "$with_gnu_ld" != yes && break
5253 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5256 if test -n "$LD"; then
5261 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5265 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5269 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5270 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5271 dnl aclocal-1.4 backwards compatibility:
5272 dnl AC_DEFUN([AM_PROG_LD], [])
5273 dnl AC_DEFUN([AC_PROG_LD], [])
5278 m4_defun([_LT_PATH_LD_GNU],
5279 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5280 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5281 case `$LD -v 2>&1 </dev/null` in
5282 *GNU* | *'with BFD'*)
5283 lt_cv_prog_gnu_ld=yes
5286 lt_cv_prog_gnu_ld=no
5289 with_gnu_ld=$lt_cv_prog_gnu_ld
5295 # find reload flag for linker
5296 # -- PORTME Some linkers may need a different reload flag.
5297 m4_defun([_LT_CMD_RELOAD],
5298 [AC_CACHE_CHECK([for $LD option to reload object files],
5299 lt_cv_ld_reload_flag,
5300 [lt_cv_ld_reload_flag='-r'])
5301 reload_flag=$lt_cv_ld_reload_flag
5302 case $reload_flag in
5304 *) reload_flag=" $reload_flag" ;;
5306 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5309 if test "$GCC" = yes; then
5310 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5312 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5316 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5317 _LT_TAGDECL([], [reload_cmds], [2])dnl
5321 # _LT_CHECK_MAGIC_METHOD
5322 # ----------------------
5323 # how to check for library dependencies
5324 # -- PORTME fill in with the dynamic library characteristics
5325 m4_defun([_LT_CHECK_MAGIC_METHOD],
5326 [m4_require([_LT_DECL_EGREP])
5327 m4_require([_LT_DECL_OBJDUMP])
5328 AC_CACHE_CHECK([how to recognize dependent libraries],
5329 lt_cv_deplibs_check_method,
5330 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5331 lt_cv_file_magic_test_file=
5332 lt_cv_deplibs_check_method='unknown'
5333 # Need to set the preceding variable on all platforms that support
5334 # interlibrary dependencies.
5335 # 'none' -- dependencies not supported.
5336 # `unknown' -- same as none, but documents that we really don't know.
5337 # 'pass_all' -- all dependencies passed with no checks.
5338 # 'test_compile' -- check by making test program.
5339 # 'file_magic [[regex]]' -- check by looking for files in library path
5340 # which responds to the $file_magic_cmd with a given extended regex.
5341 # If you have `file' or equivalent on your system and you're not sure
5342 # whether `pass_all' will *always* work, you probably want this one.
5346 lt_cv_deplibs_check_method=pass_all
5350 lt_cv_deplibs_check_method=pass_all
5354 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5355 lt_cv_file_magic_cmd='/usr/bin/file -L'
5356 lt_cv_file_magic_test_file=/shlib/libc.so
5360 # func_win32_libid is a shell function defined in ltmain.sh
5361 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5362 lt_cv_file_magic_cmd='func_win32_libid'
5366 # Base MSYS/MinGW do not provide the 'file' command needed by
5367 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5368 # unless we find 'file', for example because we are cross-compiling.
5369 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5370 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5371 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5372 lt_cv_file_magic_cmd='func_win32_libid'
5374 # Keep this pattern in sync with the one in func_win32_libid.
5375 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5376 lt_cv_file_magic_cmd='$OBJDUMP -f'
5381 # use the weaker test based on 'objdump'. See mingw*.
5382 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5383 lt_cv_file_magic_cmd='$OBJDUMP -f'
5386 darwin* | rhapsody*)
5387 lt_cv_deplibs_check_method=pass_all
5390 freebsd* | dragonfly*)
5391 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5394 # Not sure whether the presence of OpenBSD here was a mistake.
5395 # Let's accept both of them until this is cleared up.
5396 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5397 lt_cv_file_magic_cmd=/usr/bin/file
5398 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5402 lt_cv_deplibs_check_method=pass_all
5407 lt_cv_deplibs_check_method=pass_all
5411 lt_cv_deplibs_check_method=pass_all
5414 hpux10.20* | hpux11*)
5415 lt_cv_file_magic_cmd=/usr/bin/file
5418 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5419 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5422 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
5423 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5426 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5427 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5433 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5434 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5437 irix5* | irix6* | nonstopux*)
5439 *-32|*"-32 ") libmagic=32-bit;;
5440 *-n32|*"-n32 ") libmagic=N32;;
5441 *-64|*"-64 ") libmagic=64-bit;;
5442 *) libmagic=never-match;;
5444 lt_cv_deplibs_check_method=pass_all
5447 # This must be Linux ELF.
5448 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5449 lt_cv_deplibs_check_method=pass_all
5453 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5454 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5456 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5461 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5462 lt_cv_file_magic_cmd=/usr/bin/file
5463 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5467 lt_cv_deplibs_check_method=pass_all
5471 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5472 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5474 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5478 osf3* | osf4* | osf5*)
5479 lt_cv_deplibs_check_method=pass_all
5483 lt_cv_deplibs_check_method=pass_all
5487 lt_cv_deplibs_check_method=pass_all
5490 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5491 lt_cv_deplibs_check_method=pass_all
5495 case $host_vendor in
5497 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]]'
5498 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5501 lt_cv_deplibs_check_method=pass_all
5504 lt_cv_file_magic_cmd='/bin/file'
5505 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5508 lt_cv_file_magic_cmd='/bin/file'
5509 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5510 lt_cv_file_magic_test_file=/lib/libc.so
5513 lt_cv_deplibs_check_method=pass_all
5516 lt_cv_deplibs_check_method=pass_all
5522 lt_cv_deplibs_check_method=pass_all
5526 file_magic_cmd=$lt_cv_file_magic_cmd
5527 deplibs_check_method=$lt_cv_deplibs_check_method
5528 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5530 _LT_DECL([], [deplibs_check_method], [1],
5531 [Method to check whether dependent libraries are shared objects])
5532 _LT_DECL([], [file_magic_cmd], [1],
5533 [Command to use when deplibs_check_method == "file_magic"])
5534 ])# _LT_CHECK_MAGIC_METHOD
5539 # find the pathname to a BSD- or MS-compatible name lister
5540 AC_DEFUN([LT_PATH_NM],
5541 [AC_REQUIRE([AC_PROG_CC])dnl
5542 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5543 [if test -n "$NM"; then
5544 # Let the user override the test.
5547 lt_nm_to_check="${ac_tool_prefix}nm"
5548 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5549 lt_nm_to_check="$lt_nm_to_check nm"
5551 for lt_tmp_nm in $lt_nm_to_check; do
5552 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5553 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5555 test -z "$ac_dir" && ac_dir=.
5556 tmp_nm="$ac_dir/$lt_tmp_nm"
5557 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5558 # Check to see if the nm accepts a BSD-compat flag.
5559 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5560 # nm: unknown option "B" ignored
5561 # Tru64's nm complains that /dev/null is an invalid object file
5562 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5563 */dev/null* | *'Invalid file or object type'*)
5564 lt_cv_path_NM="$tmp_nm -B"
5568 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5570 lt_cv_path_NM="$tmp_nm -p"
5574 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5575 continue # so that we can try to find one that supports BSD flags
5584 : ${lt_cv_path_NM=no}
5586 if test "$lt_cv_path_NM" != "no"; then
5589 # Didn't find any BSD compatible name lister, look for dumpbin.
5590 if test -n "$DUMPBIN"; then :
5591 # Let the user override the test.
5593 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5594 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5596 DUMPBIN="$DUMPBIN -symbols"
5604 if test "$DUMPBIN" != ":"; then
5608 test -z "$NM" && NM=nm
5610 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5612 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5613 [lt_cv_nm_interface="BSD nm"
5614 echo "int some_variable = 0;" > conftest.$ac_ext
5615 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5616 (eval "$ac_compile" 2>conftest.err)
5617 cat conftest.err >&AS_MESSAGE_LOG_FD
5618 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5619 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5620 cat conftest.err >&AS_MESSAGE_LOG_FD
5621 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5622 cat conftest.out >&AS_MESSAGE_LOG_FD
5623 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5624 lt_cv_nm_interface="MS dumpbin"
5630 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5631 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5632 dnl aclocal-1.4 backwards compatibility:
5633 dnl AC_DEFUN([AM_PROG_NM], [])
5634 dnl AC_DEFUN([AC_PROG_NM], [])
5639 # check for math library
5640 AC_DEFUN([LT_LIB_M],
5641 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5644 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5645 # These system don't have libm, or don't need it
5648 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5649 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5652 AC_CHECK_LIB(m, cos, LIBM="-lm")
5659 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5660 dnl aclocal-1.4 backwards compatibility:
5661 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5664 # _LT_COMPILER_NO_RTTI([TAGNAME])
5665 # -------------------------------
5666 m4_defun([_LT_COMPILER_NO_RTTI],
5667 [m4_require([_LT_TAG_COMPILER])dnl
5669 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5671 if test "$GCC" = yes; then
5672 case $cc_basename in
5674 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5676 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5679 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5680 lt_cv_prog_compiler_rtti_exceptions,
5681 [-fno-rtti -fno-exceptions], [],
5682 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5684 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5685 [Compiler flag to turn off builtin functions])
5686 ])# _LT_COMPILER_NO_RTTI
5689 # _LT_CMD_GLOBAL_SYMBOLS
5690 # ----------------------
5691 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5692 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5693 AC_REQUIRE([AC_PROG_CC])dnl
5694 AC_REQUIRE([AC_PROG_AWK])dnl
5695 AC_REQUIRE([LT_PATH_NM])dnl
5696 AC_REQUIRE([LT_PATH_LD])dnl
5697 m4_require([_LT_DECL_SED])dnl
5698 m4_require([_LT_DECL_EGREP])dnl
5699 m4_require([_LT_TAG_COMPILER])dnl
5701 # Check for command to grab the raw symbol name followed by C symbol from nm.
5702 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5703 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5705 # These are sane defaults that work on at least a few old systems.
5706 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5708 # Character class describing NM global symbol codes.
5709 symcode='[[BCDEGRST]]'
5711 # Regexp to match symbols that can be accessed directly from C.
5712 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5714 # Define system-specific variables.
5719 cygwin* | mingw* | pw32* | cegcc*)
5720 symcode='[[ABCDGISTW]]'
5723 if test "$host_cpu" = ia64; then
5724 symcode='[[ABCDEGRST]]'
5728 symcode='[[BCDEGRST]]'
5731 symcode='[[BCDEGQRST]]'
5742 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5746 symcode='[[DFNSTU]]'
5750 # If we're using GNU nm, then use its standard symbol codes.
5751 case `$NM -V 2>&1` in
5752 *GNU* | *'with BFD'*)
5753 symcode='[[ABCDGIRSTW]]' ;;
5756 # Transform an extracted symbol line into a proper C declaration.
5757 # Some systems (esp. on ia64) link data and code symbols differently,
5758 # so use this general approach.
5759 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5761 # Transform an extracted symbol line into symbol name and symbol address
5762 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5763 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'"
5765 # Handle CRLF in mingw tool chain
5769 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5773 # Try without a prefix underscore, then with it.
5774 for ac_symprfx in "" "_"; do
5776 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5777 symxfrm="\\1 $ac_symprfx\\2 \\2"
5779 # Write the raw and C identifiers.
5780 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5781 # Fake it for dumpbin and say T for any non-static function
5782 # and D for any global variable.
5783 # Also find C++ and __fastcall symbols from MSVC++,
5784 # which start with @ or ?.
5785 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5786 " {last_section=section; section=\$ 3};"\
5787 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5788 " \$ 0!~/External *\|/{next};"\
5789 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5790 " {if(hide[section]) next};"\
5791 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5792 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5793 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5794 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5795 " ' prfx=^$ac_symprfx]"
5797 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5800 # Check to see that the pipe works correctly.
5804 cat > conftest.$ac_ext <<_LT_EOF
5809 void nm_test_func(void);
5810 void nm_test_func(void){}
5814 int main(){nm_test_var='a';nm_test_func();return(0);}
5817 if AC_TRY_EVAL(ac_compile); then
5818 # Now try to grab the symbols.
5820 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5821 # Try sorting and uniquifying the output.
5822 if sort "$nlist" | uniq > "$nlist"T; then
5823 mv -f "$nlist"T "$nlist"
5828 # Make sure that we snagged all the symbols we need.
5829 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5830 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5831 cat <<_LT_EOF > conftest.$ac_ext
5837 # Now generate the symbol file.
5838 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5840 cat <<_LT_EOF >> conftest.$ac_ext
5842 /* The mapping between symbol names and symbols. */
5847 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5849 { "@PROGRAM@", (void *) 0 },
5851 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5852 cat <<\_LT_EOF >> conftest.$ac_ext
5856 /* This works around a problem in FreeBSD linker */
5857 #ifdef FREEBSD_WORKAROUND
5858 static const void *lt_preloaded_setup() {
5859 return lt__PROGRAM__LTX_preloaded_symbols;
5867 # Now try linking the two files.
5868 mv conftest.$ac_objext conftstm.$ac_objext
5869 lt_save_LIBS="$LIBS"
5870 lt_save_CFLAGS="$CFLAGS"
5871 LIBS="conftstm.$ac_objext"
5872 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5873 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5876 LIBS="$lt_save_LIBS"
5877 CFLAGS="$lt_save_CFLAGS"
5879 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5882 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5885 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5888 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5889 cat conftest.$ac_ext >&5
5891 rm -rf conftest* conftst*
5893 # Do not use the global_symbol_pipe unless it works.
5894 if test "$pipe_works" = yes; then
5897 lt_cv_sys_global_symbol_pipe=
5901 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5902 lt_cv_sys_global_symbol_to_cdecl=
5904 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5905 AC_MSG_RESULT(failed)
5910 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5911 [Take the output of nm and produce a listing of raw symbols and C names])
5912 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5913 [Transform the output of nm in a proper C declaration])
5914 _LT_DECL([global_symbol_to_c_name_address],
5915 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5916 [Transform the output of nm in a C name address pair])
5917 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5918 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5919 [Transform the output of nm in a C name address pair when lib prefix is needed])
5920 ]) # _LT_CMD_GLOBAL_SYMBOLS
5923 # _LT_COMPILER_PIC([TAGNAME])
5924 # ---------------------------
5925 m4_defun([_LT_COMPILER_PIC],
5926 [m4_require([_LT_TAG_COMPILER])dnl
5927 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5928 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5929 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5931 AC_MSG_CHECKING([for $compiler option to produce PIC])
5932 m4_if([$1], [CXX], [
5933 # C++ specific cases for pic, static, wl, etc.
5934 if test "$GXX" = yes; then
5935 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5936 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5940 # All AIX code is PIC.
5941 if test "$host_cpu" = ia64; then
5942 # AIX 5 now supports IA64 processor
5943 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5950 # see comment about AmigaOS4 .so support
5951 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5954 # FIXME: we need at least 68020 code to build shared libraries, but
5955 # adding the `-m68020' flag to GCC prevents building anything better,
5957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5962 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5963 # PIC is the default for these OSes.
5965 mingw* | cygwin* | os2* | pw32* | cegcc*)
5966 # This hack is so that the source file can tell whether it is being
5967 # built for inclusion in a dll (and should export symbols for example).
5968 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5969 # (--disable-auto-import) libraries
5970 m4_if([$1], [GCJ], [],
5971 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5973 darwin* | rhapsody*)
5974 # PIC is the default on this platform
5975 # Common symbols not allowed in MH_DYLIB files
5976 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5979 # DJGPP does not support shared libraries at all
5980 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5983 # PIC is the default for Haiku.
5984 # The "-static" flag exists, but is broken.
5985 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5988 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5989 # Instead, we relocate shared libraries at runtime.
5992 if test -d /usr/nec; then
5993 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5997 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5998 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5999 # sets the default TLS model and affects inlining.
6004 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6009 # QNX uses GNU C++, but need to define -shared option too, otherwise
6011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6014 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6020 # All AIX code is PIC.
6021 if test "$host_cpu" = ia64; then
6022 # AIX 5 now supports IA64 processor
6023 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6025 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6029 case $cc_basename in
6031 # Green Hills C++ Compiler
6032 # _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"
6037 case $cc_basename in
6039 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6042 # Green Hills C++ Compiler
6043 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6049 freebsd* | dragonfly*)
6050 # FreeBSD uses GNU C++
6052 hpux9* | hpux10* | hpux11*)
6053 case $cc_basename in
6055 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6056 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6057 if test "$host_cpu" != ia64; then
6058 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6062 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6063 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6069 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6078 # This is c89, which is MS Visual C++ (no shared libs)
6079 # Anyone wants to do a port?
6081 irix5* | irix6* | nonstopux*)
6082 case $cc_basename in
6084 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6085 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6086 # CC pic flag -KPIC is the default.
6092 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6093 case $cc_basename in
6096 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6100 # old Intel C++ for x86_64 which still supported -KPIC.
6101 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6103 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6106 # Intel C++, used to be incompatible with GCC.
6107 # ICC 10 doesn't accept -KPIC any more.
6108 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6110 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6113 # Portland Group C++ compiler
6114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6115 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6116 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6120 # Make sure the PIC flag is empty. It appears that all Alpha
6121 # Linux and Compaq Tru64 Unix objects are PIC.
6122 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6123 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6125 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6126 # IBM XL 8.0, 9.0 on PPC and BlueGene
6127 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6128 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6129 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6132 case `$CC -V 2>&1 | sed 5q` in
6135 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6136 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6137 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6148 case $cc_basename in
6150 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6159 # QNX uses GNU C++, but need to define -shared option too, otherwise
6161 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6163 osf3* | osf4* | osf5*)
6164 case $cc_basename in
6166 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6169 # Rational C++ 2.4.1
6170 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6173 # Digital/Compaq C++
6174 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6175 # Make sure the PIC flag is empty. It appears that all Alpha
6176 # Linux and Compaq Tru64 Unix objects are PIC.
6177 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6178 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6187 case $cc_basename in
6189 # Sun C++ 4.2, 5.x and Centerline C++
6190 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6191 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6192 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6195 # Green Hills C++ Compiler
6196 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6203 case $cc_basename in
6206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6207 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6211 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6217 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6218 case $cc_basename in
6220 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6227 case $cc_basename in
6229 # NonStop-UX NCC 3.20
6230 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6239 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6245 if test "$GCC" = yes; then
6246 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6247 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6251 # All AIX code is PIC.
6252 if test "$host_cpu" = ia64; then
6253 # AIX 5 now supports IA64 processor
6254 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6261 # see comment about AmigaOS4 .so support
6262 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6265 # FIXME: we need at least 68020 code to build shared libraries, but
6266 # adding the `-m68020' flag to GCC prevents building anything better,
6268 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6273 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6274 # PIC is the default for these OSes.
6277 mingw* | cygwin* | pw32* | os2* | cegcc*)
6278 # This hack is so that the source file can tell whether it is being
6279 # built for inclusion in a dll (and should export symbols for example).
6280 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6281 # (--disable-auto-import) libraries
6282 m4_if([$1], [GCJ], [],
6283 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6286 darwin* | rhapsody*)
6287 # PIC is the default on this platform
6288 # Common symbols not allowed in MH_DYLIB files
6289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6293 # PIC is the default for Haiku.
6294 # The "-static" flag exists, but is broken.
6295 _LT_TAGVAR(lt_prog_compiler_static, $1)=
6299 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6300 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6301 # sets the default TLS model and affects inlining.
6307 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6313 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6314 # Instead, we relocate shared libraries at runtime.
6318 # Just because we use GCC doesn't mean we suddenly get shared libraries
6319 # on systems that don't support them.
6320 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6325 # QNX uses GNU C++, but need to define -shared option too, otherwise
6327 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6331 if test -d /usr/nec; then
6332 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6341 case $cc_basename in
6342 nvcc*) # Cuda Compiler Driver 2.2
6343 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6344 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6348 # PORTME Check for flag to pass linker flags through the system compiler.
6351 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6352 if test "$host_cpu" = ia64; then
6353 # AIX 5 now supports IA64 processor
6354 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6360 mingw* | cygwin* | pw32* | os2* | cegcc*)
6361 # This hack is so that the source file can tell whether it is being
6362 # built for inclusion in a dll (and should export symbols for example).
6363 m4_if([$1], [GCJ], [],
6364 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6367 hpux9* | hpux10* | hpux11*)
6368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6369 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6376 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6379 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6380 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6383 irix5* | irix6* | nonstopux*)
6384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6385 # PIC (with -KPIC) is the default.
6386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6389 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6390 case $cc_basename in
6391 # old Intel for x86_64 which still supported -KPIC.
6393 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6394 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6395 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6397 # icc used to be incompatible with GCC.
6398 # ICC 10 doesn't accept -KPIC any more.
6400 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6401 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6402 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6404 # Lahey Fortran 8.1.
6406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6408 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6410 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6411 # Portland Group compilers (*not* the Pentium gcc compiler,
6412 # which looks to be a dead project)
6413 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6415 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6418 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6419 # All Alpha code is PIC.
6420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6422 xl* | bgxl* | bgf* | mpixl*)
6423 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6424 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6425 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6426 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6429 case `$CC -V 2>&1 | sed 5q` in
6430 *Sun\ F* | *Sun*Fortran*)
6431 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6433 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6434 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6438 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6439 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6449 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6453 # QNX uses GNU C++, but need to define -shared option too, otherwise
6455 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6458 osf3* | osf4* | osf5*)
6459 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6460 # All OSF/1 code is PIC.
6461 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6471 case $cc_basename in
6472 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6481 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6482 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6485 sysv4 | sysv4.2uw2* | sysv4.3*)
6486 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6492 if test -d /usr/nec ;then
6493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6498 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6501 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6506 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6510 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6511 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6515 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6521 # For platforms which do not support PIC, -DPIC is meaningless:
6523 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6526 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6529 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6530 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6531 [How to pass a linker flag through the compiler])
6534 # Check to make sure the PIC flag actually works.
6536 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6537 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6538 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6539 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6540 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6542 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6544 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6545 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6547 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6548 [Additional compiler flags for building library objects])
6551 # Check to make sure the static flag actually works.
6553 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6554 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6555 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6556 $lt_tmp_static_flag,
6558 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6559 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6560 [Compiler flag to prevent dynamic linking])
6561 ])# _LT_COMPILER_PIC
6564 # _LT_LINKER_SHLIBS([TAGNAME])
6565 # ----------------------------
6566 # See if the linker supports building shared libraries.
6567 m4_defun([_LT_LINKER_SHLIBS],
6568 [AC_REQUIRE([LT_PATH_LD])dnl
6569 AC_REQUIRE([LT_PATH_NM])dnl
6570 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6571 m4_require([_LT_DECL_EGREP])dnl
6572 m4_require([_LT_DECL_SED])dnl
6573 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6574 m4_require([_LT_TAG_COMPILER])dnl
6575 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6576 m4_if([$1], [CXX], [
6577 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6580 # If we're using GNU nm, then we don't want the "-C" option.
6581 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6582 # Also, AIX nm treats weak defined symbols like other global defined
6583 # symbols, whereas GNU nm marks them as "W".
6584 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6585 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6587 _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'
6591 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6593 cygwin* | mingw* | cegcc*)
6594 _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'
6597 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6600 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6603 _LT_TAGVAR(allow_undefined_flag, $1)=
6604 _LT_TAGVAR(always_export_symbols, $1)=no
6605 _LT_TAGVAR(archive_cmds, $1)=
6606 _LT_TAGVAR(archive_expsym_cmds, $1)=
6607 _LT_TAGVAR(compiler_needs_object, $1)=no
6608 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6609 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6610 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6611 _LT_TAGVAR(hardcode_automatic, $1)=no
6612 _LT_TAGVAR(hardcode_direct, $1)=no
6613 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6614 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6615 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6616 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6617 _LT_TAGVAR(hardcode_minus_L, $1)=no
6618 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6619 _LT_TAGVAR(inherit_rpath, $1)=no
6620 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6621 _LT_TAGVAR(module_cmds, $1)=
6622 _LT_TAGVAR(module_expsym_cmds, $1)=
6623 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6624 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6625 _LT_TAGVAR(thread_safe_flag_spec, $1)=
6626 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6627 # include_expsyms should be a list of space-separated symbols to be *always*
6628 # included in the symbol list
6629 _LT_TAGVAR(include_expsyms, $1)=
6630 # exclude_expsyms can be an extended regexp of symbols to exclude
6631 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6632 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6633 # as well as any symbol that contains `d'.
6634 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6635 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6636 # platforms (ab)use it in PIC code, but their linkers get confused if
6637 # the symbol is explicitly referenced. Since portable code cannot
6638 # rely on this symbol name, it's probably fine to never include it in
6639 # preloaded symbol tables.
6640 # Exclude shared library initialization/finalization symbols.
6641 dnl Note also adjust exclude_expsyms for C++ above.
6642 extract_expsyms_cmds=
6645 cygwin* | mingw* | pw32* | cegcc*)
6646 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6647 # When not using gcc, we currently assume that we are using
6648 # Microsoft Visual C++.
6649 if test "$GCC" != yes; then
6654 # we just hope/assume this is gcc and not c89 (= MSVC++)
6662 _LT_TAGVAR(ld_shlibs, $1)=yes
6664 # On some targets, GNU ld is compatible enough with the native linker
6665 # that we're better off using the native interface for both.
6666 lt_use_gnu_ld_interface=no
6667 if test "$with_gnu_ld" = yes; then
6670 # The AIX port of GNU ld has always aspired to compatibility
6671 # with the native linker. However, as the warning in the GNU ld
6672 # block says, versions before 2.19.5* couldn't really create working
6673 # shared libraries, regardless of the interface used.
6674 case `$LD -v 2>&1` in
6675 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6676 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6677 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6679 lt_use_gnu_ld_interface=yes
6684 lt_use_gnu_ld_interface=yes
6689 if test "$lt_use_gnu_ld_interface" = yes; then
6690 # If archive_cmds runs LD, not CC, wlarc should be empty
6693 # Set some defaults for GNU ld with shared library support. These
6694 # are reset later if shared libraries are not supported. Putting them
6695 # here allows them to be overridden if necessary.
6696 runpath_var=LD_RUN_PATH
6697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6699 # ancient GNU ld didn't support --whole-archive et. al.
6700 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6701 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6703 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6705 supports_anon_versioning=no
6706 case `$LD -v 2>&1` in
6707 *GNU\ gold*) supports_anon_versioning=yes ;;
6708 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6709 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6710 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6711 *\ 2.11.*) ;; # other 2.11 versions
6712 *) supports_anon_versioning=yes ;;
6715 # See if GNU ld supports shared libraries.
6718 # On AIX/PPC, the GNU linker is very broken
6719 if test "$host_cpu" != ia64; then
6720 _LT_TAGVAR(ld_shlibs, $1)=no
6723 *** Warning: the GNU linker, at least up to release 2.19, is reported
6724 *** to be unable to reliably create shared libraries on AIX.
6725 *** Therefore, libtool is disabling shared libraries support. If you
6726 *** really care for shared libraries, you may want to install binutils
6727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6728 *** You will then need to restart the configuration process.
6737 # see comment about AmigaOS4 .so support
6738 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6739 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6742 _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)'
6743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6744 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6750 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6751 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6752 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6753 # support --undefined. This deserves some investigation. FIXME
6754 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6756 _LT_TAGVAR(ld_shlibs, $1)=no
6760 cygwin* | mingw* | pw32* | cegcc*)
6761 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6762 # as there is no search path for DLLs.
6763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6765 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6766 _LT_TAGVAR(always_export_symbols, $1)=no
6767 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6768 _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'
6770 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6771 _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'
6772 # If the export-symbols file already is a .def file (1st line
6773 # is EXPORTS), use it as is; otherwise, prepend...
6774 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6775 cp $export_symbols $output_objdir/$soname.def;
6777 echo EXPORTS > $output_objdir/$soname.def;
6778 cat $export_symbols >> $output_objdir/$soname.def;
6780 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6782 _LT_TAGVAR(ld_shlibs, $1)=no
6787 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6788 _LT_TAGVAR(link_all_deplibs, $1)=yes
6792 _LT_TAGVAR(hardcode_direct, $1)=no
6793 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6796 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6797 # Instead, shared libraries are loaded at an image base (0x10000000 by
6798 # default) and relocated if they conflict, which is a slow very memory
6799 # consuming and fragmenting process. To avoid this, we pick a random,
6800 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6801 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6802 _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'
6803 _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'
6806 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6808 if test "$host_os" = linux-dietlibc; then
6809 case $cc_basename in
6810 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6813 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6814 && test "$tmp_diet" = no
6817 tmp_sharedflag='-shared'
6818 case $cc_basename,$host_cpu in
6819 pgcc*) # Portland Group C compiler
6820 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6821 tmp_addflag=' $pic_flag'
6823 pgf77* | pgf90* | pgf95* | pgfortran*)
6824 # Portland Group f77 and f90 compilers
6825 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6826 tmp_addflag=' $pic_flag -Mnomain' ;;
6827 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6828 tmp_addflag=' -i_dynamic' ;;
6829 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6830 tmp_addflag=' -i_dynamic -nofor_main' ;;
6831 ifc* | ifort*) # Intel Fortran compiler
6832 tmp_addflag=' -nofor_main' ;;
6833 lf95*) # Lahey Fortran 8.1
6834 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6835 tmp_sharedflag='--shared' ;;
6836 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6837 tmp_sharedflag='-qmkshrobj'
6839 nvcc*) # Cuda Compiler Driver 2.2
6840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6841 _LT_TAGVAR(compiler_needs_object, $1)=yes
6844 case `$CC -V 2>&1 | sed 5q` in
6845 *Sun\ C*) # Sun C 5.9
6846 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6847 _LT_TAGVAR(compiler_needs_object, $1)=yes
6848 tmp_sharedflag='-G' ;;
6849 *Sun\ F*) # Sun Fortran 8.3
6850 tmp_sharedflag='-G' ;;
6852 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6854 if test "x$supports_anon_versioning" = xyes; then
6855 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6856 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6857 echo "local: *; };" >> $output_objdir/$libname.ver~
6858 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6861 case $cc_basename in
6862 xlf* | bgf* | bgxlf* | mpixlf*)
6863 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6864 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6866 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6867 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6868 if test "x$supports_anon_versioning" = xyes; then
6869 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6870 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6871 echo "local: *; };" >> $output_objdir/$libname.ver~
6872 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6877 _LT_TAGVAR(ld_shlibs, $1)=no
6882 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6883 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6887 _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'
6892 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6893 _LT_TAGVAR(ld_shlibs, $1)=no
6896 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6897 *** create shared libraries on Solaris systems. Therefore, libtool
6898 *** is disabling shared libraries support. We urge you to upgrade GNU
6899 *** binutils to release 2.9.1 or newer. Another option is to modify
6900 *** your PATH or compiler configuration so that the native linker is
6901 *** used, and then restart.
6904 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6906 _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'
6908 _LT_TAGVAR(ld_shlibs, $1)=no
6912 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6913 case `$LD -v 2>&1` in
6914 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6915 _LT_TAGVAR(ld_shlibs, $1)=no
6918 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6919 *** reliably create shared libraries on SCO systems. Therefore, libtool
6920 *** is disabling shared libraries support. We urge you to upgrade GNU
6921 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6922 *** your PATH or compiler configuration so that the native linker is
6923 *** used, and then restart.
6928 # For security reasons, it is highly recommended that you always
6929 # use absolute paths for naming shared libraries, and exclude the
6930 # DT_RUNPATH tag from executables and libraries. But doing so
6931 # requires that you compile everything twice, which is a pain.
6932 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6934 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6935 _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'
6937 _LT_TAGVAR(ld_shlibs, $1)=no
6944 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6946 _LT_TAGVAR(hardcode_direct, $1)=yes
6947 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6953 _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'
6955 _LT_TAGVAR(ld_shlibs, $1)=no
6960 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6962 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6963 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6964 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6967 # PORTME fill in a description of your system's linker (not GNU ld)
6970 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6971 _LT_TAGVAR(always_export_symbols, $1)=yes
6972 _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'
6973 # Note: this linker hardcodes the directories in LIBPATH if there
6974 # are no directories specified by -L.
6975 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6976 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6977 # Neither direct hardcoding nor static linking is supported with a
6979 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6984 if test "$host_cpu" = ia64; then
6985 # On IA64, the linker does run time linking by default, so we don't
6986 # have to do anything special.
6987 aix_use_runtimelinking=no
6988 exp_sym_flag='-Bexport'
6991 # If we're using GNU nm, then we don't want the "-C" option.
6992 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6993 # Also, AIX nm treats weak defined symbols like other global
6994 # defined symbols, whereas GNU nm marks them as "W".
6995 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6996 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6998 _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'
7000 aix_use_runtimelinking=no
7002 # Test if we are trying to use run time linking or normal
7003 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7004 # need to do runtime linking.
7005 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7006 for ld_flag in $LDFLAGS; do
7007 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7008 aix_use_runtimelinking=yes
7015 exp_sym_flag='-bexport'
7016 no_entry_flag='-bnoentry'
7019 # When large executables or shared objects are built, AIX ld can
7020 # have problems creating the table of contents. If linking a library
7021 # or program results in "error TOC overflow" add -mminimal-toc to
7022 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7023 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7025 _LT_TAGVAR(archive_cmds, $1)=''
7026 _LT_TAGVAR(hardcode_direct, $1)=yes
7027 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7028 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7029 _LT_TAGVAR(link_all_deplibs, $1)=yes
7030 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7032 if test "$GCC" = yes; then
7033 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7034 # We only want to do this on AIX 4.2 and lower, the check
7035 # below for broken collect2 doesn't work under 4.3+
7036 collect2name=`${CC} -print-prog-name=collect2`
7037 if test -f "$collect2name" &&
7038 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7040 # We have reworked collect2
7043 # We have old collect2
7044 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7045 # It fails to find uninstalled libraries when the uninstalled
7046 # path is not listed in the libpath. Setting hardcode_minus_L
7047 # to unsupported forces relinking
7048 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7050 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7054 shared_flag='-shared'
7055 if test "$aix_use_runtimelinking" = yes; then
7056 shared_flag="$shared_flag "'${wl}-G'
7060 if test "$host_cpu" = ia64; then
7061 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7062 # chokes on -Wl,-G. The following line is correct:
7065 if test "$aix_use_runtimelinking" = yes; then
7066 shared_flag='${wl}-G'
7068 shared_flag='${wl}-bM:SRE'
7073 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7074 # It seems that -bexpall does not export symbols beginning with
7075 # underscore (_), so it is better to generate a list of symbols to export.
7076 _LT_TAGVAR(always_export_symbols, $1)=yes
7077 if test "$aix_use_runtimelinking" = yes; then
7078 # Warning - without using the other runtime loading flags (-brtl),
7079 # -berok will link without error, but may produce a broken library.
7080 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7081 # Determine the default libpath from the value encoded in an
7083 _LT_SYS_MODULE_PATH_AIX
7084 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7085 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7087 if test "$host_cpu" = ia64; then
7088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7089 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7090 _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"
7092 # Determine the default libpath from the value encoded in an
7094 _LT_SYS_MODULE_PATH_AIX
7095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7096 # Warning - without using the other run time loading flags,
7097 # -berok will link without error, but may produce a broken library.
7098 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7100 if test "$with_gnu_ld" = yes; then
7101 # We only use this code for GNU lds that support --whole-archive.
7102 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7104 # Exported symbols can be pulled into shared objects from archives
7105 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7107 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7108 # This is similar to how AIX traditionally builds its shared libraries.
7109 _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'
7117 # see comment about AmigaOS4 .so support
7118 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7119 _LT_TAGVAR(archive_expsym_cmds, $1)=''
7122 _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)'
7123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7124 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7130 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7133 cygwin* | mingw* | pw32* | cegcc*)
7134 # When not using gcc, we currently assume that we are using
7135 # Microsoft Visual C++.
7136 # hardcode_libdir_flag_spec is actually meaningless, as there is
7137 # no search path for DLLs.
7138 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7139 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7140 # Tell ltmain to make .lib files, not .a files.
7142 # Tell ltmain to make .dll files, not .so files.
7144 # FIXME: Setting linknames here is a bad hack.
7145 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7146 # The linker will automatically build a .lib file if we build a DLL.
7147 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7148 # FIXME: Should let the user specify the lib program.
7149 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7150 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7151 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7154 darwin* | rhapsody*)
7155 _LT_DARWIN_LINKER_FEATURES($1)
7159 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7160 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7161 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7165 _LT_TAGVAR(ld_shlibs, $1)=no
7168 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7169 # support. Future versions do this automatically, but an explicit c++rt0.o
7170 # does not break anything, and helps significantly (at the cost of a little
7173 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7174 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7175 _LT_TAGVAR(hardcode_direct, $1)=yes
7176 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7179 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7181 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7182 _LT_TAGVAR(hardcode_direct, $1)=yes
7183 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7184 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7187 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7188 freebsd* | dragonfly*)
7189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7190 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7191 _LT_TAGVAR(hardcode_direct, $1)=yes
7192 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7196 if test "$GCC" = yes; then
7197 _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'
7199 _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'
7201 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7202 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7203 _LT_TAGVAR(hardcode_direct, $1)=yes
7205 # hardcode_minus_L: Not really in the search PATH,
7206 # but as the default location of the library.
7207 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7208 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7212 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7213 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7215 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7217 if test "$with_gnu_ld" = no; then
7218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7219 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7220 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7221 _LT_TAGVAR(hardcode_direct, $1)=yes
7222 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7223 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7224 # hardcode_minus_L: Not really in the search PATH,
7225 # but as the default location of the library.
7226 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7231 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7234 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7237 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7240 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7246 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7249 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7253 # Older versions of the 11.00 compiler do not understand -b yet
7254 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7255 _LT_LINKER_OPTION([if $CC understands -b],
7256 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7257 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7258 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7259 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7263 if test "$with_gnu_ld" = no; then
7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7265 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7269 _LT_TAGVAR(hardcode_direct, $1)=no
7270 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7273 _LT_TAGVAR(hardcode_direct, $1)=yes
7274 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7275 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7277 # hardcode_minus_L: Not really in the search PATH,
7278 # but as the default location of the library.
7279 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7285 irix5* | irix6* | nonstopux*)
7286 if test "$GCC" = yes; then
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7288 # Try to use the -exported_symbol ld option, if it does not
7289 # work, assume that -exports_file does not work either and
7290 # implicitly export all symbols.
7291 save_LDFLAGS="$LDFLAGS"
7292 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7293 AC_LINK_IFELSE(int foo(void) {},
7294 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7296 LDFLAGS="$save_LDFLAGS"
7298 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7299 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7301 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7302 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7303 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7304 _LT_TAGVAR(inherit_rpath, $1)=yes
7305 _LT_TAGVAR(link_all_deplibs, $1)=yes
7309 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7310 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7312 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7314 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7315 _LT_TAGVAR(hardcode_direct, $1)=yes
7316 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7320 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7321 _LT_TAGVAR(hardcode_direct, $1)=yes
7322 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7323 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7324 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7331 if test -f /usr/libexec/ld.so; then
7332 _LT_TAGVAR(hardcode_direct, $1)=yes
7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7334 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7335 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7336 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7337 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7338 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7339 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7342 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7343 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7344 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7348 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7353 _LT_TAGVAR(ld_shlibs, $1)=no
7358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7359 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7360 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7361 _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'
7362 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7366 if test "$GCC" = yes; then
7367 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7368 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7370 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7371 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7373 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7375 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7378 osf4* | osf5*) # as osf3* with the addition of -msym flag
7379 if test "$GCC" = yes; then
7380 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7381 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7384 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7385 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7386 _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~
7387 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7389 # Both c and cxx compiler support -rpath directly
7390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7392 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7393 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7397 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7398 if test "$GCC" = yes; then
7400 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7401 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7402 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7404 case `$CC -V 2>&1` in
7407 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7408 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7409 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7413 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7414 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7415 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7419 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7420 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7422 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7424 # The compiler driver will combine and reorder linker options,
7425 # but understands `-z linker_flag'. GCC discards it without `$wl',
7426 # but is careful enough not to reorder.
7427 # Supported since Solaris 2.6 (maybe 2.5.1?)
7428 if test "$GCC" = yes; then
7429 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7431 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7435 _LT_TAGVAR(link_all_deplibs, $1)=yes
7439 if test "x$host_vendor" = xsequent; then
7440 # Use $CC to link under sequent, because it throws in some extra .o
7441 # files that make .init and .fini sections work.
7442 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7444 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7447 _LT_TAGVAR(hardcode_direct, $1)=yes
7448 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7449 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7453 case $host_vendor in
7455 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7456 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7459 ## LD is ld it makes a PLAMLIB
7460 ## CC just makes a GrossModule.
7461 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7462 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7463 _LT_TAGVAR(hardcode_direct, $1)=no
7466 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7467 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7470 runpath_var='LD_RUN_PATH'
7471 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7475 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7476 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7477 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7481 if test -d /usr/nec; then
7482 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7483 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7484 runpath_var=LD_RUN_PATH
7485 hardcode_runpath_var=yes
7486 _LT_TAGVAR(ld_shlibs, $1)=yes
7490 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7491 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7492 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7493 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7494 runpath_var='LD_RUN_PATH'
7496 if test "$GCC" = yes; then
7497 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7498 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7500 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7501 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7505 sysv5* | sco3.2v5* | sco5v6*)
7506 # Note: We can NOT use -z defs as we might desire, because we do not
7507 # link with -lc, and that would cause any symbols used from libc to
7508 # always be unresolved, which means just about no library would
7509 # ever link correctly. If we're not using GNU ld we use -z text
7510 # though, which does catch some bad symbols but isn't as heavy-handed
7512 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7513 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7514 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7517 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7518 _LT_TAGVAR(link_all_deplibs, $1)=yes
7519 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7520 runpath_var='LD_RUN_PATH'
7522 if test "$GCC" = yes; then
7523 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7524 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7526 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7527 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7532 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7534 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7538 _LT_TAGVAR(ld_shlibs, $1)=no
7542 if test x$host_vendor = xsni; then
7544 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7545 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7551 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7552 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7554 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7556 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7557 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7558 _LT_DECL([], [extract_expsyms_cmds], [2],
7559 [The commands to extract the exported symbol list from a shared archive])
7562 # Do we need to explicitly link libc?
7564 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7566 # Assume -lc should be added
7567 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7569 if test "$enable_shared" = yes && test "$GCC" = yes; then
7570 case $_LT_TAGVAR(archive_cmds, $1) in
7572 # FIXME: we may have to deal with multi-command sequences.
7575 # Test whether the compiler implicitly links with -lc since on some
7576 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7577 # to ld, don't add -lc before -lgcc.
7578 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7579 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7581 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7583 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7586 libobjs=conftest.$ac_objext
7588 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7589 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7595 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7596 _LT_TAGVAR(allow_undefined_flag, $1)=
7597 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7599 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7601 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7603 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7605 cat conftest.err 1>&5
7609 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7616 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7617 [Whether or not to add -lc for building shared libraries])
7618 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7619 [enable_shared_with_static_runtimes], [0],
7620 [Whether or not to disallow shared libs when runtime libs are static])
7621 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7622 [Compiler flag to allow reflexive dlopens])
7623 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7624 [Compiler flag to generate shared objects directly from archives])
7625 _LT_TAGDECL([], [compiler_needs_object], [1],
7626 [Whether the compiler copes with passing no objects directly])
7627 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7628 [Create an old-style archive from a shared archive])
7629 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7630 [Create a temporary old-style archive to link instead of a shared archive])
7631 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7632 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7633 _LT_TAGDECL([], [module_cmds], [2],
7634 [Commands used to build a loadable module if different from building
7636 _LT_TAGDECL([], [module_expsym_cmds], [2])
7637 _LT_TAGDECL([], [with_gnu_ld], [1],
7638 [Whether we are building with GNU ld or not])
7639 _LT_TAGDECL([], [allow_undefined_flag], [1],
7640 [Flag that allows shared libraries with undefined symbols to be built])
7641 _LT_TAGDECL([], [no_undefined_flag], [1],
7642 [Flag that enforces no undefined symbols])
7643 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7644 [Flag to hardcode $libdir into a binary during linking.
7645 This must work even if $libdir does not exist])
7646 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7647 [[If ld is used when linking, flag to hardcode $libdir into a binary
7648 during linking. This must work even if $libdir does not exist]])
7649 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7650 [Whether we need a single "-rpath" flag with a separated argument])
7651 _LT_TAGDECL([], [hardcode_direct], [0],
7652 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7653 DIR into the resulting binary])
7654 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7655 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7656 DIR into the resulting binary and the resulting library dependency is
7657 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7658 library is relocated])
7659 _LT_TAGDECL([], [hardcode_minus_L], [0],
7660 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7661 into the resulting binary])
7662 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7663 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7664 into the resulting binary])
7665 _LT_TAGDECL([], [hardcode_automatic], [0],
7666 [Set to "yes" if building a shared library automatically hardcodes DIR
7667 into the library and all subsequent libraries and executables linked
7669 _LT_TAGDECL([], [inherit_rpath], [0],
7670 [Set to yes if linker adds runtime paths of dependent libraries
7671 to runtime path list])
7672 _LT_TAGDECL([], [link_all_deplibs], [0],
7673 [Whether libtool must link a program against all its dependency libraries])
7674 _LT_TAGDECL([], [fix_srcfile_path], [1],
7675 [Fix the shell variable $srcfile for the compiler])
7676 _LT_TAGDECL([], [always_export_symbols], [0],
7677 [Set to "yes" if exported symbols are required])
7678 _LT_TAGDECL([], [export_symbols_cmds], [2],
7679 [The commands to list exported symbols])
7680 _LT_TAGDECL([], [exclude_expsyms], [1],
7681 [Symbols that should not be listed in the preloaded symbols])
7682 _LT_TAGDECL([], [include_expsyms], [1],
7683 [Symbols that must always be exported])
7684 _LT_TAGDECL([], [prelink_cmds], [2],
7685 [Commands necessary for linking programs (against libraries) with templates])
7686 _LT_TAGDECL([], [file_list_spec], [1],
7687 [Specify filename containing input files])
7688 dnl FIXME: Not yet implemented
7689 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7690 dnl [Compiler flag to generate thread safe objects])
7691 ])# _LT_LINKER_SHLIBS
7694 # _LT_LANG_C_CONFIG([TAG])
7695 # ------------------------
7696 # Ensure that the configuration variables for a C compiler are suitably
7697 # defined. These variables are subsequently used by _LT_CONFIG to write
7698 # the compiler configuration to `libtool'.
7699 m4_defun([_LT_LANG_C_CONFIG],
7700 [m4_require([_LT_DECL_EGREP])dnl
7704 # Source file extension for C test sources.
7707 # Object file extension for compiled C test sources.
7709 _LT_TAGVAR(objext, $1)=$objext
7711 # Code to be used in simple compile tests
7712 lt_simple_compile_test_code="int some_variable = 0;"
7714 # Code to be used in simple link tests
7715 lt_simple_link_test_code='int main(){return(0);}'
7718 # Save the default compiler, since it gets overwritten when the other
7719 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7720 compiler_DEFAULT=$CC
7722 # save warnings/boilerplate of simple test code
7723 _LT_COMPILER_BOILERPLATE
7724 _LT_LINKER_BOILERPLATE
7726 if test -n "$compiler"; then
7727 _LT_COMPILER_NO_RTTI($1)
7728 _LT_COMPILER_PIC($1)
7729 _LT_COMPILER_C_O($1)
7730 _LT_COMPILER_FILE_LOCKS($1)
7731 _LT_LINKER_SHLIBS($1)
7732 _LT_SYS_DYNAMIC_LINKER($1)
7733 _LT_LINKER_HARDCODE_LIBPATH($1)
7737 # Report which library types will actually be built
7738 AC_MSG_CHECKING([if libtool supports shared libraries])
7739 AC_MSG_RESULT([$can_build_shared])
7741 AC_MSG_CHECKING([whether to build shared libraries])
7742 test "$can_build_shared" = "no" && enable_shared=no
7744 # On AIX, shared libraries and static libraries use the same namespace, and
7745 # are all built from PIC.
7748 test "$enable_shared" = yes && enable_static=no
7749 if test -n "$RANLIB"; then
7750 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7751 postinstall_cmds='$RANLIB $lib'
7756 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7757 test "$enable_shared" = yes && enable_static=no
7761 AC_MSG_RESULT([$enable_shared])
7763 AC_MSG_CHECKING([whether to build static libraries])
7764 # Make sure either enable_shared or enable_static is yes.
7765 test "$enable_shared" = yes || enable_static=yes
7766 AC_MSG_RESULT([$enable_static])
7772 ])# _LT_LANG_C_CONFIG
7775 # _LT_LANG_CXX_CONFIG([TAG])
7776 # --------------------------
7777 # Ensure that the configuration variables for a C++ compiler are suitably
7778 # defined. These variables are subsequently used by _LT_CONFIG to write
7779 # the compiler configuration to `libtool'.
7780 m4_defun([_LT_LANG_CXX_CONFIG],
7781 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7782 m4_require([_LT_DECL_EGREP])dnl
7783 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7784 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7785 (test "X$CXX" != "Xg++"))) ; then
7788 _lt_caught_CXX_error=yes
7792 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7793 _LT_TAGVAR(allow_undefined_flag, $1)=
7794 _LT_TAGVAR(always_export_symbols, $1)=no
7795 _LT_TAGVAR(archive_expsym_cmds, $1)=
7796 _LT_TAGVAR(compiler_needs_object, $1)=no
7797 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7798 _LT_TAGVAR(hardcode_direct, $1)=no
7799 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7801 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7802 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7803 _LT_TAGVAR(hardcode_minus_L, $1)=no
7804 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7805 _LT_TAGVAR(hardcode_automatic, $1)=no
7806 _LT_TAGVAR(inherit_rpath, $1)=no
7807 _LT_TAGVAR(module_cmds, $1)=
7808 _LT_TAGVAR(module_expsym_cmds, $1)=
7809 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7810 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7811 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7812 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7813 _LT_TAGVAR(no_undefined_flag, $1)=
7814 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7815 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7817 # Source file extension for C++ test sources.
7820 # Object file extension for compiled C++ test sources.
7822 _LT_TAGVAR(objext, $1)=$objext
7824 # No sense in running all these tests if we already determined that
7825 # the CXX compiler isn't working. Some variables (like enable_shared)
7826 # are currently assumed to apply to all compilers on this platform,
7827 # and will be corrupted by setting them based on a non-working compiler.
7828 if test "$_lt_caught_CXX_error" != yes; then
7829 # Code to be used in simple compile tests
7830 lt_simple_compile_test_code="int some_variable = 0;"
7832 # Code to be used in simple link tests
7833 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7835 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7838 # save warnings/boilerplate of simple test code
7839 _LT_COMPILER_BOILERPLATE
7840 _LT_LINKER_BOILERPLATE
7842 # Allow CC to be a program name with arguments.
7847 lt_save_with_gnu_ld=$with_gnu_ld
7848 lt_save_path_LD=$lt_cv_path_LD
7849 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7850 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7852 $as_unset lt_cv_prog_gnu_ld
7854 if test -n "${lt_cv_path_LDCXX+set}"; then
7855 lt_cv_path_LD=$lt_cv_path_LDCXX
7857 $as_unset lt_cv_path_LD
7859 test -z "${LDCXX+set}" || LD=$LDCXX
7862 _LT_TAGVAR(compiler, $1)=$CC
7863 _LT_CC_BASENAME([$compiler])
7865 if test -n "$compiler"; then
7866 # We don't want -fno-exception when compiling C++ code, so set the
7867 # no_builtin_flag separately
7868 if test "$GXX" = yes; then
7869 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7871 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7874 if test "$GXX" = yes; then
7875 # Set up default GNU C++ configuration
7879 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7880 # archiving commands below assume that GNU ld is being used.
7881 if test "$with_gnu_ld" = yes; then
7882 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7883 _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'
7885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7886 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7888 # If archive_cmds runs LD, not CC, wlarc should be empty
7889 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7890 # investigate it a little bit more. (MM)
7893 # ancient GNU ld didn't support --whole-archive et. al.
7894 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7895 $GREP 'no-whole-archive' > /dev/null; then
7896 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7898 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7904 # A generic and very simple default shared library creation
7905 # command for GNU C++ for the case where it uses the native
7906 # linker, instead of GNU ld. If possible, this setting should
7907 # overridden to take advantage of the native linker features on
7908 # the platform it is being used on.
7909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7912 # Commands to make compiler produce verbose output that lists
7913 # what "hidden" libraries, object files and flags are used when
7914 # linking a shared library.
7915 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7923 # PORTME: fill in a description of your system's C++ link characteristics
7924 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7925 _LT_TAGVAR(ld_shlibs, $1)=yes
7928 # FIXME: insert proper C++ library support
7929 _LT_TAGVAR(ld_shlibs, $1)=no
7932 if test "$host_cpu" = ia64; then
7933 # On IA64, the linker does run time linking by default, so we don't
7934 # have to do anything special.
7935 aix_use_runtimelinking=no
7936 exp_sym_flag='-Bexport'
7939 aix_use_runtimelinking=no
7941 # Test if we are trying to use run time linking or normal
7942 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7943 # need to do runtime linking.
7944 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7945 for ld_flag in $LDFLAGS; do
7948 aix_use_runtimelinking=yes
7956 exp_sym_flag='-bexport'
7957 no_entry_flag='-bnoentry'
7960 # When large executables or shared objects are built, AIX ld can
7961 # have problems creating the table of contents. If linking a library
7962 # or program results in "error TOC overflow" add -mminimal-toc to
7963 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7964 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7966 _LT_TAGVAR(archive_cmds, $1)=''
7967 _LT_TAGVAR(hardcode_direct, $1)=yes
7968 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7969 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7970 _LT_TAGVAR(link_all_deplibs, $1)=yes
7971 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7973 if test "$GXX" = yes; then
7974 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7975 # We only want to do this on AIX 4.2 and lower, the check
7976 # below for broken collect2 doesn't work under 4.3+
7977 collect2name=`${CC} -print-prog-name=collect2`
7978 if test -f "$collect2name" &&
7979 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7981 # We have reworked collect2
7984 # We have old collect2
7985 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7986 # It fails to find uninstalled libraries when the uninstalled
7987 # path is not listed in the libpath. Setting hardcode_minus_L
7988 # to unsupported forces relinking
7989 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7990 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7991 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7994 shared_flag='-shared'
7995 if test "$aix_use_runtimelinking" = yes; then
7996 shared_flag="$shared_flag "'${wl}-G'
8000 if test "$host_cpu" = ia64; then
8001 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8002 # chokes on -Wl,-G. The following line is correct:
8005 if test "$aix_use_runtimelinking" = yes; then
8006 shared_flag='${wl}-G'
8008 shared_flag='${wl}-bM:SRE'
8013 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8014 # It seems that -bexpall does not export symbols beginning with
8015 # underscore (_), so it is better to generate a list of symbols to
8017 _LT_TAGVAR(always_export_symbols, $1)=yes
8018 if test "$aix_use_runtimelinking" = yes; then
8019 # Warning - without using the other runtime loading flags (-brtl),
8020 # -berok will link without error, but may produce a broken library.
8021 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8022 # Determine the default libpath from the value encoded in an empty
8024 _LT_SYS_MODULE_PATH_AIX
8025 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8027 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8029 if test "$host_cpu" = ia64; then
8030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8031 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8032 _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"
8034 # Determine the default libpath from the value encoded in an
8036 _LT_SYS_MODULE_PATH_AIX
8037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8038 # Warning - without using the other run time loading flags,
8039 # -berok will link without error, but may produce a broken library.
8040 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8041 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8042 if test "$with_gnu_ld" = yes; then
8043 # We only use this code for GNU lds that support --whole-archive.
8044 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8046 # Exported symbols can be pulled into shared objects from archives
8047 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8049 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8050 # This is similar to how AIX traditionally builds its shared
8052 _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'
8058 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8059 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8060 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8061 # support --undefined. This deserves some investigation. FIXME
8062 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8064 _LT_TAGVAR(ld_shlibs, $1)=no
8069 case $cc_basename in
8071 # FIXME: insert proper C++ library support
8072 _LT_TAGVAR(ld_shlibs, $1)=no
8077 cygwin* | mingw* | pw32* | cegcc*)
8078 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8079 # as there is no search path for DLLs.
8080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8081 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8082 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8083 _LT_TAGVAR(always_export_symbols, $1)=no
8084 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8086 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8087 _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'
8088 # If the export-symbols file already is a .def file (1st line
8089 # is EXPORTS), use it as is; otherwise, prepend...
8090 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8091 cp $export_symbols $output_objdir/$soname.def;
8093 echo EXPORTS > $output_objdir/$soname.def;
8094 cat $export_symbols >> $output_objdir/$soname.def;
8096 $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'
8098 _LT_TAGVAR(ld_shlibs, $1)=no
8101 darwin* | rhapsody*)
8102 _LT_DARWIN_LINKER_FEATURES($1)
8106 case $cc_basename in
8108 # FIXME: insert proper C++ library support
8109 _LT_TAGVAR(ld_shlibs, $1)=no
8112 # Green Hills C++ Compiler
8113 # FIXME: insert proper C++ library support
8114 _LT_TAGVAR(ld_shlibs, $1)=no
8117 # FIXME: insert proper C++ library support
8118 _LT_TAGVAR(ld_shlibs, $1)=no
8124 # C++ shared libraries reported to be fairly broken before
8126 _LT_TAGVAR(ld_shlibs, $1)=no
8130 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8133 freebsd* | dragonfly*)
8134 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8136 _LT_TAGVAR(ld_shlibs, $1)=yes
8143 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8144 _LT_TAGVAR(link_all_deplibs, $1)=yes
8148 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8149 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8150 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8151 _LT_TAGVAR(hardcode_direct, $1)=yes
8152 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8153 # but as the default
8154 # location of the library.
8156 case $cc_basename in
8158 # FIXME: insert proper C++ library support
8159 _LT_TAGVAR(ld_shlibs, $1)=no
8162 _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'
8163 # Commands to make compiler produce verbose output that lists
8164 # what "hidden" libraries, object files and flags are used when
8165 # linking a shared library.
8167 # There doesn't appear to be a way to prevent this compiler from
8168 # explicitly linking system object files so we need to strip them
8169 # from the output so that they don't get included in the library
8171 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8174 if test "$GXX" = yes; then
8175 _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'
8177 # FIXME: insert proper C++ library support
8178 _LT_TAGVAR(ld_shlibs, $1)=no
8185 if test $with_gnu_ld = no; then
8186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8187 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8193 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8199 _LT_TAGVAR(hardcode_direct, $1)=no
8200 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8203 _LT_TAGVAR(hardcode_direct, $1)=yes
8204 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8205 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8206 # but as the default
8207 # location of the library.
8211 case $cc_basename in
8213 # FIXME: insert proper C++ library support
8214 _LT_TAGVAR(ld_shlibs, $1)=no
8219 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8222 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8225 _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'
8228 # Commands to make compiler produce verbose output that lists
8229 # what "hidden" libraries, object files and flags are used when
8230 # linking a shared library.
8232 # There doesn't appear to be a way to prevent this compiler from
8233 # explicitly linking system object files so we need to strip them
8234 # from the output so that they don't get included in the library
8236 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8239 if test "$GXX" = yes; then
8240 if test $with_gnu_ld = no; then
8243 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8246 _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'
8249 _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'
8254 # FIXME: insert proper C++ library support
8255 _LT_TAGVAR(ld_shlibs, $1)=no
8262 _LT_TAGVAR(hardcode_direct, $1)=no
8263 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8265 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8266 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8267 # Instead, shared libraries are loaded at an image base (0x10000000 by
8268 # default) and relocated if they conflict, which is a slow very memory
8269 # consuming and fragmenting process. To avoid this, we pick a random,
8270 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8271 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8272 _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'
8273 _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'
8276 case $cc_basename in
8279 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8281 # Archives containing C++ object files must be created using
8282 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8283 # necessary to make sure instantiated templates are included
8285 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8288 if test "$GXX" = yes; then
8289 if test "$with_gnu_ld" = no; then
8290 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8295 _LT_TAGVAR(link_all_deplibs, $1)=yes
8298 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8299 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8300 _LT_TAGVAR(inherit_rpath, $1)=yes
8303 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8304 case $cc_basename in
8306 # Kuck and Associates, Inc. (KAI) C++ Compiler
8308 # KCC will only create a shared library if the output file
8309 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8310 # to its proper name (with version) after linking.
8311 _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'
8312 _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'
8313 # Commands to make compiler produce verbose output that lists
8314 # what "hidden" libraries, object files and flags are used when
8315 # linking a shared library.
8317 # There doesn't appear to be a way to prevent this compiler from
8318 # explicitly linking system object files so we need to strip them
8319 # from the output so that they don't get included in the library
8321 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8324 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8326 # Archives containing C++ object files must be created using
8327 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8328 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8333 # version 8.0 and above of icpc choke on multiply defined symbols
8334 # if we add $predep_objects and $postdep_objects, however 7.1 and
8335 # earlier do not add the objects themselves.
8336 case `$CC -V 2>&1` in
8338 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8339 _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'
8341 *) # Version 8.0 or newer
8344 ia64*) tmp_idyn=' -i_dynamic';;
8346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8347 _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'
8350 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8352 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8353 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8356 # Portland Group C++ compiler
8358 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8359 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8361 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8362 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8363 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8365 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8366 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8368 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8370 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8371 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8372 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8374 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8375 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8377 *) # Version 6 and above use weak symbols
8378 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8379 _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'
8383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8384 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8385 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8389 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8390 _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'
8392 runpath_var=LD_RUN_PATH
8393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8394 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8396 # Commands to make compiler produce verbose output that lists
8397 # what "hidden" libraries, object files and flags are used when
8398 # linking a shared library.
8400 # There doesn't appear to be a way to prevent this compiler from
8401 # explicitly linking system object files so we need to strip them
8402 # from the output so that they don't get included in the library
8404 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
8406 xl* | mpixl* | bgxl*)
8407 # IBM XL 8.0 on PPC, with GNU ld
8408 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8409 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8410 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8411 if test "x$supports_anon_versioning" = xyes; then
8412 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8413 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8414 echo "local: *; };" >> $output_objdir/$libname.ver~
8415 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8419 case `$CC -V 2>&1 | sed 5q` in
8422 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8423 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8424 _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'
8425 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8426 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8427 _LT_TAGVAR(compiler_needs_object, $1)=yes
8429 # Not sure whether something based on
8430 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8432 output_verbose_link_cmd='func_echo_all'
8434 # Archives containing C++ object files must be created using
8435 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8436 # necessary to make sure instantiated templates are included
8438 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8446 # FIXME: insert proper C++ library support
8447 _LT_TAGVAR(ld_shlibs, $1)=no
8451 # FIXME: insert proper C++ library support
8452 _LT_TAGVAR(ld_shlibs, $1)=no
8456 case $cc_basename in
8458 # FIXME: insert proper C++ library support
8459 _LT_TAGVAR(ld_shlibs, $1)=no
8462 # FIXME: insert proper C++ library support
8463 _LT_TAGVAR(ld_shlibs, $1)=no
8469 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8470 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8473 _LT_TAGVAR(hardcode_direct, $1)=yes
8474 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8476 # Workaround some broken pre-1.5 toolchains
8477 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8481 _LT_TAGVAR(ld_shlibs, $1)=yes
8485 # C++ shared libraries are fairly broken
8486 _LT_TAGVAR(ld_shlibs, $1)=no
8490 if test -f /usr/libexec/ld.so; then
8491 _LT_TAGVAR(hardcode_direct, $1)=yes
8492 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8493 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8494 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8495 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8496 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8497 _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'
8498 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8499 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8501 output_verbose_link_cmd=func_echo_all
8503 _LT_TAGVAR(ld_shlibs, $1)=no
8507 osf3* | osf4* | osf5*)
8508 case $cc_basename in
8510 # Kuck and Associates, Inc. (KAI) C++ Compiler
8512 # KCC will only create a shared library if the output file
8513 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8514 # to its proper name (with version) after linking.
8515 _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'
8517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8518 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8520 # Archives containing C++ object files must be created using
8521 # the KAI C++ compiler.
8523 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8524 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8528 # Rational C++ 2.4.1
8529 # FIXME: insert proper C++ library support
8530 _LT_TAGVAR(ld_shlibs, $1)=no
8535 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8540 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8541 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8542 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8543 echo "-hidden">> $lib.exp~
8544 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
8546 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8550 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8552 # Commands to make compiler produce verbose output that lists
8553 # what "hidden" libraries, object files and flags are used when
8554 # linking a shared library.
8556 # There doesn't appear to be a way to prevent this compiler from
8557 # explicitly linking system object files so we need to strip them
8558 # from the output so that they don't get included in the library
8560 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8563 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8564 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8567 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8570 _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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8575 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8577 # Commands to make compiler produce verbose output that lists
8578 # what "hidden" libraries, object files and flags are used when
8579 # linking a shared library.
8580 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8583 # FIXME: insert proper C++ library support
8584 _LT_TAGVAR(ld_shlibs, $1)=no
8591 # FIXME: insert proper C++ library support
8592 _LT_TAGVAR(ld_shlibs, $1)=no
8596 case $cc_basename in
8599 # FIXME: insert proper C++ library support
8600 _LT_TAGVAR(ld_shlibs, $1)=no
8604 # FIXME: insert proper C++ library support
8605 _LT_TAGVAR(ld_shlibs, $1)=no
8608 # FIXME: insert proper C++ library support
8609 _LT_TAGVAR(ld_shlibs, $1)=no
8615 case $cc_basename in
8617 # Sun C++ 4.2, 5.x and Centerline C++
8618 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8619 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8620 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8621 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8622 $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'
8624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8625 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8627 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8629 # The compiler driver will combine and reorder linker options,
8630 # but understands `-z linker_flag'.
8631 # Supported since Solaris 2.6 (maybe 2.5.1?)
8632 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8635 _LT_TAGVAR(link_all_deplibs, $1)=yes
8637 output_verbose_link_cmd='func_echo_all'
8639 # Archives containing C++ object files must be created using
8640 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8641 # necessary to make sure instantiated templates are included
8643 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8646 # Green Hills C++ Compiler
8647 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8649 # The C++ compiler must be used to create the archive.
8650 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8653 # GNU C++ compiler with Solaris linker
8654 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8655 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8656 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8657 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8658 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8659 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8661 # Commands to make compiler produce verbose output that lists
8662 # what "hidden" libraries, object files and flags are used when
8663 # linking a shared library.
8664 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8666 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8668 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8669 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8670 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8672 # Commands to make compiler produce verbose output that lists
8673 # what "hidden" libraries, object files and flags are used when
8674 # linking a shared library.
8675 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8678 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8680 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8682 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8690 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8691 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8692 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8693 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8694 runpath_var='LD_RUN_PATH'
8696 case $cc_basename in
8698 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8699 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8702 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8703 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8708 sysv5* | sco3.2v5* | sco5v6*)
8709 # Note: We can NOT use -z defs as we might desire, because we do not
8710 # link with -lc, and that would cause any symbols used from libc to
8711 # always be unresolved, which means just about no library would
8712 # ever link correctly. If we're not using GNU ld we use -z text
8713 # though, which does catch some bad symbols but isn't as heavy-handed
8715 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8716 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8717 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8718 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8720 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8721 _LT_TAGVAR(link_all_deplibs, $1)=yes
8722 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8723 runpath_var='LD_RUN_PATH'
8725 case $cc_basename in
8727 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8728 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8729 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8730 '"$_LT_TAGVAR(old_archive_cmds, $1)"
8731 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8732 '"$_LT_TAGVAR(reload_cmds, $1)"
8735 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8736 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8742 case $cc_basename in
8744 # NonStop-UX NCC 3.20
8745 # FIXME: insert proper C++ library support
8746 _LT_TAGVAR(ld_shlibs, $1)=no
8749 # FIXME: insert proper C++ library support
8750 _LT_TAGVAR(ld_shlibs, $1)=no
8756 # FIXME: insert proper C++ library support
8757 _LT_TAGVAR(ld_shlibs, $1)=no
8761 # FIXME: insert proper C++ library support
8762 _LT_TAGVAR(ld_shlibs, $1)=no
8766 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8767 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8769 _LT_TAGVAR(GCC, $1)="$GXX"
8770 _LT_TAGVAR(LD, $1)="$LD"
8773 ## There is no encapsulation within the following macros, do not change
8774 ## the running order or otherwise move them around unless you know exactly
8775 ## what you are doing...
8776 _LT_SYS_HIDDEN_LIBDEPS($1)
8777 _LT_COMPILER_PIC($1)
8778 _LT_COMPILER_C_O($1)
8779 _LT_COMPILER_FILE_LOCKS($1)
8780 _LT_LINKER_SHLIBS($1)
8781 _LT_SYS_DYNAMIC_LINKER($1)
8782 _LT_LINKER_HARDCODE_LIBPATH($1)
8785 fi # test -n "$compiler"
8791 with_gnu_ld=$lt_save_with_gnu_ld
8792 lt_cv_path_LDCXX=$lt_cv_path_LD
8793 lt_cv_path_LD=$lt_save_path_LD
8794 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8795 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8796 fi # test "$_lt_caught_CXX_error" != yes
8799 ])# _LT_LANG_CXX_CONFIG
8802 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8803 # ---------------------------------
8804 # Figure out "hidden" library dependencies from verbose
8805 # compiler output when linking a shared library.
8806 # Parse the compiler output and extract the necessary
8807 # objects, libraries and library flags.
8808 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8809 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8810 # Dependencies to place before and after the object being linked:
8811 _LT_TAGVAR(predep_objects, $1)=
8812 _LT_TAGVAR(postdep_objects, $1)=
8813 _LT_TAGVAR(predeps, $1)=
8814 _LT_TAGVAR(postdeps, $1)=
8815 _LT_TAGVAR(compiler_lib_search_path, $1)=
8817 dnl we can't use the lt_simple_compile_test_code here,
8818 dnl because it contains code intended for an executable,
8819 dnl not a library. It's possible we should let each
8820 dnl tag define a new lt_????_link_test_code variable,
8821 dnl but it's only used here...
8822 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8824 void foo (void) { a = 0; }
8826 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8830 Foo (void) { a = 0; }
8835 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8843 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8851 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8854 public void bar (void) {
8860 dnl Parse the compiler output and extract the necessary
8861 dnl objects, libraries and library flags.
8862 if AC_TRY_EVAL(ac_compile); then
8863 # Parse the compiler output and extract the necessary
8864 # objects, libraries and library flags.
8866 # Sentinel used to keep track of whether or not we are before
8867 # the conftest object file.
8868 pre_test_object_deps_done=no
8870 for p in `eval "$output_verbose_link_cmd"`; do
8874 # Some compilers place space between "-{L,R}" and the path.
8876 if test $p = "-L" ||
8877 test $p = "-R"; then
8884 if test "$pre_test_object_deps_done" = no; then
8887 # Internal compiler library paths should come after those
8888 # provided the user. The postdeps already come after the
8889 # user supplied libs so there is no need to process them.
8890 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8891 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8893 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8896 # The "-l" case would never come before the object being
8897 # linked, so don't bother handling this case.
8900 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8901 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8903 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8909 # This assumes that the test object file only shows up
8910 # once in the compiler output.
8911 if test "$p" = "conftest.$objext"; then
8912 pre_test_object_deps_done=yes
8916 if test "$pre_test_object_deps_done" = no; then
8917 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8918 _LT_TAGVAR(predep_objects, $1)="$p"
8920 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8923 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8924 _LT_TAGVAR(postdep_objects, $1)="$p"
8926 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8931 *) ;; # Ignore the rest.
8939 echo "libtool.m4: error: problem compiling $1 test program"
8942 $RM -f confest.$objext
8944 # PORTME: override above test on systems where it is broken
8948 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8949 # hack all around it, let's just trust "g++" to DTRT.
8950 _LT_TAGVAR(predep_objects,$1)=
8951 _LT_TAGVAR(postdep_objects,$1)=
8952 _LT_TAGVAR(postdeps,$1)=
8956 case `$CC -V 2>&1 | sed 5q` in
8960 # The more standards-conforming stlport4 library is
8961 # incompatible with the Cstd library. Avoid specifying
8962 # it if it's in CXXFLAGS. Ignore libCrun as
8963 # -library=stlport4 depends on it.
8964 case " $CXX $CXXFLAGS " in
8965 *" -library=stlport4 "*)
8966 solaris_use_stlport4=yes
8970 if test "$solaris_use_stlport4" != yes; then
8971 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8978 case $cc_basename in
8980 # The more standards-conforming stlport4 library is
8981 # incompatible with the Cstd library. Avoid specifying
8982 # it if it's in CXXFLAGS. Ignore libCrun as
8983 # -library=stlport4 depends on it.
8984 case " $CXX $CXXFLAGS " in
8985 *" -library=stlport4 "*)
8986 solaris_use_stlport4=yes
8990 # Adding this requires a known-good setup of shared libraries for
8991 # Sun compiler versions before 5.6, else PIC objects from an old
8992 # archive will be linked into the output, leading to subtle bugs.
8993 if test "$solaris_use_stlport4" != yes; then
8994 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9002 case " $_LT_TAGVAR(postdeps, $1) " in
9003 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9005 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9006 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9007 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9009 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9010 [The directories searched by this compiler when creating a shared library])
9011 _LT_TAGDECL([], [predep_objects], [1],
9012 [Dependencies to place before and after the objects being linked to
9013 create a shared library])
9014 _LT_TAGDECL([], [postdep_objects], [1])
9015 _LT_TAGDECL([], [predeps], [1])
9016 _LT_TAGDECL([], [postdeps], [1])
9017 _LT_TAGDECL([], [compiler_lib_search_path], [1],
9018 [The library search path used internally by the compiler when linking
9020 ])# _LT_SYS_HIDDEN_LIBDEPS
9023 # _LT_LANG_F77_CONFIG([TAG])
9024 # --------------------------
9025 # Ensure that the configuration variables for a Fortran 77 compiler are
9026 # suitably defined. These variables are subsequently used by _LT_CONFIG
9027 # to write the compiler configuration to `libtool'.
9028 m4_defun([_LT_LANG_F77_CONFIG],
9029 [AC_LANG_PUSH(Fortran 77)
9030 if test -z "$F77" || test "X$F77" = "Xno"; then
9034 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9035 _LT_TAGVAR(allow_undefined_flag, $1)=
9036 _LT_TAGVAR(always_export_symbols, $1)=no
9037 _LT_TAGVAR(archive_expsym_cmds, $1)=
9038 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9039 _LT_TAGVAR(hardcode_direct, $1)=no
9040 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9042 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9043 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9044 _LT_TAGVAR(hardcode_minus_L, $1)=no
9045 _LT_TAGVAR(hardcode_automatic, $1)=no
9046 _LT_TAGVAR(inherit_rpath, $1)=no
9047 _LT_TAGVAR(module_cmds, $1)=
9048 _LT_TAGVAR(module_expsym_cmds, $1)=
9049 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9050 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9051 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9052 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9053 _LT_TAGVAR(no_undefined_flag, $1)=
9054 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9055 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9057 # Source file extension for f77 test sources.
9060 # Object file extension for compiled f77 test sources.
9062 _LT_TAGVAR(objext, $1)=$objext
9064 # No sense in running all these tests if we already determined that
9065 # the F77 compiler isn't working. Some variables (like enable_shared)
9066 # are currently assumed to apply to all compilers on this platform,
9067 # and will be corrupted by setting them based on a non-working compiler.
9068 if test "$_lt_disable_F77" != yes; then
9069 # Code to be used in simple compile tests
9070 lt_simple_compile_test_code="\
9076 # Code to be used in simple link tests
9077 lt_simple_link_test_code="\
9082 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9085 # save warnings/boilerplate of simple test code
9086 _LT_COMPILER_BOILERPLATE
9087 _LT_LINKER_BOILERPLATE
9089 # Allow CC to be a program name with arguments.
9094 _LT_TAGVAR(compiler, $1)=$CC
9095 _LT_CC_BASENAME([$compiler])
9097 if test -n "$compiler"; then
9098 AC_MSG_CHECKING([if libtool supports shared libraries])
9099 AC_MSG_RESULT([$can_build_shared])
9101 AC_MSG_CHECKING([whether to build shared libraries])
9102 test "$can_build_shared" = "no" && enable_shared=no
9104 # On AIX, shared libraries and static libraries use the same namespace, and
9105 # are all built from PIC.
9108 test "$enable_shared" = yes && enable_static=no
9109 if test -n "$RANLIB"; then
9110 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9111 postinstall_cmds='$RANLIB $lib'
9115 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9116 test "$enable_shared" = yes && enable_static=no
9120 AC_MSG_RESULT([$enable_shared])
9122 AC_MSG_CHECKING([whether to build static libraries])
9123 # Make sure either enable_shared or enable_static is yes.
9124 test "$enable_shared" = yes || enable_static=yes
9125 AC_MSG_RESULT([$enable_static])
9127 _LT_TAGVAR(GCC, $1)="$G77"
9128 _LT_TAGVAR(LD, $1)="$LD"
9131 ## There is no encapsulation within the following macros, do not change
9132 ## the running order or otherwise move them around unless you know exactly
9133 ## what you are doing...
9134 _LT_COMPILER_PIC($1)
9135 _LT_COMPILER_C_O($1)
9136 _LT_COMPILER_FILE_LOCKS($1)
9137 _LT_LINKER_SHLIBS($1)
9138 _LT_SYS_DYNAMIC_LINKER($1)
9139 _LT_LINKER_HARDCODE_LIBPATH($1)
9142 fi # test -n "$compiler"
9146 fi # test "$_lt_disable_F77" != yes
9149 ])# _LT_LANG_F77_CONFIG
9152 # _LT_LANG_FC_CONFIG([TAG])
9153 # -------------------------
9154 # Ensure that the configuration variables for a Fortran compiler are
9155 # suitably defined. These variables are subsequently used by _LT_CONFIG
9156 # to write the compiler configuration to `libtool'.
9157 m4_defun([_LT_LANG_FC_CONFIG],
9158 [AC_LANG_PUSH(Fortran)
9160 if test -z "$FC" || test "X$FC" = "Xno"; then
9164 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9165 _LT_TAGVAR(allow_undefined_flag, $1)=
9166 _LT_TAGVAR(always_export_symbols, $1)=no
9167 _LT_TAGVAR(archive_expsym_cmds, $1)=
9168 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9169 _LT_TAGVAR(hardcode_direct, $1)=no
9170 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9172 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9173 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9174 _LT_TAGVAR(hardcode_minus_L, $1)=no
9175 _LT_TAGVAR(hardcode_automatic, $1)=no
9176 _LT_TAGVAR(inherit_rpath, $1)=no
9177 _LT_TAGVAR(module_cmds, $1)=
9178 _LT_TAGVAR(module_expsym_cmds, $1)=
9179 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9180 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9181 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9182 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9183 _LT_TAGVAR(no_undefined_flag, $1)=
9184 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9185 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9187 # Source file extension for fc test sources.
9188 ac_ext=${ac_fc_srcext-f}
9190 # Object file extension for compiled fc test sources.
9192 _LT_TAGVAR(objext, $1)=$objext
9194 # No sense in running all these tests if we already determined that
9195 # the FC compiler isn't working. Some variables (like enable_shared)
9196 # are currently assumed to apply to all compilers on this platform,
9197 # and will be corrupted by setting them based on a non-working compiler.
9198 if test "$_lt_disable_FC" != yes; then
9199 # Code to be used in simple compile tests
9200 lt_simple_compile_test_code="\
9206 # Code to be used in simple link tests
9207 lt_simple_link_test_code="\
9212 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9215 # save warnings/boilerplate of simple test code
9216 _LT_COMPILER_BOILERPLATE
9217 _LT_LINKER_BOILERPLATE
9219 # Allow CC to be a program name with arguments.
9224 GCC=$ac_cv_fc_compiler_gnu
9226 _LT_TAGVAR(compiler, $1)=$CC
9227 _LT_CC_BASENAME([$compiler])
9229 if test -n "$compiler"; then
9230 AC_MSG_CHECKING([if libtool supports shared libraries])
9231 AC_MSG_RESULT([$can_build_shared])
9233 AC_MSG_CHECKING([whether to build shared libraries])
9234 test "$can_build_shared" = "no" && enable_shared=no
9236 # On AIX, shared libraries and static libraries use the same namespace, and
9237 # are all built from PIC.
9240 test "$enable_shared" = yes && enable_static=no
9241 if test -n "$RANLIB"; then
9242 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9243 postinstall_cmds='$RANLIB $lib'
9247 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9248 test "$enable_shared" = yes && enable_static=no
9252 AC_MSG_RESULT([$enable_shared])
9254 AC_MSG_CHECKING([whether to build static libraries])
9255 # Make sure either enable_shared or enable_static is yes.
9256 test "$enable_shared" = yes || enable_static=yes
9257 AC_MSG_RESULT([$enable_static])
9259 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9260 _LT_TAGVAR(LD, $1)="$LD"
9263 ## There is no encapsulation within the following macros, do not change
9264 ## the running order or otherwise move them around unless you know exactly
9265 ## what you are doing...
9266 _LT_SYS_HIDDEN_LIBDEPS($1)
9267 _LT_COMPILER_PIC($1)
9268 _LT_COMPILER_C_O($1)
9269 _LT_COMPILER_FILE_LOCKS($1)
9270 _LT_LINKER_SHLIBS($1)
9271 _LT_SYS_DYNAMIC_LINKER($1)
9272 _LT_LINKER_HARDCODE_LIBPATH($1)
9275 fi # test -n "$compiler"
9279 fi # test "$_lt_disable_FC" != yes
9282 ])# _LT_LANG_FC_CONFIG
9285 # _LT_LANG_GCJ_CONFIG([TAG])
9286 # --------------------------
9287 # Ensure that the configuration variables for the GNU Java Compiler compiler
9288 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9289 # to write the compiler configuration to `libtool'.
9290 m4_defun([_LT_LANG_GCJ_CONFIG],
9291 [AC_REQUIRE([LT_PROG_GCJ])dnl
9294 # Source file extension for Java test sources.
9297 # Object file extension for compiled Java test sources.
9299 _LT_TAGVAR(objext, $1)=$objext
9301 # Code to be used in simple compile tests
9302 lt_simple_compile_test_code="class foo {}"
9304 # Code to be used in simple link tests
9305 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9307 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9310 # save warnings/boilerplate of simple test code
9311 _LT_COMPILER_BOILERPLATE
9312 _LT_LINKER_BOILERPLATE
9314 # Allow CC to be a program name with arguments.
9320 _LT_TAGVAR(compiler, $1)=$CC
9321 _LT_TAGVAR(LD, $1)="$LD"
9322 _LT_CC_BASENAME([$compiler])
9324 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9325 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9327 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9328 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9329 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9331 if test -n "$compiler"; then
9332 _LT_COMPILER_NO_RTTI($1)
9333 _LT_COMPILER_PIC($1)
9334 _LT_COMPILER_C_O($1)
9335 _LT_COMPILER_FILE_LOCKS($1)
9336 _LT_LINKER_SHLIBS($1)
9337 _LT_LINKER_HARDCODE_LIBPATH($1)
9346 ])# _LT_LANG_GCJ_CONFIG
9349 # _LT_LANG_RC_CONFIG([TAG])
9350 # -------------------------
9351 # Ensure that the configuration variables for the Windows resource compiler
9352 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9353 # to write the compiler configuration to `libtool'.
9354 m4_defun([_LT_LANG_RC_CONFIG],
9355 [AC_REQUIRE([LT_PROG_RC])dnl
9358 # Source file extension for RC test sources.
9361 # Object file extension for compiled RC test sources.
9363 _LT_TAGVAR(objext, $1)=$objext
9365 # Code to be used in simple compile tests
9366 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9368 # Code to be used in simple link tests
9369 lt_simple_link_test_code="$lt_simple_compile_test_code"
9371 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9374 # save warnings/boilerplate of simple test code
9375 _LT_COMPILER_BOILERPLATE
9376 _LT_LINKER_BOILERPLATE
9378 # Allow CC to be a program name with arguments.
9384 _LT_TAGVAR(compiler, $1)=$CC
9385 _LT_CC_BASENAME([$compiler])
9386 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9388 if test -n "$compiler"; then
9396 ])# _LT_LANG_RC_CONFIG
9401 AC_DEFUN([LT_PROG_GCJ],
9402 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9403 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9404 [AC_CHECK_TOOL(GCJ, gcj,)
9405 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9406 AC_SUBST(GCJFLAGS)])])[]dnl
9410 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9411 dnl aclocal-1.4 backwards compatibility:
9412 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9417 AC_DEFUN([LT_PROG_RC],
9418 [AC_CHECK_TOOL(RC, windres,)
9422 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9423 dnl aclocal-1.4 backwards compatibility:
9424 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9429 # If we don't have a new enough Autoconf to choose the best grep
9430 # available, choose the one first in the user's PATH.
9431 m4_defun([_LT_DECL_EGREP],
9432 [AC_REQUIRE([AC_PROG_EGREP])dnl
9433 AC_REQUIRE([AC_PROG_FGREP])dnl
9434 test -z "$GREP" && GREP=grep
9435 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9436 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9437 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9438 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9445 # If we don't have a new enough Autoconf to choose the best objdump
9446 # available, choose the one first in the user's PATH.
9447 m4_defun([_LT_DECL_OBJDUMP],
9448 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9449 test -z "$OBJDUMP" && OBJDUMP=objdump
9450 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9457 # Check for a fully-functional sed program, that truncates
9458 # as few characters as possible. Prefer GNU sed if found.
9459 m4_defun([_LT_DECL_SED],
9461 test -z "$SED" && SED=sed
9462 Xsed="$SED -e 1s/^X//"
9463 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9464 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9465 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9468 m4_ifndef([AC_PROG_SED], [
9469 # NOTE: This macro has been submitted for inclusion into #
9470 # GNU Autoconf as AC_PROG_SED. When it is available in #
9471 # a released version of Autoconf we should remove this #
9472 # macro and use it instead. #
9474 m4_defun([AC_PROG_SED],
9475 [AC_MSG_CHECKING([for a sed that does not truncate output])
9476 AC_CACHE_VAL(lt_cv_path_SED,
9477 [# Loop through the user's path and test for sed and gsed.
9478 # Then use that list of sed's as ones to test for truncation.
9479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483 test -z "$as_dir" && as_dir=.
9484 for lt_ac_prog in sed gsed; do
9485 for ac_exec_ext in '' $ac_executable_extensions; do
9486 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9487 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9495 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9496 # along with /bin/sed that truncates output.
9497 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9498 test ! -f $lt_ac_sed && continue
9499 cat /dev/null > conftest.in
9501 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9502 # Check for GNU sed and select it if it is found.
9503 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9504 lt_cv_path_SED=$lt_ac_sed
9508 cat conftest.in conftest.in >conftest.tmp
9509 mv conftest.tmp conftest.in
9510 cp conftest.in conftest.nl
9512 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9513 cmp -s conftest.out conftest.nl || break
9514 # 10000 chars as input seems more than enough
9515 test $lt_ac_count -gt 10 && break
9516 lt_ac_count=`expr $lt_ac_count + 1`
9517 if test $lt_ac_count -gt $lt_ac_max; then
9518 lt_ac_max=$lt_ac_count
9519 lt_cv_path_SED=$lt_ac_sed
9526 AC_MSG_RESULT([$SED])
9531 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9532 dnl aclocal-1.4 backwards compatibility:
9533 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9536 # _LT_CHECK_SHELL_FEATURES
9537 # ------------------------
9538 # Find out whether the shell is Bourne or XSI compatible,
9539 # or has some other useful features.
9540 m4_defun([_LT_CHECK_SHELL_FEATURES],
9541 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9542 # Try some XSI features
9545 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9547 && eval 'test $(( 1 + 1 )) -eq 2 \
9548 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9550 AC_MSG_RESULT([$xsi_shell])
9551 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9553 AC_MSG_CHECKING([whether the shell understands "+="])
9555 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9557 && lt_shell_append=yes
9558 AC_MSG_RESULT([$lt_shell_append])
9559 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9561 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9566 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9568 # test EBCDIC or ASCII
9569 case `echo X|tr X '\101'` in
9570 A) # ASCII based system
9571 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9572 lt_SP2NL='tr \040 \012'
9573 lt_NL2SP='tr \015\012 \040\040'
9575 *) # EBCDIC based system
9576 lt_SP2NL='tr \100 \n'
9577 lt_NL2SP='tr \r\n \100\100'
9580 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9581 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9582 ])# _LT_CHECK_SHELL_FEATURES
9585 # _LT_PROG_XSI_SHELLFNS
9586 # ---------------------
9587 # Bourne and XSI compatible variants of some useful shell functions.
9588 m4_defun([_LT_PROG_XSI_SHELLFNS],
9591 cat << \_LT_EOF >> "$cfgfile"
9593 # func_dirname file append nondir_replacement
9594 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
9595 # otherwise set result to NONDIR_REPLACEMENT.
9599 */*) func_dirname_result="${1%/*}${2}" ;;
9600 * ) func_dirname_result="${3}" ;;
9604 # func_basename file
9607 func_basename_result="${1##*/}"
9610 # func_dirname_and_basename file append nondir_replacement
9611 # perform func_basename and func_dirname in a single function
9613 # dirname: Compute the dirname of FILE. If nonempty,
9614 # add APPEND to the result, otherwise set result
9615 # to NONDIR_REPLACEMENT.
9616 # value returned in "$func_dirname_result"
9617 # basename: Compute filename of FILE.
9618 # value retuned in "$func_basename_result"
9619 # Implementation must be kept synchronized with func_dirname
9620 # and func_basename. For efficiency, we do not delegate to
9621 # those functions but instead duplicate the functionality here.
9622 func_dirname_and_basename ()
9625 */*) func_dirname_result="${1%/*}${2}" ;;
9626 * ) func_dirname_result="${3}" ;;
9628 func_basename_result="${1##*/}"
9631 # func_stripname prefix suffix name
9632 # strip PREFIX and SUFFIX off of NAME.
9633 # PREFIX and SUFFIX must not contain globbing or regex special
9634 # characters, hashes, percent signs, but SUFFIX may contain a leading
9635 # dot (in which case that matches only a dot).
9638 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9639 # positional parameters, so assign one to ordinary parameter first.
9640 func_stripname_result=${3}
9641 func_stripname_result=${func_stripname_result#"${1}"}
9642 func_stripname_result=${func_stripname_result%"${2}"}
9648 func_opt_split_opt=${1%%=*}
9649 func_opt_split_arg=${1#*=}
9656 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9657 *) func_lo2o_result=${1} ;;
9661 # func_xform libobj-or-source
9664 func_xform_result=${1%.*}.lo
9667 # func_arith arithmetic-term...
9670 func_arith_result=$(( $[*] ))
9674 # STRING may not start with a hyphen.
9677 func_len_result=${#1}
9682 *) # Bourne compatible functions.
9683 cat << \_LT_EOF >> "$cfgfile"
9685 # func_dirname file append nondir_replacement
9686 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
9687 # otherwise set result to NONDIR_REPLACEMENT.
9690 # Extract subdirectory from the argument.
9691 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
9692 if test "X$func_dirname_result" = "X${1}"; then
9693 func_dirname_result="${3}"
9695 func_dirname_result="$func_dirname_result${2}"
9699 # func_basename file
9702 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
9705 dnl func_dirname_and_basename
9706 dnl A portable version of this function is already defined in general.m4sh
9707 dnl so there is no need for it here.
9709 # func_stripname prefix suffix name
9710 # strip PREFIX and SUFFIX off of NAME.
9711 # PREFIX and SUFFIX must not contain globbing or regex special
9712 # characters, hashes, percent signs, but SUFFIX may contain a leading
9713 # dot (in which case that matches only a dot).
9714 # func_strip_suffix prefix name
9718 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9719 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9724 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9725 my_sed_long_arg='1s/^-[[^=]]*=//'
9730 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
9731 func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
9737 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
9740 # func_xform libobj-or-source
9743 func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
9746 # func_arith arithmetic-term...
9749 func_arith_result=`expr "$[@]"`
9753 # STRING may not start with a hyphen.
9756 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9762 case $lt_shell_append in
9764 cat << \_LT_EOF >> "$cfgfile"
9766 # func_append var value
9767 # Append VALUE to the end of shell variable VAR.
9775 cat << \_LT_EOF >> "$cfgfile"
9777 # func_append var value
9778 # Append VALUE to the end of shell variable VAR.
9781 eval "$[1]=\$$[1]\$[2]"
9789 # Helper functions for option handling. -*- Autoconf -*-
9791 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9793 # Written by Gary V. Vaughan, 2004
9795 # This file is free software; the Free Software Foundation gives
9796 # unlimited permission to copy and/or distribute it, with or without
9797 # modifications, as long as this notice is preserved.
9799 # serial 7 ltoptions.m4
9801 # This is to help aclocal find these macros, as it can't see m4_define.
9802 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9805 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9806 # ------------------------------------------
9807 m4_define([_LT_MANGLE_OPTION],
9808 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9811 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9812 # ---------------------------------------
9813 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9814 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9816 m4_define([_LT_SET_OPTION],
9817 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9818 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9819 _LT_MANGLE_DEFUN([$1], [$2]),
9820 [m4_warning([Unknown $1 option `$2'])])[]dnl
9824 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9825 # ------------------------------------------------------------
9826 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9827 m4_define([_LT_IF_OPTION],
9828 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9831 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9832 # -------------------------------------------------------
9833 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9835 m4_define([_LT_UNLESS_OPTIONS],
9836 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9837 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9838 [m4_define([$0_found])])])[]dnl
9839 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9844 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9845 # ----------------------------------------
9846 # OPTION-LIST is a space-separated list of Libtool options associated
9847 # with MACRO-NAME. If any OPTION has a matching handler declared with
9848 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9849 # the unknown option and exit.
9850 m4_defun([_LT_SET_OPTIONS],
9852 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9853 [_LT_SET_OPTION([$1], _LT_Option)])
9855 m4_if([$1],[LT_INIT],[
9857 dnl Simply set some default values (i.e off) if boolean options were not
9859 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9861 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9864 dnl If no reference was made to various pairs of opposing options, then
9865 dnl we run the default mode handler for the pair. For example, if neither
9866 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9867 dnl archives by default:
9868 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9869 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9870 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9871 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9872 [_LT_ENABLE_FAST_INSTALL])
9878 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9879 # -----------------------------------------
9880 m4_define([_LT_MANGLE_DEFUN],
9881 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9884 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9885 # -----------------------------------------------
9886 m4_define([LT_OPTION_DEFINE],
9887 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9888 ])# LT_OPTION_DEFINE
9893 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9896 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9897 [_LT_SET_OPTION([LT_INIT], [dlopen])
9898 AC_DIAGNOSE([obsolete],
9899 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9900 put the `dlopen' option into LT_INIT's first parameter.])
9903 dnl aclocal-1.4 backwards compatibility:
9904 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9909 # Declare package support for building win32 dll's.
9910 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9911 [enable_win32_dll=yes
9914 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9915 AC_CHECK_TOOL(AS, as, false)
9916 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9917 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9921 test -z "$AS" && AS=as
9922 _LT_DECL([], [AS], [1], [Assembler program])dnl
9924 test -z "$DLLTOOL" && DLLTOOL=dlltool
9925 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9927 test -z "$OBJDUMP" && OBJDUMP=objdump
9928 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9931 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9932 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9933 _LT_SET_OPTION([LT_INIT], [win32-dll])
9934 AC_DIAGNOSE([obsolete],
9935 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9936 put the `win32-dll' option into LT_INIT's first parameter.])
9939 dnl aclocal-1.4 backwards compatibility:
9940 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9943 # _LT_ENABLE_SHARED([DEFAULT])
9944 # ----------------------------
9945 # implement the --enable-shared flag, and supports the `shared' and
9946 # `disable-shared' LT_INIT options.
9947 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9948 m4_define([_LT_ENABLE_SHARED],
9949 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9950 AC_ARG_ENABLE([shared],
9951 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9952 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9953 [p=${PACKAGE-default}
9955 yes) enable_shared=yes ;;
9956 no) enable_shared=no ;;
9959 # Look at the argument we got. We use all the common list separators.
9960 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9961 for pkg in $enableval; do
9963 if test "X$pkg" = "X$p"; then
9970 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9972 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9973 [Whether or not to build shared libraries])
9974 ])# _LT_ENABLE_SHARED
9976 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9977 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9980 AC_DEFUN([AC_ENABLE_SHARED],
9981 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9984 AC_DEFUN([AC_DISABLE_SHARED],
9985 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9988 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9989 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9991 dnl aclocal-1.4 backwards compatibility:
9992 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9993 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9997 # _LT_ENABLE_STATIC([DEFAULT])
9998 # ----------------------------
9999 # implement the --enable-static flag, and support the `static' and
10000 # `disable-static' LT_INIT options.
10001 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10002 m4_define([_LT_ENABLE_STATIC],
10003 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10004 AC_ARG_ENABLE([static],
10005 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10006 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10007 [p=${PACKAGE-default}
10009 yes) enable_static=yes ;;
10010 no) enable_static=no ;;
10013 # Look at the argument we got. We use all the common list separators.
10014 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10015 for pkg in $enableval; do
10017 if test "X$pkg" = "X$p"; then
10024 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10026 _LT_DECL([build_old_libs], [enable_static], [0],
10027 [Whether or not to build static libraries])
10028 ])# _LT_ENABLE_STATIC
10030 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10031 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10034 AC_DEFUN([AC_ENABLE_STATIC],
10035 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10038 AC_DEFUN([AC_DISABLE_STATIC],
10039 [_LT_SET_OPTION([LT_INIT], [disable-static])
10042 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10043 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10045 dnl aclocal-1.4 backwards compatibility:
10046 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10047 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10051 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
10052 # ----------------------------------
10053 # implement the --enable-fast-install flag, and support the `fast-install'
10054 # and `disable-fast-install' LT_INIT options.
10055 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10056 m4_define([_LT_ENABLE_FAST_INSTALL],
10057 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10058 AC_ARG_ENABLE([fast-install],
10059 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10060 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10061 [p=${PACKAGE-default}
10063 yes) enable_fast_install=yes ;;
10064 no) enable_fast_install=no ;;
10066 enable_fast_install=no
10067 # Look at the argument we got. We use all the common list separators.
10068 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10069 for pkg in $enableval; do
10071 if test "X$pkg" = "X$p"; then
10072 enable_fast_install=yes
10078 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10080 _LT_DECL([fast_install], [enable_fast_install], [0],
10081 [Whether or not to optimize for fast installation])dnl
10082 ])# _LT_ENABLE_FAST_INSTALL
10084 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10085 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10088 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10089 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10090 AC_DIAGNOSE([obsolete],
10091 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10092 the `fast-install' option into LT_INIT's first parameter.])
10095 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10096 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10097 AC_DIAGNOSE([obsolete],
10098 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10099 the `disable-fast-install' option into LT_INIT's first parameter.])
10102 dnl aclocal-1.4 backwards compatibility:
10103 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10104 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10107 # _LT_WITH_PIC([MODE])
10108 # --------------------
10109 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
10111 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
10112 m4_define([_LT_WITH_PIC],
10113 [AC_ARG_WITH([pic],
10114 [AS_HELP_STRING([--with-pic],
10115 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10116 [pic_mode="$withval"],
10117 [pic_mode=default])
10119 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10121 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10124 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10125 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10128 AU_DEFUN([AC_LIBTOOL_PICMODE],
10129 [_LT_SET_OPTION([LT_INIT], [pic-only])
10130 AC_DIAGNOSE([obsolete],
10131 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10132 put the `pic-only' option into LT_INIT's first parameter.])
10135 dnl aclocal-1.4 backwards compatibility:
10136 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10139 m4_define([_LTDL_MODE], [])
10140 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10141 [m4_define([_LTDL_MODE], [nonrecursive])])
10142 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10143 [m4_define([_LTDL_MODE], [recursive])])
10144 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10145 [m4_define([_LTDL_MODE], [subproject])])
10147 m4_define([_LTDL_TYPE], [])
10148 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10149 [m4_define([_LTDL_TYPE], [installable])])
10150 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10151 [m4_define([_LTDL_TYPE], [convenience])])
10153 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
10155 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10156 # Written by Gary V. Vaughan, 2004
10158 # This file is free software; the Free Software Foundation gives
10159 # unlimited permission to copy and/or distribute it, with or without
10160 # modifications, as long as this notice is preserved.
10162 # serial 6 ltsugar.m4
10164 # This is to help aclocal find these macros, as it can't see m4_define.
10165 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10168 # lt_join(SEP, ARG1, [ARG2...])
10169 # -----------------------------
10170 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10171 # associated separator.
10172 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10173 # versions in m4sugar had bugs.
10174 m4_define([lt_join],
10175 [m4_if([$#], [1], [],
10177 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10178 m4_define([_lt_join],
10179 [m4_if([$#$2], [2], [],
10180 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10186 # Manipulate m4 lists.
10187 # These macros are necessary as long as will still need to support
10188 # Autoconf-2.59 which quotes differently.
10189 m4_define([lt_car], [[$1]])
10190 m4_define([lt_cdr],
10191 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10193 [m4_dquote(m4_shift($@))])])
10194 m4_define([lt_unquote], $1)
10197 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10198 # ------------------------------------------
10199 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10200 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10201 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10202 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10203 # than defined and empty).
10205 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10206 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10207 m4_define([lt_append],
10209 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10213 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10214 # ----------------------------------------------------------
10215 # Produce a SEP delimited list of all paired combinations of elements of
10216 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
10217 # has the form PREFIXmINFIXSUFFIXn.
10218 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10219 m4_define([lt_combine],
10220 [m4_if(m4_eval([$# > 3]), [1],
10221 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10222 [[m4_foreach([_Lt_prefix], [$2],
10223 [m4_foreach([_Lt_suffix],
10224 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10225 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10228 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10229 # -----------------------------------------------------------------------
10230 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10231 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10232 m4_define([lt_if_append_uniq],
10234 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10235 [lt_append([$1], [$2], [$3])$4],
10237 [lt_append([$1], [$2], [$3])$4])])
10240 # lt_dict_add(DICT, KEY, VALUE)
10241 # -----------------------------
10242 m4_define([lt_dict_add],
10243 [m4_define([$1($2)], [$3])])
10246 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10247 # --------------------------------------------
10248 m4_define([lt_dict_add_subkey],
10249 [m4_define([$1($2:$3)], [$4])])
10252 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10253 # ----------------------------------
10254 m4_define([lt_dict_fetch],
10256 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10257 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10260 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10261 # -----------------------------------------------------------------
10262 m4_define([lt_if_dict_fetch],
10263 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10268 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10269 # --------------------------------------------------------------
10270 m4_define([lt_dict_filter],
10271 [m4_if([$5], [], [],
10272 [lt_join(m4_quote(m4_default([$4], [[, ]])),
10273 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10274 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10277 # ltversion.m4 -- version numbers -*- Autoconf -*-
10279 # Copyright (C) 2004 Free Software Foundation, Inc.
10280 # Written by Scott James Remnant, 2004
10282 # This file is free software; the Free Software Foundation gives
10283 # unlimited permission to copy and/or distribute it, with or without
10284 # modifications, as long as this notice is preserved.
10286 # Generated from ltversion.in.
10288 # serial 3175 ltversion.m4
10289 # This file is part of GNU Libtool
10291 m4_define([LT_PACKAGE_VERSION], [2.2.10])
10292 m4_define([LT_PACKAGE_REVISION], [1.3175])
10294 AC_DEFUN([LTVERSION_VERSION],
10295 [macro_version='2.2.10'
10296 macro_revision='1.3175'
10297 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10298 _LT_DECL(, macro_revision, 0)
10301 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
10303 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10304 # Written by Scott James Remnant, 2004.
10306 # This file is free software; the Free Software Foundation gives
10307 # unlimited permission to copy and/or distribute it, with or without
10308 # modifications, as long as this notice is preserved.
10310 # serial 5 lt~obsolete.m4
10312 # These exist entirely to fool aclocal when bootstrapping libtool.
10314 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10315 # which have later been changed to m4_define as they aren't part of the
10316 # exported API, or moved to Autoconf or Automake where they belong.
10318 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
10319 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10320 # using a macro with the same name in our local m4/libtool.m4 it'll
10321 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10322 # and doesn't know about Autoconf macros at all.)
10324 # So we provide this file, which has a silly filename so it's always
10325 # included after everything else. This provides aclocal with the
10326 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10327 # because those macros already exist, or will be overwritten later.
10328 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10330 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10331 # Yes, that means every name once taken will need to remain here until
10332 # we give up compatibility with versions before 1.7, at which point
10333 # we need to keep only those names which we still refer to.
10335 # This is to help aclocal find these macros, as it can't see m4_define.
10336 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10338 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10339 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
10340 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10341 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
10342 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10343 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
10344 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
10345 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10346 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
10347 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10348 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
10349 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10350 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10351 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10352 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10353 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10354 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
10355 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10356 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10357 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
10358 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
10359 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10360 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10361 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10362 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10363 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10364 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10365 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10366 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
10367 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
10368 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
10369 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10370 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10371 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
10372 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
10373 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10374 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10375 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
10376 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10377 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
10378 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
10379 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
10380 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10381 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10382 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10383 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10384 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10385 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10386 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10387 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10388 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10389 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10390 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10391 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10392 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10393 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10394 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10395 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10396 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
10397 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
10398 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])