1 # generated automatically by aclocal 1.14 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
29 # AM_AUTOMAKE_VERSION(VERSION)
30 # ----------------------------
31 # Automake X.Y traces this macro to ensure aclocal.m4 has been
32 # generated from the m4 files accompanying Automake X.Y.
33 # (This private macro should not be called outside this file.)
34 AC_DEFUN([AM_AUTOMAKE_VERSION],
35 [am__api_version='1.14'
36 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 dnl require some minimum version. Point them to the right macro.
38 m4_if([$1], [1.14], [],
39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
42 # _AM_AUTOCONF_VERSION(VERSION)
43 # -----------------------------
44 # aclocal traces this macro to find the Autoconf version.
45 # This is a private macro too. Using m4_define simplifies
46 # the logic in aclocal, which can simply ignore this definition.
47 m4_define([_AM_AUTOCONF_VERSION], [])
49 # AM_SET_CURRENT_AUTOMAKE_VERSION
50 # -------------------------------
51 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54 [AM_AUTOMAKE_VERSION([1.14])dnl
55 m4_ifndef([AC_AUTOCONF_VERSION],
56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
59 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
61 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
63 # This file is free software; the Free Software Foundation
64 # gives unlimited permission to copy and/or distribute it,
65 # with or without modifications, as long as this notice is preserved.
67 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
71 # Of course, Automake must honor this variable whenever it calls a
72 # tool from the auxiliary directory. The problem is that $srcdir (and
73 # therefore $ac_aux_dir as well) can be either absolute or relative,
74 # depending on how configure is run. This is pretty annoying, since
75 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
76 # source directory, any form will work fine, but in subdirectories a
77 # relative path needs to be adjusted first.
80 # fails when called from a subdirectory if $ac_aux_dir is relative
81 # $top_srcdir/$ac_aux_dir/missing
82 # fails if $ac_aux_dir is absolute,
83 # fails when called from a subdirectory in a VPATH build with
84 # a relative $ac_aux_dir
86 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87 # are both prefixed by $srcdir. In an in-source build this is usually
88 # harmless because $srcdir is '.', but things will broke when you
89 # start a VPATH build or use an absolute $srcdir.
91 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94 # and then we would define $MISSING as
95 # MISSING="\${SHELL} $am_aux_dir/missing"
96 # This will work as long as MISSING is not called from configure, because
97 # unfortunately $(top_srcdir) has no meaning in configure.
98 # However there are other variables, like CC, which are often used in
99 # configure, and could therefore not use this "fixed" $ac_aux_dir.
101 # Another solution, used here, is to always expand $ac_aux_dir to an
102 # absolute PATH. The drawback is that using absolute paths prevent a
103 # configured tree to be moved without reconfiguration.
105 AC_DEFUN([AM_AUX_DIR_EXPAND],
106 [dnl Rely on autoconf to set up CDPATH properly.
108 # expand $ac_aux_dir to an absolute path
109 am_aux_dir=`cd $ac_aux_dir && pwd`
112 # AM_CONDITIONAL -*- Autoconf -*-
114 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
116 # This file is free software; the Free Software Foundation
117 # gives unlimited permission to copy and/or distribute it,
118 # with or without modifications, as long as this notice is preserved.
120 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
121 # -------------------------------------
122 # Define a conditional.
123 AC_DEFUN([AM_CONDITIONAL],
124 [AC_PREREQ([2.52])dnl
125 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127 AC_SUBST([$1_TRUE])dnl
128 AC_SUBST([$1_FALSE])dnl
129 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
130 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
131 m4_define([_AM_COND_VALUE_$1], [$2])dnl
139 AC_CONFIG_COMMANDS_PRE(
140 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141 AC_MSG_ERROR([[conditional "$1" was never defined.
142 Usually this means the macro was only invoked conditionally.]])
145 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
147 # This file is free software; the Free Software Foundation
148 # gives unlimited permission to copy and/or distribute it,
149 # with or without modifications, as long as this notice is preserved.
152 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153 # written in clear, in which case automake, when reading aclocal.m4,
154 # will think it sees a *use*, and therefore will trigger all it's
155 # C support machinery. Also note that it means that autoscan, seeing
156 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
159 # _AM_DEPENDENCIES(NAME)
160 # ----------------------
161 # See how the compiler implements dependency checking.
162 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163 # We try a few techniques and use that to set a single cache variable.
165 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167 # dependency, and given that the user is not expected to run this macro,
168 # just rely on AC_PROG_CC.
169 AC_DEFUN([_AM_DEPENDENCIES],
170 [AC_REQUIRE([AM_SET_DEPDIR])dnl
171 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173 AC_REQUIRE([AM_DEP_TRACK])dnl
175 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
176 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
177 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
180 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
181 [depcc="$$1" am_compiler_list=])
183 AC_CACHE_CHECK([dependency style of $depcc],
184 [am_cv_$1_dependencies_compiler_type],
185 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186 # We make a subdir and do the tests there. Otherwise we can end up
187 # making bogus files that we don't know about and never remove. For
188 # instance it was reported that on HP-UX the gcc test will end up
189 # making a dummy file named 'D' -- because '-MD' means "put the output
193 # Copy depcomp to subdir because otherwise we won't find it if we're
194 # using a relative directory.
195 cp "$am_depcomp" conftest.dir
197 # We will build objects and dependencies in a subdirectory because
198 # it helps to detect inapplicable dependency modes. For instance
199 # both Tru64's cc and ICC support -MD to output dependencies as a
200 # side effect of compilation, but ICC will put the dependencies in
201 # the current directory while Tru64 will put them in the object
205 am_cv_$1_dependencies_compiler_type=none
206 if test "$am_compiler_list" = ""; then
207 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
211 [case " $depcc " in #(
212 *\ -arch\ *\ -arch\ *) am__universal=true ;;
215 [case " $depcc " in #(
216 *\ -arch\ *\ -arch\ *) am__universal=true ;;
219 for depmode in $am_compiler_list; do
220 # Setup a source with many dependencies, because some compilers
221 # like to wrap large dependency lists on column 80 (with \), and
222 # we should not choose a depcomp mode which is confused by this.
224 # We need to recreate these files for each test, as the compiler may
225 # overwrite some of them when testing with obscure command lines.
226 # This happens at least with the AIX C compiler.
228 for i in 1 2 3 4 5 6; do
229 echo '#include "conftst'$i'.h"' >> sub/conftest.c
230 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231 # Solaris 10 /bin/sh.
232 echo '/* dummy */' > sub/conftst$i.h
234 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
236 # We check with '-c' and '-o' for the sake of the "dashmstdout"
237 # mode. It turns out that the SunPro C++ compiler does not properly
238 # handle '-M -o', and we need to detect this. Also, some Intel
239 # versions had trouble with output in subdirs.
240 am__obj=sub/conftest.${OBJEXT-o}
241 am__minus_obj="-o $am__obj"
244 # This depmode causes a compiler race in universal mode.
245 test "$am__universal" = false || continue
248 # After this tag, mechanisms are not by side-effect, so they'll
249 # only be used when explicitly requested.
250 if test "x$enable_dependency_tracking" = xyes; then
256 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257 # This compiler won't grok '-c -o', but also, the minuso test has
258 # not run yet. These depmodes are late enough in the game, and
259 # so weak that their functioning should not be impacted.
260 am__obj=conftest.${OBJEXT-o}
265 if depmode=$depmode \
266 source=sub/conftest.c object=$am__obj \
267 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269 >/dev/null 2>conftest.err &&
270 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274 # icc doesn't choke on unknown options, it will just issue warnings
275 # or remarks (even with -Werror). So we grep stderr for any message
276 # that says an option was ignored or not supported.
277 # When given -MP, icc 7.0 and 7.1 complain thusly:
278 # icc: Command line warning: ignoring option '-M'; no argument required
279 # The diagnosis changed in icc 8.0:
280 # icc: Command line remark: option '-MP' not supported
281 if (grep 'ignoring option' conftest.err ||
282 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283 am_cv_$1_dependencies_compiler_type=$depmode
292 am_cv_$1_dependencies_compiler_type=none
295 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296 AM_CONDITIONAL([am__fastdep$1], [
297 test "x$enable_dependency_tracking" != xno \
298 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
304 # Choose a directory name for dependency files.
305 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306 AC_DEFUN([AM_SET_DEPDIR],
307 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
314 AC_DEFUN([AM_DEP_TRACK],
315 [AC_ARG_ENABLE([dependency-tracking], [dnl
317 [--enable-dependency-tracking],
318 [do not reject slow dependency extractors])
320 [--disable-dependency-tracking],
321 [speeds up one-time build])])
322 if test "x$enable_dependency_tracking" != xno; then
323 am_depcomp="$ac_aux_dir/depcomp"
327 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328 AC_SUBST([AMDEPBACKSLASH])dnl
329 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330 AC_SUBST([am__nodep])dnl
331 _AM_SUBST_NOTMAKE([am__nodep])dnl
334 # Generate code to set up dependency tracking. -*- Autoconf -*-
336 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
338 # This file is free software; the Free Software Foundation
339 # gives unlimited permission to copy and/or distribute it,
340 # with or without modifications, as long as this notice is preserved.
343 # _AM_OUTPUT_DEPENDENCY_COMMANDS
344 # ------------------------------
345 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
347 # Older Autoconf quotes --file arguments for eval, but not when files
348 # are listed without --file. Let's play safe and only enable the eval
349 # if we detect the quoting.
350 case $CONFIG_FILES in
351 *\'*) eval set x "$CONFIG_FILES" ;;
352 *) set x $CONFIG_FILES ;;
357 # Strip MF so we end up with the name of the file.
358 mf=`echo "$mf" | sed -e 's/:.*$//'`
359 # Check whether this is an Automake generated Makefile or not.
360 # We used to match only the files named 'Makefile.in', but
361 # some people rename them; so instead we look at the file content.
362 # Grep'ing the first line is not enough: some people post-process
363 # each Makefile.in and add a new line on top of each file to say so.
364 # Grep'ing the whole file is not good either: AIX grep has a line
365 # limit of 2048, but all sed's we know have understand at least 4000.
366 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367 dirpart=`AS_DIRNAME("$mf")`
371 # Extract the definition of DEPDIR, am__include, and am__quote
372 # from the Makefile without running 'make'.
373 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374 test -z "$DEPDIR" && continue
375 am__include=`sed -n 's/^am__include = //p' < "$mf"`
376 test -z "$am__include" && continue
377 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378 # Find all dependency output files, they are included files with
379 # $(DEPDIR) in their names. We invoke sed twice because it is the
380 # simplest approach to changing $(DEPDIR) to its actual value in the
382 for file in `sed -n "
383 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385 # Make sure the directory exists.
386 test -f "$dirpart/$file" && continue
387 fdir=`AS_DIRNAME(["$file"])`
388 AS_MKDIR_P([$dirpart/$fdir])
389 # echo "creating $dirpart/$file"
390 echo '# dummy' > "$dirpart/$file"
394 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
397 # AM_OUTPUT_DEPENDENCY_COMMANDS
398 # -----------------------------
399 # This macro should only be invoked once -- use via AC_REQUIRE.
401 # This code is only required when automatic dependency tracking
402 # is enabled. FIXME. This creates each '.P' file that we will
403 # need in order to bootstrap the dependency handling code.
404 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AC_CONFIG_COMMANDS([depfiles],
406 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
410 # Do all the work for Automake. -*- Autoconf -*-
412 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
418 # This macro actually does too much. Some checks are only needed if
419 # your package does certain things. But this isn't really a big deal.
421 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
422 m4_define([AC_PROG_CC],
423 m4_defn([AC_PROG_CC])
427 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
428 # AM_INIT_AUTOMAKE([OPTIONS])
429 # -----------------------------------------------
430 # The call with PACKAGE and VERSION arguments is the old style
431 # call (pre autoconf-2.50), which is being phased out. PACKAGE
432 # and VERSION should now be passed to AC_INIT and removed from
433 # the call to AM_INIT_AUTOMAKE.
434 # We support both call styles for the transition. After
435 # the next Automake release, Autoconf can make the AC_INIT
436 # arguments mandatory, and then we can depend on a new Autoconf
437 # release and drop the old call support.
438 AC_DEFUN([AM_INIT_AUTOMAKE],
439 [AC_PREREQ([2.65])dnl
440 dnl Autoconf wants to disallow AM_ names. We explicitly allow
441 dnl the ones we care about.
442 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
443 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
444 AC_REQUIRE([AC_PROG_INSTALL])dnl
445 if test "`cd $srcdir && pwd`" != "`pwd`"; then
446 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
447 # is not polluted with repeated "-I."
448 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
449 # test to see if srcdir already configured
450 if test -f $srcdir/config.status; then
451 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
455 # test whether we have cygpath
456 if test -z "$CYGPATH_W"; then
457 if (cygpath --version) >/dev/null 2>/dev/null; then
458 CYGPATH_W='cygpath -w'
463 AC_SUBST([CYGPATH_W])
465 # Define the identity of the package.
466 dnl Distinguish between old-style and new-style calls.
468 [AC_DIAGNOSE([obsolete],
469 [$0: two- and three-arguments forms are deprecated.])
470 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
471 AC_SUBST([PACKAGE], [$1])dnl
472 AC_SUBST([VERSION], [$2])],
473 [_AM_SET_OPTIONS([$1])dnl
474 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
476 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
478 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
479 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
480 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
482 _AM_IF_OPTION([no-define],,
483 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
484 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
486 # Some tools Automake needs.
487 AC_REQUIRE([AM_SANITY_CHECK])dnl
488 AC_REQUIRE([AC_ARG_PROGRAM])dnl
489 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
490 AM_MISSING_PROG([AUTOCONF], [autoconf])
491 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
492 AM_MISSING_PROG([AUTOHEADER], [autoheader])
493 AM_MISSING_PROG([MAKEINFO], [makeinfo])
494 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
495 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
496 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
497 # For better backward compatibility. To be removed once Automake 1.9.x
498 # dies out for good. For more background, see:
499 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
500 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
501 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
502 # We need awk for the "check" target. The system "awk" is bad on
504 AC_REQUIRE([AC_PROG_AWK])dnl
505 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
506 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
507 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
508 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
509 [_AM_PROG_TAR([v7])])])
510 _AM_IF_OPTION([no-dependencies],,
511 [AC_PROVIDE_IFELSE([AC_PROG_CC],
512 [_AM_DEPENDENCIES([CC])],
513 [m4_define([AC_PROG_CC],
514 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
515 AC_PROVIDE_IFELSE([AC_PROG_CXX],
516 [_AM_DEPENDENCIES([CXX])],
517 [m4_define([AC_PROG_CXX],
518 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
519 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
520 [_AM_DEPENDENCIES([OBJC])],
521 [m4_define([AC_PROG_OBJC],
522 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
523 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
524 [_AM_DEPENDENCIES([OBJCXX])],
525 [m4_define([AC_PROG_OBJCXX],
526 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
528 AC_REQUIRE([AM_SILENT_RULES])dnl
529 dnl The testsuite driver may need to know about EXEEXT, so add the
530 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
531 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
532 AC_CONFIG_COMMANDS_PRE(dnl
533 [m4_provide_if([_AM_COMPILER_EXEEXT],
534 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
536 # POSIX will say in a future version that running "rm -f" with no argument
537 # is OK; and we want to be able to make that assumption in our Makefile
538 # recipes. So use an aggressive probe to check that the usage we want is
539 # actually supported "in the wild" to an acceptable degree.
540 # See automake bug#10828.
541 # To make any issue more visible, cause the running configure to be aborted
542 # by default if the 'rm' program in use doesn't match our expectations; the
543 # user can still override this though.
544 if rm -f && rm -fr && rm -rf; then : OK; else
548 Your 'rm' program seems unable to run without file operands specified
549 on the command line, even when the '-f' option is present. This is contrary
550 to the behaviour of most rm programs out there, and not conforming with
551 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
553 Please tell bug-automake@gnu.org about your system, including the value
554 of your $PATH and any error possibly output before this message. This
555 can help us improve future automake versions.
558 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
559 echo 'Configuration will proceed anyway, since you have set the' >&2
560 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
564 Aborting the configuration process, to ensure you take notice of the issue.
566 You can download and install GNU coreutils to get an 'rm' implementation
567 that behaves properly: <http://www.gnu.org/software/coreutils/>.
569 If you want to complete the configuration process using your problematic
570 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
571 to "yes", and re-run configure.
574 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
578 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
579 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
580 dnl mangled by Autoconf and run in a shell conditional statement.
581 m4_define([_AC_COMPILER_EXEEXT],
582 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
584 # When config.status generates a header, we must update the stamp-h file.
585 # This file resides in the same directory as the config header
586 # that is generated. The stamp files are numbered to have different names.
588 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
589 # loop where config.status creates the headers, so we can generate
590 # our stamp files there.
591 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
592 [# Compute $1's index in $config_headers.
595 for _am_header in $config_headers :; do
597 $_am_arg | $_am_arg:* )
600 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
603 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
605 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
607 # This file is free software; the Free Software Foundation
608 # gives unlimited permission to copy and/or distribute it,
609 # with or without modifications, as long as this notice is preserved.
613 # Define $install_sh.
614 AC_DEFUN([AM_PROG_INSTALL_SH],
615 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
616 if test x"${install_sh}" != xset; then
619 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
621 install_sh="\${SHELL} $am_aux_dir/install-sh"
624 AC_SUBST([install_sh])])
626 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
628 # This file is free software; the Free Software Foundation
629 # gives unlimited permission to copy and/or distribute it,
630 # with or without modifications, as long as this notice is preserved.
632 # Check whether the underlying file-system supports filenames
633 # with a leading dot. For instance MS-DOS doesn't.
634 AC_DEFUN([AM_SET_LEADING_DOT],
635 [rm -rf .tst 2>/dev/null
636 mkdir .tst 2>/dev/null
637 if test -d .tst; then
642 rmdir .tst 2>/dev/null
643 AC_SUBST([am__leading_dot])])
645 # Check to see how 'make' treats includes. -*- Autoconf -*-
647 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
649 # This file is free software; the Free Software Foundation
650 # gives unlimited permission to copy and/or distribute it,
651 # with or without modifications, as long as this notice is preserved.
655 # Check to see how make treats includes.
656 AC_DEFUN([AM_MAKE_INCLUDE],
657 [am_make=${MAKE-make}
658 cat > confinc << 'END'
660 @echo this is the am__doit target
663 # If we don't find an include directive, just comment out the code.
664 AC_MSG_CHECKING([for style of include used by $am_make])
668 # First try GNU make style include.
669 echo "include confinc" > confmf
670 # Ignore all kinds of additional output from 'make'.
671 case `$am_make -s -f confmf 2> /dev/null` in #(
672 *the\ am__doit\ target*)
678 # Now try BSD make style include.
679 if test "$am__include" = "#"; then
680 echo '.include "confinc"' > confmf
681 case `$am_make -s -f confmf 2> /dev/null` in #(
682 *the\ am__doit\ target*)
689 AC_SUBST([am__include])
690 AC_SUBST([am__quote])
691 AC_MSG_RESULT([$_am_result])
695 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
697 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
699 # This file is free software; the Free Software Foundation
700 # gives unlimited permission to copy and/or distribute it,
701 # with or without modifications, as long as this notice is preserved.
703 # AM_MISSING_PROG(NAME, PROGRAM)
704 # ------------------------------
705 AC_DEFUN([AM_MISSING_PROG],
706 [AC_REQUIRE([AM_MISSING_HAS_RUN])
707 $1=${$1-"${am_missing_run}$2"}
712 # Define MISSING if not defined so far and test if it is modern enough.
713 # If it is, set am_missing_run to use it, otherwise, to nothing.
714 AC_DEFUN([AM_MISSING_HAS_RUN],
715 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
716 AC_REQUIRE_AUX_FILE([missing])dnl
717 if test x"${MISSING+set}" != xset; then
720 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
722 MISSING="\${SHELL} $am_aux_dir/missing" ;;
725 # Use eval to expand $SHELL
726 if eval "$MISSING --is-lightweight"; then
727 am_missing_run="$MISSING "
730 AC_MSG_WARN(['missing' script is too old or missing])
734 # Helper functions for option handling. -*- Autoconf -*-
736 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
738 # This file is free software; the Free Software Foundation
739 # gives unlimited permission to copy and/or distribute it,
740 # with or without modifications, as long as this notice is preserved.
742 # _AM_MANGLE_OPTION(NAME)
743 # -----------------------
744 AC_DEFUN([_AM_MANGLE_OPTION],
745 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
747 # _AM_SET_OPTION(NAME)
748 # --------------------
749 # Set option NAME. Presently that only means defining a flag for this option.
750 AC_DEFUN([_AM_SET_OPTION],
751 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
753 # _AM_SET_OPTIONS(OPTIONS)
754 # ------------------------
755 # OPTIONS is a space-separated list of Automake options.
756 AC_DEFUN([_AM_SET_OPTIONS],
757 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
759 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
760 # -------------------------------------------
761 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
762 AC_DEFUN([_AM_IF_OPTION],
763 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
765 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
773 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
774 # to automatically call this.
775 AC_DEFUN([_AM_PROG_CC_C_O],
776 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
777 AC_REQUIRE_AUX_FILE([compile])dnl
780 [whether $CC understands -c and -o together],
782 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
783 # Make sure it works both with $CC and with simple cc.
784 # Following AC_PROG_CC_C_O, we do the test twice because some
785 # compilers refuse to overwrite an existing .o file with -o,
786 # though they will create one.
787 am_cv_prog_cc_c_o=yes
789 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
790 && test -f conftest2.$ac_objext; then
799 if test "$am_cv_prog_cc_c_o" != yes; then
800 # Losing compiler, so override with the script.
801 # FIXME: It is wrong to rewrite CC.
802 # But if we don't then we get into trouble of one sort or another.
803 # A longer-term fix would be to have automake use am__CC in this case,
804 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
805 CC="$am_aux_dir/compile $CC"
809 # For backward compatibility.
810 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
812 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
814 # This file is free software; the Free Software Foundation
815 # gives unlimited permission to copy and/or distribute it,
816 # with or without modifications, as long as this notice is preserved.
818 # AM_RUN_LOG(COMMAND)
819 # -------------------
820 # Run COMMAND, save the exit status in ac_status, and log it.
821 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
822 AC_DEFUN([AM_RUN_LOG],
823 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
824 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
826 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
827 (exit $ac_status); }])
829 # Check to make sure that the build environment is sane. -*- Autoconf -*-
831 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
833 # This file is free software; the Free Software Foundation
834 # gives unlimited permission to copy and/or distribute it,
835 # with or without modifications, as long as this notice is preserved.
839 AC_DEFUN([AM_SANITY_CHECK],
840 [AC_MSG_CHECKING([whether build environment is sane])
841 # Reject unsafe characters in $srcdir or the absolute working directory
842 # name. Accept space and tab only in the latter.
846 *[[\\\"\#\$\&\'\`$am_lf]]*)
847 AC_MSG_ERROR([unsafe absolute working directory name]);;
850 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
851 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
854 # Do 'set' in a subshell so we don't clobber the current shell's
855 # arguments. Must try -L first in case configure is actually a
856 # symlink; some systems play weird games with the mod time of symlinks
857 # (eg FreeBSD returns the mod time of the symlink's containing
861 for am_try in 1 2; do
862 echo "timestamp, slept: $am_has_slept" > conftest.file
863 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
864 if test "$[*]" = "X"; then
866 set X `ls -t "$srcdir/configure" conftest.file`
868 if test "$[*]" != "X $srcdir/configure conftest.file" \
869 && test "$[*]" != "X conftest.file $srcdir/configure"; then
871 # If neither matched, then we have a broken ls. This can happen
872 # if, for instance, CONFIG_SHELL is bash and it inherits a
873 # broken ls alias from the environment. This has actually
874 # happened. Such a system could not be considered "sane".
875 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
876 alias in your environment])
878 if test "$[2]" = conftest.file || test $am_try -eq 2; then
885 test "$[2]" = conftest.file
891 AC_MSG_ERROR([newly created file is older than distributed files!
892 Check your system clock])
895 # If we didn't sleep, we still need to ensure time stamps of config.status and
896 # generated files are strictly newer.
898 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
902 AC_CONFIG_COMMANDS_PRE(
903 [AC_MSG_CHECKING([that generated files are newer than configure])
904 if test -n "$am_sleep_pid"; then
905 # Hide warnings about reused PIDs.
906 wait $am_sleep_pid 2>/dev/null
908 AC_MSG_RESULT([done])])
912 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
914 # This file is free software; the Free Software Foundation
915 # gives unlimited permission to copy and/or distribute it,
916 # with or without modifications, as long as this notice is preserved.
918 # AM_SILENT_RULES([DEFAULT])
919 # --------------------------
920 # Enable less verbose build rules; with the default set to DEFAULT
921 # ("yes" being less verbose, "no" or empty being verbose).
922 AC_DEFUN([AM_SILENT_RULES],
923 [AC_ARG_ENABLE([silent-rules], [dnl
925 [--enable-silent-rules],
926 [less verbose build output (undo: "make V=1")])
928 [--disable-silent-rules],
929 [verbose build output (undo: "make V=0")])dnl
931 case $enable_silent_rules in @%:@ (((
932 yes) AM_DEFAULT_VERBOSITY=0;;
933 no) AM_DEFAULT_VERBOSITY=1;;
934 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
937 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
938 dnl do not support nested variable expansions.
939 dnl See automake bug#9928 and bug#10237.
941 AC_CACHE_CHECK([whether $am_make supports nested variables],
942 [am_cv_make_support_nested_variables],
943 [if AS_ECHO([['TRUE=$(BAR$(V))
949 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
950 am_cv_make_support_nested_variables=yes
952 am_cv_make_support_nested_variables=no
954 if test $am_cv_make_support_nested_variables = yes; then
955 dnl Using '$V' instead of '$(V)' breaks IRIX make.
957 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
959 AM_V=$AM_DEFAULT_VERBOSITY
960 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
963 AM_SUBST_NOTMAKE([AM_V])dnl
964 AC_SUBST([AM_DEFAULT_V])dnl
965 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
966 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
968 AC_SUBST([AM_BACKSLASH])dnl
969 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
972 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
974 # This file is free software; the Free Software Foundation
975 # gives unlimited permission to copy and/or distribute it,
976 # with or without modifications, as long as this notice is preserved.
978 # AM_PROG_INSTALL_STRIP
979 # ---------------------
980 # One issue with vendor 'install' (even GNU) is that you can't
981 # specify the program used to strip binaries. This is especially
982 # annoying in cross-compiling environments, where the build's strip
983 # is unlikely to handle the host's binaries.
984 # Fortunately install-sh will honor a STRIPPROG variable, so we
985 # always use install-sh in "make install-strip", and initialize
986 # STRIPPROG with the value of the STRIP variable (set by the user).
987 AC_DEFUN([AM_PROG_INSTALL_STRIP],
988 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
989 # Installed binaries are usually stripped using 'strip' when the user
990 # run "make install-strip". However 'strip' might not be the right
991 # tool to use in cross-compilation environments, therefore Automake
992 # will honor the 'STRIP' environment variable to overrule this program.
993 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
994 if test "$cross_compiling" != no; then
995 AC_CHECK_TOOL([STRIP], [strip], :)
997 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
998 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1000 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1002 # This file is free software; the Free Software Foundation
1003 # gives unlimited permission to copy and/or distribute it,
1004 # with or without modifications, as long as this notice is preserved.
1006 # _AM_SUBST_NOTMAKE(VARIABLE)
1007 # ---------------------------
1008 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1009 # This macro is traced by Automake.
1010 AC_DEFUN([_AM_SUBST_NOTMAKE])
1012 # AM_SUBST_NOTMAKE(VARIABLE)
1013 # --------------------------
1014 # Public sister of _AM_SUBST_NOTMAKE.
1015 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1017 # Check how to create a tarball. -*- Autoconf -*-
1019 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1021 # This file is free software; the Free Software Foundation
1022 # gives unlimited permission to copy and/or distribute it,
1023 # with or without modifications, as long as this notice is preserved.
1025 # _AM_PROG_TAR(FORMAT)
1026 # --------------------
1027 # Check how to create a tarball in format FORMAT.
1028 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1030 # Substitute a variable $(am__tar) that is a command
1031 # writing to stdout a FORMAT-tarball containing the directory
1033 # tardir=directory && $(am__tar) > result.tar
1035 # Substitute a variable $(am__untar) that extract such
1036 # a tarball read from stdin.
1037 # $(am__untar) < result.tar
1039 AC_DEFUN([_AM_PROG_TAR],
1040 [# Always define AMTAR for backward compatibility. Yes, it's still used
1041 # in the wild :-( We should find a proper way to deprecate it ...
1042 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1044 # We'll loop over all known methods to create a tar archive until one works.
1045 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1048 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1052 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053 # There is notably a 21 bits limit for the UID and the GID. In fact,
1054 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1056 am_max_uid=2097151 # 2^21 - 1
1057 am_max_gid=$am_max_uid
1058 # The $UID and $GID variables are not portable, so we need to resort
1059 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1060 # below are definitely unexpected, so allow the users to see them
1061 # (that is, avoid stderr redirection).
1062 am_uid=`id -u || echo unknown`
1063 am_gid=`id -g || echo unknown`
1064 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065 if test $am_uid -le $am_max_uid; then
1066 AC_MSG_RESULT([yes])
1071 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072 if test $am_gid -le $am_max_gid; then
1073 AC_MSG_RESULT([yes])
1082 [m4_fatal([Unknown tar format])])
1084 AC_MSG_CHECKING([how to create a $1 tar archive])
1086 # Go ahead even if we have the value already cached. We do so because we
1087 # need to set the values for the 'am__tar' and 'am__untar' variables.
1088 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090 for _am_tool in $_am_tools; do
1093 for _am_tar in tar gnutar gtar; do
1094 AM_RUN_LOG([$_am_tar --version]) && break
1096 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098 am__untar="$_am_tar -xf -"
1101 # Must skip GNU tar: if it does not support --format= it doesn't create
1102 # ustar tarball either.
1103 (tar --version) >/dev/null 2>&1 && continue
1104 am__tar='tar chf - "$$tardir"'
1105 am__tar_='tar chf - "$tardir"'
1106 am__untar='tar xf -'
1109 am__tar='pax -L -x $1 -w "$$tardir"'
1110 am__tar_='pax -L -x $1 -w "$tardir"'
1114 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116 am__untar='cpio -i -H $1 -d'
1125 # If the value was cached, stop now. We just wanted to have am__tar
1126 # and am__untar set.
1127 test -n "${am_cv_prog_tar_$1}" && break
1129 # tar/untar a dummy directory, and stop if the command works.
1132 echo GrepMe > conftest.dir/file
1133 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135 if test -s conftest.tar; then
1136 AM_RUN_LOG([$am__untar <conftest.tar])
1137 AM_RUN_LOG([cat conftest.dir/file])
1138 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1143 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1147 AC_SUBST([am__untar])
1150 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1152 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1153 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1155 # Written by Gordon Matzigkeit, 1996
1157 # This file is free software; the Free Software Foundation gives
1158 # unlimited permission to copy and/or distribute it, with or without
1159 # modifications, as long as this notice is preserved.
1161 m4_define([_LT_COPYING], [dnl
1162 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1163 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1165 # Written by Gordon Matzigkeit, 1996
1167 # This file is part of GNU Libtool.
1169 # GNU Libtool is free software; you can redistribute it and/or
1170 # modify it under the terms of the GNU General Public License as
1171 # published by the Free Software Foundation; either version 2 of
1172 # the License, or (at your option) any later version.
1174 # As a special exception to the GNU General Public License,
1175 # if you distribute this file as part of a program or library that
1176 # is built using GNU Libtool, you may include this file under the
1177 # same distribution terms that you use for the rest of that program.
1179 # GNU Libtool is distributed in the hope that it will be useful,
1180 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1181 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1182 # GNU General Public License for more details.
1184 # You should have received a copy of the GNU General Public License
1185 # along with GNU Libtool; see the file COPYING. If not, a copy
1186 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1187 # obtained by writing to the Free Software Foundation, Inc.,
1188 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1194 # LT_PREREQ(VERSION)
1195 # ------------------
1196 # Complain and exit if this libtool version is less that VERSION.
1197 m4_defun([LT_PREREQ],
1198 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1200 [m4_fatal([Libtool version $1 or higher is required],
1205 # _LT_CHECK_BUILDDIR
1206 # ------------------
1207 # Complain if the absolute build directory name contains unusual characters
1208 m4_defun([_LT_CHECK_BUILDDIR],
1211 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1216 # LT_INIT([OPTIONS])
1217 # ------------------
1219 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1220 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1221 AC_BEFORE([$0], [LT_LANG])dnl
1222 AC_BEFORE([$0], [LT_OUTPUT])dnl
1223 AC_BEFORE([$0], [LTDL_INIT])dnl
1224 m4_require([_LT_CHECK_BUILDDIR])dnl
1226 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1227 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1228 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1229 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1230 dnl unless we require an AC_DEFUNed macro:
1231 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1232 AC_REQUIRE([LTSUGAR_VERSION])dnl
1233 AC_REQUIRE([LTVERSION_VERSION])dnl
1234 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1235 m4_require([_LT_PROG_LTMAIN])dnl
1237 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1240 _LT_SET_OPTIONS([$0], [$1])
1242 # This can be used to rebuild libtool when needed
1243 LIBTOOL_DEPS="$ltmain"
1245 # Always use our own libtool.
1246 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1247 AC_SUBST(LIBTOOL)dnl
1252 m4_define([LT_INIT])
1256 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1257 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1258 dnl aclocal-1.4 backwards compatibility:
1259 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1260 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1263 # _LT_CC_BASENAME(CC)
1264 # -------------------
1265 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1266 m4_defun([_LT_CC_BASENAME],
1267 [for cc_temp in $1""; do
1269 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1270 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1275 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1279 # _LT_FILEUTILS_DEFAULTS
1280 # ----------------------
1281 # It is okay to use these file commands and assume they have been set
1282 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1283 m4_defun([_LT_FILEUTILS_DEFAULTS],
1287 ])# _LT_FILEUTILS_DEFAULTS
1292 m4_defun([_LT_SETUP],
1293 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1294 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1295 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1296 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1298 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1300 _LT_DECL([], [host_alias], [0], [The host system])dnl
1301 _LT_DECL([], [host], [0])dnl
1302 _LT_DECL([], [host_os], [0])dnl
1304 _LT_DECL([], [build_alias], [0], [The build system])dnl
1305 _LT_DECL([], [build], [0])dnl
1306 _LT_DECL([], [build_os], [0])dnl
1308 AC_REQUIRE([AC_PROG_CC])dnl
1309 AC_REQUIRE([LT_PATH_LD])dnl
1310 AC_REQUIRE([LT_PATH_NM])dnl
1312 AC_REQUIRE([AC_PROG_LN_S])dnl
1313 test -z "$LN_S" && LN_S="ln -s"
1314 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1316 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1317 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1318 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1320 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1321 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1322 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1323 m4_require([_LT_CMD_RELOAD])dnl
1324 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1325 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1326 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1327 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1328 m4_require([_LT_WITH_SYSROOT])dnl
1330 _LT_CONFIG_LIBTOOL_INIT([
1331 # See if we are running on zsh, and set the options which allow our
1332 # commands through without removal of \ escapes INIT.
1333 if test -n "\${ZSH_VERSION+set}" ; then
1334 setopt NO_GLOB_SUBST
1337 if test -n "${ZSH_VERSION+set}" ; then
1338 setopt NO_GLOB_SUBST
1343 m4_require([_LT_TAG_COMPILER])dnl
1347 # AIX sometimes has problems with the GCC collect2 program. For some
1348 # reason, if we set the COLLECT_NAMES environment variable, the problems
1349 # vanish in a puff of smoke.
1350 if test "X${COLLECT_NAMES+set}" != Xset; then
1352 export COLLECT_NAMES
1359 can_build_shared=yes
1361 # All known linkers require a `.a' archive for static linking (except MSVC,
1362 # which needs '.lib').
1365 with_gnu_ld="$lt_cv_prog_gnu_ld"
1368 old_CFLAGS="$CFLAGS"
1370 # Set sane defaults for various variables
1371 test -z "$CC" && CC=cc
1372 test -z "$LTCC" && LTCC=$CC
1373 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1374 test -z "$LD" && LD=ld
1375 test -z "$ac_objext" && ac_objext=o
1377 _LT_CC_BASENAME([$compiler])
1379 # Only perform the check for file, if the check method requires it
1380 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1381 case $deplibs_check_method in
1383 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1389 # Use C for the default configuration in the libtool script
1390 LT_SUPPORTED_TAG([CC])
1392 _LT_LANG_DEFAULT_CONFIG
1397 # _LT_PREPARE_SED_QUOTE_VARS
1398 # --------------------------
1399 # Define a few sed substitution that help us do robust quoting.
1400 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1401 [# Backslashify metacharacters that are still active within
1402 # double-quoted strings.
1403 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1405 # Same as above, but do not quote variable references.
1406 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1408 # Sed substitution to delay expansion of an escaped shell variable in a
1409 # double_quote_subst'ed string.
1410 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1412 # Sed substitution to delay expansion of an escaped single quote.
1413 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1415 # Sed substitution to avoid accidental globbing in evaled expressions
1416 no_glob_subst='s/\*/\\\*/g'
1421 # Note that this code is called both from `configure', and `config.status'
1422 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1423 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1424 # so we pass a copy along to make sure it has a sensible value anyway.
1425 m4_defun([_LT_PROG_LTMAIN],
1426 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1427 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1428 ltmain="$ac_aux_dir/ltmain.sh"
1433 # So that we can recreate a full libtool script including additional
1434 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1435 # in macros and then make a single call at the end using the `libtool'
1439 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1440 # ----------------------------------------
1441 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1442 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1444 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1449 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1452 # _LT_CONFIG_LIBTOOL([COMMANDS])
1453 # ------------------------------
1454 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1455 m4_define([_LT_CONFIG_LIBTOOL],
1457 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1462 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1465 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1466 # -----------------------------------------------------
1467 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1468 [_LT_CONFIG_LIBTOOL([$1])
1469 _LT_CONFIG_LIBTOOL_INIT([$2])
1473 # _LT_FORMAT_COMMENT([COMMENT])
1474 # -----------------------------
1475 # Add leading comment marks to the start of each line, and a trailing
1476 # full-stop to the whole comment if one is not present already.
1477 m4_define([_LT_FORMAT_COMMENT],
1479 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1480 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1487 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1488 # -------------------------------------------------------------------
1489 # CONFIGNAME is the name given to the value in the libtool script.
1490 # VARNAME is the (base) name used in the configure script.
1491 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1492 # VARNAME. Any other value will be used directly.
1493 m4_define([_LT_DECL],
1494 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1495 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1496 [m4_ifval([$1], [$1], [$2])])
1497 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1499 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1500 lt_dict_add_subkey([lt_decl_dict], [$2],
1501 [tagged?], [m4_ifval([$5], [yes], [no])])])
1505 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1506 # --------------------------------------------------------
1507 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1510 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1511 # ------------------------------------------------
1512 m4_define([lt_decl_tag_varnames],
1513 [_lt_decl_filter([tagged?], [yes], $@)])
1516 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1517 # ---------------------------------------------------------
1518 m4_define([_lt_decl_filter],
1520 [0], [m4_fatal([$0: too few arguments: $#])],
1521 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1522 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1523 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1524 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1528 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1529 # --------------------------------------------------
1530 m4_define([lt_decl_quote_varnames],
1531 [_lt_decl_filter([value], [1], $@)])
1534 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1535 # ---------------------------------------------------
1536 m4_define([lt_decl_dquote_varnames],
1537 [_lt_decl_filter([value], [2], $@)])
1540 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1541 # ---------------------------------------------------
1542 m4_define([lt_decl_varnames_tagged],
1543 [m4_assert([$# <= 2])dnl
1544 _$0(m4_quote(m4_default([$1], [[, ]])),
1545 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1546 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1547 m4_define([_lt_decl_varnames_tagged],
1548 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1551 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1552 # ------------------------------------------------
1553 m4_define([lt_decl_all_varnames],
1554 [_$0(m4_quote(m4_default([$1], [[, ]])),
1556 m4_quote(lt_decl_varnames),
1557 m4_quote(m4_shift($@))))[]dnl
1559 m4_define([_lt_decl_all_varnames],
1560 [lt_join($@, lt_decl_varnames_tagged([$1],
1561 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1565 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1566 # ------------------------------------
1567 # Quote a variable value, and forward it to `config.status' so that its
1568 # declaration there will have the same value as in `configure'. VARNAME
1569 # must have a single quote delimited value for this to work.
1570 m4_define([_LT_CONFIG_STATUS_DECLARE],
1571 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1574 # _LT_CONFIG_STATUS_DECLARATIONS
1575 # ------------------------------
1576 # We delimit libtool config variables with single quotes, so when
1577 # we write them to config.status, we have to be sure to quote all
1578 # embedded single quotes properly. In configure, this macro expands
1579 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1581 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1582 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1583 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1584 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1589 # Output comment and list of tags supported by the script
1590 m4_defun([_LT_LIBTOOL_TAGS],
1591 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1592 available_tags="_LT_TAGS"dnl
1596 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1597 # -----------------------------------
1598 # Extract the dictionary values for VARNAME (optionally with TAG) and
1599 # expand to a commented shell variable setting:
1601 # # Some comment about what VAR is for.
1602 # visible_name=$lt_internal_name
1603 m4_define([_LT_LIBTOOL_DECLARE],
1604 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1605 [description])))[]dnl
1606 m4_pushdef([_libtool_name],
1607 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1608 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1609 [0], [_libtool_name=[$]$1],
1610 [1], [_libtool_name=$lt_[]$1],
1611 [2], [_libtool_name=$lt_[]$1],
1612 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1613 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1617 # _LT_LIBTOOL_CONFIG_VARS
1618 # -----------------------
1619 # Produce commented declarations of non-tagged libtool config variables
1620 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1621 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1622 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1623 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1624 [m4_foreach([_lt_var],
1625 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1626 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1629 # _LT_LIBTOOL_TAG_VARS(TAG)
1630 # -------------------------
1631 m4_define([_LT_LIBTOOL_TAG_VARS],
1632 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1633 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1636 # _LT_TAGVAR(VARNAME, [TAGNAME])
1637 # ------------------------------
1638 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1641 # _LT_CONFIG_COMMANDS
1642 # -------------------
1643 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1644 # variables for single and double quote escaping we saved from calls
1645 # to _LT_DECL, we can put quote escaped variables declarations
1646 # into `config.status', and then the shell code to quote escape them in
1647 # for loops in `config.status'. Finally, any additional code accumulated
1648 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1649 m4_defun([_LT_CONFIG_COMMANDS],
1650 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1651 dnl If the libtool generation code has been placed in $CONFIG_LT,
1652 dnl instead of duplicating it all over again into config.status,
1653 dnl then we will have config.status run $CONFIG_LT later, so it
1654 dnl needs to know what name is stored there:
1655 [AC_CONFIG_COMMANDS([libtool],
1656 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1657 dnl If the libtool generation code is destined for config.status,
1658 dnl expand the accumulated commands and init code now:
1659 [AC_CONFIG_COMMANDS([libtool],
1660 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1661 ])#_LT_CONFIG_COMMANDS
1665 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1668 # The HP-UX ksh and POSIX shell print the target directory to stdout
1670 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1672 sed_quote_subst='$sed_quote_subst'
1673 double_quote_subst='$double_quote_subst'
1674 delay_variable_subst='$delay_variable_subst'
1675 _LT_CONFIG_STATUS_DECLARATIONS
1677 LTCFLAGS='$LTCFLAGS'
1678 compiler='$compiler_DEFAULT'
1680 # A function that is used when there is no print builtin or printf.
1681 func_fallback_echo ()
1683 eval 'cat <<_LTECHO_EOF
1688 # Quote evaled strings.
1689 for var in lt_decl_all_varnames([[ \
1690 ]], lt_decl_quote_varnames); do
1691 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1692 *[[\\\\\\\`\\"\\\$]]*)
1693 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1696 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1701 # Double-quote double-evaled strings.
1702 for var in lt_decl_all_varnames([[ \
1703 ]], lt_decl_dquote_varnames); do
1704 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1705 *[[\\\\\\\`\\"\\\$]]*)
1706 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1709 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1714 _LT_OUTPUT_LIBTOOL_INIT
1717 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1718 # ------------------------------------
1719 # Generate a child script FILE with all initialization necessary to
1720 # reuse the environment learned by the parent script, and make the
1721 # file executable. If COMMENT is supplied, it is inserted after the
1722 # `#!' sequence but before initialization text begins. After this
1723 # macro, additional text can be appended to FILE to form the body of
1724 # the child script. The macro ends with non-zero status if the
1725 # file could not be fully written (such as if the disk is full).
1726 m4_ifdef([AS_INIT_GENERATED],
1727 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1728 [m4_defun([_LT_GENERATED_FILE_INIT],
1729 [m4_require([AS_PREPARE])]dnl
1730 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1732 cat >$1 <<_ASEOF || lt_write_fail=1
1734 # Generated by $as_me.
1736 SHELL=\${CONFIG_SHELL-$SHELL}
1739 cat >>$1 <<\_ASEOF || lt_write_fail=1
1742 exec AS_MESSAGE_FD>&1
1744 test $lt_write_fail = 0 && chmod +x $1[]dnl
1745 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1749 # This macro allows early generation of the libtool script (before
1750 # AC_OUTPUT is called), incase it is used in configure for compilation
1752 AC_DEFUN([LT_OUTPUT],
1753 [: ${CONFIG_LT=./config.lt}
1754 AC_MSG_NOTICE([creating $CONFIG_LT])
1755 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1756 [# Run this file to recreate a libtool stub with the current configuration.])
1758 cat >>"$CONFIG_LT" <<\_LTEOF
1760 exec AS_MESSAGE_LOG_FD>>config.log
1763 AS_BOX([Running $as_me.])
1764 } >&AS_MESSAGE_LOG_FD
1767 \`$as_me' creates a local libtool stub from the current configuration,
1768 for use in further configure time tests before the real libtool is
1771 Usage: $[0] [[OPTIONS]]
1773 -h, --help print this help, then exit
1774 -V, --version print version number, then exit
1775 -q, --quiet do not print progress messages
1776 -d, --debug don't remove temporary files
1778 Report bugs to <bug-libtool@gnu.org>."
1781 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1782 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1783 configured by $[0], generated by m4_PACKAGE_STRING.
1785 Copyright (C) 2011 Free Software Foundation, Inc.
1786 This config.lt script is free software; the Free Software Foundation
1787 gives unlimited permision to copy, distribute and modify it."
1789 while test $[#] != 0
1792 --version | --v* | -V )
1793 echo "$lt_cl_version"; exit 0 ;;
1794 --help | --h* | -h )
1795 echo "$lt_cl_help"; exit 0 ;;
1796 --debug | --d* | -d )
1798 --quiet | --q* | --silent | --s* | -q )
1801 -*) AC_MSG_ERROR([unrecognized option: $[1]
1802 Try \`$[0] --help' for more information.]) ;;
1804 *) AC_MSG_ERROR([unrecognized argument: $[1]
1805 Try \`$[0] --help' for more information.]) ;;
1810 if $lt_cl_silent; then
1811 exec AS_MESSAGE_FD>/dev/null
1815 cat >>"$CONFIG_LT" <<_LTEOF
1816 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1819 cat >>"$CONFIG_LT" <<\_LTEOF
1820 AC_MSG_NOTICE([creating $ofile])
1821 _LT_OUTPUT_LIBTOOL_COMMANDS
1824 chmod +x "$CONFIG_LT"
1826 # configure is writing to config.log, but config.lt does its own redirection,
1827 # appending to config.log, which fails on DOS, as config.log is still kept
1828 # open by configure. Here we exec the FD to /dev/null, effectively closing
1829 # config.log, so it can be properly (re)opened and appended to by config.lt.
1831 test "$silent" = yes &&
1832 lt_config_lt_args="$lt_config_lt_args --quiet"
1833 exec AS_MESSAGE_LOG_FD>/dev/null
1834 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1835 exec AS_MESSAGE_LOG_FD>>config.log
1836 $lt_cl_success || AS_EXIT(1)
1842 # If TAG is the built-in tag, create an initial libtool script with a
1843 # default configuration from the untagged config vars. Otherwise add code
1844 # to config.status for appending the configuration named by TAG from the
1845 # matching tagged config vars.
1846 m4_defun([_LT_CONFIG],
1847 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1848 _LT_CONFIG_SAVE_COMMANDS([
1849 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1850 m4_if(_LT_TAG, [C], [
1851 # See if we are running on zsh, and set the options which allow our
1852 # commands through without removal of \ escapes.
1853 if test -n "${ZSH_VERSION+set}" ; then
1854 setopt NO_GLOB_SUBST
1858 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1861 cat <<_LT_EOF >> "$cfgfile"
1864 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1865 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1866 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1867 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1872 # ### BEGIN LIBTOOL CONFIG
1873 _LT_LIBTOOL_CONFIG_VARS
1874 _LT_LIBTOOL_TAG_VARS
1875 # ### END LIBTOOL CONFIG
1881 cat <<\_LT_EOF >> "$cfgfile"
1882 # AIX sometimes has problems with the GCC collect2 program. For some
1883 # reason, if we set the COLLECT_NAMES environment variable, the problems
1884 # vanish in a puff of smoke.
1885 if test "X${COLLECT_NAMES+set}" != Xset; then
1887 export COLLECT_NAMES
1895 # We use sed instead of cat because bash on DJGPP gets confused if
1896 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1897 # text mode, it properly converts lines to CR/LF. This bash problem
1898 # is reportedly fixed, but why not run on old versions too?
1899 sed '$q' "$ltmain" >> "$cfgfile" \
1900 || (rm -f "$cfgfile"; exit 1)
1902 _LT_PROG_REPLACE_SHELLFNS
1904 mv -f "$cfgfile" "$ofile" ||
1905 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1908 [cat <<_LT_EOF >> "$ofile"
1910 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1911 dnl in a comment (ie after a #).
1912 # ### BEGIN LIBTOOL TAG CONFIG: $1
1913 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1914 # ### END LIBTOOL TAG CONFIG: $1
1921 TIMESTAMP='$TIMESTAMP'
1923 ofile='$ofile'], [])
1924 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1928 # LT_SUPPORTED_TAG(TAG)
1929 # ---------------------
1930 # Trace this macro to discover what tags are supported by the libtool
1931 # --tag option, using:
1932 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
1933 AC_DEFUN([LT_SUPPORTED_TAG], [])
1936 # C support is built-in for now
1937 m4_define([_LT_LANG_C_enabled], [])
1938 m4_define([_LT_TAGS], [])
1943 # Enable libtool support for the given language if not already enabled.
1945 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1948 [C++], [_LT_LANG(CXX)],
1949 [Go], [_LT_LANG(GO)],
1950 [Java], [_LT_LANG(GCJ)],
1951 [Fortran 77], [_LT_LANG(F77)],
1952 [Fortran], [_LT_LANG(FC)],
1953 [Windows Resource], [_LT_LANG(RC)],
1954 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1956 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1960 # _LT_LANG(LANGNAME)
1961 # ------------------
1962 m4_defun([_LT_LANG],
1963 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1964 [LT_SUPPORTED_TAG([$1])dnl
1965 m4_append([_LT_TAGS], [$1 ])dnl
1966 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1967 _LT_LANG_$1_CONFIG($1)])dnl
1971 m4_ifndef([AC_PROG_GO], [
1972 # NOTE: This macro has been submitted for inclusion into #
1973 # GNU Autoconf as AC_PROG_GO. When it is available in #
1974 # a released version of Autoconf we should remove this #
1975 # macro and use it instead. #
1976 m4_defun([AC_PROG_GO],
1977 [AC_LANG_PUSH(Go)dnl
1978 AC_ARG_VAR([GOC], [Go compiler command])dnl
1979 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1980 _AC_ARG_VAR_LDFLAGS()dnl
1981 AC_CHECK_TOOL(GOC, gccgo)
1982 if test -z "$GOC"; then
1983 if test -n "$ac_tool_prefix"; then
1984 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1987 if test -z "$GOC"; then
1988 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1994 # _LT_LANG_DEFAULT_CONFIG
1995 # -----------------------
1996 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1997 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1999 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2001 AC_PROVIDE_IFELSE([AC_PROG_F77],
2003 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2005 AC_PROVIDE_IFELSE([AC_PROG_FC],
2007 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2009 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2010 dnl pulling things in needlessly.
2011 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2013 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2015 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2017 [m4_ifdef([AC_PROG_GCJ],
2018 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2019 m4_ifdef([A][M_PROG_GCJ],
2020 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2021 m4_ifdef([LT_PROG_GCJ],
2022 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2024 AC_PROVIDE_IFELSE([AC_PROG_GO],
2026 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2028 AC_PROVIDE_IFELSE([LT_PROG_RC],
2030 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2031 ])# _LT_LANG_DEFAULT_CONFIG
2034 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2035 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2036 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2037 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2038 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2039 dnl aclocal-1.4 backwards compatibility:
2040 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2041 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2042 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2043 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2044 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2049 m4_defun([_LT_TAG_COMPILER],
2050 [AC_REQUIRE([AC_PROG_CC])dnl
2052 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2053 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2054 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2055 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2057 # If no C compiler was specified, use CC.
2060 # If no C compiler flags were specified, use CFLAGS.
2061 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2063 # Allow CC to be a program name with arguments.
2065 ])# _LT_TAG_COMPILER
2068 # _LT_COMPILER_BOILERPLATE
2069 # ------------------------
2070 # Check for compiler boilerplate output or warnings with
2071 # the simple compiler test code.
2072 m4_defun([_LT_COMPILER_BOILERPLATE],
2073 [m4_require([_LT_DECL_SED])dnl
2074 ac_outfile=conftest.$ac_objext
2075 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2076 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2077 _lt_compiler_boilerplate=`cat conftest.err`
2079 ])# _LT_COMPILER_BOILERPLATE
2082 # _LT_LINKER_BOILERPLATE
2083 # ----------------------
2084 # Check for linker boilerplate output or warnings with
2085 # the simple link test code.
2086 m4_defun([_LT_LINKER_BOILERPLATE],
2087 [m4_require([_LT_DECL_SED])dnl
2088 ac_outfile=conftest.$ac_objext
2089 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2090 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2091 _lt_linker_boilerplate=`cat conftest.err`
2093 ])# _LT_LINKER_BOILERPLATE
2095 # _LT_REQUIRED_DARWIN_CHECKS
2096 # -------------------------
2097 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2099 rhapsody* | darwin*)
2100 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2101 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2102 AC_CHECK_TOOL([LIPO], [lipo], [:])
2103 AC_CHECK_TOOL([OTOOL], [otool], [:])
2104 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2105 _LT_DECL([], [DSYMUTIL], [1],
2106 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2107 _LT_DECL([], [NMEDIT], [1],
2108 [Tool to change global to local symbols on Mac OS X])
2109 _LT_DECL([], [LIPO], [1],
2110 [Tool to manipulate fat objects and archives on Mac OS X])
2111 _LT_DECL([], [OTOOL], [1],
2112 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2113 _LT_DECL([], [OTOOL64], [1],
2114 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2116 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2117 [lt_cv_apple_cc_single_mod=no
2118 if test -z "${LT_MULTI_MODULE}"; then
2119 # By default we will add the -single_module flag. You can override
2120 # by either setting the environment variable LT_MULTI_MODULE
2121 # non-empty at configure time, or by adding -multi_module to the
2123 rm -rf libconftest.dylib*
2124 echo "int foo(void){return 1;}" > conftest.c
2125 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2126 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2127 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2128 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2130 # If there is a non-empty error log, and "single_module"
2131 # appears in it, assume the flag caused a linker warning
2132 if test -s conftest.err && $GREP single_module conftest.err; then
2133 cat conftest.err >&AS_MESSAGE_LOG_FD
2134 # Otherwise, if the output was created with a 0 exit code from
2135 # the compiler, it worked.
2136 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2137 lt_cv_apple_cc_single_mod=yes
2139 cat conftest.err >&AS_MESSAGE_LOG_FD
2141 rm -rf libconftest.dylib*
2145 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2146 [lt_cv_ld_exported_symbols_list],
2147 [lt_cv_ld_exported_symbols_list=no
2148 save_LDFLAGS=$LDFLAGS
2149 echo "_main" > conftest.sym
2150 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2151 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2152 [lt_cv_ld_exported_symbols_list=yes],
2153 [lt_cv_ld_exported_symbols_list=no])
2154 LDFLAGS="$save_LDFLAGS"
2157 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2158 [lt_cv_ld_force_load=no
2159 cat > conftest.c << _LT_EOF
2160 int forced_loaded() { return 2;}
2162 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2163 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2164 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2165 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2166 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2167 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2168 cat > conftest.c << _LT_EOF
2169 int main() { return 0;}
2171 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2172 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2174 if test -s conftest.err && $GREP force_load conftest.err; then
2175 cat conftest.err >&AS_MESSAGE_LOG_FD
2176 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2177 lt_cv_ld_force_load=yes
2179 cat conftest.err >&AS_MESSAGE_LOG_FD
2181 rm -f conftest.err libconftest.a conftest conftest.c
2182 rm -rf conftest.dSYM
2185 rhapsody* | darwin1.[[012]])
2186 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2188 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2189 darwin*) # darwin 5.x on
2190 # if running on 10.5 or later, the deployment target defaults
2191 # to the OS version, if on x86, and 10.4, the deployment
2192 # target defaults to 10.4. Don't you love it?
2193 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2194 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2195 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2197 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2199 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2203 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2204 _lt_dar_single_mod='$single_module'
2206 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2207 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2209 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2211 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2212 _lt_dsymutil='~$DSYMUTIL $lib || :'
2221 # _LT_DARWIN_LINKER_FEATURES([TAG])
2222 # ---------------------------------
2223 # Checks for linker and compiler features on darwin
2224 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2226 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2227 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2228 _LT_TAGVAR(hardcode_direct, $1)=no
2229 _LT_TAGVAR(hardcode_automatic, $1)=yes
2230 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2231 if test "$lt_cv_ld_force_load" = "yes"; then
2232 _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\"`'
2233 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2234 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2236 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2238 _LT_TAGVAR(link_all_deplibs, $1)=yes
2239 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2240 case $cc_basename in
2241 ifort*) _lt_dar_can_shared=yes ;;
2242 *) _lt_dar_can_shared=$GCC ;;
2244 if test "$_lt_dar_can_shared" = "yes"; then
2245 output_verbose_link_cmd=func_echo_all
2246 _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}"
2247 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2248 _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}"
2249 _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}"
2251 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2252 _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}"
2253 _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}"
2257 _LT_TAGVAR(ld_shlibs, $1)=no
2261 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2262 # ----------------------------------
2263 # Links a minimal program and checks the executable
2264 # for the system default hardcoded library path. In most cases,
2265 # this is /usr/lib:/lib, but when the MPI compilers are used
2266 # the location of the communication and MPI libs are included too.
2267 # If we don't find anything, use the default library path according
2268 # to the aix ld manual.
2269 # Store the results from the different compilers for each TAGNAME.
2270 # Allow to override them for all tags through lt_cv_aix_libpath.
2271 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2272 [m4_require([_LT_DECL_SED])dnl
2273 if test "${lt_cv_aix_libpath+set}" = set; then
2274 aix_libpath=$lt_cv_aix_libpath
2276 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2277 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2278 lt_aix_libpath_sed='[
2279 /Import File Strings/,/^$/ {
2281 s/^0 *\([^ ]*\) *$/\1/
2285 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2286 # Check for a 64-bit object if we didn't find anything.
2287 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2288 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2290 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2291 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2294 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2296 ])# _LT_SYS_MODULE_PATH_AIX
2299 # _LT_SHELL_INIT(ARG)
2300 # -------------------
2301 m4_define([_LT_SHELL_INIT],
2302 [m4_divert_text([M4SH-INIT], [$1
2303 ])])# _LT_SHELL_INIT
2307 # _LT_PROG_ECHO_BACKSLASH
2308 # -----------------------
2309 # Find how we can fake an echo command that does not interpret backslash.
2310 # In particular, with Autoconf 2.60 or later we add some code to the start
2311 # of the generated configure script which will find a shell with a builtin
2312 # printf (which we can use as an echo command).
2313 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2314 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2315 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2316 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2318 AC_MSG_CHECKING([how to print strings])
2319 # Test print first, because it will be a builtin if present.
2320 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2321 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2323 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2326 # Use this function as a fallback that always works.
2327 func_fallback_echo ()
2329 eval 'cat <<_LTECHO_EOF
2333 ECHO='func_fallback_echo'
2336 # func_echo_all arg...
2337 # Invoke $ECHO with all args, space-separated.
2344 printf*) AC_MSG_RESULT([printf]) ;;
2345 print*) AC_MSG_RESULT([print -r]) ;;
2346 *) AC_MSG_RESULT([cat]) ;;
2349 m4_ifdef([_AS_DETECT_SUGGESTED],
2350 [_AS_DETECT_SUGGESTED([
2351 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2352 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2353 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2354 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2355 PATH=/empty FPATH=/empty; export PATH FPATH
2356 test "X`printf %s $ECHO`" = "X$ECHO" \
2357 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2359 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2360 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2361 ])# _LT_PROG_ECHO_BACKSLASH
2366 AC_DEFUN([_LT_WITH_SYSROOT],
2367 [AC_MSG_CHECKING([for sysroot])
2368 AC_ARG_WITH([sysroot],
2369 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2370 (or the compiler's sysroot if not specified).],
2371 [], [with_sysroot=no])
2373 dnl lt_sysroot will always be passed unquoted. We quote it here
2374 dnl in case the user passed a directory name.
2376 case ${with_sysroot} in #(
2378 if test "$GCC" = yes; then
2379 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2383 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2388 AC_MSG_RESULT([${with_sysroot}])
2389 AC_MSG_ERROR([The sysroot must be an absolute path.])
2393 AC_MSG_RESULT([${lt_sysroot:-no}])
2394 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2395 [dependent libraries, and in which our libraries should be installed.])])
2399 m4_defun([_LT_ENABLE_LOCK],
2400 [AC_ARG_ENABLE([libtool-lock],
2401 [AS_HELP_STRING([--disable-libtool-lock],
2402 [avoid locking (might break parallel builds)])])
2403 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2405 # Some flags need to be propagated to the compiler or linker for good
2409 # Find out which ABI we are using.
2410 echo 'int i;' > conftest.$ac_ext
2411 if AC_TRY_EVAL(ac_compile); then
2412 case `/usr/bin/file conftest.$ac_objext` in
2424 # Find out which ABI we are using.
2425 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2426 if AC_TRY_EVAL(ac_compile); then
2427 if test "$lt_cv_prog_gnu_ld" = yes; then
2428 case `/usr/bin/file conftest.$ac_objext` in
2430 LD="${LD-ld} -melf32bsmip"
2433 LD="${LD-ld} -melf32bmipn32"
2436 LD="${LD-ld} -melf64bmip"
2440 case `/usr/bin/file conftest.$ac_objext` in
2456 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2457 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2458 # Find out which ABI we are using.
2459 echo 'int i;' > conftest.$ac_ext
2460 if AC_TRY_EVAL(ac_compile); then
2461 case `/usr/bin/file conftest.o` in
2464 x86_64-*kfreebsd*-gnu)
2465 LD="${LD-ld} -m elf_i386_fbsd"
2468 LD="${LD-ld} -m elf_i386"
2470 ppc64-*linux*|powerpc64-*linux*)
2471 LD="${LD-ld} -m elf32ppclinux"
2474 LD="${LD-ld} -m elf_s390"
2477 LD="${LD-ld} -m elf32_sparc"
2483 x86_64-*kfreebsd*-gnu)
2484 LD="${LD-ld} -m elf_x86_64_fbsd"
2487 LD="${LD-ld} -m elf_x86_64"
2489 ppc*-*linux*|powerpc*-*linux*)
2490 LD="${LD-ld} -m elf64ppc"
2492 s390*-*linux*|s390*-*tpf*)
2493 LD="${LD-ld} -m elf64_s390"
2496 LD="${LD-ld} -m elf64_sparc"
2506 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2507 SAVE_CFLAGS="$CFLAGS"
2508 CFLAGS="$CFLAGS -belf"
2509 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2511 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2513 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2514 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2515 CFLAGS="$SAVE_CFLAGS"
2519 # Find out which ABI we are using.
2520 echo 'int i;' > conftest.$ac_ext
2521 if AC_TRY_EVAL(ac_compile); then
2522 case `/usr/bin/file conftest.o` in
2524 case $lt_cv_prog_gnu_ld in
2528 LD="${LD-ld} -m elf_x86_64"
2531 LD="${LD-ld} -m elf64_sparc"
2534 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2535 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2540 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2552 need_locks="$enable_libtool_lock"
2558 m4_defun([_LT_PROG_AR],
2559 [AC_CHECK_TOOLS(AR, [ar], false)
2562 _LT_DECL([], [AR], [1], [The archiver])
2563 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2565 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2566 [lt_cv_ar_at_file=no
2567 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2568 [echo conftest.$ac_objext > conftest.lst
2569 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2570 AC_TRY_EVAL([lt_ar_try])
2571 if test "$ac_status" -eq 0; then
2572 # Ensure the archiver fails upon bogus file names.
2573 rm -f conftest.$ac_objext libconftest.a
2574 AC_TRY_EVAL([lt_ar_try])
2575 if test "$ac_status" -ne 0; then
2579 rm -f conftest.* libconftest.a
2583 if test "x$lt_cv_ar_at_file" = xno; then
2586 archiver_list_spec=$lt_cv_ar_at_file
2588 _LT_DECL([], [archiver_list_spec], [1],
2589 [How to feed a file listing to the archiver])
2593 # _LT_CMD_OLD_ARCHIVE
2594 # -------------------
2595 m4_defun([_LT_CMD_OLD_ARCHIVE],
2598 AC_CHECK_TOOL(STRIP, strip, :)
2599 test -z "$STRIP" && STRIP=:
2600 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2602 AC_CHECK_TOOL(RANLIB, ranlib, :)
2603 test -z "$RANLIB" && RANLIB=:
2604 _LT_DECL([], [RANLIB], [1],
2605 [Commands used to install an old-style archive])
2607 # Determine commands to create old-style static archives.
2608 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2609 old_postinstall_cmds='chmod 644 $oldlib'
2610 old_postuninstall_cmds=
2612 if test -n "$RANLIB"; then
2615 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2618 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2621 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2626 lock_old_archive_extraction=yes ;;
2628 lock_old_archive_extraction=no ;;
2630 _LT_DECL([], [old_postinstall_cmds], [2])
2631 _LT_DECL([], [old_postuninstall_cmds], [2])
2632 _LT_TAGDECL([], [old_archive_cmds], [2],
2633 [Commands used to build an old-style archive])
2634 _LT_DECL([], [lock_old_archive_extraction], [0],
2635 [Whether to use a lock for old archive extraction])
2636 ])# _LT_CMD_OLD_ARCHIVE
2639 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2640 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2641 # ----------------------------------------------------------------
2642 # Check whether the given compiler option works
2643 AC_DEFUN([_LT_COMPILER_OPTION],
2644 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2645 m4_require([_LT_DECL_SED])dnl
2646 AC_CACHE_CHECK([$1], [$2],
2648 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2649 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2650 lt_compiler_flag="$3"
2651 # Insert the option either (1) after the last *FLAGS variable, or
2652 # (2) before a word containing "conftest.", or (3) at the end.
2653 # Note that $ac_compile itself does not contain backslashes and begins
2654 # with a dollar sign (not a hyphen), so the echo should work correctly.
2655 # The option is referenced via a variable to avoid confusing sed.
2656 lt_compile=`echo "$ac_compile" | $SED \
2657 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2658 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2659 -e 's:$: $lt_compiler_flag:'`
2660 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2661 (eval "$lt_compile" 2>conftest.err)
2663 cat conftest.err >&AS_MESSAGE_LOG_FD
2664 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2665 if (exit $ac_status) && test -s "$ac_outfile"; then
2666 # The compiler can only warn and ignore the option if not recognized
2667 # So say no if there are warnings other than the usual output.
2668 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2669 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2670 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2677 if test x"[$]$2" = xyes; then
2678 m4_if([$5], , :, [$5])
2680 m4_if([$6], , :, [$6])
2682 ])# _LT_COMPILER_OPTION
2685 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2686 dnl aclocal-1.4 backwards compatibility:
2687 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2690 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2691 # [ACTION-SUCCESS], [ACTION-FAILURE])
2692 # ----------------------------------------------------
2693 # Check whether the given linker option works
2694 AC_DEFUN([_LT_LINKER_OPTION],
2695 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2696 m4_require([_LT_DECL_SED])dnl
2697 AC_CACHE_CHECK([$1], [$2],
2699 save_LDFLAGS="$LDFLAGS"
2700 LDFLAGS="$LDFLAGS $3"
2701 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2702 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2703 # The linker can only warn and ignore the option if not recognized
2704 # So say no if there are warnings
2705 if test -s conftest.err; then
2706 # Append any errors to the config.log.
2707 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2708 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2709 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2710 if diff conftest.exp conftest.er2 >/dev/null; then
2718 LDFLAGS="$save_LDFLAGS"
2721 if test x"[$]$2" = xyes; then
2722 m4_if([$4], , :, [$4])
2724 m4_if([$5], , :, [$5])
2726 ])# _LT_LINKER_OPTION
2729 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2730 dnl aclocal-1.4 backwards compatibility:
2731 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2736 AC_DEFUN([LT_CMD_MAX_LEN],
2737 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2738 # find the maximum length of command line arguments
2739 AC_MSG_CHECKING([the maximum length of command line arguments])
2740 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2746 # On DJGPP, this test can blow up pretty badly due to problems in libc
2747 # (any single argument exceeding 2000 bytes causes a buffer overrun
2748 # during glob expansion). Even if it were fixed, the result of this
2749 # check would be larger than it should be.
2750 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2754 # Under GNU Hurd, this test is not required because there is
2755 # no limit to the length of command line arguments.
2756 # Libtool will interpret -1 as no limit whatsoever
2757 lt_cv_sys_max_cmd_len=-1;
2760 cygwin* | mingw* | cegcc*)
2761 # On Win9x/ME, this test blows up -- it succeeds, but takes
2762 # about 5 minutes as the teststring grows exponentially.
2763 # Worse, since 9x/ME are not pre-emptively multitasking,
2764 # you end up with a "frozen" computer, even though with patience
2765 # the test eventually succeeds (with a max line length of 256k).
2766 # Instead, let's just punt: use the minimum linelength reported by
2767 # all of the supported platforms: 8192 (on NT/2K/XP).
2768 lt_cv_sys_max_cmd_len=8192;
2772 # On MiNT this can take a long time and run out of memory.
2773 lt_cv_sys_max_cmd_len=8192;
2777 # On AmigaOS with pdksh, this test takes hours, literally.
2778 # So we just punt and use a minimum line length of 8192.
2779 lt_cv_sys_max_cmd_len=8192;
2782 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2783 # This has been around since 386BSD, at least. Likely further.
2784 if test -x /sbin/sysctl; then
2785 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2786 elif test -x /usr/sbin/sysctl; then
2787 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2789 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2791 # And add a safety zone
2792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2797 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2798 lt_cv_sys_max_cmd_len=196608
2802 # The test takes a long time on OS/2.
2803 lt_cv_sys_max_cmd_len=8192
2807 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2808 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2809 # nice to cause kernel panics so lets avoid the loop below.
2810 # First set a reasonable default.
2811 lt_cv_sys_max_cmd_len=16384
2813 if test -x /sbin/sysconfig; then
2814 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2815 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2820 lt_cv_sys_max_cmd_len=102400
2822 sysv5* | sco5v6* | sysv4.2uw2*)
2823 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2824 if test -n "$kargmax"; then
2825 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2827 lt_cv_sys_max_cmd_len=32768
2831 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2832 if test -n "$lt_cv_sys_max_cmd_len"; then
2833 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2834 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2836 # Make teststring a little bigger before we do anything with it.
2837 # a 1K string should be a reasonable start.
2838 for i in 1 2 3 4 5 6 7 8 ; do
2839 teststring=$teststring$teststring
2841 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2842 # If test is not a shell built-in, we'll probably end up computing a
2843 # maximum length that is only half of the actual maximum length, but
2845 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2846 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2847 test $i != 17 # 1/2 MB should be enough
2850 teststring=$teststring$teststring
2852 # Only check the string length outside the loop.
2853 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2855 # Add a significant safety factor because C++ compilers can tack on
2856 # massive amounts of additional arguments before passing them to the
2857 # linker. It appears as though 1/2 is a usable value.
2858 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2863 if test -n $lt_cv_sys_max_cmd_len ; then
2864 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2868 max_cmd_len=$lt_cv_sys_max_cmd_len
2869 _LT_DECL([], [max_cmd_len], [0],
2870 [What is the maximum length of a command?])
2874 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2875 dnl aclocal-1.4 backwards compatibility:
2876 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2881 m4_defun([_LT_HEADER_DLFCN],
2882 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2883 ])# _LT_HEADER_DLFCN
2886 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2887 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2888 # ----------------------------------------------------------------
2889 m4_defun([_LT_TRY_DLOPEN_SELF],
2890 [m4_require([_LT_HEADER_DLFCN])dnl
2891 if test "$cross_compiling" = yes; then :
2894 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2895 lt_status=$lt_dlunknown
2896 cat > conftest.$ac_ext <<_LT_EOF
2897 [#line $LINENO "configure"
2898 #include "confdefs.h"
2907 # define LT_DLGLOBAL RTLD_GLOBAL
2910 # define LT_DLGLOBAL DL_GLOBAL
2912 # define LT_DLGLOBAL 0
2916 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2917 find out it does not work in some platform. */
2918 #ifndef LT_DLLAZY_OR_NOW
2920 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2923 # define LT_DLLAZY_OR_NOW DL_LAZY
2926 # define LT_DLLAZY_OR_NOW RTLD_NOW
2929 # define LT_DLLAZY_OR_NOW DL_NOW
2931 # define LT_DLLAZY_OR_NOW 0
2938 /* When -fvisbility=hidden is used, assume the code has been annotated
2939 correspondingly for the symbols needed. */
2940 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2941 int fnord () __attribute__((visibility("default")));
2944 int fnord () { return 42; }
2947 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2948 int status = $lt_dlunknown;
2952 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2955 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2956 else puts (dlerror ());
2958 /* dlclose (self); */
2966 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2967 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2970 x$lt_dlno_uscore) $1 ;;
2971 x$lt_dlneed_uscore) $2 ;;
2972 x$lt_dlunknown|x*) $3 ;;
2975 # compilation failed
2980 ])# _LT_TRY_DLOPEN_SELF
2983 # LT_SYS_DLOPEN_SELF
2984 # ------------------
2985 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2986 [m4_require([_LT_HEADER_DLFCN])dnl
2987 if test "x$enable_dlopen" != xyes; then
2988 enable_dlopen=unknown
2989 enable_dlopen_self=unknown
2990 enable_dlopen_self_static=unknown
2997 lt_cv_dlopen="load_add_on"
2999 lt_cv_dlopen_self=yes
3002 mingw* | pw32* | cegcc*)
3003 lt_cv_dlopen="LoadLibrary"
3008 lt_cv_dlopen="dlopen"
3013 # if libdl is installed we need to link against it
3014 AC_CHECK_LIB([dl], [dlopen],
3015 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3018 lt_cv_dlopen_self=yes
3023 AC_CHECK_FUNC([shl_load],
3024 [lt_cv_dlopen="shl_load"],
3025 [AC_CHECK_LIB([dld], [shl_load],
3026 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3027 [AC_CHECK_FUNC([dlopen],
3028 [lt_cv_dlopen="dlopen"],
3029 [AC_CHECK_LIB([dl], [dlopen],
3030 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3031 [AC_CHECK_LIB([svld], [dlopen],
3032 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3033 [AC_CHECK_LIB([dld], [dld_link],
3034 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3043 if test "x$lt_cv_dlopen" != xno; then
3049 case $lt_cv_dlopen in
3051 save_CPPFLAGS="$CPPFLAGS"
3052 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3054 save_LDFLAGS="$LDFLAGS"
3055 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3058 LIBS="$lt_cv_dlopen_libs $LIBS"
3060 AC_CACHE_CHECK([whether a program can dlopen itself],
3061 lt_cv_dlopen_self, [dnl
3062 _LT_TRY_DLOPEN_SELF(
3063 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3064 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3067 if test "x$lt_cv_dlopen_self" = xyes; then
3068 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3069 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3070 lt_cv_dlopen_self_static, [dnl
3071 _LT_TRY_DLOPEN_SELF(
3072 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3073 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3077 CPPFLAGS="$save_CPPFLAGS"
3078 LDFLAGS="$save_LDFLAGS"
3083 case $lt_cv_dlopen_self in
3084 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3085 *) enable_dlopen_self=unknown ;;
3088 case $lt_cv_dlopen_self_static in
3089 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3090 *) enable_dlopen_self_static=unknown ;;
3093 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3094 [Whether dlopen is supported])
3095 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3096 [Whether dlopen of programs is supported])
3097 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3098 [Whether dlopen of statically linked programs is supported])
3099 ])# LT_SYS_DLOPEN_SELF
3102 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3103 dnl aclocal-1.4 backwards compatibility:
3104 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3107 # _LT_COMPILER_C_O([TAGNAME])
3108 # ---------------------------
3109 # Check to see if options -c and -o are simultaneously supported by compiler.
3110 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3111 m4_defun([_LT_COMPILER_C_O],
3112 [m4_require([_LT_DECL_SED])dnl
3113 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3114 m4_require([_LT_TAG_COMPILER])dnl
3115 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3116 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3117 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3118 $RM -r conftest 2>/dev/null
3122 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3124 lt_compiler_flag="-o out/conftest2.$ac_objext"
3125 # Insert the option either (1) after the last *FLAGS variable, or
3126 # (2) before a word containing "conftest.", or (3) at the end.
3127 # Note that $ac_compile itself does not contain backslashes and begins
3128 # with a dollar sign (not a hyphen), so the echo should work correctly.
3129 lt_compile=`echo "$ac_compile" | $SED \
3130 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3131 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3132 -e 's:$: $lt_compiler_flag:'`
3133 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3134 (eval "$lt_compile" 2>out/conftest.err)
3136 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3137 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3138 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3140 # The compiler can only warn and ignore the option if not recognized
3141 # So say no if there are warnings
3142 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3143 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3144 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3145 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3148 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3150 # SGI C++ compiler will create directory out/ii_files/ for
3151 # template instantiation
3152 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3153 $RM out/* && rmdir out
3158 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3159 [Does compiler simultaneously support -c and -o options?])
3160 ])# _LT_COMPILER_C_O
3163 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3164 # ----------------------------------
3165 # Check to see if we can do hard links to lock some files if needed
3166 m4_defun([_LT_COMPILER_FILE_LOCKS],
3167 [m4_require([_LT_ENABLE_LOCK])dnl
3168 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3169 _LT_COMPILER_C_O([$1])
3171 hard_links="nottested"
3172 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3173 # do not overwrite the value of need_locks provided by the user
3174 AC_MSG_CHECKING([if we can lock with hard links])
3177 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3179 ln conftest.a conftest.b 2>&5 || hard_links=no
3180 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3181 AC_MSG_RESULT([$hard_links])
3182 if test "$hard_links" = no; then
3183 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3189 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3190 ])# _LT_COMPILER_FILE_LOCKS
3195 m4_defun([_LT_CHECK_OBJDIR],
3196 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3197 [rm -f .libs 2>/dev/null
3198 mkdir .libs 2>/dev/null
3199 if test -d .libs; then
3202 # MS-DOS does not allow filenames that begin with a dot.
3205 rmdir .libs 2>/dev/null])
3206 objdir=$lt_cv_objdir
3207 _LT_DECL([], [objdir], [0],
3208 [The name of the directory that contains temporary libtool files])dnl
3209 m4_pattern_allow([LT_OBJDIR])dnl
3210 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3211 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3212 ])# _LT_CHECK_OBJDIR
3215 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3216 # --------------------------------------
3217 # Check hardcoding attributes.
3218 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3219 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3220 _LT_TAGVAR(hardcode_action, $1)=
3221 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3222 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3223 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3225 # We can hardcode non-existent directories.
3226 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3227 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3228 # have to relink, otherwise we might link with an installed library
3229 # when we should be linking with a yet-to-be-installed one
3230 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3231 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3232 # Linking always hardcodes the temporary library directory.
3233 _LT_TAGVAR(hardcode_action, $1)=relink
3235 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3236 _LT_TAGVAR(hardcode_action, $1)=immediate
3239 # We cannot hardcode anything, or else we can only hardcode existing
3241 _LT_TAGVAR(hardcode_action, $1)=unsupported
3243 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3245 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3246 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3247 # Fast installation is not supported
3248 enable_fast_install=no
3249 elif test "$shlibpath_overrides_runpath" = yes ||
3250 test "$enable_shared" = no; then
3251 # Fast installation is not necessary
3252 enable_fast_install=needless
3254 _LT_TAGDECL([], [hardcode_action], [0],
3255 [How to hardcode a shared library path into an executable])
3256 ])# _LT_LINKER_HARDCODE_LIBPATH
3261 m4_defun([_LT_CMD_STRIPLIB],
3262 [m4_require([_LT_DECL_EGREP])
3265 AC_MSG_CHECKING([whether stripping libraries is possible])
3266 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3267 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3268 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3269 AC_MSG_RESULT([yes])
3271 # FIXME - insert some real tests, host_os isn't really good enough
3274 if test -n "$STRIP" ; then
3275 striplib="$STRIP -x"
3276 old_striplib="$STRIP -S"
3277 AC_MSG_RESULT([yes])
3287 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3288 _LT_DECL([], [striplib], [1])
3289 ])# _LT_CMD_STRIPLIB
3292 # _LT_SYS_DYNAMIC_LINKER([TAG])
3293 # -----------------------------
3294 # PORTME Fill in your ld.so characteristics
3295 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3296 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3297 m4_require([_LT_DECL_EGREP])dnl
3298 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3299 m4_require([_LT_DECL_OBJDUMP])dnl
3300 m4_require([_LT_DECL_SED])dnl
3301 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3302 AC_MSG_CHECKING([dynamic linker characteristics])
3305 if test "$GCC" = yes; then
3307 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3308 *) lt_awk_arg="/^libraries:/" ;;
3311 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3312 *) lt_sed_strip_eq="s,=/,/,g" ;;
3314 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3315 case $lt_search_path_spec in
3317 # if the path contains ";" then we assume it to be the separator
3318 # otherwise default to the standard path separator (i.e. ":") - it is
3319 # assumed that no part of a normal pathname contains ";" but that should
3320 # okay in the real world where ";" in dirpaths is itself problematic.
3321 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3324 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3327 # Ok, now we have the path, separated by spaces, we can step through it
3328 # and add multilib dir if necessary.
3329 lt_tmp_lt_search_path_spec=
3330 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3331 for lt_sys_path in $lt_search_path_spec; do
3332 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3333 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3335 test -d "$lt_sys_path" && \
3336 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3339 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3340 BEGIN {RS=" "; FS="/|\n";} {
3343 for (lt_i = NF; lt_i > 0; lt_i--) {
3344 if ($lt_i != "" && $lt_i != ".") {
3345 if ($lt_i == "..") {
3348 if (lt_count == 0) {
3349 lt_foo="/" $lt_i lt_foo;
3356 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3357 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3359 # AWK program above erroneously prepends '/' to C:/dos/paths
3362 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3363 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3365 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3367 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3370 libname_spec='lib$name'
3378 shlibpath_overrides_runpath=unknown
3380 dynamic_linker="$host_os ld.so"
3381 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3382 need_lib_prefix=unknown
3383 hardcode_into_libs=no
3385 # when you set need_version to no, make sure it does not cause -set_version
3386 # flags to be left without arguments
3387 need_version=unknown
3391 version_type=linux # correct to gnu/linux during the next big refactor
3392 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3393 shlibpath_var=LIBPATH
3395 # AIX 3 has no versioning support, so we append a major version to the name.
3396 soname_spec='${libname}${release}${shared_ext}$major'
3400 version_type=linux # correct to gnu/linux during the next big refactor
3403 hardcode_into_libs=yes
3404 if test "$host_cpu" = ia64; then
3405 # AIX 5 supports IA64
3406 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3407 shlibpath_var=LD_LIBRARY_PATH
3409 # With GCC up to 2.95.x, collect2 would create an import file
3410 # for dependence libraries. The import file would start with
3411 # the line `#! .'. This would cause the generated library to
3412 # depend on `.', always an invalid library. This was fixed in
3413 # development snapshots of GCC prior to 3.0.
3415 aix4 | aix4.[[01]] | aix4.[[01]].*)
3416 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3418 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3425 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3426 # soname into executable. Probably we can add versioning support to
3427 # collect2, so additional links can be useful in future.
3428 if test "$aix_use_runtimelinking" = yes; then
3429 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3430 # instead of lib<name>.a to let people know that these are not
3431 # typical AIX shared libraries.
3432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3434 # We preserve .a as extension for shared libraries through AIX4.2
3435 # and later when we are not doing run time linking.
3436 library_names_spec='${libname}${release}.a $libname.a'
3437 soname_spec='${libname}${release}${shared_ext}$major'
3439 shlibpath_var=LIBPATH
3446 # Since July 2007 AmigaOS4 officially supports .so libraries.
3447 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3448 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3451 library_names_spec='$libname.ixlibrary $libname.a'
3452 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3453 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'
3459 library_names_spec='${libname}${shared_ext}'
3460 dynamic_linker="$host_os ld.so"
3461 shlibpath_var=LIBRARY_PATH
3465 version_type=linux # correct to gnu/linux during the next big refactor
3467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3468 soname_spec='${libname}${release}${shared_ext}$major'
3469 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3470 shlibpath_var=LD_LIBRARY_PATH
3471 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3472 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3473 # the default ld.so.conf also contains /usr/contrib/lib and
3474 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3475 # libtool to hard-code these into programs
3478 cygwin* | mingw* | pw32* | cegcc*)
3479 version_type=windows
3484 case $GCC,$cc_basename in
3487 library_names_spec='$libname.dll.a'
3488 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3489 postinstall_cmds='base_file=`basename \${file}`~
3490 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3491 dldir=$destdir/`dirname \$dlpath`~
3492 test -d \$dldir || mkdir -p \$dldir~
3493 $install_prog $dir/$dlname \$dldir/$dlname~
3494 chmod a+x \$dldir/$dlname~
3495 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3496 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3498 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3499 dlpath=$dir/\$dldll~
3501 shlibpath_overrides_runpath=yes
3505 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3506 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3508 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3511 # MinGW DLLs use traditional 'lib' prefix
3512 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3515 # pw32 DLLs use 'pw' prefix rather than 'lib'
3516 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3519 dynamic_linker='Win32 ld.exe'
3524 libname_spec='$name'
3525 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3526 library_names_spec='${libname}.dll.lib'
3530 sys_lib_search_path_spec=
3536 # Let DOS variable expansion print the short 8.3 style file name.
3537 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3538 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3541 # Convert to MSYS style.
3542 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3545 # Convert to unix form, then to dos form, then back to unix form
3546 # but this time dos style (no spaces!) so that the unix form looks
3547 # like /cygdrive/c/PROGRA~1:/cygdr...
3548 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3549 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3550 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3553 sys_lib_search_path_spec="$LIB"
3554 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3555 # It is most probably a Windows format PATH.
3556 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3558 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3560 # FIXME: find the short name or the path components, as spaces are
3561 # common. (e.g. "Program Files" -> "PROGRA~1")
3565 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3566 postinstall_cmds='base_file=`basename \${file}`~
3567 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3568 dldir=$destdir/`dirname \$dlpath`~
3569 test -d \$dldir || mkdir -p \$dldir~
3570 $install_prog $dir/$dlname \$dldir/$dlname'
3571 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3572 dlpath=$dir/\$dldll~
3574 shlibpath_overrides_runpath=yes
3575 dynamic_linker='Win32 link.exe'
3579 # Assume MSVC wrapper
3580 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3581 dynamic_linker='Win32 ld.exe'
3584 # FIXME: first we should search . and the directory the executable is in
3588 darwin* | rhapsody*)
3589 dynamic_linker="$host_os dyld"
3593 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3594 soname_spec='${libname}${release}${major}$shared_ext'
3595 shlibpath_overrides_runpath=yes
3596 shlibpath_var=DYLD_LIBRARY_PATH
3597 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3599 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3600 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3604 version_type=linux # correct to gnu/linux during the next big refactor
3607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3608 soname_spec='${libname}${release}${shared_ext}$major'
3609 shlibpath_var=LD_LIBRARY_PATH
3612 freebsd* | dragonfly*)
3613 # DragonFly does not have aout. When/if they implement a new
3614 # versioning mechanism, adjust this.
3615 if test -x /usr/bin/objformat; then
3616 objformat=`/usr/bin/objformat`
3619 freebsd[[23]].*) objformat=aout ;;
3623 version_type=freebsd-$objformat
3624 case $version_type in
3626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3631 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3635 shlibpath_var=LD_LIBRARY_PATH
3638 shlibpath_overrides_runpath=yes
3640 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3641 shlibpath_overrides_runpath=yes
3642 hardcode_into_libs=yes
3644 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3645 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3646 shlibpath_overrides_runpath=no
3647 hardcode_into_libs=yes
3649 *) # from 4.6 on, and DragonFly
3650 shlibpath_overrides_runpath=yes
3651 hardcode_into_libs=yes
3657 version_type=linux # correct to gnu/linux during the next big refactor
3660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3661 soname_spec='${libname}${release}${shared_ext}$major'
3662 shlibpath_var=LD_LIBRARY_PATH
3663 shlibpath_overrides_runpath=no
3664 hardcode_into_libs=yes
3668 version_type=linux # correct to gnu/linux during the next big refactor
3671 dynamic_linker="$host_os runtime_loader"
3672 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3673 soname_spec='${libname}${release}${shared_ext}$major'
3674 shlibpath_var=LIBRARY_PATH
3675 shlibpath_overrides_runpath=yes
3676 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3677 hardcode_into_libs=yes
3680 hpux9* | hpux10* | hpux11*)
3681 # Give a soname corresponding to the major version so that dld.sl refuses to
3682 # link against other versions.
3689 hardcode_into_libs=yes
3690 dynamic_linker="$host_os dld.so"
3691 shlibpath_var=LD_LIBRARY_PATH
3692 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3694 soname_spec='${libname}${release}${shared_ext}$major'
3695 if test "X$HPUX_IA64_MODE" = X32; then
3696 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3698 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3700 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3704 hardcode_into_libs=yes
3705 dynamic_linker="$host_os dld.sl"
3706 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3707 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3709 soname_spec='${libname}${release}${shared_ext}$major'
3710 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3711 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3715 dynamic_linker="$host_os dld.sl"
3716 shlibpath_var=SHLIB_PATH
3717 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3719 soname_spec='${libname}${release}${shared_ext}$major'
3722 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3723 postinstall_cmds='chmod 555 $lib'
3724 # or fails outright, so override atomically:
3725 install_override_mode=555
3729 version_type=linux # correct to gnu/linux during the next big refactor
3732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3733 soname_spec='${libname}${release}${shared_ext}$major'
3734 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3735 shlibpath_var=LD_LIBRARY_PATH
3736 shlibpath_overrides_runpath=no
3737 hardcode_into_libs=yes
3740 irix5* | irix6* | nonstopux*)
3742 nonstopux*) version_type=nonstopux ;;
3744 if test "$lt_cv_prog_gnu_ld" = yes; then
3745 version_type=linux # correct to gnu/linux during the next big refactor
3752 soname_spec='${libname}${release}${shared_ext}$major'
3753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3755 irix5* | nonstopux*)
3759 case $LD in # libtool.m4 will add one of these switches to LD
3760 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3761 libsuff= shlibsuff= libmagic=32-bit;;
3762 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3763 libsuff=32 shlibsuff=N32 libmagic=N32;;
3764 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3765 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3766 *) libsuff= shlibsuff= libmagic=never-match;;
3770 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3771 shlibpath_overrides_runpath=no
3772 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3773 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3774 hardcode_into_libs=yes
3777 # No shared lib support for Linux oldld, aout, or coff.
3778 linux*oldld* | linux*aout* | linux*coff*)
3782 # This must be glibc/ELF.
3783 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3784 version_type=linux # correct to gnu/linux during the next big refactor
3787 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3788 soname_spec='${libname}${release}${shared_ext}$major'
3789 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3790 shlibpath_var=LD_LIBRARY_PATH
3791 shlibpath_overrides_runpath=no
3793 # Some binutils ld are patched to set DT_RUNPATH
3794 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3795 [lt_cv_shlibpath_overrides_runpath=no
3796 save_LDFLAGS=$LDFLAGS
3798 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3799 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3800 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3801 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3802 [lt_cv_shlibpath_overrides_runpath=yes])])
3803 LDFLAGS=$save_LDFLAGS
3806 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3808 # This implies no fast_install, which is unacceptable.
3809 # Some rework will be needed to allow for fast_install
3810 # before this can be enabled.
3811 hardcode_into_libs=yes
3813 # Append ld.so.conf contents to the search path
3814 if test -f /etc/ld.so.conf; then
3815 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' ' '`
3816 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3819 # We used to test for /lib/ld.so.1 and disable shared libraries on
3820 # powerpc, because MkLinux only supported shared libraries with the
3821 # GNU dynamic linker. Since this was broken with cross compilers,
3822 # most powerpc-linux boxes support dynamic linking these days and
3823 # people can always --disable-shared, the test was removed, and we
3824 # assume the GNU/Linux dynamic linker is in use.
3825 dynamic_linker='GNU/Linux ld.so'
3832 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3833 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3834 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3835 dynamic_linker='NetBSD (a.out) ld.so'
3837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3838 soname_spec='${libname}${release}${shared_ext}$major'
3839 dynamic_linker='NetBSD ld.elf_so'
3841 shlibpath_var=LD_LIBRARY_PATH
3842 shlibpath_overrides_runpath=yes
3843 hardcode_into_libs=yes
3847 version_type=linux # correct to gnu/linux during the next big refactor
3848 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3849 shlibpath_var=LD_LIBRARY_PATH
3850 shlibpath_overrides_runpath=yes
3857 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3858 soname_spec='${libname}${release}${shared_ext}$major'
3859 shlibpath_var=LD_LIBRARY_PATH
3860 shlibpath_overrides_runpath=no
3861 hardcode_into_libs=yes
3862 dynamic_linker='ldqnx.so'
3867 sys_lib_dlsearch_path_spec="/usr/lib"
3869 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3871 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3872 *) need_version=no ;;
3874 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3875 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3876 shlibpath_var=LD_LIBRARY_PATH
3877 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3879 openbsd2.[[89]] | openbsd2.[[89]].*)
3880 shlibpath_overrides_runpath=no
3883 shlibpath_overrides_runpath=yes
3887 shlibpath_overrides_runpath=yes
3892 libname_spec='$name'
3895 library_names_spec='$libname${shared_ext} $libname.a'
3896 dynamic_linker='OS/2 ld.exe'
3897 shlibpath_var=LIBPATH
3900 osf3* | osf4* | osf5*)
3904 soname_spec='${libname}${release}${shared_ext}$major'
3905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3906 shlibpath_var=LD_LIBRARY_PATH
3907 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3908 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3916 version_type=linux # correct to gnu/linux during the next big refactor
3919 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3920 soname_spec='${libname}${release}${shared_ext}$major'
3921 shlibpath_var=LD_LIBRARY_PATH
3922 shlibpath_overrides_runpath=yes
3923 hardcode_into_libs=yes
3924 # ldd complains unless libraries are executable
3925 postinstall_cmds='chmod +x $lib'
3930 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3931 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3932 shlibpath_var=LD_LIBRARY_PATH
3933 shlibpath_overrides_runpath=yes
3934 if test "$with_gnu_ld" = yes; then
3941 version_type=linux # correct to gnu/linux during the next big refactor
3942 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3943 soname_spec='${libname}${release}${shared_ext}$major'
3944 shlibpath_var=LD_LIBRARY_PATH
3945 case $host_vendor in
3947 shlibpath_overrides_runpath=no
3949 runpath_var=LD_RUN_PATH
3957 shlibpath_overrides_runpath=no
3958 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3964 if test -d /usr/nec ;then
3965 version_type=linux # correct to gnu/linux during the next big refactor
3966 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3967 soname_spec='$libname${shared_ext}.$major'
3968 shlibpath_var=LD_LIBRARY_PATH
3972 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3973 version_type=freebsd-elf
3976 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3977 soname_spec='${libname}${release}${shared_ext}$major'
3978 shlibpath_var=LD_LIBRARY_PATH
3979 shlibpath_overrides_runpath=yes
3980 hardcode_into_libs=yes
3981 if test "$with_gnu_ld" = yes; then
3982 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3984 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3987 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3991 sys_lib_dlsearch_path_spec='/usr/lib'
3995 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3996 version_type=linux # correct to gnu/linux during the next big refactor
3999 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4000 shlibpath_var=LD_LIBRARY_PATH
4001 shlibpath_overrides_runpath=no
4002 hardcode_into_libs=yes
4006 version_type=linux # correct to gnu/linux during the next big refactor
4007 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4008 soname_spec='${libname}${release}${shared_ext}$major'
4009 shlibpath_var=LD_LIBRARY_PATH
4016 AC_MSG_RESULT([$dynamic_linker])
4017 test "$dynamic_linker" = no && can_build_shared=no
4019 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4020 if test "$GCC" = yes; then
4021 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4024 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4025 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4027 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4028 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4031 _LT_DECL([], [variables_saved_for_relink], [1],
4032 [Variables whose values should be saved in libtool wrapper scripts and
4033 restored at link time])
4034 _LT_DECL([], [need_lib_prefix], [0],
4035 [Do we need the "lib" prefix for modules?])
4036 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4037 _LT_DECL([], [version_type], [0], [Library versioning type])
4038 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4039 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4040 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4041 [Is shlibpath searched before the hard-coded library search path?])
4042 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4043 _LT_DECL([], [library_names_spec], [1],
4044 [[List of archive names. First name is the real one, the rest are links.
4045 The last name is the one that the linker finds with -lNAME]])
4046 _LT_DECL([], [soname_spec], [1],
4047 [[The coded name of the library, if different from the real name]])
4048 _LT_DECL([], [install_override_mode], [1],
4049 [Permission mode override for installation of shared libraries])
4050 _LT_DECL([], [postinstall_cmds], [2],
4051 [Command to use after installation of a shared archive])
4052 _LT_DECL([], [postuninstall_cmds], [2],
4053 [Command to use after uninstallation of a shared archive])
4054 _LT_DECL([], [finish_cmds], [2],
4055 [Commands used to finish a libtool library installation in a directory])
4056 _LT_DECL([], [finish_eval], [1],
4057 [[As "finish_cmds", except a single script fragment to be evaled but
4059 _LT_DECL([], [hardcode_into_libs], [0],
4060 [Whether we should hardcode library paths into libraries])
4061 _LT_DECL([], [sys_lib_search_path_spec], [2],
4062 [Compile-time system search path for libraries])
4063 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4064 [Run-time system search path for libraries])
4065 ])# _LT_SYS_DYNAMIC_LINKER
4068 # _LT_PATH_TOOL_PREFIX(TOOL)
4069 # --------------------------
4070 # find a file program which can recognize shared library
4071 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4072 [m4_require([_LT_DECL_EGREP])dnl
4073 AC_MSG_CHECKING([for $1])
4074 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4076 [[\\/*] | ?:[\\/]*])
4077 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4080 lt_save_MAGIC_CMD="$MAGIC_CMD"
4081 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4082 dnl $ac_dummy forces splitting on constant user-supplied paths.
4083 dnl POSIX.2 word splitting is done only on the output of word expansions,
4084 dnl not every word. This closes a longstanding sh security hole.
4085 ac_dummy="m4_if([$2], , $PATH, [$2])"
4086 for ac_dir in $ac_dummy; do
4088 test -z "$ac_dir" && ac_dir=.
4089 if test -f $ac_dir/$1; then
4090 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4091 if test -n "$file_magic_test_file"; then
4092 case $deplibs_check_method in
4094 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4095 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4096 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4097 $EGREP "$file_magic_regex" > /dev/null; then
4102 *** Warning: the command libtool uses to detect shared libraries,
4103 *** $file_magic_cmd, produces output that libtool cannot recognize.
4104 *** The result is that libtool may fail to recognize shared libraries
4105 *** as such. This will affect the creation of libtool libraries that
4106 *** depend on shared libraries, but programs linked with such libtool
4107 *** libraries will work regardless of this problem. Nevertheless, you
4108 *** may want to report the problem to your system manager and/or to
4109 *** bug-libtool@gnu.org
4119 MAGIC_CMD="$lt_save_MAGIC_CMD"
4122 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4123 if test -n "$MAGIC_CMD"; then
4124 AC_MSG_RESULT($MAGIC_CMD)
4128 _LT_DECL([], [MAGIC_CMD], [0],
4129 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4130 ])# _LT_PATH_TOOL_PREFIX
4133 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4134 dnl aclocal-1.4 backwards compatibility:
4135 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4140 # find a file program which can recognize a shared library
4141 m4_defun([_LT_PATH_MAGIC],
4142 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4143 if test -z "$lt_cv_path_MAGIC_CMD"; then
4144 if test -n "$ac_tool_prefix"; then
4145 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4155 # find the pathname to the GNU or non-GNU linker
4156 AC_DEFUN([LT_PATH_LD],
4157 [AC_REQUIRE([AC_PROG_CC])dnl
4158 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4159 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4160 m4_require([_LT_DECL_SED])dnl
4161 m4_require([_LT_DECL_EGREP])dnl
4162 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4164 AC_ARG_WITH([gnu-ld],
4165 [AS_HELP_STRING([--with-gnu-ld],
4166 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4167 [test "$withval" = no || with_gnu_ld=yes],
4168 [with_gnu_ld=no])dnl
4171 if test "$GCC" = yes; then
4172 # Check if gcc -print-prog-name=ld gives a path.
4173 AC_MSG_CHECKING([for ld used by $CC])
4176 # gcc leaves a trailing carriage return which upsets mingw
4177 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4179 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4182 # Accept absolute paths.
4183 [[\\/]]* | ?:[[\\/]]*)
4184 re_direlt='/[[^/]][[^/]]*/\.\./'
4185 # Canonicalize the pathname of ld
4186 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4187 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4188 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4190 test -z "$LD" && LD="$ac_prog"
4193 # If it fails, then pretend we aren't using GCC.
4197 # If it is relative, then search for the first ld in PATH.
4201 elif test "$with_gnu_ld" = yes; then
4202 AC_MSG_CHECKING([for GNU ld])
4204 AC_MSG_CHECKING([for non-GNU ld])
4206 AC_CACHE_VAL(lt_cv_path_LD,
4207 [if test -z "$LD"; then
4208 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4209 for ac_dir in $PATH; do
4211 test -z "$ac_dir" && ac_dir=.
4212 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4213 lt_cv_path_LD="$ac_dir/$ac_prog"
4214 # Check to see if the program is GNU ld. I'd rather use --version,
4215 # but apparently some variants of GNU ld only accept -v.
4216 # Break only if it was the GNU/non-GNU ld that we prefer.
4217 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4218 *GNU* | *'with BFD'*)
4219 test "$with_gnu_ld" != no && break
4222 test "$with_gnu_ld" != yes && break
4229 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4232 if test -n "$LD"; then
4237 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4241 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4245 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4246 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4247 dnl aclocal-1.4 backwards compatibility:
4248 dnl AC_DEFUN([AM_PROG_LD], [])
4249 dnl AC_DEFUN([AC_PROG_LD], [])
4254 m4_defun([_LT_PATH_LD_GNU],
4255 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4256 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4257 case `$LD -v 2>&1 </dev/null` in
4258 *GNU* | *'with BFD'*)
4259 lt_cv_prog_gnu_ld=yes
4262 lt_cv_prog_gnu_ld=no
4265 with_gnu_ld=$lt_cv_prog_gnu_ld
4271 # find reload flag for linker
4272 # -- PORTME Some linkers may need a different reload flag.
4273 m4_defun([_LT_CMD_RELOAD],
4274 [AC_CACHE_CHECK([for $LD option to reload object files],
4275 lt_cv_ld_reload_flag,
4276 [lt_cv_ld_reload_flag='-r'])
4277 reload_flag=$lt_cv_ld_reload_flag
4278 case $reload_flag in
4280 *) reload_flag=" $reload_flag" ;;
4282 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4284 cygwin* | mingw* | pw32* | cegcc*)
4285 if test "$GCC" != yes; then
4290 if test "$GCC" = yes; then
4291 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4293 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4297 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4298 _LT_TAGDECL([], [reload_cmds], [2])dnl
4302 # _LT_CHECK_MAGIC_METHOD
4303 # ----------------------
4304 # how to check for library dependencies
4305 # -- PORTME fill in with the dynamic library characteristics
4306 m4_defun([_LT_CHECK_MAGIC_METHOD],
4307 [m4_require([_LT_DECL_EGREP])
4308 m4_require([_LT_DECL_OBJDUMP])
4309 AC_CACHE_CHECK([how to recognize dependent libraries],
4310 lt_cv_deplibs_check_method,
4311 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4312 lt_cv_file_magic_test_file=
4313 lt_cv_deplibs_check_method='unknown'
4314 # Need to set the preceding variable on all platforms that support
4315 # interlibrary dependencies.
4316 # 'none' -- dependencies not supported.
4317 # `unknown' -- same as none, but documents that we really don't know.
4318 # 'pass_all' -- all dependencies passed with no checks.
4319 # 'test_compile' -- check by making test program.
4320 # 'file_magic [[regex]]' -- check by looking for files in library path
4321 # which responds to the $file_magic_cmd with a given extended regex.
4322 # If you have `file' or equivalent on your system and you're not sure
4323 # whether `pass_all' will *always* work, you probably want this one.
4327 lt_cv_deplibs_check_method=pass_all
4331 lt_cv_deplibs_check_method=pass_all
4335 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4336 lt_cv_file_magic_cmd='/usr/bin/file -L'
4337 lt_cv_file_magic_test_file=/shlib/libc.so
4341 # func_win32_libid is a shell function defined in ltmain.sh
4342 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4343 lt_cv_file_magic_cmd='func_win32_libid'
4347 # Base MSYS/MinGW do not provide the 'file' command needed by
4348 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4349 # unless we find 'file', for example because we are cross-compiling.
4350 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4351 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4352 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4353 lt_cv_file_magic_cmd='func_win32_libid'
4355 # Keep this pattern in sync with the one in func_win32_libid.
4356 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4357 lt_cv_file_magic_cmd='$OBJDUMP -f'
4362 # use the weaker test based on 'objdump'. See mingw*.
4363 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4364 lt_cv_file_magic_cmd='$OBJDUMP -f'
4367 darwin* | rhapsody*)
4368 lt_cv_deplibs_check_method=pass_all
4371 freebsd* | dragonfly*)
4372 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4375 # Not sure whether the presence of OpenBSD here was a mistake.
4376 # Let's accept both of them until this is cleared up.
4377 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4378 lt_cv_file_magic_cmd=/usr/bin/file
4379 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4383 lt_cv_deplibs_check_method=pass_all
4388 lt_cv_deplibs_check_method=pass_all
4392 lt_cv_deplibs_check_method=pass_all
4395 hpux10.20* | hpux11*)
4396 lt_cv_file_magic_cmd=/usr/bin/file
4399 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4400 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4403 [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]']
4404 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4407 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4408 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4414 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4415 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4418 irix5* | irix6* | nonstopux*)
4420 *-32|*"-32 ") libmagic=32-bit;;
4421 *-n32|*"-n32 ") libmagic=N32;;
4422 *-64|*"-64 ") libmagic=64-bit;;
4423 *) libmagic=never-match;;
4425 lt_cv_deplibs_check_method=pass_all
4428 # This must be glibc/ELF.
4429 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4430 lt_cv_deplibs_check_method=pass_all
4434 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4435 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4437 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4442 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4443 lt_cv_file_magic_cmd=/usr/bin/file
4444 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4448 lt_cv_deplibs_check_method=pass_all
4452 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4453 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4455 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4459 osf3* | osf4* | osf5*)
4460 lt_cv_deplibs_check_method=pass_all
4464 lt_cv_deplibs_check_method=pass_all
4468 lt_cv_deplibs_check_method=pass_all
4471 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4472 lt_cv_deplibs_check_method=pass_all
4476 case $host_vendor in
4478 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]]'
4479 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4482 lt_cv_deplibs_check_method=pass_all
4485 lt_cv_file_magic_cmd='/bin/file'
4486 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4489 lt_cv_file_magic_cmd='/bin/file'
4490 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4491 lt_cv_file_magic_test_file=/lib/libc.so
4494 lt_cv_deplibs_check_method=pass_all
4497 lt_cv_deplibs_check_method=pass_all
4503 lt_cv_deplibs_check_method=pass_all
4510 if test "$build" = "$host"; then
4513 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4516 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4522 file_magic_cmd=$lt_cv_file_magic_cmd
4523 deplibs_check_method=$lt_cv_deplibs_check_method
4524 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4526 _LT_DECL([], [deplibs_check_method], [1],
4527 [Method to check whether dependent libraries are shared objects])
4528 _LT_DECL([], [file_magic_cmd], [1],
4529 [Command to use when deplibs_check_method = "file_magic"])
4530 _LT_DECL([], [file_magic_glob], [1],
4531 [How to find potential files when deplibs_check_method = "file_magic"])
4532 _LT_DECL([], [want_nocaseglob], [1],
4533 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4534 ])# _LT_CHECK_MAGIC_METHOD
4539 # find the pathname to a BSD- or MS-compatible name lister
4540 AC_DEFUN([LT_PATH_NM],
4541 [AC_REQUIRE([AC_PROG_CC])dnl
4542 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4543 [if test -n "$NM"; then
4544 # Let the user override the test.
4547 lt_nm_to_check="${ac_tool_prefix}nm"
4548 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4549 lt_nm_to_check="$lt_nm_to_check nm"
4551 for lt_tmp_nm in $lt_nm_to_check; do
4552 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4553 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4555 test -z "$ac_dir" && ac_dir=.
4556 tmp_nm="$ac_dir/$lt_tmp_nm"
4557 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4558 # Check to see if the nm accepts a BSD-compat flag.
4559 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4560 # nm: unknown option "B" ignored
4561 # Tru64's nm complains that /dev/null is an invalid object file
4562 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4563 */dev/null* | *'Invalid file or object type'*)
4564 lt_cv_path_NM="$tmp_nm -B"
4568 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4570 lt_cv_path_NM="$tmp_nm -p"
4574 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4575 continue # so that we can try to find one that supports BSD flags
4584 : ${lt_cv_path_NM=no}
4586 if test "$lt_cv_path_NM" != "no"; then
4589 # Didn't find any BSD compatible name lister, look for dumpbin.
4590 if test -n "$DUMPBIN"; then :
4591 # Let the user override the test.
4593 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4594 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4596 DUMPBIN="$DUMPBIN -symbols"
4604 if test "$DUMPBIN" != ":"; then
4608 test -z "$NM" && NM=nm
4610 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4612 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4613 [lt_cv_nm_interface="BSD nm"
4614 echo "int some_variable = 0;" > conftest.$ac_ext
4615 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4616 (eval "$ac_compile" 2>conftest.err)
4617 cat conftest.err >&AS_MESSAGE_LOG_FD
4618 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4619 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4620 cat conftest.err >&AS_MESSAGE_LOG_FD
4621 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4622 cat conftest.out >&AS_MESSAGE_LOG_FD
4623 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4624 lt_cv_nm_interface="MS dumpbin"
4630 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4631 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4632 dnl aclocal-1.4 backwards compatibility:
4633 dnl AC_DEFUN([AM_PROG_NM], [])
4634 dnl AC_DEFUN([AC_PROG_NM], [])
4636 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4637 # --------------------------------
4638 # how to determine the name of the shared library
4639 # associated with a specific link library.
4640 # -- PORTME fill in with the dynamic library characteristics
4641 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4642 [m4_require([_LT_DECL_EGREP])
4643 m4_require([_LT_DECL_OBJDUMP])
4644 m4_require([_LT_DECL_DLLTOOL])
4645 AC_CACHE_CHECK([how to associate runtime and link libraries],
4646 lt_cv_sharedlib_from_linklib_cmd,
4647 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4650 cygwin* | mingw* | pw32* | cegcc*)
4651 # two different shell functions defined in ltmain.sh
4652 # decide which to use based on capabilities of $DLLTOOL
4653 case `$DLLTOOL --help 2>&1` in
4654 *--identify-strict*)
4655 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4658 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4663 # fallback: assume linklib IS sharedlib
4664 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4668 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4669 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4671 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4672 [Command to associate shared and link libraries])
4673 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4676 # _LT_PATH_MANIFEST_TOOL
4677 # ----------------------
4678 # locate the manifest tool
4679 m4_defun([_LT_PATH_MANIFEST_TOOL],
4680 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4681 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4682 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4683 [lt_cv_path_mainfest_tool=no
4684 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4685 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4686 cat conftest.err >&AS_MESSAGE_LOG_FD
4687 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4688 lt_cv_path_mainfest_tool=yes
4691 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4694 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4695 ])# _LT_PATH_MANIFEST_TOOL
4700 # check for math library
4701 AC_DEFUN([LT_LIB_M],
4702 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4705 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4706 # These system don't have libm, or don't need it
4709 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4710 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4713 AC_CHECK_LIB(m, cos, LIBM="-lm")
4720 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4721 dnl aclocal-1.4 backwards compatibility:
4722 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4725 # _LT_COMPILER_NO_RTTI([TAGNAME])
4726 # -------------------------------
4727 m4_defun([_LT_COMPILER_NO_RTTI],
4728 [m4_require([_LT_TAG_COMPILER])dnl
4730 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4732 if test "$GCC" = yes; then
4733 case $cc_basename in
4735 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4737 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4740 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4741 lt_cv_prog_compiler_rtti_exceptions,
4742 [-fno-rtti -fno-exceptions], [],
4743 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4745 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4746 [Compiler flag to turn off builtin functions])
4747 ])# _LT_COMPILER_NO_RTTI
4750 # _LT_CMD_GLOBAL_SYMBOLS
4751 # ----------------------
4752 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4753 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4754 AC_REQUIRE([AC_PROG_CC])dnl
4755 AC_REQUIRE([AC_PROG_AWK])dnl
4756 AC_REQUIRE([LT_PATH_NM])dnl
4757 AC_REQUIRE([LT_PATH_LD])dnl
4758 m4_require([_LT_DECL_SED])dnl
4759 m4_require([_LT_DECL_EGREP])dnl
4760 m4_require([_LT_TAG_COMPILER])dnl
4762 # Check for command to grab the raw symbol name followed by C symbol from nm.
4763 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4764 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4766 # These are sane defaults that work on at least a few old systems.
4767 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4769 # Character class describing NM global symbol codes.
4770 symcode='[[BCDEGRST]]'
4772 # Regexp to match symbols that can be accessed directly from C.
4773 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4775 # Define system-specific variables.
4780 cygwin* | mingw* | pw32* | cegcc*)
4781 symcode='[[ABCDGISTW]]'
4784 if test "$host_cpu" = ia64; then
4785 symcode='[[ABCDEGRST]]'
4789 symcode='[[BCDEGRST]]'
4792 symcode='[[BCDEGQRST]]'
4803 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4807 symcode='[[DFNSTU]]'
4811 # If we're using GNU nm, then use its standard symbol codes.
4812 case `$NM -V 2>&1` in
4813 *GNU* | *'with BFD'*)
4814 symcode='[[ABCDGIRSTW]]' ;;
4817 # Transform an extracted symbol line into a proper C declaration.
4818 # Some systems (esp. on ia64) link data and code symbols differently,
4819 # so use this general approach.
4820 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4822 # Transform an extracted symbol line into symbol name and symbol address
4823 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4824 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'"
4826 # Handle CRLF in mingw tool chain
4830 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4834 # Try without a prefix underscore, then with it.
4835 for ac_symprfx in "" "_"; do
4837 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4838 symxfrm="\\1 $ac_symprfx\\2 \\2"
4840 # Write the raw and C identifiers.
4841 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4842 # Fake it for dumpbin and say T for any non-static function
4843 # and D for any global variable.
4844 # Also find C++ and __fastcall symbols from MSVC++,
4845 # which start with @ or ?.
4846 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4847 " {last_section=section; section=\$ 3};"\
4848 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4849 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4850 " \$ 0!~/External *\|/{next};"\
4851 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4852 " {if(hide[section]) next};"\
4853 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4854 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4855 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
4856 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4857 " ' prfx=^$ac_symprfx]"
4859 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4861 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4863 # Check to see that the pipe works correctly.
4867 cat > conftest.$ac_ext <<_LT_EOF
4872 void nm_test_func(void);
4873 void nm_test_func(void){}
4877 int main(){nm_test_var='a';nm_test_func();return(0);}
4880 if AC_TRY_EVAL(ac_compile); then
4881 # Now try to grab the symbols.
4883 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4884 # Try sorting and uniquifying the output.
4885 if sort "$nlist" | uniq > "$nlist"T; then
4886 mv -f "$nlist"T "$nlist"
4891 # Make sure that we snagged all the symbols we need.
4892 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4893 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4894 cat <<_LT_EOF > conftest.$ac_ext
4895 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4896 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4897 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4898 relocations are performed -- see ld's documentation on pseudo-relocs. */
4899 # define LT@&t@_DLSYM_CONST
4900 #elif defined(__osf__)
4901 /* This system does not cope well with relocations in const data. */
4902 # define LT@&t@_DLSYM_CONST
4904 # define LT@&t@_DLSYM_CONST const
4912 # Now generate the symbol file.
4913 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4915 cat <<_LT_EOF >> conftest.$ac_ext
4917 /* The mapping between symbol names and symbols. */
4918 LT@&t@_DLSYM_CONST struct {
4922 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4924 { "@PROGRAM@", (void *) 0 },
4926 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4927 cat <<\_LT_EOF >> conftest.$ac_ext
4931 /* This works around a problem in FreeBSD linker */
4932 #ifdef FREEBSD_WORKAROUND
4933 static const void *lt_preloaded_setup() {
4934 return lt__PROGRAM__LTX_preloaded_symbols;
4942 # Now try linking the two files.
4943 mv conftest.$ac_objext conftstm.$ac_objext
4944 lt_globsym_save_LIBS=$LIBS
4945 lt_globsym_save_CFLAGS=$CFLAGS
4946 LIBS="conftstm.$ac_objext"
4947 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4948 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4951 LIBS=$lt_globsym_save_LIBS
4952 CFLAGS=$lt_globsym_save_CFLAGS
4954 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4957 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4960 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4963 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4964 cat conftest.$ac_ext >&5
4966 rm -rf conftest* conftst*
4968 # Do not use the global_symbol_pipe unless it works.
4969 if test "$pipe_works" = yes; then
4972 lt_cv_sys_global_symbol_pipe=
4976 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4977 lt_cv_sys_global_symbol_to_cdecl=
4979 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4980 AC_MSG_RESULT(failed)
4985 # Response file support.
4986 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4987 nm_file_list_spec='@'
4988 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4989 nm_file_list_spec='@'
4992 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4993 [Take the output of nm and produce a listing of raw symbols and C names])
4994 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4995 [Transform the output of nm in a proper C declaration])
4996 _LT_DECL([global_symbol_to_c_name_address],
4997 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4998 [Transform the output of nm in a C name address pair])
4999 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5000 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5001 [Transform the output of nm in a C name address pair when lib prefix is needed])
5002 _LT_DECL([], [nm_file_list_spec], [1],
5003 [Specify filename containing input files for $NM])
5004 ]) # _LT_CMD_GLOBAL_SYMBOLS
5007 # _LT_COMPILER_PIC([TAGNAME])
5008 # ---------------------------
5009 m4_defun([_LT_COMPILER_PIC],
5010 [m4_require([_LT_TAG_COMPILER])dnl
5011 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5012 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5013 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5015 m4_if([$1], [CXX], [
5016 # C++ specific cases for pic, static, wl, etc.
5017 if test "$GXX" = yes; then
5018 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5019 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5023 # All AIX code is PIC.
5024 if test "$host_cpu" = ia64; then
5025 # AIX 5 now supports IA64 processor
5026 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5033 # see comment about AmigaOS4 .so support
5034 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5037 # FIXME: we need at least 68020 code to build shared libraries, but
5038 # adding the `-m68020' flag to GCC prevents building anything better,
5040 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5045 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5046 # PIC is the default for these OSes.
5048 mingw* | cygwin* | os2* | pw32* | cegcc*)
5049 # This hack is so that the source file can tell whether it is being
5050 # built for inclusion in a dll (and should export symbols for example).
5051 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5052 # (--disable-auto-import) libraries
5053 m4_if([$1], [GCJ], [],
5054 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5056 darwin* | rhapsody*)
5057 # PIC is the default on this platform
5058 # Common symbols not allowed in MH_DYLIB files
5059 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5062 # DJGPP does not support shared libraries at all
5063 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5066 # PIC is the default for Haiku.
5067 # The "-static" flag exists, but is broken.
5068 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5071 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5072 # Instead, we relocate shared libraries at runtime.
5075 if test -d /usr/nec; then
5076 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5080 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5081 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5082 # sets the default TLS model and affects inlining.
5087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5092 # QNX uses GNU C++, but need to define -shared option too, otherwise
5094 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5103 # All AIX code is PIC.
5104 if test "$host_cpu" = ia64; then
5105 # AIX 5 now supports IA64 processor
5106 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5108 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5112 case $cc_basename in
5114 # Green Hills C++ Compiler
5115 # _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"
5119 mingw* | cygwin* | os2* | pw32* | cegcc*)
5120 # This hack is so that the source file can tell whether it is being
5121 # built for inclusion in a dll (and should export symbols for example).
5122 m4_if([$1], [GCJ], [],
5123 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5126 case $cc_basename in
5128 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5131 # Green Hills C++ Compiler
5132 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5138 freebsd* | dragonfly*)
5139 # FreeBSD uses GNU C++
5141 hpux9* | hpux10* | hpux11*)
5142 case $cc_basename in
5144 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5145 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5146 if test "$host_cpu" != ia64; then
5147 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5151 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5152 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5167 # This is c89, which is MS Visual C++ (no shared libs)
5168 # Anyone wants to do a port?
5170 irix5* | irix6* | nonstopux*)
5171 case $cc_basename in
5173 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5174 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5175 # CC pic flag -KPIC is the default.
5181 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5182 case $cc_basename in
5185 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5186 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5189 # old Intel C++ for x86_64 which still supported -KPIC.
5190 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5191 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5192 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5195 # Intel C++, used to be incompatible with GCC.
5196 # ICC 10 doesn't accept -KPIC any more.
5197 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5202 # Portland Group C++ compiler
5203 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5204 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5205 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5209 # Make sure the PIC flag is empty. It appears that all Alpha
5210 # Linux and Compaq Tru64 Unix objects are PIC.
5211 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5212 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5214 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5215 # IBM XL 8.0, 9.0 on PPC and BlueGene
5216 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5217 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5218 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5221 case `$CC -V 2>&1 | sed 5q` in
5224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5225 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5237 case $cc_basename in
5239 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5248 # QNX uses GNU C++, but need to define -shared option too, otherwise
5250 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5252 osf3* | osf4* | osf5*)
5253 case $cc_basename in
5255 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5258 # Rational C++ 2.4.1
5259 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5262 # Digital/Compaq C++
5263 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5264 # Make sure the PIC flag is empty. It appears that all Alpha
5265 # Linux and Compaq Tru64 Unix objects are PIC.
5266 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5267 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5276 case $cc_basename in
5278 # Sun C++ 4.2, 5.x and Centerline C++
5279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5280 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5284 # Green Hills C++ Compiler
5285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5292 case $cc_basename in
5295 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5296 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5300 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5306 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5307 case $cc_basename in
5309 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5310 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5311 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5316 case $cc_basename in
5318 # NonStop-UX NCC 3.20
5319 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5328 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5334 if test "$GCC" = yes; then
5335 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5336 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5340 # All AIX code is PIC.
5341 if test "$host_cpu" = ia64; then
5342 # AIX 5 now supports IA64 processor
5343 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5350 # see comment about AmigaOS4 .so support
5351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5354 # FIXME: we need at least 68020 code to build shared libraries, but
5355 # adding the `-m68020' flag to GCC prevents building anything better,
5357 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5362 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5363 # PIC is the default for these OSes.
5366 mingw* | cygwin* | pw32* | os2* | cegcc*)
5367 # This hack is so that the source file can tell whether it is being
5368 # built for inclusion in a dll (and should export symbols for example).
5369 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5370 # (--disable-auto-import) libraries
5371 m4_if([$1], [GCJ], [],
5372 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5375 darwin* | rhapsody*)
5376 # PIC is the default on this platform
5377 # Common symbols not allowed in MH_DYLIB files
5378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5382 # PIC is the default for Haiku.
5383 # The "-static" flag exists, but is broken.
5384 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5388 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5389 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5390 # sets the default TLS model and affects inlining.
5396 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5402 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5403 # Instead, we relocate shared libraries at runtime.
5407 # Just because we use GCC doesn't mean we suddenly get shared libraries
5408 # on systems that don't support them.
5409 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5414 # QNX uses GNU C++, but need to define -shared option too, otherwise
5416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5420 if test -d /usr/nec; then
5421 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5430 case $cc_basename in
5431 nvcc*) # Cuda Compiler Driver 2.2
5432 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5433 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5434 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5439 # PORTME Check for flag to pass linker flags through the system compiler.
5442 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5443 if test "$host_cpu" = ia64; then
5444 # AIX 5 now supports IA64 processor
5445 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5447 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5451 mingw* | cygwin* | pw32* | os2* | cegcc*)
5452 # This hack is so that the source file can tell whether it is being
5453 # built for inclusion in a dll (and should export symbols for example).
5454 m4_if([$1], [GCJ], [],
5455 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5458 hpux9* | hpux10* | hpux11*)
5459 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5460 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5470 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5471 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5474 irix5* | irix6* | nonstopux*)
5475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5476 # PIC (with -KPIC) is the default.
5477 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5480 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5481 case $cc_basename in
5482 # old Intel for x86_64 which still supported -KPIC.
5484 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5488 # icc used to be incompatible with GCC.
5489 # ICC 10 doesn't accept -KPIC any more.
5491 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5495 # Lahey Fortran 8.1.
5497 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5498 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5499 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5502 # NAG Fortran compiler
5503 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5507 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5508 # Portland Group compilers (*not* the Pentium gcc compiler,
5509 # which looks to be a dead project)
5510 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5512 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5515 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5516 # All Alpha code is PIC.
5517 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5519 xl* | bgxl* | bgf* | mpixl*)
5520 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5521 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5522 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5523 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5526 case `$CC -V 2>&1 | sed 5q` in
5527 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5528 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5529 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5530 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5531 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5533 *Sun\ F* | *Sun*Fortran*)
5534 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5535 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5536 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5540 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5541 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5542 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5544 *Intel*\ [[CF]]*Compiler*)
5545 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5547 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5550 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5552 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5560 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5561 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5565 # QNX uses GNU C++, but need to define -shared option too, otherwise
5567 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5570 osf3* | osf4* | osf5*)
5571 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5572 # All OSF/1 code is PIC.
5573 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5577 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5581 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5582 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5583 case $cc_basename in
5584 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5585 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5587 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5592 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5593 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5594 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5597 sysv4 | sysv4.2uw2* | sysv4.3*)
5598 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5599 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5600 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5604 if test -d /usr/nec ;then
5605 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5606 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5610 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5611 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5612 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5613 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5617 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5618 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5622 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5623 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5627 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5633 # For platforms which do not support PIC, -DPIC is meaningless:
5635 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5638 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5642 AC_CACHE_CHECK([for $compiler option to produce PIC],
5643 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5644 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5645 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5648 # Check to make sure the PIC flag actually works.
5650 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5651 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5652 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5653 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5654 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5656 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5658 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5659 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5661 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5662 [Additional compiler flags for building library objects])
5664 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5665 [How to pass a linker flag through the compiler])
5667 # Check to make sure the static flag actually works.
5669 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5670 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5671 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5672 $lt_tmp_static_flag,
5674 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5675 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5676 [Compiler flag to prevent dynamic linking])
5677 ])# _LT_COMPILER_PIC
5680 # _LT_LINKER_SHLIBS([TAGNAME])
5681 # ----------------------------
5682 # See if the linker supports building shared libraries.
5683 m4_defun([_LT_LINKER_SHLIBS],
5684 [AC_REQUIRE([LT_PATH_LD])dnl
5685 AC_REQUIRE([LT_PATH_NM])dnl
5686 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5687 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5688 m4_require([_LT_DECL_EGREP])dnl
5689 m4_require([_LT_DECL_SED])dnl
5690 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5691 m4_require([_LT_TAG_COMPILER])dnl
5692 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5693 m4_if([$1], [CXX], [
5694 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5695 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5698 # If we're using GNU nm, then we don't want the "-C" option.
5699 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5700 # Also, AIX nm treats weak defined symbols like other global defined
5701 # symbols, whereas GNU nm marks them as "W".
5702 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5703 _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'
5705 _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'
5709 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5711 cygwin* | mingw* | cegcc*)
5712 case $cc_basename in
5714 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5717 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5718 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5723 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5728 _LT_TAGVAR(allow_undefined_flag, $1)=
5729 _LT_TAGVAR(always_export_symbols, $1)=no
5730 _LT_TAGVAR(archive_cmds, $1)=
5731 _LT_TAGVAR(archive_expsym_cmds, $1)=
5732 _LT_TAGVAR(compiler_needs_object, $1)=no
5733 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5734 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5735 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5736 _LT_TAGVAR(hardcode_automatic, $1)=no
5737 _LT_TAGVAR(hardcode_direct, $1)=no
5738 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5740 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5741 _LT_TAGVAR(hardcode_minus_L, $1)=no
5742 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5743 _LT_TAGVAR(inherit_rpath, $1)=no
5744 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5745 _LT_TAGVAR(module_cmds, $1)=
5746 _LT_TAGVAR(module_expsym_cmds, $1)=
5747 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5748 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5749 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5750 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5751 # include_expsyms should be a list of space-separated symbols to be *always*
5752 # included in the symbol list
5753 _LT_TAGVAR(include_expsyms, $1)=
5754 # exclude_expsyms can be an extended regexp of symbols to exclude
5755 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5756 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5757 # as well as any symbol that contains `d'.
5758 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5759 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5760 # platforms (ab)use it in PIC code, but their linkers get confused if
5761 # the symbol is explicitly referenced. Since portable code cannot
5762 # rely on this symbol name, it's probably fine to never include it in
5763 # preloaded symbol tables.
5764 # Exclude shared library initialization/finalization symbols.
5765 dnl Note also adjust exclude_expsyms for C++ above.
5766 extract_expsyms_cmds=
5769 cygwin* | mingw* | pw32* | cegcc*)
5770 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5771 # When not using gcc, we currently assume that we are using
5772 # Microsoft Visual C++.
5773 if test "$GCC" != yes; then
5778 # we just hope/assume this is gcc and not c89 (= MSVC++)
5786 _LT_TAGVAR(ld_shlibs, $1)=yes
5788 # On some targets, GNU ld is compatible enough with the native linker
5789 # that we're better off using the native interface for both.
5790 lt_use_gnu_ld_interface=no
5791 if test "$with_gnu_ld" = yes; then
5794 # The AIX port of GNU ld has always aspired to compatibility
5795 # with the native linker. However, as the warning in the GNU ld
5796 # block says, versions before 2.19.5* couldn't really create working
5797 # shared libraries, regardless of the interface used.
5798 case `$LD -v 2>&1` in
5799 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5800 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5801 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5803 lt_use_gnu_ld_interface=yes
5808 lt_use_gnu_ld_interface=yes
5813 if test "$lt_use_gnu_ld_interface" = yes; then
5814 # If archive_cmds runs LD, not CC, wlarc should be empty
5817 # Set some defaults for GNU ld with shared library support. These
5818 # are reset later if shared libraries are not supported. Putting them
5819 # here allows them to be overridden if necessary.
5820 runpath_var=LD_RUN_PATH
5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5822 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5823 # ancient GNU ld didn't support --whole-archive et. al.
5824 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5825 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5827 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5829 supports_anon_versioning=no
5830 case `$LD -v 2>&1` in
5831 *GNU\ gold*) supports_anon_versioning=yes ;;
5832 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5833 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5834 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5835 *\ 2.11.*) ;; # other 2.11 versions
5836 *) supports_anon_versioning=yes ;;
5839 # See if GNU ld supports shared libraries.
5842 # On AIX/PPC, the GNU linker is very broken
5843 if test "$host_cpu" != ia64; then
5844 _LT_TAGVAR(ld_shlibs, $1)=no
5847 *** Warning: the GNU linker, at least up to release 2.19, is reported
5848 *** to be unable to reliably create shared libraries on AIX.
5849 *** Therefore, libtool is disabling shared libraries support. If you
5850 *** really care for shared libraries, you may want to install binutils
5851 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5852 *** You will then need to restart the configuration process.
5861 # see comment about AmigaOS4 .so support
5862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5863 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5866 _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)'
5867 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5868 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5874 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5875 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5876 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5877 # support --undefined. This deserves some investigation. FIXME
5878 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5880 _LT_TAGVAR(ld_shlibs, $1)=no
5884 cygwin* | mingw* | pw32* | cegcc*)
5885 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5886 # as there is no search path for DLLs.
5887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5888 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5889 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5890 _LT_TAGVAR(always_export_symbols, $1)=no
5891 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5892 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5893 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5895 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5896 _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'
5897 # If the export-symbols file already is a .def file (1st line
5898 # is EXPORTS), use it as is; otherwise, prepend...
5899 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5900 cp $export_symbols $output_objdir/$soname.def;
5902 echo EXPORTS > $output_objdir/$soname.def;
5903 cat $export_symbols >> $output_objdir/$soname.def;
5905 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5907 _LT_TAGVAR(ld_shlibs, $1)=no
5912 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5913 _LT_TAGVAR(link_all_deplibs, $1)=yes
5917 _LT_TAGVAR(hardcode_direct, $1)=no
5918 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5919 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5920 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5921 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5922 # Instead, shared libraries are loaded at an image base (0x10000000 by
5923 # default) and relocated if they conflict, which is a slow very memory
5924 # consuming and fragmenting process. To avoid this, we pick a random,
5925 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5926 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5927 _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'
5928 _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'
5931 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5933 if test "$host_os" = linux-dietlibc; then
5934 case $cc_basename in
5935 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5938 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5939 && test "$tmp_diet" = no
5941 tmp_addflag=' $pic_flag'
5942 tmp_sharedflag='-shared'
5943 case $cc_basename,$host_cpu in
5944 pgcc*) # Portland Group C compiler
5945 _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'
5946 tmp_addflag=' $pic_flag'
5948 pgf77* | pgf90* | pgf95* | pgfortran*)
5949 # Portland Group f77 and f90 compilers
5950 _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'
5951 tmp_addflag=' $pic_flag -Mnomain' ;;
5952 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5953 tmp_addflag=' -i_dynamic' ;;
5954 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5955 tmp_addflag=' -i_dynamic -nofor_main' ;;
5956 ifc* | ifort*) # Intel Fortran compiler
5957 tmp_addflag=' -nofor_main' ;;
5958 lf95*) # Lahey Fortran 8.1
5959 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5960 tmp_sharedflag='--shared' ;;
5961 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5962 tmp_sharedflag='-qmkshrobj'
5964 nvcc*) # Cuda Compiler Driver 2.2
5965 _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'
5966 _LT_TAGVAR(compiler_needs_object, $1)=yes
5969 case `$CC -V 2>&1 | sed 5q` in
5970 *Sun\ C*) # Sun C 5.9
5971 _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'
5972 _LT_TAGVAR(compiler_needs_object, $1)=yes
5973 tmp_sharedflag='-G' ;;
5974 *Sun\ F*) # Sun Fortran 8.3
5975 tmp_sharedflag='-G' ;;
5977 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5979 if test "x$supports_anon_versioning" = xyes; then
5980 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5981 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5982 echo "local: *; };" >> $output_objdir/$libname.ver~
5983 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5986 case $cc_basename in
5987 xlf* | bgf* | bgxlf* | mpixlf*)
5988 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5989 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5990 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5991 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5992 if test "x$supports_anon_versioning" = xyes; then
5993 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5994 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5995 echo "local: *; };" >> $output_objdir/$libname.ver~
5996 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6001 _LT_TAGVAR(ld_shlibs, $1)=no
6006 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6007 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6010 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6011 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6016 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6017 _LT_TAGVAR(ld_shlibs, $1)=no
6020 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6021 *** create shared libraries on Solaris systems. Therefore, libtool
6022 *** is disabling shared libraries support. We urge you to upgrade GNU
6023 *** binutils to release 2.9.1 or newer. Another option is to modify
6024 *** your PATH or compiler configuration so that the native linker is
6025 *** used, and then restart.
6028 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6029 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6030 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6032 _LT_TAGVAR(ld_shlibs, $1)=no
6036 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6037 case `$LD -v 2>&1` in
6038 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6039 _LT_TAGVAR(ld_shlibs, $1)=no
6042 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6043 *** reliably create shared libraries on SCO systems. Therefore, libtool
6044 *** is disabling shared libraries support. We urge you to upgrade GNU
6045 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6046 *** your PATH or compiler configuration so that the native linker is
6047 *** used, and then restart.
6052 # For security reasons, it is highly recommended that you always
6053 # use absolute paths for naming shared libraries, and exclude the
6054 # DT_RUNPATH tag from executables and libraries. But doing so
6055 # requires that you compile everything twice, which is a pain.
6056 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6057 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6058 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6059 _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'
6061 _LT_TAGVAR(ld_shlibs, $1)=no
6068 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6070 _LT_TAGVAR(hardcode_direct, $1)=yes
6071 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6075 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6076 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6077 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6079 _LT_TAGVAR(ld_shlibs, $1)=no
6084 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6087 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6088 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6091 # PORTME fill in a description of your system's linker (not GNU ld)
6094 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6095 _LT_TAGVAR(always_export_symbols, $1)=yes
6096 _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'
6097 # Note: this linker hardcodes the directories in LIBPATH if there
6098 # are no directories specified by -L.
6099 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6100 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6101 # Neither direct hardcoding nor static linking is supported with a
6103 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6108 if test "$host_cpu" = ia64; then
6109 # On IA64, the linker does run time linking by default, so we don't
6110 # have to do anything special.
6111 aix_use_runtimelinking=no
6112 exp_sym_flag='-Bexport'
6115 # If we're using GNU nm, then we don't want the "-C" option.
6116 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6117 # Also, AIX nm treats weak defined symbols like other global
6118 # defined symbols, whereas GNU nm marks them as "W".
6119 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6120 _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'
6122 _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'
6124 aix_use_runtimelinking=no
6126 # Test if we are trying to use run time linking or normal
6127 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6128 # need to do runtime linking.
6129 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6130 for ld_flag in $LDFLAGS; do
6131 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6132 aix_use_runtimelinking=yes
6139 exp_sym_flag='-bexport'
6140 no_entry_flag='-bnoentry'
6143 # When large executables or shared objects are built, AIX ld can
6144 # have problems creating the table of contents. If linking a library
6145 # or program results in "error TOC overflow" add -mminimal-toc to
6146 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6147 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6149 _LT_TAGVAR(archive_cmds, $1)=''
6150 _LT_TAGVAR(hardcode_direct, $1)=yes
6151 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6152 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6153 _LT_TAGVAR(link_all_deplibs, $1)=yes
6154 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6156 if test "$GCC" = yes; then
6157 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6158 # We only want to do this on AIX 4.2 and lower, the check
6159 # below for broken collect2 doesn't work under 4.3+
6160 collect2name=`${CC} -print-prog-name=collect2`
6161 if test -f "$collect2name" &&
6162 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6164 # We have reworked collect2
6167 # We have old collect2
6168 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6169 # It fails to find uninstalled libraries when the uninstalled
6170 # path is not listed in the libpath. Setting hardcode_minus_L
6171 # to unsupported forces relinking
6172 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6173 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6174 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6178 shared_flag='-shared'
6179 if test "$aix_use_runtimelinking" = yes; then
6180 shared_flag="$shared_flag "'${wl}-G'
6184 if test "$host_cpu" = ia64; then
6185 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6186 # chokes on -Wl,-G. The following line is correct:
6189 if test "$aix_use_runtimelinking" = yes; then
6190 shared_flag='${wl}-G'
6192 shared_flag='${wl}-bM:SRE'
6197 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6198 # It seems that -bexpall does not export symbols beginning with
6199 # underscore (_), so it is better to generate a list of symbols to export.
6200 _LT_TAGVAR(always_export_symbols, $1)=yes
6201 if test "$aix_use_runtimelinking" = yes; then
6202 # Warning - without using the other runtime loading flags (-brtl),
6203 # -berok will link without error, but may produce a broken library.
6204 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6205 # Determine the default libpath from the value encoded in an
6207 _LT_SYS_MODULE_PATH_AIX([$1])
6208 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6209 _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"
6211 if test "$host_cpu" = ia64; then
6212 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6213 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6214 _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"
6216 # Determine the default libpath from the value encoded in an
6218 _LT_SYS_MODULE_PATH_AIX([$1])
6219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6220 # Warning - without using the other run time loading flags,
6221 # -berok will link without error, but may produce a broken library.
6222 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6223 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6224 if test "$with_gnu_ld" = yes; then
6225 # We only use this code for GNU lds that support --whole-archive.
6226 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6228 # Exported symbols can be pulled into shared objects from archives
6229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6231 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6232 # This is similar to how AIX traditionally builds its shared libraries.
6233 _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'
6241 # see comment about AmigaOS4 .so support
6242 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6243 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6246 _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)'
6247 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6254 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6257 cygwin* | mingw* | pw32* | cegcc*)
6258 # When not using gcc, we currently assume that we are using
6259 # Microsoft Visual C++.
6260 # hardcode_libdir_flag_spec is actually meaningless, as there is
6261 # no search path for DLLs.
6262 case $cc_basename in
6265 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6266 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6267 _LT_TAGVAR(always_export_symbols, $1)=yes
6268 _LT_TAGVAR(file_list_spec, $1)='@'
6269 # Tell ltmain to make .lib files, not .a files.
6271 # Tell ltmain to make .dll files, not .so files.
6273 # FIXME: Setting linknames here is a bad hack.
6274 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6275 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6276 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6278 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6280 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6282 # The linker will not automatically build a static lib if we build a DLL.
6283 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6284 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6285 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6286 _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'
6288 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6289 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6290 lt_tool_outputfile="@TOOL_OUTPUT@"~
6291 case $lt_outputfile in
6294 lt_outputfile="$lt_outputfile.exe"
6295 lt_tool_outputfile="$lt_tool_outputfile.exe"
6298 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6299 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6300 $RM "$lt_outputfile.manifest";
6304 # Assume MSVC wrapper
6305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6306 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6307 # Tell ltmain to make .lib files, not .a files.
6309 # Tell ltmain to make .dll files, not .so files.
6311 # FIXME: Setting linknames here is a bad hack.
6312 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6313 # The linker will automatically build a .lib file if we build a DLL.
6314 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6315 # FIXME: Should let the user specify the lib program.
6316 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6317 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6322 darwin* | rhapsody*)
6323 _LT_DARWIN_LINKER_FEATURES($1)
6327 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6329 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6332 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6333 # support. Future versions do this automatically, but an explicit c++rt0.o
6334 # does not break anything, and helps significantly (at the cost of a little
6337 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6338 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6339 _LT_TAGVAR(hardcode_direct, $1)=yes
6340 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6343 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6345 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6346 _LT_TAGVAR(hardcode_direct, $1)=yes
6347 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6348 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6351 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6352 freebsd* | dragonfly*)
6353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6355 _LT_TAGVAR(hardcode_direct, $1)=yes
6356 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6360 if test "$GCC" = yes; then
6361 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6363 _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'
6365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6366 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6367 _LT_TAGVAR(hardcode_direct, $1)=yes
6369 # hardcode_minus_L: Not really in the search PATH,
6370 # but as the default location of the library.
6371 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6372 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6376 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6377 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6379 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6381 if test "$with_gnu_ld" = no; then
6382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6383 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6384 _LT_TAGVAR(hardcode_direct, $1)=yes
6385 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6386 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6387 # hardcode_minus_L: Not really in the search PATH,
6388 # but as the default location of the library.
6389 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6394 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6397 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6400 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6403 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6409 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6412 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6416 # Older versions of the 11.00 compiler do not understand -b yet
6417 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6418 _LT_LINKER_OPTION([if $CC understands -b],
6419 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6420 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6421 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6422 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6426 if test "$with_gnu_ld" = no; then
6427 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6428 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6432 _LT_TAGVAR(hardcode_direct, $1)=no
6433 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6436 _LT_TAGVAR(hardcode_direct, $1)=yes
6437 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6438 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6440 # hardcode_minus_L: Not really in the search PATH,
6441 # but as the default location of the library.
6442 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6448 irix5* | irix6* | nonstopux*)
6449 if test "$GCC" = yes; then
6450 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6451 # Try to use the -exported_symbol ld option, if it does not
6452 # work, assume that -exports_file does not work either and
6453 # implicitly export all symbols.
6454 # This should be the same for all languages, so no per-tag cache variable.
6455 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6456 [lt_cv_irix_exported_symbol],
6457 [save_LDFLAGS="$LDFLAGS"
6458 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6461 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6462 [C++], [[int foo (void) { return 0; }]],
6469 [lt_cv_irix_exported_symbol=yes],
6470 [lt_cv_irix_exported_symbol=no])
6471 LDFLAGS="$save_LDFLAGS"])
6472 if test "$lt_cv_irix_exported_symbol" = yes; then
6473 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6476 _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'
6477 _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'
6479 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6480 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6481 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6482 _LT_TAGVAR(inherit_rpath, $1)=yes
6483 _LT_TAGVAR(link_all_deplibs, $1)=yes
6487 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6488 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6490 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6493 _LT_TAGVAR(hardcode_direct, $1)=yes
6494 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6498 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6499 _LT_TAGVAR(hardcode_direct, $1)=yes
6500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6501 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6502 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6509 if test -f /usr/libexec/ld.so; then
6510 _LT_TAGVAR(hardcode_direct, $1)=yes
6511 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6512 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6513 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6514 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6515 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6517 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6520 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6521 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6522 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6525 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6526 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6531 _LT_TAGVAR(ld_shlibs, $1)=no
6536 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6537 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6538 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6539 _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'
6540 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6544 if test "$GCC" = yes; then
6545 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6546 _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'
6548 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6549 _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'
6551 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6552 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6553 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6556 osf4* | osf5*) # as osf3* with the addition of -msym flag
6557 if test "$GCC" = yes; then
6558 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6562 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6563 _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'
6564 _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~
6565 $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'
6567 # Both c and cxx compiler support -rpath directly
6568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6570 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6571 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6575 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6576 if test "$GCC" = yes; then
6578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6579 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6580 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6582 case `$CC -V 2>&1` in
6585 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6586 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6587 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6591 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6592 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6593 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6598 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6600 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6602 # The compiler driver will combine and reorder linker options,
6603 # but understands `-z linker_flag'. GCC discards it without `$wl',
6604 # but is careful enough not to reorder.
6605 # Supported since Solaris 2.6 (maybe 2.5.1?)
6606 if test "$GCC" = yes; then
6607 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6609 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6613 _LT_TAGVAR(link_all_deplibs, $1)=yes
6617 if test "x$host_vendor" = xsequent; then
6618 # Use $CC to link under sequent, because it throws in some extra .o
6619 # files that make .init and .fini sections work.
6620 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6622 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6625 _LT_TAGVAR(hardcode_direct, $1)=yes
6626 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6627 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6631 case $host_vendor in
6633 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6634 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6637 ## LD is ld it makes a PLAMLIB
6638 ## CC just makes a GrossModule.
6639 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6640 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6641 _LT_TAGVAR(hardcode_direct, $1)=no
6644 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6645 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6648 runpath_var='LD_RUN_PATH'
6649 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6653 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6654 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6655 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6659 if test -d /usr/nec; then
6660 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6661 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6662 runpath_var=LD_RUN_PATH
6663 hardcode_runpath_var=yes
6664 _LT_TAGVAR(ld_shlibs, $1)=yes
6668 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6669 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6670 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6671 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6672 runpath_var='LD_RUN_PATH'
6674 if test "$GCC" = yes; then
6675 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6676 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6678 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6679 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6683 sysv5* | sco3.2v5* | sco5v6*)
6684 # Note: We can NOT use -z defs as we might desire, because we do not
6685 # link with -lc, and that would cause any symbols used from libc to
6686 # always be unresolved, which means just about no library would
6687 # ever link correctly. If we're not using GNU ld we use -z text
6688 # though, which does catch some bad symbols but isn't as heavy-handed
6690 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6691 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6692 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6693 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6694 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6695 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6696 _LT_TAGVAR(link_all_deplibs, $1)=yes
6697 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6698 runpath_var='LD_RUN_PATH'
6700 if test "$GCC" = yes; then
6701 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6702 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6704 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6705 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6710 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6712 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6716 _LT_TAGVAR(ld_shlibs, $1)=no
6720 if test x$host_vendor = xsni; then
6722 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6723 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6729 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6730 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6732 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6734 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6735 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6736 _LT_DECL([], [extract_expsyms_cmds], [2],
6737 [The commands to extract the exported symbol list from a shared archive])
6740 # Do we need to explicitly link libc?
6742 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6744 # Assume -lc should be added
6745 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6747 if test "$enable_shared" = yes && test "$GCC" = yes; then
6748 case $_LT_TAGVAR(archive_cmds, $1) in
6750 # FIXME: we may have to deal with multi-command sequences.
6753 # Test whether the compiler implicitly links with -lc since on some
6754 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6755 # to ld, don't add -lc before -lgcc.
6756 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6757 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6759 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6761 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6764 libobjs=conftest.$ac_objext
6766 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6767 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6773 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6774 _LT_TAGVAR(allow_undefined_flag, $1)=
6775 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6777 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6779 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6781 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6783 cat conftest.err 1>&5
6787 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6794 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6795 [Whether or not to add -lc for building shared libraries])
6796 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6797 [enable_shared_with_static_runtimes], [0],
6798 [Whether or not to disallow shared libs when runtime libs are static])
6799 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6800 [Compiler flag to allow reflexive dlopens])
6801 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6802 [Compiler flag to generate shared objects directly from archives])
6803 _LT_TAGDECL([], [compiler_needs_object], [1],
6804 [Whether the compiler copes with passing no objects directly])
6805 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6806 [Create an old-style archive from a shared archive])
6807 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6808 [Create a temporary old-style archive to link instead of a shared archive])
6809 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6810 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6811 _LT_TAGDECL([], [module_cmds], [2],
6812 [Commands used to build a loadable module if different from building
6814 _LT_TAGDECL([], [module_expsym_cmds], [2])
6815 _LT_TAGDECL([], [with_gnu_ld], [1],
6816 [Whether we are building with GNU ld or not])
6817 _LT_TAGDECL([], [allow_undefined_flag], [1],
6818 [Flag that allows shared libraries with undefined symbols to be built])
6819 _LT_TAGDECL([], [no_undefined_flag], [1],
6820 [Flag that enforces no undefined symbols])
6821 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6822 [Flag to hardcode $libdir into a binary during linking.
6823 This must work even if $libdir does not exist])
6824 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6825 [Whether we need a single "-rpath" flag with a separated argument])
6826 _LT_TAGDECL([], [hardcode_direct], [0],
6827 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6828 DIR into the resulting binary])
6829 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6830 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6831 DIR into the resulting binary and the resulting library dependency is
6832 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6833 library is relocated])
6834 _LT_TAGDECL([], [hardcode_minus_L], [0],
6835 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6836 into the resulting binary])
6837 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6838 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6839 into the resulting binary])
6840 _LT_TAGDECL([], [hardcode_automatic], [0],
6841 [Set to "yes" if building a shared library automatically hardcodes DIR
6842 into the library and all subsequent libraries and executables linked
6844 _LT_TAGDECL([], [inherit_rpath], [0],
6845 [Set to yes if linker adds runtime paths of dependent libraries
6846 to runtime path list])
6847 _LT_TAGDECL([], [link_all_deplibs], [0],
6848 [Whether libtool must link a program against all its dependency libraries])
6849 _LT_TAGDECL([], [always_export_symbols], [0],
6850 [Set to "yes" if exported symbols are required])
6851 _LT_TAGDECL([], [export_symbols_cmds], [2],
6852 [The commands to list exported symbols])
6853 _LT_TAGDECL([], [exclude_expsyms], [1],
6854 [Symbols that should not be listed in the preloaded symbols])
6855 _LT_TAGDECL([], [include_expsyms], [1],
6856 [Symbols that must always be exported])
6857 _LT_TAGDECL([], [prelink_cmds], [2],
6858 [Commands necessary for linking programs (against libraries) with templates])
6859 _LT_TAGDECL([], [postlink_cmds], [2],
6860 [Commands necessary for finishing linking programs])
6861 _LT_TAGDECL([], [file_list_spec], [1],
6862 [Specify filename containing input files])
6863 dnl FIXME: Not yet implemented
6864 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6865 dnl [Compiler flag to generate thread safe objects])
6866 ])# _LT_LINKER_SHLIBS
6869 # _LT_LANG_C_CONFIG([TAG])
6870 # ------------------------
6871 # Ensure that the configuration variables for a C compiler are suitably
6872 # defined. These variables are subsequently used by _LT_CONFIG to write
6873 # the compiler configuration to `libtool'.
6874 m4_defun([_LT_LANG_C_CONFIG],
6875 [m4_require([_LT_DECL_EGREP])dnl
6879 # Source file extension for C test sources.
6882 # Object file extension for compiled C test sources.
6884 _LT_TAGVAR(objext, $1)=$objext
6886 # Code to be used in simple compile tests
6887 lt_simple_compile_test_code="int some_variable = 0;"
6889 # Code to be used in simple link tests
6890 lt_simple_link_test_code='int main(){return(0);}'
6893 # Save the default compiler, since it gets overwritten when the other
6894 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6895 compiler_DEFAULT=$CC
6897 # save warnings/boilerplate of simple test code
6898 _LT_COMPILER_BOILERPLATE
6899 _LT_LINKER_BOILERPLATE
6901 if test -n "$compiler"; then
6902 _LT_COMPILER_NO_RTTI($1)
6903 _LT_COMPILER_PIC($1)
6904 _LT_COMPILER_C_O($1)
6905 _LT_COMPILER_FILE_LOCKS($1)
6906 _LT_LINKER_SHLIBS($1)
6907 _LT_SYS_DYNAMIC_LINKER($1)
6908 _LT_LINKER_HARDCODE_LIBPATH($1)
6912 # Report which library types will actually be built
6913 AC_MSG_CHECKING([if libtool supports shared libraries])
6914 AC_MSG_RESULT([$can_build_shared])
6916 AC_MSG_CHECKING([whether to build shared libraries])
6917 test "$can_build_shared" = "no" && enable_shared=no
6919 # On AIX, shared libraries and static libraries use the same namespace, and
6920 # are all built from PIC.
6923 test "$enable_shared" = yes && enable_static=no
6924 if test -n "$RANLIB"; then
6925 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6926 postinstall_cmds='$RANLIB $lib'
6931 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6932 test "$enable_shared" = yes && enable_static=no
6936 AC_MSG_RESULT([$enable_shared])
6938 AC_MSG_CHECKING([whether to build static libraries])
6939 # Make sure either enable_shared or enable_static is yes.
6940 test "$enable_shared" = yes || enable_static=yes
6941 AC_MSG_RESULT([$enable_static])
6947 ])# _LT_LANG_C_CONFIG
6950 # _LT_LANG_CXX_CONFIG([TAG])
6951 # --------------------------
6952 # Ensure that the configuration variables for a C++ compiler are suitably
6953 # defined. These variables are subsequently used by _LT_CONFIG to write
6954 # the compiler configuration to `libtool'.
6955 m4_defun([_LT_LANG_CXX_CONFIG],
6956 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6957 m4_require([_LT_DECL_EGREP])dnl
6958 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6959 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6960 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6961 (test "X$CXX" != "Xg++"))) ; then
6964 _lt_caught_CXX_error=yes
6968 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6969 _LT_TAGVAR(allow_undefined_flag, $1)=
6970 _LT_TAGVAR(always_export_symbols, $1)=no
6971 _LT_TAGVAR(archive_expsym_cmds, $1)=
6972 _LT_TAGVAR(compiler_needs_object, $1)=no
6973 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6974 _LT_TAGVAR(hardcode_direct, $1)=no
6975 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6977 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6978 _LT_TAGVAR(hardcode_minus_L, $1)=no
6979 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6980 _LT_TAGVAR(hardcode_automatic, $1)=no
6981 _LT_TAGVAR(inherit_rpath, $1)=no
6982 _LT_TAGVAR(module_cmds, $1)=
6983 _LT_TAGVAR(module_expsym_cmds, $1)=
6984 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6985 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6986 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6987 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6988 _LT_TAGVAR(no_undefined_flag, $1)=
6989 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6990 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6992 # Source file extension for C++ test sources.
6995 # Object file extension for compiled C++ test sources.
6997 _LT_TAGVAR(objext, $1)=$objext
6999 # No sense in running all these tests if we already determined that
7000 # the CXX compiler isn't working. Some variables (like enable_shared)
7001 # are currently assumed to apply to all compilers on this platform,
7002 # and will be corrupted by setting them based on a non-working compiler.
7003 if test "$_lt_caught_CXX_error" != yes; then
7004 # Code to be used in simple compile tests
7005 lt_simple_compile_test_code="int some_variable = 0;"
7007 # Code to be used in simple link tests
7008 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7010 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7013 # save warnings/boilerplate of simple test code
7014 _LT_COMPILER_BOILERPLATE
7015 _LT_LINKER_BOILERPLATE
7017 # Allow CC to be a program name with arguments.
7019 lt_save_CFLAGS=$CFLAGS
7023 lt_save_with_gnu_ld=$with_gnu_ld
7024 lt_save_path_LD=$lt_cv_path_LD
7025 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7026 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7028 $as_unset lt_cv_prog_gnu_ld
7030 if test -n "${lt_cv_path_LDCXX+set}"; then
7031 lt_cv_path_LD=$lt_cv_path_LDCXX
7033 $as_unset lt_cv_path_LD
7035 test -z "${LDCXX+set}" || LD=$LDCXX
7039 _LT_TAGVAR(compiler, $1)=$CC
7040 _LT_CC_BASENAME([$compiler])
7042 if test -n "$compiler"; then
7043 # We don't want -fno-exception when compiling C++ code, so set the
7044 # no_builtin_flag separately
7045 if test "$GXX" = yes; then
7046 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7048 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7051 if test "$GXX" = yes; then
7052 # Set up default GNU C++ configuration
7056 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7057 # archiving commands below assume that GNU ld is being used.
7058 if test "$with_gnu_ld" = yes; then
7059 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7060 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7062 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7063 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7065 # If archive_cmds runs LD, not CC, wlarc should be empty
7066 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7067 # investigate it a little bit more. (MM)
7070 # ancient GNU ld didn't support --whole-archive et. al.
7071 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7072 $GREP 'no-whole-archive' > /dev/null; then
7073 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7075 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7081 # A generic and very simple default shared library creation
7082 # command for GNU C++ for the case where it uses the native
7083 # linker, instead of GNU ld. If possible, this setting should
7084 # overridden to take advantage of the native linker features on
7085 # the platform it is being used on.
7086 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7089 # Commands to make compiler produce verbose output that lists
7090 # what "hidden" libraries, object files and flags are used when
7091 # linking a shared library.
7092 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7100 # PORTME: fill in a description of your system's C++ link characteristics
7101 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7102 _LT_TAGVAR(ld_shlibs, $1)=yes
7105 # FIXME: insert proper C++ library support
7106 _LT_TAGVAR(ld_shlibs, $1)=no
7109 if test "$host_cpu" = ia64; then
7110 # On IA64, the linker does run time linking by default, so we don't
7111 # have to do anything special.
7112 aix_use_runtimelinking=no
7113 exp_sym_flag='-Bexport'
7116 aix_use_runtimelinking=no
7118 # Test if we are trying to use run time linking or normal
7119 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7120 # need to do runtime linking.
7121 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7122 for ld_flag in $LDFLAGS; do
7125 aix_use_runtimelinking=yes
7133 exp_sym_flag='-bexport'
7134 no_entry_flag='-bnoentry'
7137 # When large executables or shared objects are built, AIX ld can
7138 # have problems creating the table of contents. If linking a library
7139 # or program results in "error TOC overflow" add -mminimal-toc to
7140 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7141 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7143 _LT_TAGVAR(archive_cmds, $1)=''
7144 _LT_TAGVAR(hardcode_direct, $1)=yes
7145 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7146 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7147 _LT_TAGVAR(link_all_deplibs, $1)=yes
7148 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7150 if test "$GXX" = yes; then
7151 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7152 # We only want to do this on AIX 4.2 and lower, the check
7153 # below for broken collect2 doesn't work under 4.3+
7154 collect2name=`${CC} -print-prog-name=collect2`
7155 if test -f "$collect2name" &&
7156 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7158 # We have reworked collect2
7161 # We have old collect2
7162 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7163 # It fails to find uninstalled libraries when the uninstalled
7164 # path is not listed in the libpath. Setting hardcode_minus_L
7165 # to unsupported forces relinking
7166 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7168 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7171 shared_flag='-shared'
7172 if test "$aix_use_runtimelinking" = yes; then
7173 shared_flag="$shared_flag "'${wl}-G'
7177 if test "$host_cpu" = ia64; then
7178 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7179 # chokes on -Wl,-G. The following line is correct:
7182 if test "$aix_use_runtimelinking" = yes; then
7183 shared_flag='${wl}-G'
7185 shared_flag='${wl}-bM:SRE'
7190 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7191 # It seems that -bexpall does not export symbols beginning with
7192 # underscore (_), so it is better to generate a list of symbols to
7194 _LT_TAGVAR(always_export_symbols, $1)=yes
7195 if test "$aix_use_runtimelinking" = yes; then
7196 # Warning - without using the other runtime loading flags (-brtl),
7197 # -berok will link without error, but may produce a broken library.
7198 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7199 # Determine the default libpath from the value encoded in an empty
7201 _LT_SYS_MODULE_PATH_AIX([$1])
7202 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7204 _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"
7206 if test "$host_cpu" = ia64; then
7207 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7208 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7209 _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"
7211 # Determine the default libpath from the value encoded in an
7213 _LT_SYS_MODULE_PATH_AIX([$1])
7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7215 # Warning - without using the other run time loading flags,
7216 # -berok will link without error, but may produce a broken library.
7217 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7218 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7219 if test "$with_gnu_ld" = yes; then
7220 # We only use this code for GNU lds that support --whole-archive.
7221 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7223 # Exported symbols can be pulled into shared objects from archives
7224 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7226 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7227 # This is similar to how AIX traditionally builds its shared
7229 _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'
7235 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7236 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7237 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7238 # support --undefined. This deserves some investigation. FIXME
7239 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7241 _LT_TAGVAR(ld_shlibs, $1)=no
7246 case $cc_basename in
7248 # FIXME: insert proper C++ library support
7249 _LT_TAGVAR(ld_shlibs, $1)=no
7254 cygwin* | mingw* | pw32* | cegcc*)
7255 case $GXX,$cc_basename in
7258 # hardcode_libdir_flag_spec is actually meaningless, as there is
7259 # no search path for DLLs.
7260 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7261 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7262 _LT_TAGVAR(always_export_symbols, $1)=yes
7263 _LT_TAGVAR(file_list_spec, $1)='@'
7264 # Tell ltmain to make .lib files, not .a files.
7266 # Tell ltmain to make .dll files, not .so files.
7268 # FIXME: Setting linknames here is a bad hack.
7269 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7270 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7271 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7273 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7275 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7277 # The linker will not automatically build a static lib if we build a DLL.
7278 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7279 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7281 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7282 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7283 lt_tool_outputfile="@TOOL_OUTPUT@"~
7284 case $lt_outputfile in
7287 lt_outputfile="$lt_outputfile.exe"
7288 lt_tool_outputfile="$lt_tool_outputfile.exe"
7291 func_to_tool_file "$lt_outputfile"~
7292 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7293 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7294 $RM "$lt_outputfile.manifest";
7299 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7300 # as there is no search path for DLLs.
7301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7302 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7303 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7304 _LT_TAGVAR(always_export_symbols, $1)=no
7305 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7307 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7308 _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'
7309 # If the export-symbols file already is a .def file (1st line
7310 # is EXPORTS), use it as is; otherwise, prepend...
7311 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7312 cp $export_symbols $output_objdir/$soname.def;
7314 echo EXPORTS > $output_objdir/$soname.def;
7315 cat $export_symbols >> $output_objdir/$soname.def;
7317 $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'
7319 _LT_TAGVAR(ld_shlibs, $1)=no
7324 darwin* | rhapsody*)
7325 _LT_DARWIN_LINKER_FEATURES($1)
7329 case $cc_basename in
7331 # FIXME: insert proper C++ library support
7332 _LT_TAGVAR(ld_shlibs, $1)=no
7335 # Green Hills C++ Compiler
7336 # FIXME: insert proper C++ library support
7337 _LT_TAGVAR(ld_shlibs, $1)=no
7340 # FIXME: insert proper C++ library support
7341 _LT_TAGVAR(ld_shlibs, $1)=no
7347 # C++ shared libraries reported to be fairly broken before
7349 _LT_TAGVAR(ld_shlibs, $1)=no
7353 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7356 freebsd* | dragonfly*)
7357 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7359 _LT_TAGVAR(ld_shlibs, $1)=yes
7366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7367 _LT_TAGVAR(link_all_deplibs, $1)=yes
7371 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7372 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7373 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7374 _LT_TAGVAR(hardcode_direct, $1)=yes
7375 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7376 # but as the default
7377 # location of the library.
7379 case $cc_basename in
7381 # FIXME: insert proper C++ library support
7382 _LT_TAGVAR(ld_shlibs, $1)=no
7385 _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'
7386 # Commands to make compiler produce verbose output that lists
7387 # what "hidden" libraries, object files and flags are used when
7388 # linking a shared library.
7390 # There doesn't appear to be a way to prevent this compiler from
7391 # explicitly linking system object files so we need to strip them
7392 # from the output so that they don't get included in the library
7394 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"'
7397 if test "$GXX" = yes; then
7398 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7400 # FIXME: insert proper C++ library support
7401 _LT_TAGVAR(ld_shlibs, $1)=no
7408 if test $with_gnu_ld = no; then
7409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7410 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7416 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7422 _LT_TAGVAR(hardcode_direct, $1)=no
7423 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7426 _LT_TAGVAR(hardcode_direct, $1)=yes
7427 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7428 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7429 # but as the default
7430 # location of the library.
7434 case $cc_basename in
7436 # FIXME: insert proper C++ library support
7437 _LT_TAGVAR(ld_shlibs, $1)=no
7442 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7445 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7448 _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'
7451 # Commands to make compiler produce verbose output that lists
7452 # what "hidden" libraries, object files and flags are used when
7453 # linking a shared library.
7455 # There doesn't appear to be a way to prevent this compiler from
7456 # explicitly linking system object files so we need to strip them
7457 # from the output so that they don't get included in the library
7459 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"'
7462 if test "$GXX" = yes; then
7463 if test $with_gnu_ld = no; then
7466 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7472 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7477 # FIXME: insert proper C++ library support
7478 _LT_TAGVAR(ld_shlibs, $1)=no
7485 _LT_TAGVAR(hardcode_direct, $1)=no
7486 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7488 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7489 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7490 # Instead, shared libraries are loaded at an image base (0x10000000 by
7491 # default) and relocated if they conflict, which is a slow very memory
7492 # consuming and fragmenting process. To avoid this, we pick a random,
7493 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7494 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7495 _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'
7496 _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'
7499 case $cc_basename in
7502 _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'
7504 # Archives containing C++ object files must be created using
7505 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7506 # necessary to make sure instantiated templates are included
7508 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7511 if test "$GXX" = yes; then
7512 if test "$with_gnu_ld" = no; then
7513 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7515 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7518 _LT_TAGVAR(link_all_deplibs, $1)=yes
7521 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7522 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7523 _LT_TAGVAR(inherit_rpath, $1)=yes
7526 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7527 case $cc_basename in
7529 # Kuck and Associates, Inc. (KAI) C++ Compiler
7531 # KCC will only create a shared library if the output file
7532 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7533 # to its proper name (with version) after linking.
7534 _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'
7535 _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'
7536 # Commands to make compiler produce verbose output that lists
7537 # what "hidden" libraries, object files and flags are used when
7538 # linking a shared library.
7540 # There doesn't appear to be a way to prevent this compiler from
7541 # explicitly linking system object files so we need to strip them
7542 # from the output so that they don't get included in the library
7544 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"'
7546 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7547 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7549 # Archives containing C++ object files must be created using
7550 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7551 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7556 # version 8.0 and above of icpc choke on multiply defined symbols
7557 # if we add $predep_objects and $postdep_objects, however 7.1 and
7558 # earlier do not add the objects themselves.
7559 case `$CC -V 2>&1` in
7561 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7562 _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'
7564 *) # Version 8.0 or newer
7567 ia64*) tmp_idyn=' -i_dynamic';;
7569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7570 _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'
7573 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7575 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7576 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7579 # Portland Group C++ compiler
7581 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7582 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7584 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7585 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7586 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7588 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7589 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7591 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7593 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7594 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7595 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7597 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7598 $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'
7600 *) # Version 6 and above use weak symbols
7601 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7602 _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'
7606 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7607 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7608 _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'
7612 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7613 _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'
7615 runpath_var=LD_RUN_PATH
7616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7617 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7619 # Commands to make compiler produce verbose output that lists
7620 # what "hidden" libraries, object files and flags are used when
7621 # linking a shared library.
7623 # There doesn't appear to be a way to prevent this compiler from
7624 # explicitly linking system object files so we need to strip them
7625 # from the output so that they don't get included in the library
7627 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'
7629 xl* | mpixl* | bgxl*)
7630 # IBM XL 8.0 on PPC, with GNU ld
7631 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7632 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7633 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7634 if test "x$supports_anon_versioning" = xyes; then
7635 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7636 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7637 echo "local: *; };" >> $output_objdir/$libname.ver~
7638 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7642 case `$CC -V 2>&1 | sed 5q` in
7645 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7646 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7647 _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'
7648 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7649 _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'
7650 _LT_TAGVAR(compiler_needs_object, $1)=yes
7652 # Not sure whether something based on
7653 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7655 output_verbose_link_cmd='func_echo_all'
7657 # Archives containing C++ object files must be created using
7658 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7659 # necessary to make sure instantiated templates are included
7661 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7669 # FIXME: insert proper C++ library support
7670 _LT_TAGVAR(ld_shlibs, $1)=no
7674 # FIXME: insert proper C++ library support
7675 _LT_TAGVAR(ld_shlibs, $1)=no
7679 case $cc_basename in
7681 # FIXME: insert proper C++ library support
7682 _LT_TAGVAR(ld_shlibs, $1)=no
7685 # FIXME: insert proper C++ library support
7686 _LT_TAGVAR(ld_shlibs, $1)=no
7692 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7693 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7695 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7696 _LT_TAGVAR(hardcode_direct, $1)=yes
7697 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7699 # Workaround some broken pre-1.5 toolchains
7700 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7704 _LT_TAGVAR(ld_shlibs, $1)=yes
7708 # C++ shared libraries are fairly broken
7709 _LT_TAGVAR(ld_shlibs, $1)=no
7713 if test -f /usr/libexec/ld.so; then
7714 _LT_TAGVAR(hardcode_direct, $1)=yes
7715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7716 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7717 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7718 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7719 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7720 _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'
7721 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7722 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7724 output_verbose_link_cmd=func_echo_all
7726 _LT_TAGVAR(ld_shlibs, $1)=no
7730 osf3* | osf4* | osf5*)
7731 case $cc_basename in
7733 # Kuck and Associates, Inc. (KAI) C++ Compiler
7735 # KCC will only create a shared library if the output file
7736 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7737 # to its proper name (with version) after linking.
7738 _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'
7740 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7741 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7743 # Archives containing C++ object files must be created using
7744 # the KAI C++ compiler.
7746 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7747 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7751 # Rational C++ 2.4.1
7752 # FIXME: insert proper C++ library support
7753 _LT_TAGVAR(ld_shlibs, $1)=no
7758 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7759 _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'
7760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7763 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7764 _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'
7765 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7766 echo "-hidden">> $lib.exp~
7767 $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~
7769 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7773 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7775 # Commands to make compiler produce verbose output that lists
7776 # what "hidden" libraries, object files and flags are used when
7777 # linking a shared library.
7779 # There doesn't appear to be a way to prevent this compiler from
7780 # explicitly linking system object files so we need to strip them
7781 # from the output so that they don't get included in the library
7783 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"'
7786 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7787 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7790 _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'
7793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7797 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7798 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7800 # Commands to make compiler produce verbose output that lists
7801 # what "hidden" libraries, object files and flags are used when
7802 # linking a shared library.
7803 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7806 # FIXME: insert proper C++ library support
7807 _LT_TAGVAR(ld_shlibs, $1)=no
7814 # FIXME: insert proper C++ library support
7815 _LT_TAGVAR(ld_shlibs, $1)=no
7819 case $cc_basename in
7822 # FIXME: insert proper C++ library support
7823 _LT_TAGVAR(ld_shlibs, $1)=no
7827 # FIXME: insert proper C++ library support
7828 _LT_TAGVAR(ld_shlibs, $1)=no
7831 # FIXME: insert proper C++ library support
7832 _LT_TAGVAR(ld_shlibs, $1)=no
7838 case $cc_basename in
7840 # Sun C++ 4.2, 5.x and Centerline C++
7841 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7842 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7843 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7844 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7845 $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'
7847 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7848 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7850 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7852 # The compiler driver will combine and reorder linker options,
7853 # but understands `-z linker_flag'.
7854 # Supported since Solaris 2.6 (maybe 2.5.1?)
7855 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7858 _LT_TAGVAR(link_all_deplibs, $1)=yes
7860 output_verbose_link_cmd='func_echo_all'
7862 # Archives containing C++ object files must be created using
7863 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7864 # necessary to make sure instantiated templates are included
7866 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7869 # Green Hills C++ Compiler
7870 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7872 # The C++ compiler must be used to create the archive.
7873 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7876 # GNU C++ compiler with Solaris linker
7877 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7878 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7879 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7880 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7881 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7882 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7884 # Commands to make compiler produce verbose output that lists
7885 # what "hidden" libraries, object files and flags are used when
7886 # linking a shared library.
7887 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7889 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7891 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7892 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7893 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7895 # Commands to make compiler produce verbose output that lists
7896 # what "hidden" libraries, object files and flags are used when
7897 # linking a shared library.
7898 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7903 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7905 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7913 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7914 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7915 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7916 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7917 runpath_var='LD_RUN_PATH'
7919 case $cc_basename in
7921 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7922 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7925 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7926 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7931 sysv5* | sco3.2v5* | sco5v6*)
7932 # Note: We can NOT use -z defs as we might desire, because we do not
7933 # link with -lc, and that would cause any symbols used from libc to
7934 # always be unresolved, which means just about no library would
7935 # ever link correctly. If we're not using GNU ld we use -z text
7936 # though, which does catch some bad symbols but isn't as heavy-handed
7938 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7939 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7940 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7941 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7942 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7943 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7944 _LT_TAGVAR(link_all_deplibs, $1)=yes
7945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7946 runpath_var='LD_RUN_PATH'
7948 case $cc_basename in
7950 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7951 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7952 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7953 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7954 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7955 '"$_LT_TAGVAR(reload_cmds, $1)"
7958 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7959 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7965 case $cc_basename in
7967 # NonStop-UX NCC 3.20
7968 # FIXME: insert proper C++ library support
7969 _LT_TAGVAR(ld_shlibs, $1)=no
7972 # FIXME: insert proper C++ library support
7973 _LT_TAGVAR(ld_shlibs, $1)=no
7979 # FIXME: insert proper C++ library support
7980 _LT_TAGVAR(ld_shlibs, $1)=no
7984 # FIXME: insert proper C++ library support
7985 _LT_TAGVAR(ld_shlibs, $1)=no
7989 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7990 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7992 _LT_TAGVAR(GCC, $1)="$GXX"
7993 _LT_TAGVAR(LD, $1)="$LD"
7996 ## There is no encapsulation within the following macros, do not change
7997 ## the running order or otherwise move them around unless you know exactly
7998 ## what you are doing...
7999 _LT_SYS_HIDDEN_LIBDEPS($1)
8000 _LT_COMPILER_PIC($1)
8001 _LT_COMPILER_C_O($1)
8002 _LT_COMPILER_FILE_LOCKS($1)
8003 _LT_LINKER_SHLIBS($1)
8004 _LT_SYS_DYNAMIC_LINKER($1)
8005 _LT_LINKER_HARDCODE_LIBPATH($1)
8008 fi # test -n "$compiler"
8011 CFLAGS=$lt_save_CFLAGS
8015 with_gnu_ld=$lt_save_with_gnu_ld
8016 lt_cv_path_LDCXX=$lt_cv_path_LD
8017 lt_cv_path_LD=$lt_save_path_LD
8018 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8019 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8020 fi # test "$_lt_caught_CXX_error" != yes
8023 ])# _LT_LANG_CXX_CONFIG
8026 # _LT_FUNC_STRIPNAME_CNF
8027 # ----------------------
8028 # func_stripname_cnf prefix suffix name
8029 # strip PREFIX and SUFFIX off of NAME.
8030 # PREFIX and SUFFIX must not contain globbing or regex special
8031 # characters, hashes, percent signs, but SUFFIX may contain a leading
8032 # dot (in which case that matches only a dot).
8034 # This function is identical to the (non-XSI) version of func_stripname,
8035 # except this one can be used by m4 code that may be executed by configure,
8036 # rather than the libtool script.
8037 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8038 AC_REQUIRE([_LT_DECL_SED])
8039 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8040 func_stripname_cnf ()
8043 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8044 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8046 } # func_stripname_cnf
8047 ])# _LT_FUNC_STRIPNAME_CNF
8049 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8050 # ---------------------------------
8051 # Figure out "hidden" library dependencies from verbose
8052 # compiler output when linking a shared library.
8053 # Parse the compiler output and extract the necessary
8054 # objects, libraries and library flags.
8055 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8056 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8057 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8058 # Dependencies to place before and after the object being linked:
8059 _LT_TAGVAR(predep_objects, $1)=
8060 _LT_TAGVAR(postdep_objects, $1)=
8061 _LT_TAGVAR(predeps, $1)=
8062 _LT_TAGVAR(postdeps, $1)=
8063 _LT_TAGVAR(compiler_lib_search_path, $1)=
8065 dnl we can't use the lt_simple_compile_test_code here,
8066 dnl because it contains code intended for an executable,
8067 dnl not a library. It's possible we should let each
8068 dnl tag define a new lt_????_link_test_code variable,
8069 dnl but it's only used here...
8070 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8072 void foo (void) { a = 0; }
8074 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8078 Foo (void) { a = 0; }
8083 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8091 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8099 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8102 public void bar (void) {
8107 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8114 _lt_libdeps_save_CFLAGS=$CFLAGS
8115 case "$CC $CFLAGS " in #(
8116 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8117 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8118 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8121 dnl Parse the compiler output and extract the necessary
8122 dnl objects, libraries and library flags.
8123 if AC_TRY_EVAL(ac_compile); then
8124 # Parse the compiler output and extract the necessary
8125 # objects, libraries and library flags.
8127 # Sentinel used to keep track of whether or not we are before
8128 # the conftest object file.
8129 pre_test_object_deps_done=no
8131 for p in `eval "$output_verbose_link_cmd"`; do
8135 # Some compilers place space between "-{L,R}" and the path.
8137 if test $p = "-L" ||
8138 test $p = "-R"; then
8143 # Expand the sysroot to ease extracting the directories later.
8144 if test -z "$prev"; then
8146 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8147 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8148 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8152 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8154 if test "$pre_test_object_deps_done" = no; then
8157 # Internal compiler library paths should come after those
8158 # provided the user. The postdeps already come after the
8159 # user supplied libs so there is no need to process them.
8160 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8161 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8163 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8166 # The "-l" case would never come before the object being
8167 # linked, so don't bother handling this case.
8170 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8171 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8173 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8179 *.lto.$objext) ;; # Ignore GCC LTO objects
8181 # This assumes that the test object file only shows up
8182 # once in the compiler output.
8183 if test "$p" = "conftest.$objext"; then
8184 pre_test_object_deps_done=yes
8188 if test "$pre_test_object_deps_done" = no; then
8189 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8190 _LT_TAGVAR(predep_objects, $1)="$p"
8192 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8195 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8196 _LT_TAGVAR(postdep_objects, $1)="$p"
8198 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8203 *) ;; # Ignore the rest.
8211 echo "libtool.m4: error: problem compiling $1 test program"
8214 $RM -f confest.$objext
8215 CFLAGS=$_lt_libdeps_save_CFLAGS
8217 # PORTME: override above test on systems where it is broken
8221 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8222 # hack all around it, let's just trust "g++" to DTRT.
8223 _LT_TAGVAR(predep_objects,$1)=
8224 _LT_TAGVAR(postdep_objects,$1)=
8225 _LT_TAGVAR(postdeps,$1)=
8229 case `$CC -V 2>&1 | sed 5q` in
8233 # The more standards-conforming stlport4 library is
8234 # incompatible with the Cstd library. Avoid specifying
8235 # it if it's in CXXFLAGS. Ignore libCrun as
8236 # -library=stlport4 depends on it.
8237 case " $CXX $CXXFLAGS " in
8238 *" -library=stlport4 "*)
8239 solaris_use_stlport4=yes
8243 if test "$solaris_use_stlport4" != yes; then
8244 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8251 case $cc_basename in
8253 # The more standards-conforming stlport4 library is
8254 # incompatible with the Cstd library. Avoid specifying
8255 # it if it's in CXXFLAGS. Ignore libCrun as
8256 # -library=stlport4 depends on it.
8257 case " $CXX $CXXFLAGS " in
8258 *" -library=stlport4 "*)
8259 solaris_use_stlport4=yes
8263 # Adding this requires a known-good setup of shared libraries for
8264 # Sun compiler versions before 5.6, else PIC objects from an old
8265 # archive will be linked into the output, leading to subtle bugs.
8266 if test "$solaris_use_stlport4" != yes; then
8267 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8275 case " $_LT_TAGVAR(postdeps, $1) " in
8276 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8278 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8279 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8280 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8282 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8283 [The directories searched by this compiler when creating a shared library])
8284 _LT_TAGDECL([], [predep_objects], [1],
8285 [Dependencies to place before and after the objects being linked to
8286 create a shared library])
8287 _LT_TAGDECL([], [postdep_objects], [1])
8288 _LT_TAGDECL([], [predeps], [1])
8289 _LT_TAGDECL([], [postdeps], [1])
8290 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8291 [The library search path used internally by the compiler when linking
8293 ])# _LT_SYS_HIDDEN_LIBDEPS
8296 # _LT_LANG_F77_CONFIG([TAG])
8297 # --------------------------
8298 # Ensure that the configuration variables for a Fortran 77 compiler are
8299 # suitably defined. These variables are subsequently used by _LT_CONFIG
8300 # to write the compiler configuration to `libtool'.
8301 m4_defun([_LT_LANG_F77_CONFIG],
8302 [AC_LANG_PUSH(Fortran 77)
8303 if test -z "$F77" || test "X$F77" = "Xno"; then
8307 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8308 _LT_TAGVAR(allow_undefined_flag, $1)=
8309 _LT_TAGVAR(always_export_symbols, $1)=no
8310 _LT_TAGVAR(archive_expsym_cmds, $1)=
8311 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8312 _LT_TAGVAR(hardcode_direct, $1)=no
8313 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8314 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8315 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8316 _LT_TAGVAR(hardcode_minus_L, $1)=no
8317 _LT_TAGVAR(hardcode_automatic, $1)=no
8318 _LT_TAGVAR(inherit_rpath, $1)=no
8319 _LT_TAGVAR(module_cmds, $1)=
8320 _LT_TAGVAR(module_expsym_cmds, $1)=
8321 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8322 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8323 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8324 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8325 _LT_TAGVAR(no_undefined_flag, $1)=
8326 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8327 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8329 # Source file extension for f77 test sources.
8332 # Object file extension for compiled f77 test sources.
8334 _LT_TAGVAR(objext, $1)=$objext
8336 # No sense in running all these tests if we already determined that
8337 # the F77 compiler isn't working. Some variables (like enable_shared)
8338 # are currently assumed to apply to all compilers on this platform,
8339 # and will be corrupted by setting them based on a non-working compiler.
8340 if test "$_lt_disable_F77" != yes; then
8341 # Code to be used in simple compile tests
8342 lt_simple_compile_test_code="\
8348 # Code to be used in simple link tests
8349 lt_simple_link_test_code="\
8354 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8357 # save warnings/boilerplate of simple test code
8358 _LT_COMPILER_BOILERPLATE
8359 _LT_LINKER_BOILERPLATE
8361 # Allow CC to be a program name with arguments.
8364 lt_save_CFLAGS=$CFLAGS
8368 _LT_TAGVAR(compiler, $1)=$CC
8369 _LT_CC_BASENAME([$compiler])
8371 if test -n "$compiler"; then
8372 AC_MSG_CHECKING([if libtool supports shared libraries])
8373 AC_MSG_RESULT([$can_build_shared])
8375 AC_MSG_CHECKING([whether to build shared libraries])
8376 test "$can_build_shared" = "no" && enable_shared=no
8378 # On AIX, shared libraries and static libraries use the same namespace, and
8379 # are all built from PIC.
8382 test "$enable_shared" = yes && enable_static=no
8383 if test -n "$RANLIB"; then
8384 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8385 postinstall_cmds='$RANLIB $lib'
8389 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8390 test "$enable_shared" = yes && enable_static=no
8394 AC_MSG_RESULT([$enable_shared])
8396 AC_MSG_CHECKING([whether to build static libraries])
8397 # Make sure either enable_shared or enable_static is yes.
8398 test "$enable_shared" = yes || enable_static=yes
8399 AC_MSG_RESULT([$enable_static])
8401 _LT_TAGVAR(GCC, $1)="$G77"
8402 _LT_TAGVAR(LD, $1)="$LD"
8405 ## There is no encapsulation within the following macros, do not change
8406 ## the running order or otherwise move them around unless you know exactly
8407 ## what you are doing...
8408 _LT_COMPILER_PIC($1)
8409 _LT_COMPILER_C_O($1)
8410 _LT_COMPILER_FILE_LOCKS($1)
8411 _LT_LINKER_SHLIBS($1)
8412 _LT_SYS_DYNAMIC_LINKER($1)
8413 _LT_LINKER_HARDCODE_LIBPATH($1)
8416 fi # test -n "$compiler"
8420 CFLAGS="$lt_save_CFLAGS"
8421 fi # test "$_lt_disable_F77" != yes
8424 ])# _LT_LANG_F77_CONFIG
8427 # _LT_LANG_FC_CONFIG([TAG])
8428 # -------------------------
8429 # Ensure that the configuration variables for a Fortran compiler are
8430 # suitably defined. These variables are subsequently used by _LT_CONFIG
8431 # to write the compiler configuration to `libtool'.
8432 m4_defun([_LT_LANG_FC_CONFIG],
8433 [AC_LANG_PUSH(Fortran)
8435 if test -z "$FC" || test "X$FC" = "Xno"; then
8439 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8440 _LT_TAGVAR(allow_undefined_flag, $1)=
8441 _LT_TAGVAR(always_export_symbols, $1)=no
8442 _LT_TAGVAR(archive_expsym_cmds, $1)=
8443 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8444 _LT_TAGVAR(hardcode_direct, $1)=no
8445 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8447 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8448 _LT_TAGVAR(hardcode_minus_L, $1)=no
8449 _LT_TAGVAR(hardcode_automatic, $1)=no
8450 _LT_TAGVAR(inherit_rpath, $1)=no
8451 _LT_TAGVAR(module_cmds, $1)=
8452 _LT_TAGVAR(module_expsym_cmds, $1)=
8453 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8454 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8455 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8456 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8457 _LT_TAGVAR(no_undefined_flag, $1)=
8458 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8459 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8461 # Source file extension for fc test sources.
8462 ac_ext=${ac_fc_srcext-f}
8464 # Object file extension for compiled fc test sources.
8466 _LT_TAGVAR(objext, $1)=$objext
8468 # No sense in running all these tests if we already determined that
8469 # the FC compiler isn't working. Some variables (like enable_shared)
8470 # are currently assumed to apply to all compilers on this platform,
8471 # and will be corrupted by setting them based on a non-working compiler.
8472 if test "$_lt_disable_FC" != yes; then
8473 # Code to be used in simple compile tests
8474 lt_simple_compile_test_code="\
8480 # Code to be used in simple link tests
8481 lt_simple_link_test_code="\
8486 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8489 # save warnings/boilerplate of simple test code
8490 _LT_COMPILER_BOILERPLATE
8491 _LT_LINKER_BOILERPLATE
8493 # Allow CC to be a program name with arguments.
8496 lt_save_CFLAGS=$CFLAGS
8500 GCC=$ac_cv_fc_compiler_gnu
8502 _LT_TAGVAR(compiler, $1)=$CC
8503 _LT_CC_BASENAME([$compiler])
8505 if test -n "$compiler"; then
8506 AC_MSG_CHECKING([if libtool supports shared libraries])
8507 AC_MSG_RESULT([$can_build_shared])
8509 AC_MSG_CHECKING([whether to build shared libraries])
8510 test "$can_build_shared" = "no" && enable_shared=no
8512 # On AIX, shared libraries and static libraries use the same namespace, and
8513 # are all built from PIC.
8516 test "$enable_shared" = yes && enable_static=no
8517 if test -n "$RANLIB"; then
8518 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8519 postinstall_cmds='$RANLIB $lib'
8523 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8524 test "$enable_shared" = yes && enable_static=no
8528 AC_MSG_RESULT([$enable_shared])
8530 AC_MSG_CHECKING([whether to build static libraries])
8531 # Make sure either enable_shared or enable_static is yes.
8532 test "$enable_shared" = yes || enable_static=yes
8533 AC_MSG_RESULT([$enable_static])
8535 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8536 _LT_TAGVAR(LD, $1)="$LD"
8539 ## There is no encapsulation within the following macros, do not change
8540 ## the running order or otherwise move them around unless you know exactly
8541 ## what you are doing...
8542 _LT_SYS_HIDDEN_LIBDEPS($1)
8543 _LT_COMPILER_PIC($1)
8544 _LT_COMPILER_C_O($1)
8545 _LT_COMPILER_FILE_LOCKS($1)
8546 _LT_LINKER_SHLIBS($1)
8547 _LT_SYS_DYNAMIC_LINKER($1)
8548 _LT_LINKER_HARDCODE_LIBPATH($1)
8551 fi # test -n "$compiler"
8555 CFLAGS=$lt_save_CFLAGS
8556 fi # test "$_lt_disable_FC" != yes
8559 ])# _LT_LANG_FC_CONFIG
8562 # _LT_LANG_GCJ_CONFIG([TAG])
8563 # --------------------------
8564 # Ensure that the configuration variables for the GNU Java Compiler compiler
8565 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8566 # to write the compiler configuration to `libtool'.
8567 m4_defun([_LT_LANG_GCJ_CONFIG],
8568 [AC_REQUIRE([LT_PROG_GCJ])dnl
8571 # Source file extension for Java test sources.
8574 # Object file extension for compiled Java test sources.
8576 _LT_TAGVAR(objext, $1)=$objext
8578 # Code to be used in simple compile tests
8579 lt_simple_compile_test_code="class foo {}"
8581 # Code to be used in simple link tests
8582 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8584 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8587 # save warnings/boilerplate of simple test code
8588 _LT_COMPILER_BOILERPLATE
8589 _LT_LINKER_BOILERPLATE
8591 # Allow CC to be a program name with arguments.
8593 lt_save_CFLAGS=$CFLAGS
8599 _LT_TAGVAR(compiler, $1)=$CC
8600 _LT_TAGVAR(LD, $1)="$LD"
8601 _LT_CC_BASENAME([$compiler])
8603 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8604 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8606 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8607 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8608 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8610 if test -n "$compiler"; then
8611 _LT_COMPILER_NO_RTTI($1)
8612 _LT_COMPILER_PIC($1)
8613 _LT_COMPILER_C_O($1)
8614 _LT_COMPILER_FILE_LOCKS($1)
8615 _LT_LINKER_SHLIBS($1)
8616 _LT_LINKER_HARDCODE_LIBPATH($1)
8625 CFLAGS=$lt_save_CFLAGS
8626 ])# _LT_LANG_GCJ_CONFIG
8629 # _LT_LANG_GO_CONFIG([TAG])
8630 # --------------------------
8631 # Ensure that the configuration variables for the GNU Go compiler
8632 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8633 # to write the compiler configuration to `libtool'.
8634 m4_defun([_LT_LANG_GO_CONFIG],
8635 [AC_REQUIRE([LT_PROG_GO])dnl
8638 # Source file extension for Go test sources.
8641 # Object file extension for compiled Go test sources.
8643 _LT_TAGVAR(objext, $1)=$objext
8645 # Code to be used in simple compile tests
8646 lt_simple_compile_test_code="package main; func main() { }"
8648 # Code to be used in simple link tests
8649 lt_simple_link_test_code='package main; func main() { }'
8651 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8654 # save warnings/boilerplate of simple test code
8655 _LT_COMPILER_BOILERPLATE
8656 _LT_LINKER_BOILERPLATE
8658 # Allow CC to be a program name with arguments.
8660 lt_save_CFLAGS=$CFLAGS
8666 _LT_TAGVAR(compiler, $1)=$CC
8667 _LT_TAGVAR(LD, $1)="$LD"
8668 _LT_CC_BASENAME([$compiler])
8670 # Go did not exist at the time GCC didn't implicitly link libc in.
8671 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8673 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8674 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8675 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8677 if test -n "$compiler"; then
8678 _LT_COMPILER_NO_RTTI($1)
8679 _LT_COMPILER_PIC($1)
8680 _LT_COMPILER_C_O($1)
8681 _LT_COMPILER_FILE_LOCKS($1)
8682 _LT_LINKER_SHLIBS($1)
8683 _LT_LINKER_HARDCODE_LIBPATH($1)
8692 CFLAGS=$lt_save_CFLAGS
8693 ])# _LT_LANG_GO_CONFIG
8696 # _LT_LANG_RC_CONFIG([TAG])
8697 # -------------------------
8698 # Ensure that the configuration variables for the Windows resource compiler
8699 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8700 # to write the compiler configuration to `libtool'.
8701 m4_defun([_LT_LANG_RC_CONFIG],
8702 [AC_REQUIRE([LT_PROG_RC])dnl
8705 # Source file extension for RC test sources.
8708 # Object file extension for compiled RC test sources.
8710 _LT_TAGVAR(objext, $1)=$objext
8712 # Code to be used in simple compile tests
8713 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8715 # Code to be used in simple link tests
8716 lt_simple_link_test_code="$lt_simple_compile_test_code"
8718 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8721 # save warnings/boilerplate of simple test code
8722 _LT_COMPILER_BOILERPLATE
8723 _LT_LINKER_BOILERPLATE
8725 # Allow CC to be a program name with arguments.
8727 lt_save_CFLAGS=$CFLAGS
8733 _LT_TAGVAR(compiler, $1)=$CC
8734 _LT_CC_BASENAME([$compiler])
8735 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8737 if test -n "$compiler"; then
8745 CFLAGS=$lt_save_CFLAGS
8746 ])# _LT_LANG_RC_CONFIG
8751 AC_DEFUN([LT_PROG_GCJ],
8752 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8753 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8754 [AC_CHECK_TOOL(GCJ, gcj,)
8755 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8756 AC_SUBST(GCJFLAGS)])])[]dnl
8760 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8761 dnl aclocal-1.4 backwards compatibility:
8762 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8767 AC_DEFUN([LT_PROG_GO],
8768 [AC_CHECK_TOOL(GOC, gccgo,)
8774 AC_DEFUN([LT_PROG_RC],
8775 [AC_CHECK_TOOL(RC, windres,)
8779 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8780 dnl aclocal-1.4 backwards compatibility:
8781 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8786 # If we don't have a new enough Autoconf to choose the best grep
8787 # available, choose the one first in the user's PATH.
8788 m4_defun([_LT_DECL_EGREP],
8789 [AC_REQUIRE([AC_PROG_EGREP])dnl
8790 AC_REQUIRE([AC_PROG_FGREP])dnl
8791 test -z "$GREP" && GREP=grep
8792 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8793 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8794 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8795 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8802 # If we don't have a new enough Autoconf to choose the best objdump
8803 # available, choose the one first in the user's PATH.
8804 m4_defun([_LT_DECL_OBJDUMP],
8805 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8806 test -z "$OBJDUMP" && OBJDUMP=objdump
8807 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8813 # Ensure DLLTOOL variable is set.
8814 m4_defun([_LT_DECL_DLLTOOL],
8815 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8816 test -z "$DLLTOOL" && DLLTOOL=dlltool
8817 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8823 # Check for a fully-functional sed program, that truncates
8824 # as few characters as possible. Prefer GNU sed if found.
8825 m4_defun([_LT_DECL_SED],
8827 test -z "$SED" && SED=sed
8828 Xsed="$SED -e 1s/^X//"
8829 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8830 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8831 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8834 m4_ifndef([AC_PROG_SED], [
8835 # NOTE: This macro has been submitted for inclusion into #
8836 # GNU Autoconf as AC_PROG_SED. When it is available in #
8837 # a released version of Autoconf we should remove this #
8838 # macro and use it instead. #
8840 m4_defun([AC_PROG_SED],
8841 [AC_MSG_CHECKING([for a sed that does not truncate output])
8842 AC_CACHE_VAL(lt_cv_path_SED,
8843 [# Loop through the user's path and test for sed and gsed.
8844 # Then use that list of sed's as ones to test for truncation.
8845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849 test -z "$as_dir" && as_dir=.
8850 for lt_ac_prog in sed gsed; do
8851 for ac_exec_ext in '' $ac_executable_extensions; do
8852 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8853 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8861 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8862 # along with /bin/sed that truncates output.
8863 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8864 test ! -f $lt_ac_sed && continue
8865 cat /dev/null > conftest.in
8867 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8868 # Check for GNU sed and select it if it is found.
8869 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8870 lt_cv_path_SED=$lt_ac_sed
8874 cat conftest.in conftest.in >conftest.tmp
8875 mv conftest.tmp conftest.in
8876 cp conftest.in conftest.nl
8878 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8879 cmp -s conftest.out conftest.nl || break
8880 # 10000 chars as input seems more than enough
8881 test $lt_ac_count -gt 10 && break
8882 lt_ac_count=`expr $lt_ac_count + 1`
8883 if test $lt_ac_count -gt $lt_ac_max; then
8884 lt_ac_max=$lt_ac_count
8885 lt_cv_path_SED=$lt_ac_sed
8892 AC_MSG_RESULT([$SED])
8897 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8898 dnl aclocal-1.4 backwards compatibility:
8899 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8902 # _LT_CHECK_SHELL_FEATURES
8903 # ------------------------
8904 # Find out whether the shell is Bourne or XSI compatible,
8905 # or has some other useful features.
8906 m4_defun([_LT_CHECK_SHELL_FEATURES],
8907 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8908 # Try some XSI features
8911 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8913 && eval 'test $(( 1 + 1 )) -eq 2 \
8914 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8916 AC_MSG_RESULT([$xsi_shell])
8917 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8919 AC_MSG_CHECKING([whether the shell understands "+="])
8921 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8923 && lt_shell_append=yes
8924 AC_MSG_RESULT([$lt_shell_append])
8925 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8927 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8932 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8934 # test EBCDIC or ASCII
8935 case `echo X|tr X '\101'` in
8936 A) # ASCII based system
8937 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8938 lt_SP2NL='tr \040 \012'
8939 lt_NL2SP='tr \015\012 \040\040'
8941 *) # EBCDIC based system
8942 lt_SP2NL='tr \100 \n'
8943 lt_NL2SP='tr \r\n \100\100'
8946 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8947 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8948 ])# _LT_CHECK_SHELL_FEATURES
8951 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8952 # ------------------------------------------------------
8953 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8954 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8955 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8957 sed -e '/^$1 ()$/,/^} # $1 /c\
8960 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8961 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8962 && mv -f "$cfgfile.tmp" "$cfgfile" \
8963 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8964 test 0 -eq $? || _lt_function_replace_fail=:
8968 # _LT_PROG_REPLACE_SHELLFNS
8969 # -------------------------
8970 # Replace existing portable implementations of several shell functions with
8971 # equivalent extended shell implementations where those features are available..
8972 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8973 [if test x"$xsi_shell" = xyes; then
8974 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8976 */*) func_dirname_result="${1%/*}${2}" ;;
8977 * ) func_dirname_result="${3}" ;;
8980 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8981 func_basename_result="${1##*/}"])
8983 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8985 */*) func_dirname_result="${1%/*}${2}" ;;
8986 * ) func_dirname_result="${3}" ;;
8988 func_basename_result="${1##*/}"])
8990 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8991 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8992 # positional parameters, so assign one to ordinary parameter first.
8993 func_stripname_result=${3}
8994 func_stripname_result=${func_stripname_result#"${1}"}
8995 func_stripname_result=${func_stripname_result%"${2}"}])
8997 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8998 func_split_long_opt_name=${1%%=*}
8999 func_split_long_opt_arg=${1#*=}])
9001 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9002 func_split_short_opt_arg=${1#??}
9003 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9005 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9007 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9008 *) func_lo2o_result=${1} ;;
9011 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
9013 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
9015 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
9018 if test x"$lt_shell_append" = xyes; then
9019 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
9021 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9022 func_quote_for_eval "${2}"
9023 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9024 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9026 # Save a `func_append' function call where possible by direct use of '+='
9027 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9028 && mv -f "$cfgfile.tmp" "$cfgfile" \
9029 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9030 test 0 -eq $? || _lt_function_replace_fail=:
9032 # Save a `func_append' function call even when '+=' is not available
9033 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9034 && mv -f "$cfgfile.tmp" "$cfgfile" \
9035 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9036 test 0 -eq $? || _lt_function_replace_fail=:
9039 if test x"$_lt_function_replace_fail" = x":"; then
9040 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9044 # _LT_PATH_CONVERSION_FUNCTIONS
9045 # -----------------------------
9046 # Determine which file name conversion functions should be used by
9047 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
9048 # for certain cross-compile configurations and native mingw.
9049 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9050 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9051 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9052 AC_MSG_CHECKING([how to convert $build file names to $host format])
9053 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9057 *-*-mingw* ) # actually msys
9058 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9061 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9063 * ) # otherwise, assume *nix
9064 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9070 *-*-mingw* ) # actually msys
9071 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9074 lt_cv_to_host_file_cmd=func_convert_file_noop
9076 * ) # otherwise, assume *nix
9077 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9081 * ) # unhandled hosts (and "normal" native builds)
9082 lt_cv_to_host_file_cmd=func_convert_file_noop
9086 to_host_file_cmd=$lt_cv_to_host_file_cmd
9087 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9088 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9089 [0], [convert $build file names to $host format])dnl
9091 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9092 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9093 [#assume ordinary cross tools, or native build.
9094 lt_cv_to_tool_file_cmd=func_convert_file_noop
9098 *-*-mingw* ) # actually msys
9099 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9105 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9106 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9107 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9108 [0], [convert $build files to toolchain format])dnl
9109 ])# _LT_PATH_CONVERSION_FUNCTIONS
9111 # Helper functions for option handling. -*- Autoconf -*-
9113 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9115 # Written by Gary V. Vaughan, 2004
9117 # This file is free software; the Free Software Foundation gives
9118 # unlimited permission to copy and/or distribute it, with or without
9119 # modifications, as long as this notice is preserved.
9121 # serial 7 ltoptions.m4
9123 # This is to help aclocal find these macros, as it can't see m4_define.
9124 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9127 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9128 # ------------------------------------------
9129 m4_define([_LT_MANGLE_OPTION],
9130 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9133 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9134 # ---------------------------------------
9135 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9136 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9138 m4_define([_LT_SET_OPTION],
9139 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9140 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9141 _LT_MANGLE_DEFUN([$1], [$2]),
9142 [m4_warning([Unknown $1 option `$2'])])[]dnl
9146 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9147 # ------------------------------------------------------------
9148 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9149 m4_define([_LT_IF_OPTION],
9150 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9153 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9154 # -------------------------------------------------------
9155 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9157 m4_define([_LT_UNLESS_OPTIONS],
9158 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9159 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9160 [m4_define([$0_found])])])[]dnl
9161 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9166 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9167 # ----------------------------------------
9168 # OPTION-LIST is a space-separated list of Libtool options associated
9169 # with MACRO-NAME. If any OPTION has a matching handler declared with
9170 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9171 # the unknown option and exit.
9172 m4_defun([_LT_SET_OPTIONS],
9174 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9175 [_LT_SET_OPTION([$1], _LT_Option)])
9177 m4_if([$1],[LT_INIT],[
9179 dnl Simply set some default values (i.e off) if boolean options were not
9181 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9183 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9186 dnl If no reference was made to various pairs of opposing options, then
9187 dnl we run the default mode handler for the pair. For example, if neither
9188 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9189 dnl archives by default:
9190 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9191 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9192 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9193 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9194 [_LT_ENABLE_FAST_INSTALL])
9200 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9201 # -----------------------------------------
9202 m4_define([_LT_MANGLE_DEFUN],
9203 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9206 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9207 # -----------------------------------------------
9208 m4_define([LT_OPTION_DEFINE],
9209 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9210 ])# LT_OPTION_DEFINE
9215 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9218 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9219 [_LT_SET_OPTION([LT_INIT], [dlopen])
9220 AC_DIAGNOSE([obsolete],
9221 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9222 put the `dlopen' option into LT_INIT's first parameter.])
9225 dnl aclocal-1.4 backwards compatibility:
9226 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9231 # Declare package support for building win32 dll's.
9232 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9233 [enable_win32_dll=yes
9236 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9237 AC_CHECK_TOOL(AS, as, false)
9238 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9239 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9243 test -z "$AS" && AS=as
9244 _LT_DECL([], [AS], [1], [Assembler program])dnl
9246 test -z "$DLLTOOL" && DLLTOOL=dlltool
9247 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9249 test -z "$OBJDUMP" && OBJDUMP=objdump
9250 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9253 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9254 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9255 _LT_SET_OPTION([LT_INIT], [win32-dll])
9256 AC_DIAGNOSE([obsolete],
9257 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9258 put the `win32-dll' option into LT_INIT's first parameter.])
9261 dnl aclocal-1.4 backwards compatibility:
9262 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9265 # _LT_ENABLE_SHARED([DEFAULT])
9266 # ----------------------------
9267 # implement the --enable-shared flag, and supports the `shared' and
9268 # `disable-shared' LT_INIT options.
9269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9270 m4_define([_LT_ENABLE_SHARED],
9271 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9272 AC_ARG_ENABLE([shared],
9273 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9274 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9275 [p=${PACKAGE-default}
9277 yes) enable_shared=yes ;;
9278 no) enable_shared=no ;;
9281 # Look at the argument we got. We use all the common list separators.
9282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9283 for pkg in $enableval; do
9285 if test "X$pkg" = "X$p"; then
9292 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9294 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9295 [Whether or not to build shared libraries])
9296 ])# _LT_ENABLE_SHARED
9298 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9299 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9302 AC_DEFUN([AC_ENABLE_SHARED],
9303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9306 AC_DEFUN([AC_DISABLE_SHARED],
9307 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9310 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9311 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9313 dnl aclocal-1.4 backwards compatibility:
9314 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9315 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9319 # _LT_ENABLE_STATIC([DEFAULT])
9320 # ----------------------------
9321 # implement the --enable-static flag, and support the `static' and
9322 # `disable-static' LT_INIT options.
9323 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9324 m4_define([_LT_ENABLE_STATIC],
9325 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9326 AC_ARG_ENABLE([static],
9327 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9328 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9329 [p=${PACKAGE-default}
9331 yes) enable_static=yes ;;
9332 no) enable_static=no ;;
9335 # Look at the argument we got. We use all the common list separators.
9336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9337 for pkg in $enableval; do
9339 if test "X$pkg" = "X$p"; then
9346 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9348 _LT_DECL([build_old_libs], [enable_static], [0],
9349 [Whether or not to build static libraries])
9350 ])# _LT_ENABLE_STATIC
9352 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9353 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9356 AC_DEFUN([AC_ENABLE_STATIC],
9357 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9360 AC_DEFUN([AC_DISABLE_STATIC],
9361 [_LT_SET_OPTION([LT_INIT], [disable-static])
9364 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9365 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9367 dnl aclocal-1.4 backwards compatibility:
9368 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9369 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9373 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9374 # ----------------------------------
9375 # implement the --enable-fast-install flag, and support the `fast-install'
9376 # and `disable-fast-install' LT_INIT options.
9377 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9378 m4_define([_LT_ENABLE_FAST_INSTALL],
9379 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9380 AC_ARG_ENABLE([fast-install],
9381 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9382 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9383 [p=${PACKAGE-default}
9385 yes) enable_fast_install=yes ;;
9386 no) enable_fast_install=no ;;
9388 enable_fast_install=no
9389 # Look at the argument we got. We use all the common list separators.
9390 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9391 for pkg in $enableval; do
9393 if test "X$pkg" = "X$p"; then
9394 enable_fast_install=yes
9400 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9402 _LT_DECL([fast_install], [enable_fast_install], [0],
9403 [Whether or not to optimize for fast installation])dnl
9404 ])# _LT_ENABLE_FAST_INSTALL
9406 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9407 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9410 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9411 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9412 AC_DIAGNOSE([obsolete],
9413 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9414 the `fast-install' option into LT_INIT's first parameter.])
9417 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9418 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9419 AC_DIAGNOSE([obsolete],
9420 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9421 the `disable-fast-install' option into LT_INIT's first parameter.])
9424 dnl aclocal-1.4 backwards compatibility:
9425 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9426 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9429 # _LT_WITH_PIC([MODE])
9430 # --------------------
9431 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9433 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9434 m4_define([_LT_WITH_PIC],
9436 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9437 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9438 [lt_p=${PACKAGE-default}
9440 yes|no) pic_mode=$withval ;;
9443 # Look at the argument we got. We use all the common list separators.
9444 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9445 for lt_pkg in $withval; do
9447 if test "X$lt_pkg" = "X$lt_p"; then
9456 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9458 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9461 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9462 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9465 AU_DEFUN([AC_LIBTOOL_PICMODE],
9466 [_LT_SET_OPTION([LT_INIT], [pic-only])
9467 AC_DIAGNOSE([obsolete],
9468 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9469 put the `pic-only' option into LT_INIT's first parameter.])
9472 dnl aclocal-1.4 backwards compatibility:
9473 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9476 m4_define([_LTDL_MODE], [])
9477 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9478 [m4_define([_LTDL_MODE], [nonrecursive])])
9479 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9480 [m4_define([_LTDL_MODE], [recursive])])
9481 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9482 [m4_define([_LTDL_MODE], [subproject])])
9484 m4_define([_LTDL_TYPE], [])
9485 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9486 [m4_define([_LTDL_TYPE], [installable])])
9487 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9488 [m4_define([_LTDL_TYPE], [convenience])])
9490 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9492 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9493 # Written by Gary V. Vaughan, 2004
9495 # This file is free software; the Free Software Foundation gives
9496 # unlimited permission to copy and/or distribute it, with or without
9497 # modifications, as long as this notice is preserved.
9499 # serial 6 ltsugar.m4
9501 # This is to help aclocal find these macros, as it can't see m4_define.
9502 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9505 # lt_join(SEP, ARG1, [ARG2...])
9506 # -----------------------------
9507 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9508 # associated separator.
9509 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9510 # versions in m4sugar had bugs.
9511 m4_define([lt_join],
9512 [m4_if([$#], [1], [],
9514 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9515 m4_define([_lt_join],
9516 [m4_if([$#$2], [2], [],
9517 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9523 # Manipulate m4 lists.
9524 # These macros are necessary as long as will still need to support
9525 # Autoconf-2.59 which quotes differently.
9526 m4_define([lt_car], [[$1]])
9528 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9530 [m4_dquote(m4_shift($@))])])
9531 m4_define([lt_unquote], $1)
9534 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9535 # ------------------------------------------
9536 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9537 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9538 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9539 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9540 # than defined and empty).
9542 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9543 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9544 m4_define([lt_append],
9546 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9550 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9551 # ----------------------------------------------------------
9552 # Produce a SEP delimited list of all paired combinations of elements of
9553 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9554 # has the form PREFIXmINFIXSUFFIXn.
9555 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9556 m4_define([lt_combine],
9557 [m4_if(m4_eval([$# > 3]), [1],
9558 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9559 [[m4_foreach([_Lt_prefix], [$2],
9560 [m4_foreach([_Lt_suffix],
9561 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9562 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9565 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9566 # -----------------------------------------------------------------------
9567 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9568 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9569 m4_define([lt_if_append_uniq],
9571 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9572 [lt_append([$1], [$2], [$3])$4],
9574 [lt_append([$1], [$2], [$3])$4])])
9577 # lt_dict_add(DICT, KEY, VALUE)
9578 # -----------------------------
9579 m4_define([lt_dict_add],
9580 [m4_define([$1($2)], [$3])])
9583 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9584 # --------------------------------------------
9585 m4_define([lt_dict_add_subkey],
9586 [m4_define([$1($2:$3)], [$4])])
9589 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9590 # ----------------------------------
9591 m4_define([lt_dict_fetch],
9593 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9594 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9597 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9598 # -----------------------------------------------------------------
9599 m4_define([lt_if_dict_fetch],
9600 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9605 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9606 # --------------------------------------------------------------
9607 m4_define([lt_dict_filter],
9608 [m4_if([$5], [], [],
9609 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9610 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9611 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9614 # ltversion.m4 -- version numbers -*- Autoconf -*-
9616 # Copyright (C) 2004 Free Software Foundation, Inc.
9617 # Written by Scott James Remnant, 2004
9619 # This file is free software; the Free Software Foundation gives
9620 # unlimited permission to copy and/or distribute it, with or without
9621 # modifications, as long as this notice is preserved.
9625 # serial 3337 ltversion.m4
9626 # This file is part of GNU Libtool
9628 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9629 m4_define([LT_PACKAGE_REVISION], [1.3337])
9631 AC_DEFUN([LTVERSION_VERSION],
9632 [macro_version='2.4.2'
9633 macro_revision='1.3337'
9634 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9635 _LT_DECL(, macro_revision, 0)
9638 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9640 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9641 # Written by Scott James Remnant, 2004.
9643 # This file is free software; the Free Software Foundation gives
9644 # unlimited permission to copy and/or distribute it, with or without
9645 # modifications, as long as this notice is preserved.
9647 # serial 5 lt~obsolete.m4
9649 # These exist entirely to fool aclocal when bootstrapping libtool.
9651 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9652 # which have later been changed to m4_define as they aren't part of the
9653 # exported API, or moved to Autoconf or Automake where they belong.
9655 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9656 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9657 # using a macro with the same name in our local m4/libtool.m4 it'll
9658 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9659 # and doesn't know about Autoconf macros at all.)
9661 # So we provide this file, which has a silly filename so it's always
9662 # included after everything else. This provides aclocal with the
9663 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9664 # because those macros already exist, or will be overwritten later.
9665 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9667 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9668 # Yes, that means every name once taken will need to remain here until
9669 # we give up compatibility with versions before 1.7, at which point
9670 # we need to keep only those names which we still refer to.
9672 # This is to help aclocal find these macros, as it can't see m4_define.
9673 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9675 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9676 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9677 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9678 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9679 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9680 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9681 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9682 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9683 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9684 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9685 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9686 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9687 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9688 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9689 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9690 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9691 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9692 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9693 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9694 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9695 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9696 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9697 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9698 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9699 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9700 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9701 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9702 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9703 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9704 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9705 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9706 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9707 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9708 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9709 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9710 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9711 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9712 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9713 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9714 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9715 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9716 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9717 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9718 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9719 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9720 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9721 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9722 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9723 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9724 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9725 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9726 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9727 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9728 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9729 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9730 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9731 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9732 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9733 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9734 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9735 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9737 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9739 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9741 # This program is free software; you can redistribute it and/or modify
9742 # it under the terms of the GNU General Public License as published by
9743 # the Free Software Foundation; either version 2 of the License, or
9744 # (at your option) any later version.
9746 # This program is distributed in the hope that it will be useful, but
9747 # WITHOUT ANY WARRANTY; without even the implied warranty of
9748 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9749 # General Public License for more details.
9751 # You should have received a copy of the GNU General Public License
9752 # along with this program; if not, write to the Free Software
9753 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9755 # As a special exception to the GNU General Public License, if you
9756 # distribute this file as part of a program that contains a
9757 # configuration script generated by Autoconf, you may include it under
9758 # the same distribution terms that you use for the rest of that program.
9760 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9761 # ----------------------------------
9762 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9763 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9764 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9765 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9766 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9767 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9769 if test -n "$PKG_CONFIG"; then
9770 _pkg_min_version=m4_default([$1], [0.9.0])
9771 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9772 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9773 AC_MSG_RESULT([yes])
9780 ])# PKG_PROG_PKG_CONFIG
9782 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9784 # Check to see whether a particular set of modules exists. Similar
9785 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9788 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
9789 # this or PKG_CHECK_MODULES is called, or make sure to call
9790 # PKG_CHECK_EXISTS manually
9791 # --------------------------------------------------------------
9792 AC_DEFUN([PKG_CHECK_EXISTS],
9793 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9794 if test -n "$PKG_CONFIG" && \
9795 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9796 m4_ifval([$2], [$2], [:])
9797 m4_ifvaln([$3], [else
9802 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9803 # ---------------------------------------------
9804 m4_define([_PKG_CONFIG],
9805 [if test -n "$$1"; then
9807 elif test -n "$PKG_CONFIG"; then
9808 PKG_CHECK_EXISTS([$3],
9809 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9816 # _PKG_SHORT_ERRORS_SUPPORTED
9817 # -----------------------------
9818 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9819 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9820 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9821 _pkg_short_errors_supported=yes
9823 _pkg_short_errors_supported=no
9825 ])# _PKG_SHORT_ERRORS_SUPPORTED
9828 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9829 # [ACTION-IF-NOT-FOUND])
9832 # Note that if there is a possibility the first call to
9833 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9834 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9837 # --------------------------------------------------------------
9838 AC_DEFUN([PKG_CHECK_MODULES],
9839 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9840 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9841 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9844 AC_MSG_CHECKING([for $1])
9846 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9847 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9849 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9850 and $1[]_LIBS to avoid the need to call pkg-config.
9851 See the pkg-config man page for more details.])
9853 if test $pkg_failed = yes; then
9854 _PKG_SHORT_ERRORS_SUPPORTED
9855 if test $_pkg_short_errors_supported = yes; then
9856 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9858 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9860 # Put the nasty error message in config.log where it belongs
9861 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9863 ifelse([$4], , [AC_MSG_ERROR(dnl
9864 [Package requirements ($2) were not met:
9868 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9869 installed software in a non-standard prefix.
9873 [AC_MSG_RESULT([no])
9875 elif test $pkg_failed = untried; then
9876 ifelse([$4], , [AC_MSG_FAILURE(dnl
9877 [The pkg-config script could not be found or is too old. Make sure it
9878 is in your PATH or set the PKG_CONFIG environment variable to the full
9883 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9886 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9887 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9888 AC_MSG_RESULT([yes])
9889 ifelse([$3], , :, [$3])
9891 ])# PKG_CHECK_MODULES
9893 dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9895 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9897 dnl Permission is hereby granted, free of charge, to any person obtaining a
9898 dnl copy of this software and associated documentation files (the "Software"),
9899 dnl to deal in the Software without restriction, including without limitation
9900 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9901 dnl and/or sell copies of the Software, and to permit persons to whom the
9902 dnl Software is furnished to do so, subject to the following conditions:
9904 dnl The above copyright notice and this permission notice (including the next
9905 dnl paragraph) shall be included in all copies or substantial portions of the
9908 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9909 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9910 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
9911 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9912 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9913 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9914 dnl DEALINGS IN THE SOFTWARE.
9916 # XORG_MACROS_VERSION(required-version)
9917 # -------------------------------------
9918 # Minimum version: 1.1.0
9920 # If you're using a macro added in Version 1.1 or newer, include this in
9921 # your configure.ac with the minimum required version, such as:
9922 # XORG_MACROS_VERSION(1.1)
9924 # To ensure that this macro is defined, also add:
9925 # m4_ifndef([XORG_MACROS_VERSION],
9926 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9929 # See the "minimum version" comment for each macro you use to see what
9930 # version you require.
9931 m4_defun([XORG_MACROS_VERSION],[
9932 m4_define([vers_have], [1.19.0])
9933 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9934 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9935 m4_if(m4_cmp(maj_have, maj_needed), 0,,
9936 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9937 m4_if(m4_version_compare(vers_have, [$1]), -1,
9938 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9939 m4_undefine([vers_have])
9940 m4_undefine([maj_have])
9941 m4_undefine([maj_needed])
9942 ]) # XORG_MACROS_VERSION
9944 # XORG_PROG_RAWCPP()
9945 # ------------------
9946 # Minimum version: 1.0.0
9948 # Find cpp program and necessary flags for use in pre-processing text files
9949 # such as man pages and config files
9950 AC_DEFUN([XORG_PROG_RAWCPP],[
9951 AC_REQUIRE([AC_PROG_CPP])
9952 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
9953 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9955 # Check for flag to avoid builtin definitions - assumes unix is predefined,
9956 # which is not the best choice for supporting other OS'es, but covers most
9957 # of the ones we need for now.
9958 AC_MSG_CHECKING([if $RAWCPP requires -undef])
9959 AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9960 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9963 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9965 AC_MSG_RESULT([yes])
9966 # under Cygwin unix is still defined even with -undef
9967 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9968 RAWCPPFLAGS="-undef -ansi"
9969 AC_MSG_RESULT([yes, with -ansi])
9971 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
9974 rm -f conftest.$ac_ext
9976 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
9977 AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
9978 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
9981 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
9982 TRADITIONALCPPFLAGS="-traditional"
9983 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9984 AC_MSG_RESULT([yes])
9986 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
9989 rm -f conftest.$ac_ext
9990 AC_SUBST(RAWCPPFLAGS)
9991 AC_SUBST(TRADITIONALCPPFLAGS)
9992 ]) # XORG_PROG_RAWCPP
9994 # XORG_MANPAGE_SECTIONS()
9995 # -----------------------
9996 # Minimum version: 1.0.0
9998 # Determine which sections man pages go in for the different man page types
9999 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
10000 # Not sure if there's any better way than just hardcoding by OS name.
10001 # Override default settings by setting environment variables
10002 # Added MAN_SUBSTS in version 1.8
10003 # Added AC_PROG_SED in version 1.8
10005 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
10006 AC_REQUIRE([AC_CANONICAL_HOST])
10007 AC_REQUIRE([AC_PROG_SED])
10009 if test x$APP_MAN_SUFFIX = x ; then
10012 if test x$APP_MAN_DIR = x ; then
10013 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
10016 if test x$LIB_MAN_SUFFIX = x ; then
10019 if test x$LIB_MAN_DIR = x ; then
10020 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
10023 if test x$FILE_MAN_SUFFIX = x ; then
10025 solaris*) FILE_MAN_SUFFIX=4 ;;
10026 *) FILE_MAN_SUFFIX=5 ;;
10029 if test x$FILE_MAN_DIR = x ; then
10030 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
10033 if test x$MISC_MAN_SUFFIX = x ; then
10035 solaris*) MISC_MAN_SUFFIX=5 ;;
10036 *) MISC_MAN_SUFFIX=7 ;;
10039 if test x$MISC_MAN_DIR = x ; then
10040 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
10043 if test x$DRIVER_MAN_SUFFIX = x ; then
10045 solaris*) DRIVER_MAN_SUFFIX=7 ;;
10046 *) DRIVER_MAN_SUFFIX=4 ;;
10049 if test x$DRIVER_MAN_DIR = x ; then
10050 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
10053 if test x$ADMIN_MAN_SUFFIX = x ; then
10055 solaris*) ADMIN_MAN_SUFFIX=1m ;;
10056 *) ADMIN_MAN_SUFFIX=8 ;;
10059 if test x$ADMIN_MAN_DIR = x ; then
10060 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
10064 AC_SUBST([APP_MAN_SUFFIX])
10065 AC_SUBST([LIB_MAN_SUFFIX])
10066 AC_SUBST([FILE_MAN_SUFFIX])
10067 AC_SUBST([MISC_MAN_SUFFIX])
10068 AC_SUBST([DRIVER_MAN_SUFFIX])
10069 AC_SUBST([ADMIN_MAN_SUFFIX])
10070 AC_SUBST([APP_MAN_DIR])
10071 AC_SUBST([LIB_MAN_DIR])
10072 AC_SUBST([FILE_MAN_DIR])
10073 AC_SUBST([MISC_MAN_DIR])
10074 AC_SUBST([DRIVER_MAN_DIR])
10075 AC_SUBST([ADMIN_MAN_DIR])
10077 XORG_MAN_PAGE="X Version 11"
10078 AC_SUBST([XORG_MAN_PAGE])
10080 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10081 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10082 -e 's|__xservername__|Xorg|g' \
10083 -e 's|__xconfigfile__|xorg.conf|g' \
10084 -e 's|__projectroot__|\$(prefix)|g' \
10085 -e 's|__apploaddir__|\$(appdefaultdir)|g' \
10086 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
10087 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
10088 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
10089 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
10090 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
10091 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
10092 AC_SUBST([MAN_SUBSTS])
10094 ]) # XORG_MANPAGE_SECTIONS
10096 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
10097 # ------------------------
10098 # Minimum version: 1.7.0
10100 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
10101 # provided by xorg-sgml-doctools, if installed.
10102 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
10103 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
10105 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
10106 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
10107 [m4_ifval([$1],[:],
10108 [if test x"$cross_compiling" != x"yes" ; then
10109 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
10110 [XORG_SGML_PATH=$prefix/share/sgml])
10114 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
10115 # the path and the name of the doc stylesheet
10116 if test "x$XORG_SGML_PATH" != "x" ; then
10117 AC_MSG_RESULT([$XORG_SGML_PATH])
10118 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
10119 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
10121 AC_MSG_RESULT([no])
10124 AC_SUBST(XORG_SGML_PATH)
10125 AC_SUBST(STYLESHEET_SRCDIR)
10126 AC_SUBST(XSL_STYLESHEET)
10127 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
10128 ]) # XORG_CHECK_SGML_DOCTOOLS
10130 # XORG_CHECK_LINUXDOC
10131 # -------------------
10132 # Minimum version: 1.0.0
10134 # Defines the variable MAKE_TEXT if the necessary tools and
10135 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
10136 # Whether or not the necessary tools and files are found can be checked
10137 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
10138 AC_DEFUN([XORG_CHECK_LINUXDOC],[
10139 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10140 AC_REQUIRE([XORG_WITH_PS2PDF])
10142 AC_PATH_PROG(LINUXDOC, linuxdoc)
10144 AC_MSG_CHECKING([whether to build documentation])
10146 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
10152 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
10154 AC_MSG_RESULT([$BUILDDOC])
10156 AC_MSG_CHECKING([whether to build pdf documentation])
10158 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
10164 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10166 AC_MSG_RESULT([$BUILDPDFDOC])
10168 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
10169 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
10171 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
10173 AC_SUBST(MAKE_TEXT)
10176 AC_SUBST(MAKE_HTML)
10177 ]) # XORG_CHECK_LINUXDOC
10179 # XORG_CHECK_DOCBOOK
10180 # -------------------
10181 # Minimum version: 1.0.0
10183 # Checks for the ability to build output formats from SGML DocBook source.
10184 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
10185 # indicates whether the necessary tools and files are found and, if set,
10186 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
10187 AC_DEFUN([XORG_CHECK_DOCBOOK],[
10188 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10195 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
10196 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
10197 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
10198 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
10200 AC_MSG_CHECKING([whether to build text documentation])
10201 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
10202 test x$BUILD_TXTDOC != xno; then
10205 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
10206 AC_MSG_RESULT([$BUILDTXTDOC])
10208 AC_MSG_CHECKING([whether to build PDF documentation])
10209 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
10210 test x$BUILD_PDFDOC != xno; then
10213 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10214 AC_MSG_RESULT([$BUILDPDFDOC])
10216 AC_MSG_CHECKING([whether to build PostScript documentation])
10217 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
10218 test x$BUILD_PSDOC != xno; then
10221 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
10222 AC_MSG_RESULT([$BUILDPSDOC])
10224 AC_MSG_CHECKING([whether to build HTML documentation])
10225 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
10226 test x$BUILD_HTMLDOC != xno; then
10229 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
10230 AC_MSG_RESULT([$BUILDHTMLDOC])
10232 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
10233 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
10234 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
10235 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
10237 AC_SUBST(MAKE_TEXT)
10240 AC_SUBST(MAKE_HTML)
10241 ]) # XORG_CHECK_DOCBOOK
10243 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
10245 # Minimum version: 1.5.0
10246 # Minimum version for optional DEFAULT argument: 1.11.0
10248 # Documentation tools are not always available on all platforms and sometimes
10249 # not at the appropriate level. This macro enables a module to test for the
10250 # presence of the tool and obtain it's path in separate variables. Coupled with
10251 # the --with-xmlto option, it allows maximum flexibilty in making decisions
10252 # as whether or not to use the xmlto package. When DEFAULT is not specified,
10253 # --with-xmlto assumes 'auto'.
10255 # Interface to module:
10256 # HAVE_XMLTO: used in makefiles to conditionally generate documentation
10257 # XMLTO: returns the path of the xmlto program found
10258 # returns the path set by the user in the environment
10259 # --with-xmlto: 'yes' user instructs the module to use xmlto
10260 # 'no' user instructs the module not to use xmlto
10262 # Added in version 1.10.0
10263 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
10264 # xmlto for text output requires either lynx, links, or w3m browsers
10266 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
10268 AC_DEFUN([XORG_WITH_XMLTO],[
10269 AC_ARG_VAR([XMLTO], [Path to xmlto command])
10270 m4_define([_defopt], m4_default([$2], [auto]))
10272 AS_HELP_STRING([--with-xmlto],
10273 [Use xmlto to regenerate documentation (default: ]_defopt[)]),
10274 [use_xmlto=$withval], [use_xmlto=]_defopt)
10275 m4_undefine([_defopt])
10277 if test "x$use_xmlto" = x"auto"; then
10278 AC_PATH_PROG([XMLTO], [xmlto])
10279 if test "x$XMLTO" = "x"; then
10280 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
10285 elif test "x$use_xmlto" = x"yes" ; then
10286 AC_PATH_PROG([XMLTO], [xmlto])
10287 if test "x$XMLTO" = "x"; then
10288 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
10291 elif test "x$use_xmlto" = x"no" ; then
10292 if test "x$XMLTO" != "x"; then
10293 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10297 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
10300 # Test for a minimum version of xmlto, if provided.
10302 [if test "$have_xmlto" = yes; then
10303 # scrape the xmlto version
10304 AC_MSG_CHECKING([the xmlto version])
10305 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10306 AC_MSG_RESULT([$xmlto_version])
10307 AS_VERSION_COMPARE([$xmlto_version], [$1],
10308 [if test "x$use_xmlto" = xauto; then
10309 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10312 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10316 # Test for the ability of xmlto to generate a text target
10318 cat > conftest.xml << "EOF"
10320 AS_IF([test "$have_xmlto" = yes],
10321 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10322 [have_xmlto_text=yes],
10323 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
10325 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10326 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10327 ]) # XORG_WITH_XMLTO
10329 # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10330 # --------------------------------------------
10331 # Minimum version: 1.12.0
10332 # Minimum version for optional DEFAULT argument: 1.12.0
10334 # XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10335 # XML-based language used for the transformation of XML documents.
10336 # The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10337 # It is used under the cover by xmlto to generate html files from DocBook/XML.
10338 # The XSLT processor is often used as a standalone tool for transformations.
10339 # It should not be assumed that this tool is used only to work with documnetation.
10340 # When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10342 # Interface to module:
10343 # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10344 # XSLTPROC: returns the path of the xsltproc program found
10345 # returns the path set by the user in the environment
10346 # --with-xsltproc: 'yes' user instructs the module to use xsltproc
10347 # 'no' user instructs the module not to use xsltproc
10348 # have_xsltproc: returns yes if xsltproc found in PATH or no
10350 # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10352 AC_DEFUN([XORG_WITH_XSLTPROC],[
10353 AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10354 # Preserves the interface, should it be implemented later
10355 m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
10356 m4_define([_defopt], m4_default([$2], [auto]))
10357 AC_ARG_WITH(xsltproc,
10358 AS_HELP_STRING([--with-xsltproc],
10359 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10360 [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10361 m4_undefine([_defopt])
10363 if test "x$use_xsltproc" = x"auto"; then
10364 AC_PATH_PROG([XSLTPROC], [xsltproc])
10365 if test "x$XSLTPROC" = "x"; then
10366 AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10371 elif test "x$use_xsltproc" = x"yes" ; then
10372 AC_PATH_PROG([XSLTPROC], [xsltproc])
10373 if test "x$XSLTPROC" = "x"; then
10374 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10377 elif test "x$use_xsltproc" = x"no" ; then
10378 if test "x$XSLTPROC" != "x"; then
10379 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10383 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
10386 AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10387 ]) # XORG_WITH_XSLTPROC
10389 # XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
10390 # ----------------------------------------
10391 # Minimum version: 1.15.0
10393 # PERL (Practical Extraction and Report Language) is a language optimized for
10394 # scanning arbitrary text files, extracting information from those text files,
10395 # and printing reports based on that information.
10397 # When DEFAULT is not specified, --with-perl assumes 'auto'.
10399 # Interface to module:
10400 # HAVE_PERL: used in makefiles to conditionally scan text files
10401 # PERL: returns the path of the perl program found
10402 # returns the path set by the user in the environment
10403 # --with-perl: 'yes' user instructs the module to use perl
10404 # 'no' user instructs the module not to use perl
10405 # have_perl: returns yes if perl found in PATH or no
10407 # If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
10409 AC_DEFUN([XORG_WITH_PERL],[
10410 AC_ARG_VAR([PERL], [Path to perl command])
10411 # Preserves the interface, should it be implemented later
10412 m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
10413 m4_define([_defopt], m4_default([$2], [auto]))
10415 AS_HELP_STRING([--with-perl],
10416 [Use perl for extracting information from files (default: ]_defopt[)]),
10417 [use_perl=$withval], [use_perl=]_defopt)
10418 m4_undefine([_defopt])
10420 if test "x$use_perl" = x"auto"; then
10421 AC_PATH_PROG([PERL], [perl])
10422 if test "x$PERL" = "x"; then
10423 AC_MSG_WARN([perl not found - cannot extract information and report])
10428 elif test "x$use_perl" = x"yes" ; then
10429 AC_PATH_PROG([PERL], [perl])
10430 if test "x$PERL" = "x"; then
10431 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10434 elif test "x$use_perl" = x"no" ; then
10435 if test "x$PERL" != "x"; then
10436 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10440 AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10443 AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10444 ]) # XORG_WITH_PERL
10446 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10448 # Minimum version: 1.5.0
10449 # Minimum version for optional DEFAULT argument: 1.11.0
10451 # Documentation tools are not always available on all platforms and sometimes
10452 # not at the appropriate level. This macro enables a module to test for the
10453 # presence of the tool and obtain it's path in separate variables. Coupled with
10454 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
10455 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
10456 # --with-asciidoc assumes 'auto'.
10458 # Interface to module:
10459 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10460 # ASCIIDOC: returns the path of the asciidoc program found
10461 # returns the path set by the user in the environment
10462 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
10463 # 'no' user instructs the module not to use asciidoc
10465 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10467 AC_DEFUN([XORG_WITH_ASCIIDOC],[
10468 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10469 m4_define([_defopt], m4_default([$2], [auto]))
10470 AC_ARG_WITH(asciidoc,
10471 AS_HELP_STRING([--with-asciidoc],
10472 [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10473 [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10474 m4_undefine([_defopt])
10476 if test "x$use_asciidoc" = x"auto"; then
10477 AC_PATH_PROG([ASCIIDOC], [asciidoc])
10478 if test "x$ASCIIDOC" = "x"; then
10479 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10484 elif test "x$use_asciidoc" = x"yes" ; then
10485 AC_PATH_PROG([ASCIIDOC], [asciidoc])
10486 if test "x$ASCIIDOC" = "x"; then
10487 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10490 elif test "x$use_asciidoc" = x"no" ; then
10491 if test "x$ASCIIDOC" != "x"; then
10492 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10496 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10499 [if test "$have_asciidoc" = yes; then
10500 # scrape the asciidoc version
10501 AC_MSG_CHECKING([the asciidoc version])
10502 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10503 AC_MSG_RESULT([$asciidoc_version])
10504 AS_VERSION_COMPARE([$asciidoc_version], [$1],
10505 [if test "x$use_asciidoc" = xauto; then
10506 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10509 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10512 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10513 ]) # XORG_WITH_ASCIIDOC
10515 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10516 # -------------------------------------------
10517 # Minimum version: 1.5.0
10518 # Minimum version for optional DEFAULT argument: 1.11.0
10519 # Minimum version for optional DOT checking: 1.18.0
10521 # Documentation tools are not always available on all platforms and sometimes
10522 # not at the appropriate level. This macro enables a module to test for the
10523 # presence of the tool and obtain it's path in separate variables. Coupled with
10524 # the --with-doxygen option, it allows maximum flexibilty in making decisions
10525 # as whether or not to use the doxygen package. When DEFAULT is not specified,
10526 # --with-doxygen assumes 'auto'.
10528 # Interface to module:
10529 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10530 # DOXYGEN: returns the path of the doxygen program found
10531 # returns the path set by the user in the environment
10532 # --with-doxygen: 'yes' user instructs the module to use doxygen
10533 # 'no' user instructs the module not to use doxygen
10535 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10537 AC_DEFUN([XORG_WITH_DOXYGEN],[
10538 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10539 AC_ARG_VAR([DOT], [Path to the dot graphics utility])
10540 m4_define([_defopt], m4_default([$2], [auto]))
10541 AC_ARG_WITH(doxygen,
10542 AS_HELP_STRING([--with-doxygen],
10543 [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10544 [use_doxygen=$withval], [use_doxygen=]_defopt)
10545 m4_undefine([_defopt])
10547 if test "x$use_doxygen" = x"auto"; then
10548 AC_PATH_PROG([DOXYGEN], [doxygen])
10549 if test "x$DOXYGEN" = "x"; then
10550 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10555 elif test "x$use_doxygen" = x"yes" ; then
10556 AC_PATH_PROG([DOXYGEN], [doxygen])
10557 if test "x$DOXYGEN" = "x"; then
10558 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10561 elif test "x$use_doxygen" = x"no" ; then
10562 if test "x$DOXYGEN" != "x"; then
10563 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10567 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10570 [if test "$have_doxygen" = yes; then
10571 # scrape the doxygen version
10572 AC_MSG_CHECKING([the doxygen version])
10573 doxygen_version=`$DOXYGEN --version 2>/dev/null`
10574 AC_MSG_RESULT([$doxygen_version])
10575 AS_VERSION_COMPARE([$doxygen_version], [$1],
10576 [if test "x$use_doxygen" = xauto; then
10577 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10580 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10584 dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
10585 dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
10586 dnl HAVE_DOT = @HAVE_DOT@
10588 if test "x$have_doxygen" = "xyes"; then
10589 AC_PATH_PROG([DOT], [dot])
10590 if test "x$DOT" != "x"; then
10595 AC_SUBST([HAVE_DOT])
10596 AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
10597 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10598 ]) # XORG_WITH_DOXYGEN
10600 # XORG_WITH_GROFF([DEFAULT])
10602 # Minimum version: 1.6.0
10603 # Minimum version for optional DEFAULT argument: 1.11.0
10605 # Documentation tools are not always available on all platforms and sometimes
10606 # not at the appropriate level. This macro enables a module to test for the
10607 # presence of the tool and obtain it's path in separate variables. Coupled with
10608 # the --with-groff option, it allows maximum flexibilty in making decisions
10609 # as whether or not to use the groff package. When DEFAULT is not specified,
10610 # --with-groff assumes 'auto'.
10612 # Interface to module:
10613 # HAVE_GROFF: used in makefiles to conditionally generate documentation
10614 # HAVE_GROFF_MM: the memorandum macros (-mm) package
10615 # HAVE_GROFF_MS: the -ms macros package
10616 # GROFF: returns the path of the groff program found
10617 # returns the path set by the user in the environment
10618 # --with-groff: 'yes' user instructs the module to use groff
10619 # 'no' user instructs the module not to use groff
10621 # Added in version 1.9.0:
10622 # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10623 # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10624 # psselect from the psutils package.
10625 # the ghostcript package. Refer to the grohtml man pages
10627 # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10629 # OS and distros often splits groff in a basic and full package, the former
10630 # having the groff program and the later having devices, fonts and macros
10631 # Checking for the groff executable is not enough.
10633 # If macros are missing, we cannot assume that groff is useless, so we don't
10634 # unset HAVE_GROFF or GROFF env variables.
10635 # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10637 AC_DEFUN([XORG_WITH_GROFF],[
10638 AC_ARG_VAR([GROFF], [Path to groff command])
10639 m4_define([_defopt], m4_default([$1], [auto]))
10641 AS_HELP_STRING([--with-groff],
10642 [Use groff to regenerate documentation (default: ]_defopt[)]),
10643 [use_groff=$withval], [use_groff=]_defopt)
10644 m4_undefine([_defopt])
10646 if test "x$use_groff" = x"auto"; then
10647 AC_PATH_PROG([GROFF], [groff])
10648 if test "x$GROFF" = "x"; then
10649 AC_MSG_WARN([groff not found - documentation targets will be skipped])
10654 elif test "x$use_groff" = x"yes" ; then
10655 AC_PATH_PROG([GROFF], [groff])
10656 if test "x$GROFF" = "x"; then
10657 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10660 elif test "x$use_groff" = x"no" ; then
10661 if test "x$GROFF" != "x"; then
10662 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10666 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10669 # We have groff, test for the presence of the macro packages
10670 if test "x$have_groff" = x"yes"; then
10671 AC_MSG_CHECKING([for ${GROFF} -ms macros])
10672 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10677 AC_MSG_RESULT([$groff_ms_works])
10678 AC_MSG_CHECKING([for ${GROFF} -mm macros])
10679 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10684 AC_MSG_RESULT([$groff_mm_works])
10687 # We have groff, test for HTML dependencies, one command per package
10688 if test "x$have_groff" = x"yes"; then
10689 AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10690 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10691 AC_PATH_PROG(PSSELECT_PATH, [psselect])
10692 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10693 have_groff_html=yes
10696 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10700 # Set Automake conditionals for Makefiles
10701 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10702 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10703 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10704 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10705 ]) # XORG_WITH_GROFF
10707 # XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10708 # ---------------------------------------
10709 # Minimum version: 1.6.0
10710 # Minimum version for optional DEFAULT argument: 1.11.0
10711 # Minimum version for optional MIN-VERSION argument: 1.15.0
10713 # Documentation tools are not always available on all platforms and sometimes
10714 # not at the appropriate level. This macro enables a module to test for the
10715 # presence of the tool and obtain it's path in separate variables. Coupled with
10716 # the --with-fop option, it allows maximum flexibilty in making decisions
10717 # as whether or not to use the fop package. When DEFAULT is not specified,
10718 # --with-fop assumes 'auto'.
10720 # Interface to module:
10721 # HAVE_FOP: used in makefiles to conditionally generate documentation
10722 # FOP: returns the path of the fop program found
10723 # returns the path set by the user in the environment
10724 # --with-fop: 'yes' user instructs the module to use fop
10725 # 'no' user instructs the module not to use fop
10727 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10729 AC_DEFUN([XORG_WITH_FOP],[
10730 AC_ARG_VAR([FOP], [Path to fop command])
10731 m4_define([_defopt], m4_default([$2], [auto]))
10733 AS_HELP_STRING([--with-fop],
10734 [Use fop to regenerate documentation (default: ]_defopt[)]),
10735 [use_fop=$withval], [use_fop=]_defopt)
10736 m4_undefine([_defopt])
10738 if test "x$use_fop" = x"auto"; then
10739 AC_PATH_PROG([FOP], [fop])
10740 if test "x$FOP" = "x"; then
10741 AC_MSG_WARN([fop not found - documentation targets will be skipped])
10746 elif test "x$use_fop" = x"yes" ; then
10747 AC_PATH_PROG([FOP], [fop])
10748 if test "x$FOP" = "x"; then
10749 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10752 elif test "x$use_fop" = x"no" ; then
10753 if test "x$FOP" != "x"; then
10754 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10758 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10761 # Test for a minimum version of fop, if provided.
10763 [if test "$have_fop" = yes; then
10764 # scrape the fop version
10765 AC_MSG_CHECKING([for fop minimum version])
10766 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10767 AC_MSG_RESULT([$fop_version])
10768 AS_VERSION_COMPARE([$fop_version], [$1],
10769 [if test "x$use_fop" = xauto; then
10770 AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10773 AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10776 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10779 # XORG_WITH_M4([MIN-VERSION])
10780 # ---------------------------
10781 # Minimum version: 1.19.0
10783 # This macro attempts to locate an m4 macro processor which supports
10784 # -I option and is only useful for modules relying on M4 in order to
10785 # expand macros in source code files.
10787 # Interface to module:
10788 # M4: returns the path of the m4 program found
10789 # returns the path set by the user in the environment
10791 AC_DEFUN([XORG_WITH_M4], [
10792 AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
10793 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
10794 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
10795 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
10796 [AC_MSG_ERROR([could not find m4 that supports -I option])],
10797 [$PATH:/usr/gnu/bin])])
10799 AC_SUBST([M4], [$ac_cv_path_M4])
10802 # XORG_WITH_PS2PDF([DEFAULT])
10804 # Minimum version: 1.6.0
10805 # Minimum version for optional DEFAULT argument: 1.11.0
10807 # Documentation tools are not always available on all platforms and sometimes
10808 # not at the appropriate level. This macro enables a module to test for the
10809 # presence of the tool and obtain it's path in separate variables. Coupled with
10810 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10811 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10812 # --with-ps2pdf assumes 'auto'.
10814 # Interface to module:
10815 # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
10816 # PS2PDF: returns the path of the ps2pdf program found
10817 # returns the path set by the user in the environment
10818 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10819 # 'no' user instructs the module not to use ps2pdf
10821 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10823 AC_DEFUN([XORG_WITH_PS2PDF],[
10824 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10825 m4_define([_defopt], m4_default([$1], [auto]))
10826 AC_ARG_WITH(ps2pdf,
10827 AS_HELP_STRING([--with-ps2pdf],
10828 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10829 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10830 m4_undefine([_defopt])
10832 if test "x$use_ps2pdf" = x"auto"; then
10833 AC_PATH_PROG([PS2PDF], [ps2pdf])
10834 if test "x$PS2PDF" = "x"; then
10835 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10840 elif test "x$use_ps2pdf" = x"yes" ; then
10841 AC_PATH_PROG([PS2PDF], [ps2pdf])
10842 if test "x$PS2PDF" = "x"; then
10843 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10846 elif test "x$use_ps2pdf" = x"no" ; then
10847 if test "x$PS2PDF" != "x"; then
10848 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10852 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10854 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10855 ]) # XORG_WITH_PS2PDF
10857 # XORG_ENABLE_DOCS (enable_docs=yes)
10859 # Minimum version: 1.6.0
10861 # Documentation tools are not always available on all platforms and sometimes
10862 # not at the appropriate level. This macro enables a builder to skip all
10863 # documentation targets except traditional man pages.
10864 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10865 # maximum flexibilty in controlling documentation building.
10867 # XORG_WITH_XMLTO --with-xmlto
10868 # XORG_WITH_ASCIIDOC --with-asciidoc
10869 # XORG_WITH_DOXYGEN --with-doxygen
10870 # XORG_WITH_FOP --with-fop
10871 # XORG_WITH_GROFF --with-groff
10872 # XORG_WITH_PS2PDF --with-ps2pdf
10874 # Interface to module:
10875 # ENABLE_DOCS: used in makefiles to conditionally generate documentation
10876 # --enable-docs: 'yes' user instructs the module to generate docs
10877 # 'no' user instructs the module not to generate docs
10878 # parm1: specify the default value, yes or no.
10880 AC_DEFUN([XORG_ENABLE_DOCS],[
10881 m4_define([docs_default], m4_default([$1], [yes]))
10882 AC_ARG_ENABLE(docs,
10883 AS_HELP_STRING([--enable-docs],
10884 [Enable building the documentation (default: ]docs_default[)]),
10885 [build_docs=$enableval], [build_docs=]docs_default)
10886 m4_undefine([docs_default])
10887 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10888 AC_MSG_CHECKING([whether to build documentation])
10889 AC_MSG_RESULT([$build_docs])
10890 ]) # XORG_ENABLE_DOCS
10892 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10894 # Minimum version: 1.6.0
10896 # This macro enables a builder to skip all developer documentation.
10897 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10898 # maximum flexibilty in controlling documentation building.
10900 # XORG_WITH_XMLTO --with-xmlto
10901 # XORG_WITH_ASCIIDOC --with-asciidoc
10902 # XORG_WITH_DOXYGEN --with-doxygen
10903 # XORG_WITH_FOP --with-fop
10904 # XORG_WITH_GROFF --with-groff
10905 # XORG_WITH_PS2PDF --with-ps2pdf
10907 # Interface to module:
10908 # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
10909 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
10910 # 'no' user instructs the module not to generate developer docs
10911 # parm1: specify the default value, yes or no.
10913 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10914 m4_define([devel_default], m4_default([$1], [yes]))
10915 AC_ARG_ENABLE(devel-docs,
10916 AS_HELP_STRING([--enable-devel-docs],
10917 [Enable building the developer documentation (default: ]devel_default[)]),
10918 [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10919 m4_undefine([devel_default])
10920 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10921 AC_MSG_CHECKING([whether to build developer documentation])
10922 AC_MSG_RESULT([$build_devel_docs])
10923 ]) # XORG_ENABLE_DEVEL_DOCS
10925 # XORG_ENABLE_SPECS (enable_specs=yes)
10927 # Minimum version: 1.6.0
10929 # This macro enables a builder to skip all functional specification targets.
10930 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10931 # maximum flexibilty in controlling documentation building.
10933 # XORG_WITH_XMLTO --with-xmlto
10934 # XORG_WITH_ASCIIDOC --with-asciidoc
10935 # XORG_WITH_DOXYGEN --with-doxygen
10936 # XORG_WITH_FOP --with-fop
10937 # XORG_WITH_GROFF --with-groff
10938 # XORG_WITH_PS2PDF --with-ps2pdf
10940 # Interface to module:
10941 # ENABLE_SPECS: used in makefiles to conditionally generate specs
10942 # --enable-specs: 'yes' user instructs the module to generate specs
10943 # 'no' user instructs the module not to generate specs
10944 # parm1: specify the default value, yes or no.
10946 AC_DEFUN([XORG_ENABLE_SPECS],[
10947 m4_define([spec_default], m4_default([$1], [yes]))
10948 AC_ARG_ENABLE(specs,
10949 AS_HELP_STRING([--enable-specs],
10950 [Enable building the specs (default: ]spec_default[)]),
10951 [build_specs=$enableval], [build_specs=]spec_default)
10952 m4_undefine([spec_default])
10953 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10954 AC_MSG_CHECKING([whether to build functional specifications])
10955 AC_MSG_RESULT([$build_specs])
10956 ]) # XORG_ENABLE_SPECS
10958 # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10959 # ----------------------------------------------
10960 # Minimum version: 1.13.0
10962 # This macro enables a builder to enable/disable unit testing
10963 # It makes no assumption about the test cases implementation
10964 # Test cases may or may not use Automake "Support for test suites"
10965 # They may or may not use the software utility library GLib
10967 # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10968 # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10969 # The variable enable_unit_tests is used by other macros in this file.
10971 # Interface to module:
10972 # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
10973 # enable_unit_tests: used in configure.ac for additional configuration
10974 # --enable-unit-tests: 'yes' user instructs the module to build tests
10975 # 'no' user instructs the module not to build tests
10976 # parm1: specify the default value, yes or no.
10978 AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10979 AC_BEFORE([$0], [XORG_WITH_GLIB])
10980 AC_BEFORE([$0], [XORG_LD_WRAP])
10981 AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10982 m4_define([_defopt], m4_default([$1], [auto]))
10983 AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10984 [Enable building unit test cases (default: ]_defopt[)]),
10985 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10986 m4_undefine([_defopt])
10987 AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10988 AC_MSG_CHECKING([whether to build unit test cases])
10989 AC_MSG_RESULT([$enable_unit_tests])
10990 ]) # XORG_ENABLE_UNIT_TESTS
10992 # XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
10993 # ------------------------------------------------------
10994 # Minimum version: 1.17.0
10996 # This macro enables a builder to enable/disable integration testing
10997 # It makes no assumption about the test cases' implementation
10998 # Test cases may or may not use Automake "Support for test suites"
11000 # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
11001 # usually requires less dependencies and may be built and run under less
11002 # stringent environments than integration tests.
11004 # Interface to module:
11005 # ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests
11006 # enable_integration_tests: used in configure.ac for additional configuration
11007 # --enable-integration-tests: 'yes' user instructs the module to build tests
11008 # 'no' user instructs the module not to build tests
11009 # parm1: specify the default value, yes or no.
11011 AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
11012 AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
11013 m4_define([_defopt], m4_default([$1], [auto]))
11014 AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
11015 [Enable building integration test cases (default: ]_defopt[)]),
11016 [enable_integration_tests=$enableval],
11017 [enable_integration_tests=]_defopt)
11018 m4_undefine([_defopt])
11019 AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
11020 [test "x$enable_integration_tests" != xno])
11021 AC_MSG_CHECKING([whether to build unit test cases])
11022 AC_MSG_RESULT([$enable_integration_tests])
11023 ]) # XORG_ENABLE_INTEGRATION_TESTS
11025 # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
11026 # ----------------------------------------
11027 # Minimum version: 1.13.0
11029 # GLib is a library which provides advanced data structures and functions.
11030 # This macro enables a module to test for the presence of Glib.
11032 # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
11033 # Otherwise the value of $enable_unit_tests is blank.
11035 # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
11036 # test support usually requires less dependencies and may be built and run under
11037 # less stringent environments than integration tests.
11039 # Interface to module:
11040 # HAVE_GLIB: used in makefiles to conditionally build targets
11041 # with_glib: used in configure.ac to know if GLib has been found
11042 # --with-glib: 'yes' user instructs the module to use glib
11043 # 'no' user instructs the module not to use glib
11045 AC_DEFUN([XORG_WITH_GLIB],[
11046 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11047 m4_define([_defopt], m4_default([$2], [auto]))
11048 AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
11049 [Use GLib library for unit testing (default: ]_defopt[)]),
11050 [with_glib=$withval], [with_glib=]_defopt)
11051 m4_undefine([_defopt])
11054 # Do not probe GLib if user explicitly disabled unit testing
11055 if test "x$enable_unit_tests" != x"no"; then
11056 # Do not probe GLib if user explicitly disabled it
11057 if test "x$with_glib" != x"no"; then
11060 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
11061 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
11066 # Not having GLib when unit testing has been explicitly requested is an error
11067 if test "x$enable_unit_tests" = x"yes"; then
11068 if test "x$have_glib" = x"no"; then
11069 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11073 # Having unit testing disabled when GLib has been explicitly requested is an error
11074 if test "x$enable_unit_tests" = x"no"; then
11075 if test "x$with_glib" = x"yes"; then
11076 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11080 # Not having GLib when it has been explicitly requested is an error
11081 if test "x$with_glib" = x"yes"; then
11082 if test "x$have_glib" = x"no"; then
11083 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
11087 AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
11088 ]) # XORG_WITH_GLIB
11090 # XORG_LD_WRAP([required|optional])
11091 # ---------------------------------
11092 # Minimum version: 1.13.0
11094 # Check if linker supports -wrap, passed via compiler flags
11096 # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
11097 # Otherwise the value of $enable_unit_tests is blank.
11099 # Argument added in 1.16.0 - default is "required", to match existing behavior
11100 # of returning an error if enable_unit_tests is yes, and ld -wrap is not
11101 # available, an argument of "optional" allows use when some unit tests require
11102 # ld -wrap and others do not.
11104 AC_DEFUN([XORG_LD_WRAP],[
11105 XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
11106 [AC_LANG_PROGRAM([#include <stdlib.h>
11107 void __wrap_exit(int status) { return; }],
11109 # Not having ld wrap when unit testing has been explicitly requested is an error
11110 if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
11111 if test "x$have_ld_wrap" = x"no"; then
11112 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
11115 AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
11119 # XORG_CHECK_LINKER_FLAGS
11120 # -----------------------
11123 # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
11127 # Check whether the given linker FLAGS work with the current language's
11128 # linker, or whether they give an error.
11130 # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
11133 # PROGRAM-SOURCE is the program source to link with, if needed
11135 # NOTE: Based on AX_CHECK_COMPILER_FLAGS.
11139 # Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
11140 # Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
11141 # Copyright (c) 2009 Matteo Frigo
11143 # This program is free software: you can redistribute it and/or modify it
11144 # under the terms of the GNU General Public License as published by the
11145 # Free Software Foundation, either version 3 of the License, or (at your
11146 # option) any later version.
11148 # This program is distributed in the hope that it will be useful, but
11149 # WITHOUT ANY WARRANTY; without even the implied warranty of
11150 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11151 # Public License for more details.
11153 # You should have received a copy of the GNU General Public License along
11154 # with this program. If not, see <http://www.gnu.org/licenses/>.
11156 # As a special exception, the respective Autoconf Macro's copyright owner
11157 # gives unlimited permission to copy, distribute and modify the configure
11158 # scripts that are the output of Autoconf when processing the Macro. You
11159 # need not follow the terms of the GNU General Public License when using
11160 # or distributing such scripts, even though portions of the text of the
11161 # Macro appear in them. The GNU General Public License (GPL) does govern
11162 # all other use of the material that constitutes the Autoconf Macro.
11164 # This special exception to the GPL applies to versions of the Autoconf
11165 # Macro released by the Autoconf Archive. When you make and distribute a
11166 # modified version of the Autoconf Macro, you may extend this special
11167 # exception to the GPL to apply to your modified version as well.#
11168 AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
11169 [AC_MSG_CHECKING([whether the linker accepts $1])
11170 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
11171 AS_LITERAL_IF([$1],
11172 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
11173 ax_save_FLAGS=$LDFLAGS
11175 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
11176 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11177 AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11178 LDFLAGS=$ax_save_FLAGS])],
11179 [ax_save_FLAGS=$LDFLAGS
11181 AC_LINK_IFELSE([AC_LANG_PROGRAM()],
11182 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11183 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11184 LDFLAGS=$ax_save_FLAGS])
11185 eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
11186 AC_MSG_RESULT($xorg_check_linker_flags)
11187 if test "x$xorg_check_linker_flags" = xyes; then
11188 m4_default([$2], :)
11190 m4_default([$3], :)
11192 ]) # XORG_CHECK_LINKER_FLAGS
11194 # XORG_MEMORY_CHECK_FLAGS
11195 # -----------------------
11196 # Minimum version: 1.16.0
11198 # This macro attempts to find appropriate memory checking functionality
11199 # for various platforms which unit testing code may use to catch various
11200 # forms of memory allocation and access errors in testing.
11202 # Interface to module:
11203 # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
11204 # Usually added to TESTS_ENVIRONMENT in Makefile.am
11206 # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
11208 AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
11210 AC_REQUIRE([AC_CANONICAL_HOST])
11211 AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
11212 [Environment variables to enable memory checking in tests])
11214 # Check for different types of support on different platforms
11217 AC_CHECK_LIB([umem], [umem_alloc],
11218 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
11220 *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
11221 # both directly and inverted, so should not be 0 or 255.
11222 malloc_debug_env='MALLOC_PERTURB_=15'
11225 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
11228 malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
11232 # User supplied flags override default flags
11233 if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
11234 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
11237 AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
11238 ]) # XORG_WITH_LINT
11240 # XORG_CHECK_MALLOC_ZERO
11241 # ----------------------
11242 # Minimum version: 1.0.0
11244 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
11245 # malloc(0) returns NULL. Packages should add one of these cflags to
11246 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
11247 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
11248 AC_ARG_ENABLE(malloc0returnsnull,
11249 AS_HELP_STRING([--enable-malloc0returnsnull],
11250 [malloc(0) returns NULL (default: auto)]),
11251 [MALLOC_ZERO_RETURNS_NULL=$enableval],
11252 [MALLOC_ZERO_RETURNS_NULL=auto])
11254 AC_MSG_CHECKING([whether malloc(0) returns NULL])
11255 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
11256 AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
11257 [AC_RUN_IFELSE([AC_LANG_PROGRAM([
11258 #include <stdlib.h>
11260 char *m0, *r0, *c0, *p;
11265 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
11267 [xorg_cv_malloc0_returns_null=yes],
11268 [xorg_cv_malloc0_returns_null=no])])
11269 MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
11271 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
11273 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
11274 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
11275 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
11276 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
11278 MALLOC_ZERO_CFLAGS=""
11279 XMALLOC_ZERO_CFLAGS=""
11280 XTMALLOC_ZERO_CFLAGS=""
11283 AC_SUBST([MALLOC_ZERO_CFLAGS])
11284 AC_SUBST([XMALLOC_ZERO_CFLAGS])
11285 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
11286 ]) # XORG_CHECK_MALLOC_ZERO
11290 # Minimum version: 1.1.0
11292 # This macro enables the use of a tool that flags some suspicious and
11293 # non-portable constructs (likely to be bugs) in C language source code.
11294 # It will attempt to locate the tool and use appropriate options.
11295 # There are various lint type tools on different platforms.
11297 # Interface to module:
11298 # LINT: returns the path to the tool found on the platform
11299 # or the value set to LINT on the configure cmd line
11300 # also an Automake conditional
11301 # LINT_FLAGS: an Automake variable with appropriate flags
11303 # --with-lint: 'yes' user instructs the module to use lint
11304 # 'no' user instructs the module not to use lint (default)
11306 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
11307 # If the user sets the value of LINT_FLAGS, they are used verbatim.
11309 AC_DEFUN([XORG_WITH_LINT],[
11311 AC_ARG_VAR([LINT], [Path to a lint-style command])
11312 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
11313 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
11314 [Use a lint-style source code checker (default: disabled)])],
11315 [use_lint=$withval], [use_lint=no])
11317 # Obtain platform specific info like program name and options
11318 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
11320 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
11322 lint_options="-badflag"
11324 *freebsd* | *netbsd*)
11326 lint_options="-u -b"
11330 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
11334 # Test for the presence of the program (either guessed by the code or spelled out by the user)
11335 if test "x$use_lint" = x"yes" ; then
11336 AC_PATH_PROG([LINT], [$lint_name])
11337 if test "x$LINT" = "x"; then
11338 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
11340 elif test "x$use_lint" = x"no" ; then
11341 if test "x$LINT" != "x"; then
11342 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
11345 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
11348 # User supplied flags override default flags
11349 if test "x$LINT_FLAGS" != "x"; then
11350 lint_options=$LINT_FLAGS
11353 AC_SUBST([LINT_FLAGS],[$lint_options])
11354 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
11356 ]) # XORG_WITH_LINT
11358 # XORG_LINT_LIBRARY(LIBNAME)
11359 # --------------------------
11360 # Minimum version: 1.1.0
11362 # Sets up flags for building lint libraries for checking programs that call
11363 # functions in the library.
11365 # Interface to module:
11366 # LINTLIB - Automake variable with the name of lint library file to make
11367 # MAKE_LINT_LIB - Automake conditional
11369 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
11370 # - 'no' user instructs the module not to create a lint library (default)
11372 AC_DEFUN([XORG_LINT_LIBRARY],[
11373 AC_REQUIRE([XORG_WITH_LINT])
11374 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
11375 [Create lint library (default: disabled)])],
11376 [make_lint_lib=$enableval], [make_lint_lib=no])
11378 if test "x$make_lint_lib" = x"yes" ; then
11379 LINTLIB=llib-l$1.ln
11380 if test "x$LINT" = "x"; then
11381 AC_MSG_ERROR([Cannot make lint library without --with-lint])
11383 elif test "x$make_lint_lib" != x"no" ; then
11384 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
11388 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11390 ]) # XORG_LINT_LIBRARY
11392 # XORG_COMPILER_BRAND
11393 # -------------------
11394 # Minimum version: 1.14.0
11396 # Checks for various brands of compilers and sets flags as appropriate:
11397 # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
11398 # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
11399 # clang compiler - sets CLANGCC to "yes"
11400 # Intel compiler - sets INTELCC to "yes"
11401 # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11403 AC_DEFUN([XORG_COMPILER_BRAND], [
11406 AC_REQUIRE([AC_PROG_CC_C99])
11409 AC_REQUIRE([AC_PROG_CXX])
11412 AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11413 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11414 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11415 ]) # XORG_COMPILER_BRAND
11417 # XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
11419 # Minimum version: 1.16.0
11421 # Test if the compiler works when passed the given flag as a command line argument.
11422 # If it succeeds, the flag is appeneded to the given variable. If not, it tries the
11423 # next flag in the list until there are no more options.
11425 # Note that this does not guarantee that the compiler supports the flag as some
11426 # compilers will simply ignore arguments that they do not understand, but we do
11427 # attempt to weed out false positives by using -Werror=unknown-warning-option and
11428 # -Werror=unused-command-line-argument
11430 AC_DEFUN([XORG_TESTSET_CFLAG], [
11431 m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11432 m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11434 AC_LANG_COMPILER_REQUIRE
11438 AC_REQUIRE([AC_PROG_CC_C99])
11439 define([PREFIX], [C])
11440 define([CACHE_PREFIX], [cc])
11441 define([COMPILER], [$CC])
11444 define([PREFIX], [CXX])
11445 define([CACHE_PREFIX], [cxx])
11446 define([COMPILER], [$CXX])
11450 [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11452 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
11453 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11454 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
11455 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11456 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11457 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
11458 [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
11459 [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
11460 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11463 if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
11464 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
11465 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11467 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11468 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
11469 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11470 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11471 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
11472 [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
11473 [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
11474 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11478 m4_foreach([flag], m4_cdr($@), [
11479 if test $found = "no" ; then
11480 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
11481 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11484 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
11485 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11488 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11490 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11491 AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
11492 cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
11493 AC_CACHE_VAL($cacheid,
11494 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11495 [eval $cacheid=yes],
11496 [eval $cacheid=no])])
11498 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11500 eval supported=\$$cacheid
11501 AC_MSG_RESULT([$supported])
11502 if test "$supported" = "yes" ; then
11508 ]) # XORG_TESTSET_CFLAG
11510 # XORG_COMPILER_FLAGS
11512 # Minimum version: 1.16.0
11514 # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
11515 # arguments supported by the selected compiler which do NOT alter the generated
11516 # code. These arguments will cause the compiler to print various warnings
11517 # during compilation AND turn a conservative set of warnings into errors.
11519 # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
11520 # future versions of util-macros as options are added to new compilers.
11522 AC_DEFUN([XORG_COMPILER_FLAGS], [
11523 AC_REQUIRE([XORG_COMPILER_BRAND])
11525 AC_ARG_ENABLE(selective-werror,
11526 AS_HELP_STRING([--disable-selective-werror],
11527 [Turn off selective compiler errors. (default: enabled)]),
11528 [SELECTIVE_WERROR=$enableval],
11529 [SELECTIVE_WERROR=yes])
11533 define([PREFIX], [C])
11536 define([PREFIX], [CXX])
11539 # -v is too short to test reliably with XORG_TESTSET_CFLAG
11540 if test "x$SUNCC" = "xyes"; then
11541 [BASE_]PREFIX[FLAGS]="-v"
11543 [BASE_]PREFIX[FLAGS]=""
11546 # This chunk of warnings were those that existed in the legacy CWARNFLAGS
11547 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11548 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11549 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11550 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11554 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11555 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11556 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11557 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11558 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
11559 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11563 # This chunk adds additional warnings that could catch undesired effects.
11564 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11565 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11566 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11567 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11568 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11569 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11570 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11572 # These are currently disabled because they are noisy. They will be enabled
11573 # in the future once the codebase is sufficiently modernized to silence
11574 # them. For now, I don't want them to drown out the other warnings.
11575 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11576 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11577 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11579 # Turn some warnings into errors, so we don't accidently get successful builds
11580 # when there are problems that should be fixed.
11582 if test "x$SELECTIVE_WERROR" = "xyes" ; then
11583 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11584 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11585 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11586 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11587 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11588 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11589 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11590 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11591 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11592 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11593 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11594 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11595 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11597 AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
11598 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11599 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11600 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11601 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11602 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11603 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11604 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11605 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11606 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11607 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11608 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11609 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11610 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11613 AC_SUBST([BASE_]PREFIX[FLAGS])
11614 ]) # XORG_COMPILER_FLAGS
11618 # Minimum version: 1.2.0
11619 # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11621 # Defines CWARNFLAGS to enable C compiler warnings.
11623 # This function is deprecated because it defines -fno-strict-aliasing
11624 # which alters the code generated by the compiler. If -fno-strict-aliasing
11625 # is needed, then it should be added explicitly in the module when
11626 # it is updated to use BASE_CFLAGS.
11628 AC_DEFUN([XORG_CWARNFLAGS], [
11629 AC_REQUIRE([XORG_COMPILER_FLAGS])
11630 AC_REQUIRE([XORG_COMPILER_BRAND])
11633 CWARNFLAGS="$BASE_CFLAGS"
11634 if test "x$GCC" = xyes ; then
11635 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11637 AC_SUBST(CWARNFLAGS)
11640 ]) # XORG_CWARNFLAGS
11642 # XORG_STRICT_OPTION
11643 # -----------------------
11644 # Minimum version: 1.3.0
11646 # Add configure option to enable strict compilation flags, such as treating
11647 # warnings as fatal errors.
11648 # If --enable-strict-compilation is passed to configure, adds strict flags to
11649 # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11651 # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11652 # when strict compilation is unconditionally desired.
11653 AC_DEFUN([XORG_STRICT_OPTION], [
11654 AC_REQUIRE([XORG_CWARNFLAGS])
11655 AC_REQUIRE([XORG_COMPILER_FLAGS])
11657 AC_ARG_ENABLE(strict-compilation,
11658 AS_HELP_STRING([--enable-strict-compilation],
11659 [Enable all warnings from compiler and make them errors (default: disabled)]),
11660 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11664 define([PREFIX], [C])
11667 define([PREFIX], [CXX])
11671 [STRICT_]PREFIX[FLAGS]=""
11672 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
11673 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11675 # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11676 # activate it with -Werror, so we add it here explicitly.
11677 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11679 if test "x$STRICT_COMPILE" = "xyes"; then
11680 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
11681 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
11683 AC_SUBST([STRICT_]PREFIX[FLAGS])
11684 AC_SUBST([BASE_]PREFIX[FLAGS])
11685 AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
11686 ]) # XORG_STRICT_OPTION
11688 # XORG_DEFAULT_OPTIONS
11689 # --------------------
11690 # Minimum version: 1.3.0
11692 # Defines default options for X.Org modules.
11694 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11695 AC_REQUIRE([AC_PROG_INSTALL])
11696 XORG_COMPILER_FLAGS
11699 XORG_RELEASE_VERSION
11702 XORG_MANPAGE_SECTIONS
11703 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11704 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11705 ]) # XORG_DEFAULT_OPTIONS
11709 # Minimum version: 1.4.0
11711 # Defines the variable INSTALL_CMD as the command to copy
11712 # INSTALL from $prefix/share/util-macros.
11714 AC_DEFUN([XORG_INSTALL], [
11715 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11716 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11717 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11718 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11719 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
11720 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
11721 AC_SUBST([INSTALL_CMD])
11723 dnl Copyright 2005 Red Hat, Inc
11725 dnl Permission to use, copy, modify, distribute, and sell this software and its
11726 dnl documentation for any purpose is hereby granted without fee, provided that
11727 dnl the above copyright notice appear in all copies and that both that
11728 dnl copyright notice and this permission notice appear in supporting
11731 dnl The above copyright notice and this permission notice shall be included
11732 dnl in all copies or substantial portions of the Software.
11734 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11735 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11736 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11737 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11738 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11739 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11740 dnl OTHER DEALINGS IN THE SOFTWARE.
11742 dnl Except as contained in this notice, the name of the copyright holders shall
11743 dnl not be used in advertising or otherwise to promote the sale, use or
11744 dnl other dealings in this Software without prior written authorization
11745 dnl from the copyright holders.
11748 # XORG_RELEASE_VERSION
11749 # --------------------
11750 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11752 AC_DEFUN([XORG_RELEASE_VERSION],[
11753 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11754 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
11755 [Major version of this package])
11756 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11757 if test "x$PVM" = "x"; then
11760 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11762 [Minor version of this package])
11763 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11764 if test "x$PVP" = "x"; then
11767 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11769 [Patch version of this package])
11774 # Minimum version: 1.2.0
11776 # Defines the variable CHANGELOG_CMD as the command to generate
11777 # ChangeLog from git.
11780 AC_DEFUN([XORG_CHANGELOG], [
11781 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
11782 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11783 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
11784 echo 'git directory not found: installing possibly empty changelog.' >&2)"
11785 AC_SUBST([CHANGELOG_CMD])
11786 ]) # XORG_CHANGELOG