1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.11'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.11.1], [],
38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too. Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.11.1])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
60 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
68 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory. The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run. This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
79 # fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 # fails if $ac_aux_dir is absolute,
82 # fails when called from a subdirectory in a VPATH build with
83 # a relative $ac_aux_dir
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir. In an in-source build this is usually
87 # harmless because $srcdir is `.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 # MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH. The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
111 # AM_CONDITIONAL -*- Autoconf -*-
113 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114 # Free Software Foundation, Inc.
116 # This file is free software; the Free Software Foundation
117 # gives unlimited permission to copy and/or distribute it,
118 # with or without modifications, as long as this notice is preserved.
122 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
123 # -------------------------------------
124 # Define a conditional.
125 AC_DEFUN([AM_CONDITIONAL],
127 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
128 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129 AC_SUBST([$1_TRUE])dnl
130 AC_SUBST([$1_FALSE])dnl
131 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
132 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
133 m4_define([_AM_COND_VALUE_$1], [$2])dnl
141 AC_CONFIG_COMMANDS_PRE(
142 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143 AC_MSG_ERROR([[conditional "$1" was never defined.
144 Usually this means the macro was only invoked conditionally.]])
147 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148 # Free Software Foundation, Inc.
150 # This file is free software; the Free Software Foundation
151 # gives unlimited permission to copy and/or distribute it,
152 # with or without modifications, as long as this notice is preserved.
156 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157 # written in clear, in which case automake, when reading aclocal.m4,
158 # will think it sees a *use*, and therefore will trigger all it's
159 # C support machinery. Also note that it means that autoscan, seeing
160 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
163 # _AM_DEPENDENCIES(NAME)
164 # ----------------------
165 # See how the compiler implements dependency checking.
166 # NAME is "CC", "CXX", "GCJ", or "OBJC".
167 # We try a few techniques and use that to set a single cache variable.
169 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171 # dependency, and given that the user is not expected to run this macro,
172 # just rely on AC_PROG_CC.
173 AC_DEFUN([_AM_DEPENDENCIES],
174 [AC_REQUIRE([AM_SET_DEPDIR])dnl
175 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177 AC_REQUIRE([AM_DEP_TRACK])dnl
179 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
180 [$1], CXX, [depcc="$CXX" am_compiler_list=],
181 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182 [$1], UPC, [depcc="$UPC" am_compiler_list=],
183 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
184 [depcc="$$1" am_compiler_list=])
186 AC_CACHE_CHECK([dependency style of $depcc],
187 [am_cv_$1_dependencies_compiler_type],
188 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189 # We make a subdir and do the tests there. Otherwise we can end up
190 # making bogus files that we don't know about and never remove. For
191 # instance it was reported that on HP-UX the gcc test will end up
192 # making a dummy file named `D' -- because `-MD' means `put the output
195 # Copy depcomp to subdir because otherwise we won't find it if we're
196 # using a relative directory.
197 cp "$am_depcomp" conftest.dir
199 # We will build objects and dependencies in a subdirectory because
200 # it helps to detect inapplicable dependency modes. For instance
201 # both Tru64's cc and ICC support -MD to output dependencies as a
202 # side effect of compilation, but ICC will put the dependencies in
203 # the current directory while Tru64 will put them in the object
207 am_cv_$1_dependencies_compiler_type=none
208 if test "$am_compiler_list" = ""; then
209 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
213 [case " $depcc " in #(
214 *\ -arch\ *\ -arch\ *) am__universal=true ;;
217 [case " $depcc " in #(
218 *\ -arch\ *\ -arch\ *) am__universal=true ;;
221 for depmode in $am_compiler_list; do
222 # Setup a source with many dependencies, because some compilers
223 # like to wrap large dependency lists on column 80 (with \), and
224 # we should not choose a depcomp mode which is confused by this.
226 # We need to recreate these files for each test, as the compiler may
227 # overwrite some of them when testing with obscure command lines.
228 # This happens at least with the AIX C compiler.
230 for i in 1 2 3 4 5 6; do
231 echo '#include "conftst'$i'.h"' >> sub/conftest.c
232 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233 # Solaris 8's {/usr,}/bin/sh.
234 touch sub/conftst$i.h
236 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
238 # We check with `-c' and `-o' for the sake of the "dashmstdout"
239 # mode. It turns out that the SunPro C++ compiler does not properly
240 # handle `-M -o', and we need to detect this. Also, some Intel
241 # versions had trouble with output in subdirs
242 am__obj=sub/conftest.${OBJEXT-o}
243 am__minus_obj="-o $am__obj"
246 # This depmode causes a compiler race in universal mode.
247 test "$am__universal" = false || continue
250 # after this tag, mechanisms are not by side-effect, so they'll
251 # only be used when explicitly requested
252 if test "x$enable_dependency_tracking" = xyes; then
258 msvisualcpp | msvcmsys)
259 # This compiler won't grok `-c -o', but also, the minuso test has
260 # not run yet. These depmodes are late enough in the game, and
261 # so weak that their functioning should not be impacted.
262 am__obj=conftest.${OBJEXT-o}
267 if depmode=$depmode \
268 source=sub/conftest.c object=$am__obj \
269 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271 >/dev/null 2>conftest.err &&
272 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276 # icc doesn't choke on unknown options, it will just issue warnings
277 # or remarks (even with -Werror). So we grep stderr for any message
278 # that says an option was ignored or not supported.
279 # When given -MP, icc 7.0 and 7.1 complain thusly:
280 # icc: Command line warning: ignoring option '-M'; no argument required
281 # The diagnosis changed in icc 8.0:
282 # icc: Command line remark: option '-MP' not supported
283 if (grep 'ignoring option' conftest.err ||
284 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285 am_cv_$1_dependencies_compiler_type=$depmode
294 am_cv_$1_dependencies_compiler_type=none
297 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298 AM_CONDITIONAL([am__fastdep$1], [
299 test "x$enable_dependency_tracking" != xno \
300 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
306 # Choose a directory name for dependency files.
307 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
308 AC_DEFUN([AM_SET_DEPDIR],
309 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
316 AC_DEFUN([AM_DEP_TRACK],
317 [AC_ARG_ENABLE(dependency-tracking,
318 [ --disable-dependency-tracking speeds up one-time build
319 --enable-dependency-tracking do not reject slow dependency extractors])
320 if test "x$enable_dependency_tracking" != xno; then
321 am_depcomp="$ac_aux_dir/depcomp"
324 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325 AC_SUBST([AMDEPBACKSLASH])dnl
326 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329 # Generate code to set up dependency tracking. -*- Autoconf -*-
331 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332 # Free Software Foundation, Inc.
334 # This file is free software; the Free Software Foundation
335 # gives unlimited permission to copy and/or distribute it,
336 # with or without modifications, as long as this notice is preserved.
340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
341 # ------------------------------
342 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344 # Autoconf 2.62 quotes --file arguments for eval, but not when files
345 # are listed without --file. Let's play safe and only enable the eval
346 # if we detect the quoting.
347 case $CONFIG_FILES in
348 *\'*) eval set x "$CONFIG_FILES" ;;
349 *) set x $CONFIG_FILES ;;
354 # Strip MF so we end up with the name of the file.
355 mf=`echo "$mf" | sed -e 's/:.*$//'`
356 # Check whether this is an Automake generated Makefile or not.
357 # We used to match only the files named `Makefile.in', but
358 # some people rename them; so instead we look at the file content.
359 # Grep'ing the first line is not enough: some people post-process
360 # each Makefile.in and add a new line on top of each file to say so.
361 # Grep'ing the whole file is not good either: AIX grep has a line
362 # limit of 2048, but all sed's we know have understand at least 4000.
363 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364 dirpart=`AS_DIRNAME("$mf")`
368 # Extract the definition of DEPDIR, am__include, and am__quote
369 # from the Makefile without running `make'.
370 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371 test -z "$DEPDIR" && continue
372 am__include=`sed -n 's/^am__include = //p' < "$mf"`
373 test -z "am__include" && continue
374 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375 # When using ansi2knr, U may be empty or an underscore; expand it
376 U=`sed -n 's/^U = //p' < "$mf"`
377 # Find all dependency output files, they are included files with
378 # $(DEPDIR) in their names. We invoke sed twice because it is the
379 # simplest approach to changing $(DEPDIR) to its actual value in the
381 for file in `sed -n "
382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384 # Make sure the directory exists.
385 test -f "$dirpart/$file" && continue
386 fdir=`AS_DIRNAME(["$file"])`
387 AS_MKDIR_P([$dirpart/$fdir])
388 # echo "creating $dirpart/$file"
389 echo '# dummy' > "$dirpart/$file"
393 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
396 # AM_OUTPUT_DEPENDENCY_COMMANDS
397 # -----------------------------
398 # This macro should only be invoked once -- use via AC_REQUIRE.
400 # This code is only required when automatic dependency tracking
401 # is enabled. FIXME. This creates each `.P' file that we will
402 # need in order to bootstrap the dependency handling code.
403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404 [AC_CONFIG_COMMANDS([depfiles],
405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
409 # Do all the work for Automake. -*- Autoconf -*-
411 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
420 # This macro actually does too much. Some checks are only needed if
421 # your package does certain things. But this isn't really a big deal.
423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424 # AM_INIT_AUTOMAKE([OPTIONS])
425 # -----------------------------------------------
426 # The call with PACKAGE and VERSION arguments is the old style
427 # call (pre autoconf-2.50), which is being phased out. PACKAGE
428 # and VERSION should now be passed to AC_INIT and removed from
429 # the call to AM_INIT_AUTOMAKE.
430 # We support both call styles for the transition. After
431 # the next Automake release, Autoconf can make the AC_INIT
432 # arguments mandatory, and then we can depend on a new Autoconf
433 # release and drop the old call support.
434 AC_DEFUN([AM_INIT_AUTOMAKE],
435 [AC_PREREQ([2.62])dnl
436 dnl Autoconf wants to disallow AM_ names. We explicitly allow
437 dnl the ones we care about.
438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440 AC_REQUIRE([AC_PROG_INSTALL])dnl
441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
442 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443 # is not polluted with repeated "-I."
444 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445 # test to see if srcdir already configured
446 if test -f $srcdir/config.status; then
447 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451 # test whether we have cygpath
452 if test -z "$CYGPATH_W"; then
453 if (cygpath --version) >/dev/null 2>/dev/null; then
454 CYGPATH_W='cygpath -w'
459 AC_SUBST([CYGPATH_W])
461 # Define the identity of the package.
462 dnl Distinguish between old-style and new-style calls.
464 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 AC_SUBST([PACKAGE], [$1])dnl
466 AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474 _AM_IF_OPTION([no-define],,
475 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
478 # Some tools Automake needs.
479 AC_REQUIRE([AM_SANITY_CHECK])dnl
480 AC_REQUIRE([AC_ARG_PROGRAM])dnl
481 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482 AM_MISSING_PROG(AUTOCONF, autoconf)
483 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484 AM_MISSING_PROG(AUTOHEADER, autoheader)
485 AM_MISSING_PROG(MAKEINFO, makeinfo)
486 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489 # We need awk for the "check" target. The system "awk" is bad on
491 AC_REQUIRE([AC_PROG_AWK])dnl
492 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496 [_AM_PROG_TAR([v7])])])
497 _AM_IF_OPTION([no-dependencies],,
498 [AC_PROVIDE_IFELSE([AC_PROG_CC],
499 [_AM_DEPENDENCIES(CC)],
500 [define([AC_PROG_CC],
501 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502 AC_PROVIDE_IFELSE([AC_PROG_CXX],
503 [_AM_DEPENDENCIES(CXX)],
504 [define([AC_PROG_CXX],
505 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507 [_AM_DEPENDENCIES(OBJC)],
508 [define([AC_PROG_OBJC],
509 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
511 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
514 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515 AC_CONFIG_COMMANDS_PRE(dnl
516 [m4_provide_if([_AM_COMPILER_EXEEXT],
517 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
520 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
521 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522 dnl mangled by Autoconf and run in a shell conditional statement.
523 m4_define([_AC_COMPILER_EXEEXT],
524 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
527 # When config.status generates a header, we must update the stamp-h file.
528 # This file resides in the same directory as the config header
529 # that is generated. The stamp files are numbered to have different names.
531 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532 # loop where config.status creates the headers, so we can generate
533 # our stamp files there.
534 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535 [# Compute $1's index in $config_headers.
538 for _am_header in $config_headers :; do
540 $_am_arg | $_am_arg:* )
543 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
546 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
548 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
550 # This file is free software; the Free Software Foundation
551 # gives unlimited permission to copy and/or distribute it,
552 # with or without modifications, as long as this notice is preserved.
556 # Define $install_sh.
557 AC_DEFUN([AM_PROG_INSTALL_SH],
558 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559 if test x"${install_sh}" != xset; then
562 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
564 install_sh="\${SHELL} $am_aux_dir/install-sh"
567 AC_SUBST(install_sh)])
569 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
571 # This file is free software; the Free Software Foundation
572 # gives unlimited permission to copy and/or distribute it,
573 # with or without modifications, as long as this notice is preserved.
577 # Check whether the underlying file-system supports filenames
578 # with a leading dot. For instance MS-DOS doesn't.
579 AC_DEFUN([AM_SET_LEADING_DOT],
580 [rm -rf .tst 2>/dev/null
581 mkdir .tst 2>/dev/null
582 if test -d .tst; then
587 rmdir .tst 2>/dev/null
588 AC_SUBST([am__leading_dot])])
590 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
593 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594 # Free Software Foundation, Inc.
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
602 # AM_MAINTAINER_MODE([DEFAULT-MODE])
603 # ----------------------------------
604 # Control maintainer-specific portions of Makefiles.
605 # Default is to disable them, unless `enable' is passed literally.
606 # For symmetry, `disable' may be passed as well. Anyway, the user
607 # can override the default with the --enable/--disable switch.
608 AC_DEFUN([AM_MAINTAINER_MODE],
609 [m4_case(m4_default([$1], [disable]),
610 [enable], [m4_define([am_maintainer_other], [disable])],
611 [disable], [m4_define([am_maintainer_other], [enable])],
612 [m4_define([am_maintainer_other], [enable])
613 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616 AC_ARG_ENABLE([maintainer-mode],
617 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
618 (and sometimes confusing) to the casual installer],
619 [USE_MAINTAINER_MODE=$enableval],
620 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623 MAINT=$MAINTAINER_MODE_TRUE
628 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
630 # Check to see how 'make' treats includes. -*- Autoconf -*-
632 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
634 # This file is free software; the Free Software Foundation
635 # gives unlimited permission to copy and/or distribute it,
636 # with or without modifications, as long as this notice is preserved.
642 # Check to see how make treats includes.
643 AC_DEFUN([AM_MAKE_INCLUDE],
644 [am_make=${MAKE-make}
645 cat > confinc << 'END'
647 @echo this is the am__doit target
650 # If we don't find an include directive, just comment out the code.
651 AC_MSG_CHECKING([for style of include used by $am_make])
655 # First try GNU make style include.
656 echo "include confinc" > confmf
657 # Ignore all kinds of additional output from `make'.
658 case `$am_make -s -f confmf 2> /dev/null` in #(
659 *the\ am__doit\ target*)
665 # Now try BSD make style include.
666 if test "$am__include" = "#"; then
667 echo '.include "confinc"' > confmf
668 case `$am_make -s -f confmf 2> /dev/null` in #(
669 *the\ am__doit\ target*)
676 AC_SUBST([am__include])
677 AC_SUBST([am__quote])
678 AC_MSG_RESULT([$_am_result])
682 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
684 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685 # Free Software Foundation, Inc.
687 # This file is free software; the Free Software Foundation
688 # gives unlimited permission to copy and/or distribute it,
689 # with or without modifications, as long as this notice is preserved.
693 # AM_MISSING_PROG(NAME, PROGRAM)
694 # ------------------------------
695 AC_DEFUN([AM_MISSING_PROG],
696 [AC_REQUIRE([AM_MISSING_HAS_RUN])
697 $1=${$1-"${am_missing_run}$2"}
703 # Define MISSING if not defined so far and test if it supports --run.
704 # If it does, set am_missing_run to use it, otherwise, to nothing.
705 AC_DEFUN([AM_MISSING_HAS_RUN],
706 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707 AC_REQUIRE_AUX_FILE([missing])dnl
708 if test x"${MISSING+set}" != xset; then
711 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
713 MISSING="\${SHELL} $am_aux_dir/missing" ;;
716 # Use eval to expand $SHELL
717 if eval "$MISSING --run true"; then
718 am_missing_run="$MISSING --run "
721 AC_MSG_WARN([`missing' script is too old or missing])
725 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
733 # Check for `mkdir -p'.
734 AC_DEFUN([AM_PROG_MKDIR_P],
735 [AC_PREREQ([2.60])dnl
736 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
738 dnl while keeping a definition of mkdir_p for backward compatibility.
739 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741 dnl Makefile.ins that do not define MKDIR_P, so we do our own
742 dnl adjustment using top_builddir (which is defined more often than
744 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
746 [[\\/$]]* | ?:[[\\/]]*) ;;
747 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
751 # Helper functions for option handling. -*- Autoconf -*-
753 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
755 # This file is free software; the Free Software Foundation
756 # gives unlimited permission to copy and/or distribute it,
757 # with or without modifications, as long as this notice is preserved.
761 # _AM_MANGLE_OPTION(NAME)
762 # -----------------------
763 AC_DEFUN([_AM_MANGLE_OPTION],
764 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
766 # _AM_SET_OPTION(NAME)
767 # ------------------------------
768 # Set option NAME. Presently that only means defining a flag for this option.
769 AC_DEFUN([_AM_SET_OPTION],
770 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
772 # _AM_SET_OPTIONS(OPTIONS)
773 # ----------------------------------
774 # OPTIONS is a space-separated list of Automake options.
775 AC_DEFUN([_AM_SET_OPTIONS],
776 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
778 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779 # -------------------------------------------
780 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781 AC_DEFUN([_AM_IF_OPTION],
782 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
784 # Check to make sure that the build environment is sane. -*- Autoconf -*-
786 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787 # Free Software Foundation, Inc.
789 # This file is free software; the Free Software Foundation
790 # gives unlimited permission to copy and/or distribute it,
791 # with or without modifications, as long as this notice is preserved.
797 AC_DEFUN([AM_SANITY_CHECK],
798 [AC_MSG_CHECKING([whether build environment is sane])
801 echo timestamp > conftest.file
802 # Reject unsafe characters in $srcdir or the absolute working directory
803 # name. Accept space and tab only in the latter.
807 *[[\\\"\#\$\&\'\`$am_lf]]*)
808 AC_MSG_ERROR([unsafe absolute working directory name]);;
811 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
812 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
815 # Do `set' in a subshell so we don't clobber the current shell's
816 # arguments. Must try -L first in case configure is actually a
817 # symlink; some systems play weird games with the mod time of symlinks
818 # (eg FreeBSD returns the mod time of the symlink's containing
821 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822 if test "$[*]" = "X"; then
824 set X `ls -t "$srcdir/configure" conftest.file`
827 if test "$[*]" != "X $srcdir/configure conftest.file" \
828 && test "$[*]" != "X conftest.file $srcdir/configure"; then
830 # If neither matched, then we have a broken ls. This can happen
831 # if, for instance, CONFIG_SHELL is bash and it inherits a
832 # broken ls alias from the environment. This has actually
833 # happened. Such a system could not be considered "sane".
834 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
835 alias in your environment])
838 test "$[2]" = conftest.file
844 AC_MSG_ERROR([newly created file is older than distributed files!
845 Check your system clock])
849 # Copyright (C) 2009 Free Software Foundation, Inc.
851 # This file is free software; the Free Software Foundation
852 # gives unlimited permission to copy and/or distribute it,
853 # with or without modifications, as long as this notice is preserved.
857 # AM_SILENT_RULES([DEFAULT])
858 # --------------------------
859 # Enable less verbose build rules; with the default set to DEFAULT
860 # (`yes' being less verbose, `no' or empty being verbose).
861 AC_DEFUN([AM_SILENT_RULES],
862 [AC_ARG_ENABLE([silent-rules],
863 [ --enable-silent-rules less verbose build output (undo: `make V=1')
864 --disable-silent-rules verbose build output (undo: `make V=0')])
865 case $enable_silent_rules in
866 yes) AM_DEFAULT_VERBOSITY=0;;
867 no) AM_DEFAULT_VERBOSITY=1;;
868 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
870 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
872 AC_SUBST([AM_BACKSLASH])dnl
873 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
876 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
882 # AM_PROG_INSTALL_STRIP
883 # ---------------------
884 # One issue with vendor `install' (even GNU) is that you can't
885 # specify the program used to strip binaries. This is especially
886 # annoying in cross-compiling environments, where the build's strip
887 # is unlikely to handle the host's binaries.
888 # Fortunately install-sh will honor a STRIPPROG variable, so we
889 # always use install-sh in `make install-strip', and initialize
890 # STRIPPROG with the value of the STRIP variable (set by the user).
891 AC_DEFUN([AM_PROG_INSTALL_STRIP],
892 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893 # Installed binaries are usually stripped using `strip' when the user
894 # run `make install-strip'. However `strip' might not be the right
895 # tool to use in cross-compilation environments, therefore Automake
896 # will honor the `STRIP' environment variable to overrule this program.
897 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898 if test "$cross_compiling" != no; then
899 AC_CHECK_TOOL([STRIP], [strip], :)
901 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902 AC_SUBST([INSTALL_STRIP_PROGRAM])])
904 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
906 # This file is free software; the Free Software Foundation
907 # gives unlimited permission to copy and/or distribute it,
908 # with or without modifications, as long as this notice is preserved.
912 # _AM_SUBST_NOTMAKE(VARIABLE)
913 # ---------------------------
914 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915 # This macro is traced by Automake.
916 AC_DEFUN([_AM_SUBST_NOTMAKE])
918 # AM_SUBST_NOTMAKE(VARIABLE)
919 # ---------------------------
920 # Public sister of _AM_SUBST_NOTMAKE.
921 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
923 # Check how to create a tarball. -*- Autoconf -*-
925 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
933 # _AM_PROG_TAR(FORMAT)
934 # --------------------
935 # Check how to create a tarball in format FORMAT.
936 # FORMAT should be one of `v7', `ustar', or `pax'.
938 # Substitute a variable $(am__tar) that is a command
939 # writing to stdout a FORMAT-tarball containing the directory
941 # tardir=directory && $(am__tar) > result.tar
943 # Substitute a variable $(am__untar) that extract such
944 # a tarball read from stdin.
945 # $(am__untar) < result.tar
946 AC_DEFUN([_AM_PROG_TAR],
947 [# Always define AMTAR for backward compatibility.
948 AM_MISSING_PROG([AMTAR], [tar])
950 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951 [m4_case([$1], [ustar],, [pax],,
952 [m4_fatal([Unknown tar format])])
953 AC_MSG_CHECKING([how to create a $1 tar archive])
954 # Loop over all known methods to create a tar archive until one works.
955 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
957 # Do not fold the above two line into one, because Tru64 sh and
958 # Solaris sh will not grok spaces in the rhs of `-'.
959 for _am_tool in $_am_tools
963 for _am_tar in tar gnutar gtar;
965 AM_RUN_LOG([$_am_tar --version]) && break
967 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969 am__untar="$_am_tar -xf -"
972 # Must skip GNU tar: if it does not support --format= it doesn't create
973 # ustar tarball either.
974 (tar --version) >/dev/null 2>&1 && continue
975 am__tar='tar chf - "$$tardir"'
976 am__tar_='tar chf - "$tardir"'
980 am__tar='pax -L -x $1 -w "$$tardir"'
981 am__tar_='pax -L -x $1 -w "$tardir"'
985 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987 am__untar='cpio -i -H $1 -d'
996 # If the value was cached, stop now. We just wanted to have am__tar
998 test -n "${am_cv_prog_tar_$1}" && break
1000 # tar/untar a dummy directory, and stop if the command works
1003 echo GrepMe > conftest.dir/file
1004 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1006 if test -s conftest.tar; then
1007 AM_RUN_LOG([$am__untar <conftest.tar])
1008 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1013 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1016 AC_SUBST([am__untar])
1019 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1021 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1023 # This program is free software; you can redistribute it and/or modify
1024 # it under the terms of the GNU General Public License as published by
1025 # the Free Software Foundation; either version 2 of the License, or
1026 # (at your option) any later version.
1028 # This program is distributed in the hope that it will be useful, but
1029 # WITHOUT ANY WARRANTY; without even the implied warranty of
1030 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1031 # General Public License for more details.
1033 # You should have received a copy of the GNU General Public License
1034 # along with this program; if not, write to the Free Software
1035 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1037 # As a special exception to the GNU General Public License, if you
1038 # distribute this file as part of a program that contains a
1039 # configuration script generated by Autoconf, you may include it under
1040 # the same distribution terms that you use for the rest of that program.
1042 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1043 # ----------------------------------
1044 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1045 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1046 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1047 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1048 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1049 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1051 if test -n "$PKG_CONFIG"; then
1052 _pkg_min_version=m4_default([$1], [0.9.0])
1053 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1054 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1055 AC_MSG_RESULT([yes])
1062 ])# PKG_PROG_PKG_CONFIG
1064 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1066 # Check to see whether a particular set of modules exists. Similar
1067 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1070 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
1071 # this or PKG_CHECK_MODULES is called, or make sure to call
1072 # PKG_CHECK_EXISTS manually
1073 # --------------------------------------------------------------
1074 AC_DEFUN([PKG_CHECK_EXISTS],
1075 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1076 if test -n "$PKG_CONFIG" && \
1077 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1078 m4_ifval([$2], [$2], [:])
1079 m4_ifvaln([$3], [else
1084 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1085 # ---------------------------------------------
1086 m4_define([_PKG_CONFIG],
1087 [if test -n "$$1"; then
1089 elif test -n "$PKG_CONFIG"; then
1090 PKG_CHECK_EXISTS([$3],
1091 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1098 # _PKG_SHORT_ERRORS_SUPPORTED
1099 # -----------------------------
1100 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1101 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1102 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1103 _pkg_short_errors_supported=yes
1105 _pkg_short_errors_supported=no
1107 ])# _PKG_SHORT_ERRORS_SUPPORTED
1110 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1111 # [ACTION-IF-NOT-FOUND])
1114 # Note that if there is a possibility the first call to
1115 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1116 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1119 # --------------------------------------------------------------
1120 AC_DEFUN([PKG_CHECK_MODULES],
1121 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1122 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1123 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1126 AC_MSG_CHECKING([for $1])
1128 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1129 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1131 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1132 and $1[]_LIBS to avoid the need to call pkg-config.
1133 See the pkg-config man page for more details.])
1135 if test $pkg_failed = yes; then
1136 _PKG_SHORT_ERRORS_SUPPORTED
1137 if test $_pkg_short_errors_supported = yes; then
1138 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1140 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1142 # Put the nasty error message in config.log where it belongs
1143 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1145 ifelse([$4], , [AC_MSG_ERROR(dnl
1146 [Package requirements ($2) were not met:
1150 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1151 installed software in a non-standard prefix.
1155 [AC_MSG_RESULT([no])
1157 elif test $pkg_failed = untried; then
1158 ifelse([$4], , [AC_MSG_FAILURE(dnl
1159 [The pkg-config script could not be found or is too old. Make sure it
1160 is in your PATH or set the PKG_CONFIG environment variable to the full
1165 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1168 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1169 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1170 AC_MSG_RESULT([yes])
1171 ifelse([$3], , :, [$3])
1173 ])# PKG_CHECK_MODULES
1175 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1177 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1178 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1180 # Written by Gordon Matzigkeit, 1996
1182 # This file is free software; the Free Software Foundation gives
1183 # unlimited permission to copy and/or distribute it, with or without
1184 # modifications, as long as this notice is preserved.
1186 m4_define([_LT_COPYING], [dnl
1187 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1188 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1190 # Written by Gordon Matzigkeit, 1996
1192 # This file is part of GNU Libtool.
1194 # GNU Libtool is free software; you can redistribute it and/or
1195 # modify it under the terms of the GNU General Public License as
1196 # published by the Free Software Foundation; either version 2 of
1197 # the License, or (at your option) any later version.
1199 # As a special exception to the GNU General Public License,
1200 # if you distribute this file as part of a program or library that
1201 # is built using GNU Libtool, you may include this file under the
1202 # same distribution terms that you use for the rest of that program.
1204 # GNU Libtool is distributed in the hope that it will be useful,
1205 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1206 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1207 # GNU General Public License for more details.
1209 # You should have received a copy of the GNU General Public License
1210 # along with GNU Libtool; see the file COPYING. If not, a copy
1211 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1212 # obtained by writing to the Free Software Foundation, Inc.,
1213 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1219 # LT_PREREQ(VERSION)
1220 # ------------------
1221 # Complain and exit if this libtool version is less that VERSION.
1222 m4_defun([LT_PREREQ],
1223 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1225 [m4_fatal([Libtool version $1 or higher is required],
1230 # _LT_CHECK_BUILDDIR
1231 # ------------------
1232 # Complain if the absolute build directory name contains unusual characters
1233 m4_defun([_LT_CHECK_BUILDDIR],
1236 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1241 # LT_INIT([OPTIONS])
1242 # ------------------
1244 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1245 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1246 AC_BEFORE([$0], [LT_LANG])dnl
1247 AC_BEFORE([$0], [LT_OUTPUT])dnl
1248 AC_BEFORE([$0], [LTDL_INIT])dnl
1249 m4_require([_LT_CHECK_BUILDDIR])dnl
1251 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1252 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1253 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1254 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1255 dnl unless we require an AC_DEFUNed macro:
1256 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1257 AC_REQUIRE([LTSUGAR_VERSION])dnl
1258 AC_REQUIRE([LTVERSION_VERSION])dnl
1259 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1260 m4_require([_LT_PROG_LTMAIN])dnl
1262 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1265 _LT_SET_OPTIONS([$0], [$1])
1267 # This can be used to rebuild libtool when needed
1268 LIBTOOL_DEPS="$ltmain"
1270 # Always use our own libtool.
1271 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1272 AC_SUBST(LIBTOOL)dnl
1277 m4_define([LT_INIT])
1281 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1282 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1283 dnl aclocal-1.4 backwards compatibility:
1284 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1285 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1288 # _LT_CC_BASENAME(CC)
1289 # -------------------
1290 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1291 m4_defun([_LT_CC_BASENAME],
1292 [for cc_temp in $1""; do
1294 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1295 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1300 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1304 # _LT_FILEUTILS_DEFAULTS
1305 # ----------------------
1306 # It is okay to use these file commands and assume they have been set
1307 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1308 m4_defun([_LT_FILEUTILS_DEFAULTS],
1312 ])# _LT_FILEUTILS_DEFAULTS
1317 m4_defun([_LT_SETUP],
1318 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1319 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1320 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1321 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1323 _LT_DECL([], [host_alias], [0], [The host system])dnl
1324 _LT_DECL([], [host], [0])dnl
1325 _LT_DECL([], [host_os], [0])dnl
1327 _LT_DECL([], [build_alias], [0], [The build system])dnl
1328 _LT_DECL([], [build], [0])dnl
1329 _LT_DECL([], [build_os], [0])dnl
1331 AC_REQUIRE([AC_PROG_CC])dnl
1332 AC_REQUIRE([LT_PATH_LD])dnl
1333 AC_REQUIRE([LT_PATH_NM])dnl
1335 AC_REQUIRE([AC_PROG_LN_S])dnl
1336 test -z "$LN_S" && LN_S="ln -s"
1337 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1339 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1340 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1341 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1343 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1344 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1345 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1346 m4_require([_LT_CMD_RELOAD])dnl
1347 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1348 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1349 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1350 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1351 m4_require([_LT_WITH_SYSROOT])dnl
1353 _LT_CONFIG_LIBTOOL_INIT([
1354 # See if we are running on zsh, and set the options which allow our
1355 # commands through without removal of \ escapes INIT.
1356 if test -n "\${ZSH_VERSION+set}" ; then
1357 setopt NO_GLOB_SUBST
1360 if test -n "${ZSH_VERSION+set}" ; then
1361 setopt NO_GLOB_SUBST
1366 m4_require([_LT_TAG_COMPILER])dnl
1370 # AIX sometimes has problems with the GCC collect2 program. For some
1371 # reason, if we set the COLLECT_NAMES environment variable, the problems
1372 # vanish in a puff of smoke.
1373 if test "X${COLLECT_NAMES+set}" != Xset; then
1375 export COLLECT_NAMES
1382 can_build_shared=yes
1384 # All known linkers require a `.a' archive for static linking (except MSVC,
1385 # which needs '.lib').
1388 with_gnu_ld="$lt_cv_prog_gnu_ld"
1391 old_CFLAGS="$CFLAGS"
1393 # Set sane defaults for various variables
1394 test -z "$CC" && CC=cc
1395 test -z "$LTCC" && LTCC=$CC
1396 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1397 test -z "$LD" && LD=ld
1398 test -z "$ac_objext" && ac_objext=o
1400 _LT_CC_BASENAME([$compiler])
1402 # Only perform the check for file, if the check method requires it
1403 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1404 case $deplibs_check_method in
1406 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1412 # Use C for the default configuration in the libtool script
1413 LT_SUPPORTED_TAG([CC])
1415 _LT_LANG_DEFAULT_CONFIG
1420 # _LT_PREPARE_SED_QUOTE_VARS
1421 # --------------------------
1422 # Define a few sed substitution that help us do robust quoting.
1423 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1424 [# Backslashify metacharacters that are still active within
1425 # double-quoted strings.
1426 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1428 # Same as above, but do not quote variable references.
1429 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1431 # Sed substitution to delay expansion of an escaped shell variable in a
1432 # double_quote_subst'ed string.
1433 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1435 # Sed substitution to delay expansion of an escaped single quote.
1436 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1438 # Sed substitution to avoid accidental globbing in evaled expressions
1439 no_glob_subst='s/\*/\\\*/g'
1444 # Note that this code is called both from `configure', and `config.status'
1445 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1446 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1447 # so we pass a copy along to make sure it has a sensible value anyway.
1448 m4_defun([_LT_PROG_LTMAIN],
1449 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1450 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1451 ltmain="$ac_aux_dir/ltmain.sh"
1456 # So that we can recreate a full libtool script including additional
1457 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1458 # in macros and then make a single call at the end using the `libtool'
1462 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1463 # ----------------------------------------
1464 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1465 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1467 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1472 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1475 # _LT_CONFIG_LIBTOOL([COMMANDS])
1476 # ------------------------------
1477 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1478 m4_define([_LT_CONFIG_LIBTOOL],
1480 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1485 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1488 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1489 # -----------------------------------------------------
1490 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1491 [_LT_CONFIG_LIBTOOL([$1])
1492 _LT_CONFIG_LIBTOOL_INIT([$2])
1496 # _LT_FORMAT_COMMENT([COMMENT])
1497 # -----------------------------
1498 # Add leading comment marks to the start of each line, and a trailing
1499 # full-stop to the whole comment if one is not present already.
1500 m4_define([_LT_FORMAT_COMMENT],
1502 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1503 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1510 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1511 # -------------------------------------------------------------------
1512 # CONFIGNAME is the name given to the value in the libtool script.
1513 # VARNAME is the (base) name used in the configure script.
1514 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1515 # VARNAME. Any other value will be used directly.
1516 m4_define([_LT_DECL],
1517 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1518 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1519 [m4_ifval([$1], [$1], [$2])])
1520 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1522 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1523 lt_dict_add_subkey([lt_decl_dict], [$2],
1524 [tagged?], [m4_ifval([$5], [yes], [no])])])
1528 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1529 # --------------------------------------------------------
1530 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1533 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1534 # ------------------------------------------------
1535 m4_define([lt_decl_tag_varnames],
1536 [_lt_decl_filter([tagged?], [yes], $@)])
1539 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1540 # ---------------------------------------------------------
1541 m4_define([_lt_decl_filter],
1543 [0], [m4_fatal([$0: too few arguments: $#])],
1544 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1545 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1546 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1547 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1551 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1552 # --------------------------------------------------
1553 m4_define([lt_decl_quote_varnames],
1554 [_lt_decl_filter([value], [1], $@)])
1557 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1558 # ---------------------------------------------------
1559 m4_define([lt_decl_dquote_varnames],
1560 [_lt_decl_filter([value], [2], $@)])
1563 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1564 # ---------------------------------------------------
1565 m4_define([lt_decl_varnames_tagged],
1566 [m4_assert([$# <= 2])dnl
1567 _$0(m4_quote(m4_default([$1], [[, ]])),
1568 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1569 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1570 m4_define([_lt_decl_varnames_tagged],
1571 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1574 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1575 # ------------------------------------------------
1576 m4_define([lt_decl_all_varnames],
1577 [_$0(m4_quote(m4_default([$1], [[, ]])),
1579 m4_quote(lt_decl_varnames),
1580 m4_quote(m4_shift($@))))[]dnl
1582 m4_define([_lt_decl_all_varnames],
1583 [lt_join($@, lt_decl_varnames_tagged([$1],
1584 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1588 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1589 # ------------------------------------
1590 # Quote a variable value, and forward it to `config.status' so that its
1591 # declaration there will have the same value as in `configure'. VARNAME
1592 # must have a single quote delimited value for this to work.
1593 m4_define([_LT_CONFIG_STATUS_DECLARE],
1594 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1597 # _LT_CONFIG_STATUS_DECLARATIONS
1598 # ------------------------------
1599 # We delimit libtool config variables with single quotes, so when
1600 # we write them to config.status, we have to be sure to quote all
1601 # embedded single quotes properly. In configure, this macro expands
1602 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1604 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1605 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1606 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1607 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1612 # Output comment and list of tags supported by the script
1613 m4_defun([_LT_LIBTOOL_TAGS],
1614 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1615 available_tags="_LT_TAGS"dnl
1619 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1620 # -----------------------------------
1621 # Extract the dictionary values for VARNAME (optionally with TAG) and
1622 # expand to a commented shell variable setting:
1624 # # Some comment about what VAR is for.
1625 # visible_name=$lt_internal_name
1626 m4_define([_LT_LIBTOOL_DECLARE],
1627 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1628 [description])))[]dnl
1629 m4_pushdef([_libtool_name],
1630 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1631 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1632 [0], [_libtool_name=[$]$1],
1633 [1], [_libtool_name=$lt_[]$1],
1634 [2], [_libtool_name=$lt_[]$1],
1635 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1636 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1640 # _LT_LIBTOOL_CONFIG_VARS
1641 # -----------------------
1642 # Produce commented declarations of non-tagged libtool config variables
1643 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1644 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1645 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1646 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1647 [m4_foreach([_lt_var],
1648 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1649 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1652 # _LT_LIBTOOL_TAG_VARS(TAG)
1653 # -------------------------
1654 m4_define([_LT_LIBTOOL_TAG_VARS],
1655 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1656 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1659 # _LT_TAGVAR(VARNAME, [TAGNAME])
1660 # ------------------------------
1661 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1664 # _LT_CONFIG_COMMANDS
1665 # -------------------
1666 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1667 # variables for single and double quote escaping we saved from calls
1668 # to _LT_DECL, we can put quote escaped variables declarations
1669 # into `config.status', and then the shell code to quote escape them in
1670 # for loops in `config.status'. Finally, any additional code accumulated
1671 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1672 m4_defun([_LT_CONFIG_COMMANDS],
1673 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1674 dnl If the libtool generation code has been placed in $CONFIG_LT,
1675 dnl instead of duplicating it all over again into config.status,
1676 dnl then we will have config.status run $CONFIG_LT later, so it
1677 dnl needs to know what name is stored there:
1678 [AC_CONFIG_COMMANDS([libtool],
1679 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1680 dnl If the libtool generation code is destined for config.status,
1681 dnl expand the accumulated commands and init code now:
1682 [AC_CONFIG_COMMANDS([libtool],
1683 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1684 ])#_LT_CONFIG_COMMANDS
1688 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1691 # The HP-UX ksh and POSIX shell print the target directory to stdout
1693 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1695 sed_quote_subst='$sed_quote_subst'
1696 double_quote_subst='$double_quote_subst'
1697 delay_variable_subst='$delay_variable_subst'
1698 _LT_CONFIG_STATUS_DECLARATIONS
1700 LTCFLAGS='$LTCFLAGS'
1701 compiler='$compiler_DEFAULT'
1703 # A function that is used when there is no print builtin or printf.
1704 func_fallback_echo ()
1706 eval 'cat <<_LTECHO_EOF
1711 # Quote evaled strings.
1712 for var in lt_decl_all_varnames([[ \
1713 ]], lt_decl_quote_varnames); do
1714 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1715 *[[\\\\\\\`\\"\\\$]]*)
1716 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1719 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1724 # Double-quote double-evaled strings.
1725 for var in lt_decl_all_varnames([[ \
1726 ]], lt_decl_dquote_varnames); do
1727 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1728 *[[\\\\\\\`\\"\\\$]]*)
1729 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1732 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1737 _LT_OUTPUT_LIBTOOL_INIT
1740 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1741 # ------------------------------------
1742 # Generate a child script FILE with all initialization necessary to
1743 # reuse the environment learned by the parent script, and make the
1744 # file executable. If COMMENT is supplied, it is inserted after the
1745 # `#!' sequence but before initialization text begins. After this
1746 # macro, additional text can be appended to FILE to form the body of
1747 # the child script. The macro ends with non-zero status if the
1748 # file could not be fully written (such as if the disk is full).
1749 m4_ifdef([AS_INIT_GENERATED],
1750 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1751 [m4_defun([_LT_GENERATED_FILE_INIT],
1752 [m4_require([AS_PREPARE])]dnl
1753 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1755 cat >$1 <<_ASEOF || lt_write_fail=1
1757 # Generated by $as_me.
1759 SHELL=\${CONFIG_SHELL-$SHELL}
1762 cat >>$1 <<\_ASEOF || lt_write_fail=1
1765 exec AS_MESSAGE_FD>&1
1767 test $lt_write_fail = 0 && chmod +x $1[]dnl
1768 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1772 # This macro allows early generation of the libtool script (before
1773 # AC_OUTPUT is called), incase it is used in configure for compilation
1775 AC_DEFUN([LT_OUTPUT],
1776 [: ${CONFIG_LT=./config.lt}
1777 AC_MSG_NOTICE([creating $CONFIG_LT])
1778 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1779 [# Run this file to recreate a libtool stub with the current configuration.])
1781 cat >>"$CONFIG_LT" <<\_LTEOF
1783 exec AS_MESSAGE_LOG_FD>>config.log
1786 AS_BOX([Running $as_me.])
1787 } >&AS_MESSAGE_LOG_FD
1790 \`$as_me' creates a local libtool stub from the current configuration,
1791 for use in further configure time tests before the real libtool is
1794 Usage: $[0] [[OPTIONS]]
1796 -h, --help print this help, then exit
1797 -V, --version print version number, then exit
1798 -q, --quiet do not print progress messages
1799 -d, --debug don't remove temporary files
1801 Report bugs to <bug-libtool@gnu.org>."
1804 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1805 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1806 configured by $[0], generated by m4_PACKAGE_STRING.
1808 Copyright (C) 2010 Free Software Foundation, Inc.
1809 This config.lt script is free software; the Free Software Foundation
1810 gives unlimited permision to copy, distribute and modify it."
1812 while test $[#] != 0
1815 --version | --v* | -V )
1816 echo "$lt_cl_version"; exit 0 ;;
1817 --help | --h* | -h )
1818 echo "$lt_cl_help"; exit 0 ;;
1819 --debug | --d* | -d )
1821 --quiet | --q* | --silent | --s* | -q )
1824 -*) AC_MSG_ERROR([unrecognized option: $[1]
1825 Try \`$[0] --help' for more information.]) ;;
1827 *) AC_MSG_ERROR([unrecognized argument: $[1]
1828 Try \`$[0] --help' for more information.]) ;;
1833 if $lt_cl_silent; then
1834 exec AS_MESSAGE_FD>/dev/null
1838 cat >>"$CONFIG_LT" <<_LTEOF
1839 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1842 cat >>"$CONFIG_LT" <<\_LTEOF
1843 AC_MSG_NOTICE([creating $ofile])
1844 _LT_OUTPUT_LIBTOOL_COMMANDS
1847 chmod +x "$CONFIG_LT"
1849 # configure is writing to config.log, but config.lt does its own redirection,
1850 # appending to config.log, which fails on DOS, as config.log is still kept
1851 # open by configure. Here we exec the FD to /dev/null, effectively closing
1852 # config.log, so it can be properly (re)opened and appended to by config.lt.
1854 test "$silent" = yes &&
1855 lt_config_lt_args="$lt_config_lt_args --quiet"
1856 exec AS_MESSAGE_LOG_FD>/dev/null
1857 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1858 exec AS_MESSAGE_LOG_FD>>config.log
1859 $lt_cl_success || AS_EXIT(1)
1865 # If TAG is the built-in tag, create an initial libtool script with a
1866 # default configuration from the untagged config vars. Otherwise add code
1867 # to config.status for appending the configuration named by TAG from the
1868 # matching tagged config vars.
1869 m4_defun([_LT_CONFIG],
1870 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1871 _LT_CONFIG_SAVE_COMMANDS([
1872 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1873 m4_if(_LT_TAG, [C], [
1874 # See if we are running on zsh, and set the options which allow our
1875 # commands through without removal of \ escapes.
1876 if test -n "${ZSH_VERSION+set}" ; then
1877 setopt NO_GLOB_SUBST
1881 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1884 cat <<_LT_EOF >> "$cfgfile"
1887 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1888 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1889 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1890 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1895 # ### BEGIN LIBTOOL CONFIG
1896 _LT_LIBTOOL_CONFIG_VARS
1897 _LT_LIBTOOL_TAG_VARS
1898 # ### END LIBTOOL CONFIG
1904 cat <<\_LT_EOF >> "$cfgfile"
1905 # AIX sometimes has problems with the GCC collect2 program. For some
1906 # reason, if we set the COLLECT_NAMES environment variable, the problems
1907 # vanish in a puff of smoke.
1908 if test "X${COLLECT_NAMES+set}" != Xset; then
1910 export COLLECT_NAMES
1918 # We use sed instead of cat because bash on DJGPP gets confused if
1919 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1920 # text mode, it properly converts lines to CR/LF. This bash problem
1921 # is reportedly fixed, but why not run on old versions too?
1922 sed '$q' "$ltmain" >> "$cfgfile" \
1923 || (rm -f "$cfgfile"; exit 1)
1925 _LT_PROG_REPLACE_SHELLFNS
1927 mv -f "$cfgfile" "$ofile" ||
1928 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1931 [cat <<_LT_EOF >> "$ofile"
1933 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1934 dnl in a comment (ie after a #).
1935 # ### BEGIN LIBTOOL TAG CONFIG: $1
1936 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1937 # ### END LIBTOOL TAG CONFIG: $1
1944 TIMESTAMP='$TIMESTAMP'
1946 ofile='$ofile'], [])
1947 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1951 # LT_SUPPORTED_TAG(TAG)
1952 # ---------------------
1953 # Trace this macro to discover what tags are supported by the libtool
1954 # --tag option, using:
1955 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
1956 AC_DEFUN([LT_SUPPORTED_TAG], [])
1959 # C support is built-in for now
1960 m4_define([_LT_LANG_C_enabled], [])
1961 m4_define([_LT_TAGS], [])
1966 # Enable libtool support for the given language if not already enabled.
1968 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1971 [C++], [_LT_LANG(CXX)],
1972 [Java], [_LT_LANG(GCJ)],
1973 [Fortran 77], [_LT_LANG(F77)],
1974 [Fortran], [_LT_LANG(FC)],
1975 [Windows Resource], [_LT_LANG(RC)],
1976 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1978 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1982 # _LT_LANG(LANGNAME)
1983 # ------------------
1984 m4_defun([_LT_LANG],
1985 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1986 [LT_SUPPORTED_TAG([$1])dnl
1987 m4_append([_LT_TAGS], [$1 ])dnl
1988 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1989 _LT_LANG_$1_CONFIG($1)])dnl
1993 # _LT_LANG_DEFAULT_CONFIG
1994 # -----------------------
1995 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1996 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1998 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2000 AC_PROVIDE_IFELSE([AC_PROG_F77],
2002 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2004 AC_PROVIDE_IFELSE([AC_PROG_FC],
2006 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2008 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2009 dnl pulling things in needlessly.
2010 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2012 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2014 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2016 [m4_ifdef([AC_PROG_GCJ],
2017 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2018 m4_ifdef([A][M_PROG_GCJ],
2019 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2020 m4_ifdef([LT_PROG_GCJ],
2021 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2023 AC_PROVIDE_IFELSE([LT_PROG_RC],
2025 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2026 ])# _LT_LANG_DEFAULT_CONFIG
2029 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2030 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2031 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2032 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2033 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2034 dnl aclocal-1.4 backwards compatibility:
2035 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2036 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2037 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2038 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2039 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2044 m4_defun([_LT_TAG_COMPILER],
2045 [AC_REQUIRE([AC_PROG_CC])dnl
2047 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2048 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2049 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2050 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2052 # If no C compiler was specified, use CC.
2055 # If no C compiler flags were specified, use CFLAGS.
2056 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2058 # Allow CC to be a program name with arguments.
2060 ])# _LT_TAG_COMPILER
2063 # _LT_COMPILER_BOILERPLATE
2064 # ------------------------
2065 # Check for compiler boilerplate output or warnings with
2066 # the simple compiler test code.
2067 m4_defun([_LT_COMPILER_BOILERPLATE],
2068 [m4_require([_LT_DECL_SED])dnl
2069 ac_outfile=conftest.$ac_objext
2070 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2071 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2072 _lt_compiler_boilerplate=`cat conftest.err`
2074 ])# _LT_COMPILER_BOILERPLATE
2077 # _LT_LINKER_BOILERPLATE
2078 # ----------------------
2079 # Check for linker boilerplate output or warnings with
2080 # the simple link test code.
2081 m4_defun([_LT_LINKER_BOILERPLATE],
2082 [m4_require([_LT_DECL_SED])dnl
2083 ac_outfile=conftest.$ac_objext
2084 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2085 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2086 _lt_linker_boilerplate=`cat conftest.err`
2088 ])# _LT_LINKER_BOILERPLATE
2090 # _LT_REQUIRED_DARWIN_CHECKS
2091 # -------------------------
2092 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2094 rhapsody* | darwin*)
2095 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2096 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2097 AC_CHECK_TOOL([LIPO], [lipo], [:])
2098 AC_CHECK_TOOL([OTOOL], [otool], [:])
2099 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2100 _LT_DECL([], [DSYMUTIL], [1],
2101 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2102 _LT_DECL([], [NMEDIT], [1],
2103 [Tool to change global to local symbols on Mac OS X])
2104 _LT_DECL([], [LIPO], [1],
2105 [Tool to manipulate fat objects and archives on Mac OS X])
2106 _LT_DECL([], [OTOOL], [1],
2107 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2108 _LT_DECL([], [OTOOL64], [1],
2109 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2111 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2112 [lt_cv_apple_cc_single_mod=no
2113 if test -z "${LT_MULTI_MODULE}"; then
2114 # By default we will add the -single_module flag. You can override
2115 # by either setting the environment variable LT_MULTI_MODULE
2116 # non-empty at configure time, or by adding -multi_module to the
2118 rm -rf libconftest.dylib*
2119 echo "int foo(void){return 1;}" > conftest.c
2120 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2121 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2122 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2123 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2125 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2126 lt_cv_apple_cc_single_mod=yes
2128 cat conftest.err >&AS_MESSAGE_LOG_FD
2130 rm -rf libconftest.dylib*
2133 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2134 [lt_cv_ld_exported_symbols_list],
2135 [lt_cv_ld_exported_symbols_list=no
2136 save_LDFLAGS=$LDFLAGS
2137 echo "_main" > conftest.sym
2138 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2139 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2140 [lt_cv_ld_exported_symbols_list=yes],
2141 [lt_cv_ld_exported_symbols_list=no])
2142 LDFLAGS="$save_LDFLAGS"
2144 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2145 [lt_cv_ld_force_load=no
2146 cat > conftest.c << _LT_EOF
2147 int forced_loaded() { return 2;}
2149 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2150 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2151 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2152 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2153 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2154 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2155 cat > conftest.c << _LT_EOF
2156 int main() { return 0;}
2158 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2159 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2161 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2162 lt_cv_ld_force_load=yes
2164 cat conftest.err >&AS_MESSAGE_LOG_FD
2166 rm -f conftest.err libconftest.a conftest conftest.c
2167 rm -rf conftest.dSYM
2170 rhapsody* | darwin1.[[012]])
2171 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2173 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2174 darwin*) # darwin 5.x on
2175 # if running on 10.5 or later, the deployment target defaults
2176 # to the OS version, if on x86, and 10.4, the deployment
2177 # target defaults to 10.4. Don't you love it?
2178 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2179 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2180 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2182 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2184 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2188 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2189 _lt_dar_single_mod='$single_module'
2191 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2192 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2194 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2196 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2197 _lt_dsymutil='~$DSYMUTIL $lib || :'
2206 # _LT_DARWIN_LINKER_FEATURES
2207 # --------------------------
2208 # Checks for linker and compiler features on darwin
2209 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2211 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2212 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2213 _LT_TAGVAR(hardcode_direct, $1)=no
2214 _LT_TAGVAR(hardcode_automatic, $1)=yes
2215 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2216 if test "$lt_cv_ld_force_load" = "yes"; then
2217 _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\"`'
2219 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2221 _LT_TAGVAR(link_all_deplibs, $1)=yes
2222 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2223 case $cc_basename in
2224 ifort*) _lt_dar_can_shared=yes ;;
2225 *) _lt_dar_can_shared=$GCC ;;
2227 if test "$_lt_dar_can_shared" = "yes"; then
2228 output_verbose_link_cmd=func_echo_all
2229 _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}"
2230 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2231 _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}"
2232 _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}"
2234 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2235 _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}"
2236 _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}"
2240 _LT_TAGVAR(ld_shlibs, $1)=no
2244 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2245 # ----------------------------------
2246 # Links a minimal program and checks the executable
2247 # for the system default hardcoded library path. In most cases,
2248 # this is /usr/lib:/lib, but when the MPI compilers are used
2249 # the location of the communication and MPI libs are included too.
2250 # If we don't find anything, use the default library path according
2251 # to the aix ld manual.
2252 # Store the results from the different compilers for each TAGNAME.
2253 # Allow to override them for all tags through lt_cv_aix_libpath.
2254 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2255 [m4_require([_LT_DECL_SED])dnl
2256 if test "${lt_cv_aix_libpath+set}" = set; then
2257 aix_libpath=$lt_cv_aix_libpath
2259 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2260 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2261 lt_aix_libpath_sed='[
2262 /Import File Strings/,/^$/ {
2264 s/^0 *\([^ ]*\) *$/\1/
2268 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2269 # Check for a 64-bit object if we didn't find anything.
2270 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2271 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2273 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2274 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2277 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2279 ])# _LT_SYS_MODULE_PATH_AIX
2282 # _LT_SHELL_INIT(ARG)
2283 # -------------------
2284 m4_define([_LT_SHELL_INIT],
2285 [m4_divert_text([M4SH-INIT], [$1
2286 ])])# _LT_SHELL_INIT
2290 # _LT_PROG_ECHO_BACKSLASH
2291 # -----------------------
2292 # Find how we can fake an echo command that does not interpret backslash.
2293 # In particular, with Autoconf 2.60 or later we add some code to the start
2294 # of the generated configure script which will find a shell with a builtin
2295 # printf (which we can use as an echo command).
2296 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2297 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2298 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2299 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2301 AC_MSG_CHECKING([how to print strings])
2302 # Test print first, because it will be a builtin if present.
2303 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2304 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2306 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2309 # Use this function as a fallback that always works.
2310 func_fallback_echo ()
2312 eval 'cat <<_LTECHO_EOF
2316 ECHO='func_fallback_echo'
2319 # func_echo_all arg...
2320 # Invoke $ECHO with all args, space-separated.
2327 printf*) AC_MSG_RESULT([printf]) ;;
2328 print*) AC_MSG_RESULT([print -r]) ;;
2329 *) AC_MSG_RESULT([cat]) ;;
2332 m4_ifdef([_AS_DETECT_SUGGESTED],
2333 [_AS_DETECT_SUGGESTED([
2334 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2335 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2336 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2337 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2338 PATH=/empty FPATH=/empty; export PATH FPATH
2339 test "X`printf %s $ECHO`" = "X$ECHO" \
2340 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2342 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2343 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2344 ])# _LT_PROG_ECHO_BACKSLASH
2349 AC_DEFUN([_LT_WITH_SYSROOT],
2350 [AC_MSG_CHECKING([for sysroot])
2351 AC_ARG_WITH([sysroot],
2352 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2353 (or the compiler's sysroot if not specified).],
2354 [], [with_sysroot=no])
2356 dnl lt_sysroot will always be passed unquoted. We quote it here
2357 dnl in case the user passed a directory name.
2359 case ${with_sysroot} in #(
2361 if test "$GCC" = yes; then
2362 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2366 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2371 AC_MSG_RESULT([${with_sysroot}])
2372 AC_MSG_ERROR([The sysroot must be an absolute path.])
2376 AC_MSG_RESULT([${lt_sysroot:-no}])
2377 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2378 [dependent libraries, and in which our libraries should be installed.])])
2382 m4_defun([_LT_ENABLE_LOCK],
2383 [AC_ARG_ENABLE([libtool-lock],
2384 [AS_HELP_STRING([--disable-libtool-lock],
2385 [avoid locking (might break parallel builds)])])
2386 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2388 # Some flags need to be propagated to the compiler or linker for good
2392 # Find out which ABI we are using.
2393 echo 'int i;' > conftest.$ac_ext
2394 if AC_TRY_EVAL(ac_compile); then
2395 case `/usr/bin/file conftest.$ac_objext` in
2407 # Find out which ABI we are using.
2408 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2409 if AC_TRY_EVAL(ac_compile); then
2410 if test "$lt_cv_prog_gnu_ld" = yes; then
2411 case `/usr/bin/file conftest.$ac_objext` in
2413 LD="${LD-ld} -melf32bsmip"
2416 LD="${LD-ld} -melf32bmipn32"
2419 LD="${LD-ld} -melf64bmip"
2423 case `/usr/bin/file conftest.$ac_objext` in
2439 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2440 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2441 # Find out which ABI we are using.
2442 echo 'int i;' > conftest.$ac_ext
2443 if AC_TRY_EVAL(ac_compile); then
2444 case `/usr/bin/file conftest.o` in
2447 x86_64-*kfreebsd*-gnu)
2448 LD="${LD-ld} -m elf_i386_fbsd"
2451 LD="${LD-ld} -m elf_i386"
2453 ppc64-*linux*|powerpc64-*linux*)
2454 LD="${LD-ld} -m elf32ppclinux"
2457 LD="${LD-ld} -m elf_s390"
2460 LD="${LD-ld} -m elf32_sparc"
2466 x86_64-*kfreebsd*-gnu)
2467 LD="${LD-ld} -m elf_x86_64_fbsd"
2470 LD="${LD-ld} -m elf_x86_64"
2472 ppc*-*linux*|powerpc*-*linux*)
2473 LD="${LD-ld} -m elf64ppc"
2475 s390*-*linux*|s390*-*tpf*)
2476 LD="${LD-ld} -m elf64_s390"
2479 LD="${LD-ld} -m elf64_sparc"
2489 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2490 SAVE_CFLAGS="$CFLAGS"
2491 CFLAGS="$CFLAGS -belf"
2492 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2494 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2496 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2497 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2498 CFLAGS="$SAVE_CFLAGS"
2502 # Find out which ABI we are using.
2503 echo 'int i;' > conftest.$ac_ext
2504 if AC_TRY_EVAL(ac_compile); then
2505 case `/usr/bin/file conftest.o` in
2507 case $lt_cv_prog_gnu_ld in
2508 yes*) LD="${LD-ld} -m elf64_sparc" ;;
2510 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2522 need_locks="$enable_libtool_lock"
2528 m4_defun([_LT_PROG_AR],
2529 [AC_CHECK_TOOLS(AR, [ar], false)
2532 _LT_DECL([], [AR], [1], [The archiver])
2533 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2535 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2536 [lt_cv_ar_at_file=no
2537 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2538 [echo conftest.$ac_objext > conftest.lst
2539 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2540 AC_TRY_EVAL([lt_ar_try])
2541 if test "$ac_status" -eq 0; then
2542 # Ensure the archiver fails upon bogus file names.
2543 rm -f conftest.$ac_objext libconftest.a
2544 AC_TRY_EVAL([lt_ar_try])
2545 if test "$ac_status" -ne 0; then
2549 rm -f conftest.* libconftest.a
2553 if test "x$lt_cv_ar_at_file" = xno; then
2556 archiver_list_spec=$lt_cv_ar_at_file
2558 _LT_DECL([], [archiver_list_spec], [1],
2559 [How to feed a file listing to the archiver])
2563 # _LT_CMD_OLD_ARCHIVE
2564 # -------------------
2565 m4_defun([_LT_CMD_OLD_ARCHIVE],
2568 AC_CHECK_TOOL(STRIP, strip, :)
2569 test -z "$STRIP" && STRIP=:
2570 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2572 AC_CHECK_TOOL(RANLIB, ranlib, :)
2573 test -z "$RANLIB" && RANLIB=:
2574 _LT_DECL([], [RANLIB], [1],
2575 [Commands used to install an old-style archive])
2577 # Determine commands to create old-style static archives.
2578 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2579 old_postinstall_cmds='chmod 644 $oldlib'
2580 old_postuninstall_cmds=
2582 if test -n "$RANLIB"; then
2585 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2588 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2591 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2596 lock_old_archive_extraction=yes ;;
2598 lock_old_archive_extraction=no ;;
2600 _LT_DECL([], [old_postinstall_cmds], [2])
2601 _LT_DECL([], [old_postuninstall_cmds], [2])
2602 _LT_TAGDECL([], [old_archive_cmds], [2],
2603 [Commands used to build an old-style archive])
2604 _LT_DECL([], [lock_old_archive_extraction], [0],
2605 [Whether to use a lock for old archive extraction])
2606 ])# _LT_CMD_OLD_ARCHIVE
2609 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2610 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2611 # ----------------------------------------------------------------
2612 # Check whether the given compiler option works
2613 AC_DEFUN([_LT_COMPILER_OPTION],
2614 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2615 m4_require([_LT_DECL_SED])dnl
2616 AC_CACHE_CHECK([$1], [$2],
2618 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2619 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2620 lt_compiler_flag="$3"
2621 # Insert the option either (1) after the last *FLAGS variable, or
2622 # (2) before a word containing "conftest.", or (3) at the end.
2623 # Note that $ac_compile itself does not contain backslashes and begins
2624 # with a dollar sign (not a hyphen), so the echo should work correctly.
2625 # The option is referenced via a variable to avoid confusing sed.
2626 lt_compile=`echo "$ac_compile" | $SED \
2627 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2628 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2629 -e 's:$: $lt_compiler_flag:'`
2630 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2631 (eval "$lt_compile" 2>conftest.err)
2633 cat conftest.err >&AS_MESSAGE_LOG_FD
2634 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2635 if (exit $ac_status) && test -s "$ac_outfile"; then
2636 # The compiler can only warn and ignore the option if not recognized
2637 # So say no if there are warnings other than the usual output.
2638 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2639 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2640 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2647 if test x"[$]$2" = xyes; then
2648 m4_if([$5], , :, [$5])
2650 m4_if([$6], , :, [$6])
2652 ])# _LT_COMPILER_OPTION
2655 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2656 dnl aclocal-1.4 backwards compatibility:
2657 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2660 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2661 # [ACTION-SUCCESS], [ACTION-FAILURE])
2662 # ----------------------------------------------------
2663 # Check whether the given linker option works
2664 AC_DEFUN([_LT_LINKER_OPTION],
2665 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2666 m4_require([_LT_DECL_SED])dnl
2667 AC_CACHE_CHECK([$1], [$2],
2669 save_LDFLAGS="$LDFLAGS"
2670 LDFLAGS="$LDFLAGS $3"
2671 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2672 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2673 # The linker can only warn and ignore the option if not recognized
2674 # So say no if there are warnings
2675 if test -s conftest.err; then
2676 # Append any errors to the config.log.
2677 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2678 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2679 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2680 if diff conftest.exp conftest.er2 >/dev/null; then
2688 LDFLAGS="$save_LDFLAGS"
2691 if test x"[$]$2" = xyes; then
2692 m4_if([$4], , :, [$4])
2694 m4_if([$5], , :, [$5])
2696 ])# _LT_LINKER_OPTION
2699 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2700 dnl aclocal-1.4 backwards compatibility:
2701 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2706 AC_DEFUN([LT_CMD_MAX_LEN],
2707 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2708 # find the maximum length of command line arguments
2709 AC_MSG_CHECKING([the maximum length of command line arguments])
2710 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2716 # On DJGPP, this test can blow up pretty badly due to problems in libc
2717 # (any single argument exceeding 2000 bytes causes a buffer overrun
2718 # during glob expansion). Even if it were fixed, the result of this
2719 # check would be larger than it should be.
2720 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2724 # Under GNU Hurd, this test is not required because there is
2725 # no limit to the length of command line arguments.
2726 # Libtool will interpret -1 as no limit whatsoever
2727 lt_cv_sys_max_cmd_len=-1;
2730 cygwin* | mingw* | cegcc*)
2731 # On Win9x/ME, this test blows up -- it succeeds, but takes
2732 # about 5 minutes as the teststring grows exponentially.
2733 # Worse, since 9x/ME are not pre-emptively multitasking,
2734 # you end up with a "frozen" computer, even though with patience
2735 # the test eventually succeeds (with a max line length of 256k).
2736 # Instead, let's just punt: use the minimum linelength reported by
2737 # all of the supported platforms: 8192 (on NT/2K/XP).
2738 lt_cv_sys_max_cmd_len=8192;
2742 # On MiNT this can take a long time and run out of memory.
2743 lt_cv_sys_max_cmd_len=8192;
2747 # On AmigaOS with pdksh, this test takes hours, literally.
2748 # So we just punt and use a minimum line length of 8192.
2749 lt_cv_sys_max_cmd_len=8192;
2752 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2753 # This has been around since 386BSD, at least. Likely further.
2754 if test -x /sbin/sysctl; then
2755 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2756 elif test -x /usr/sbin/sysctl; then
2757 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2759 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2761 # And add a safety zone
2762 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2763 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2767 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2768 lt_cv_sys_max_cmd_len=196608
2772 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2773 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2774 # nice to cause kernel panics so lets avoid the loop below.
2775 # First set a reasonable default.
2776 lt_cv_sys_max_cmd_len=16384
2778 if test -x /sbin/sysconfig; then
2779 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2780 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2785 lt_cv_sys_max_cmd_len=102400
2787 sysv5* | sco5v6* | sysv4.2uw2*)
2788 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2789 if test -n "$kargmax"; then
2790 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2792 lt_cv_sys_max_cmd_len=32768
2796 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2797 if test -n "$lt_cv_sys_max_cmd_len"; then
2798 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2799 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2801 # Make teststring a little bigger before we do anything with it.
2802 # a 1K string should be a reasonable start.
2803 for i in 1 2 3 4 5 6 7 8 ; do
2804 teststring=$teststring$teststring
2806 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2807 # If test is not a shell built-in, we'll probably end up computing a
2808 # maximum length that is only half of the actual maximum length, but
2810 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2811 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2812 test $i != 17 # 1/2 MB should be enough
2815 teststring=$teststring$teststring
2817 # Only check the string length outside the loop.
2818 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2820 # Add a significant safety factor because C++ compilers can tack on
2821 # massive amounts of additional arguments before passing them to the
2822 # linker. It appears as though 1/2 is a usable value.
2823 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2828 if test -n $lt_cv_sys_max_cmd_len ; then
2829 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2833 max_cmd_len=$lt_cv_sys_max_cmd_len
2834 _LT_DECL([], [max_cmd_len], [0],
2835 [What is the maximum length of a command?])
2839 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2840 dnl aclocal-1.4 backwards compatibility:
2841 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2846 m4_defun([_LT_HEADER_DLFCN],
2847 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2848 ])# _LT_HEADER_DLFCN
2851 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2852 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2853 # ----------------------------------------------------------------
2854 m4_defun([_LT_TRY_DLOPEN_SELF],
2855 [m4_require([_LT_HEADER_DLFCN])dnl
2856 if test "$cross_compiling" = yes; then :
2859 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2860 lt_status=$lt_dlunknown
2861 cat > conftest.$ac_ext <<_LT_EOF
2862 [#line $LINENO "configure"
2863 #include "confdefs.h"
2872 # define LT_DLGLOBAL RTLD_GLOBAL
2875 # define LT_DLGLOBAL DL_GLOBAL
2877 # define LT_DLGLOBAL 0
2881 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2882 find out it does not work in some platform. */
2883 #ifndef LT_DLLAZY_OR_NOW
2885 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2888 # define LT_DLLAZY_OR_NOW DL_LAZY
2891 # define LT_DLLAZY_OR_NOW RTLD_NOW
2894 # define LT_DLLAZY_OR_NOW DL_NOW
2896 # define LT_DLLAZY_OR_NOW 0
2903 /* When -fvisbility=hidden is used, assume the code has been annotated
2904 correspondingly for the symbols needed. */
2905 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2906 int fnord () __attribute__((visibility("default")));
2909 int fnord () { return 42; }
2912 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2913 int status = $lt_dlunknown;
2917 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2920 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2921 else puts (dlerror ());
2923 /* dlclose (self); */
2931 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2932 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2935 x$lt_dlno_uscore) $1 ;;
2936 x$lt_dlneed_uscore) $2 ;;
2937 x$lt_dlunknown|x*) $3 ;;
2940 # compilation failed
2945 ])# _LT_TRY_DLOPEN_SELF
2948 # LT_SYS_DLOPEN_SELF
2949 # ------------------
2950 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2951 [m4_require([_LT_HEADER_DLFCN])dnl
2952 if test "x$enable_dlopen" != xyes; then
2953 enable_dlopen=unknown
2954 enable_dlopen_self=unknown
2955 enable_dlopen_self_static=unknown
2962 lt_cv_dlopen="load_add_on"
2964 lt_cv_dlopen_self=yes
2967 mingw* | pw32* | cegcc*)
2968 lt_cv_dlopen="LoadLibrary"
2973 lt_cv_dlopen="dlopen"
2978 # if libdl is installed we need to link against it
2979 AC_CHECK_LIB([dl], [dlopen],
2980 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2983 lt_cv_dlopen_self=yes
2988 AC_CHECK_FUNC([shl_load],
2989 [lt_cv_dlopen="shl_load"],
2990 [AC_CHECK_LIB([dld], [shl_load],
2991 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2992 [AC_CHECK_FUNC([dlopen],
2993 [lt_cv_dlopen="dlopen"],
2994 [AC_CHECK_LIB([dl], [dlopen],
2995 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2996 [AC_CHECK_LIB([svld], [dlopen],
2997 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2998 [AC_CHECK_LIB([dld], [dld_link],
2999 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3008 if test "x$lt_cv_dlopen" != xno; then
3014 case $lt_cv_dlopen in
3016 save_CPPFLAGS="$CPPFLAGS"
3017 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3019 save_LDFLAGS="$LDFLAGS"
3020 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3023 LIBS="$lt_cv_dlopen_libs $LIBS"
3025 AC_CACHE_CHECK([whether a program can dlopen itself],
3026 lt_cv_dlopen_self, [dnl
3027 _LT_TRY_DLOPEN_SELF(
3028 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3029 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3032 if test "x$lt_cv_dlopen_self" = xyes; then
3033 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3034 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3035 lt_cv_dlopen_self_static, [dnl
3036 _LT_TRY_DLOPEN_SELF(
3037 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3038 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3042 CPPFLAGS="$save_CPPFLAGS"
3043 LDFLAGS="$save_LDFLAGS"
3048 case $lt_cv_dlopen_self in
3049 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3050 *) enable_dlopen_self=unknown ;;
3053 case $lt_cv_dlopen_self_static in
3054 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3055 *) enable_dlopen_self_static=unknown ;;
3058 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3059 [Whether dlopen is supported])
3060 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3061 [Whether dlopen of programs is supported])
3062 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3063 [Whether dlopen of statically linked programs is supported])
3064 ])# LT_SYS_DLOPEN_SELF
3067 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3068 dnl aclocal-1.4 backwards compatibility:
3069 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3072 # _LT_COMPILER_C_O([TAGNAME])
3073 # ---------------------------
3074 # Check to see if options -c and -o are simultaneously supported by compiler.
3075 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3076 m4_defun([_LT_COMPILER_C_O],
3077 [m4_require([_LT_DECL_SED])dnl
3078 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3079 m4_require([_LT_TAG_COMPILER])dnl
3080 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3081 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3082 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3083 $RM -r conftest 2>/dev/null
3087 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3089 lt_compiler_flag="-o out/conftest2.$ac_objext"
3090 # Insert the option either (1) after the last *FLAGS variable, or
3091 # (2) before a word containing "conftest.", or (3) at the end.
3092 # Note that $ac_compile itself does not contain backslashes and begins
3093 # with a dollar sign (not a hyphen), so the echo should work correctly.
3094 lt_compile=`echo "$ac_compile" | $SED \
3095 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3096 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3097 -e 's:$: $lt_compiler_flag:'`
3098 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3099 (eval "$lt_compile" 2>out/conftest.err)
3101 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3102 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3103 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3105 # The compiler can only warn and ignore the option if not recognized
3106 # So say no if there are warnings
3107 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3108 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3109 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3110 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3113 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3115 # SGI C++ compiler will create directory out/ii_files/ for
3116 # template instantiation
3117 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3118 $RM out/* && rmdir out
3123 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3124 [Does compiler simultaneously support -c and -o options?])
3125 ])# _LT_COMPILER_C_O
3128 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3129 # ----------------------------------
3130 # Check to see if we can do hard links to lock some files if needed
3131 m4_defun([_LT_COMPILER_FILE_LOCKS],
3132 [m4_require([_LT_ENABLE_LOCK])dnl
3133 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3134 _LT_COMPILER_C_O([$1])
3136 hard_links="nottested"
3137 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3138 # do not overwrite the value of need_locks provided by the user
3139 AC_MSG_CHECKING([if we can lock with hard links])
3142 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3144 ln conftest.a conftest.b 2>&5 || hard_links=no
3145 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3146 AC_MSG_RESULT([$hard_links])
3147 if test "$hard_links" = no; then
3148 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3154 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3155 ])# _LT_COMPILER_FILE_LOCKS
3160 m4_defun([_LT_CHECK_OBJDIR],
3161 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3162 [rm -f .libs 2>/dev/null
3163 mkdir .libs 2>/dev/null
3164 if test -d .libs; then
3167 # MS-DOS does not allow filenames that begin with a dot.
3170 rmdir .libs 2>/dev/null])
3171 objdir=$lt_cv_objdir
3172 _LT_DECL([], [objdir], [0],
3173 [The name of the directory that contains temporary libtool files])dnl
3174 m4_pattern_allow([LT_OBJDIR])dnl
3175 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3176 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3177 ])# _LT_CHECK_OBJDIR
3180 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3181 # --------------------------------------
3182 # Check hardcoding attributes.
3183 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3184 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3185 _LT_TAGVAR(hardcode_action, $1)=
3186 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3187 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3188 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3190 # We can hardcode non-existent directories.
3191 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3192 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3193 # have to relink, otherwise we might link with an installed library
3194 # when we should be linking with a yet-to-be-installed one
3195 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3196 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3197 # Linking always hardcodes the temporary library directory.
3198 _LT_TAGVAR(hardcode_action, $1)=relink
3200 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3201 _LT_TAGVAR(hardcode_action, $1)=immediate
3204 # We cannot hardcode anything, or else we can only hardcode existing
3206 _LT_TAGVAR(hardcode_action, $1)=unsupported
3208 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3210 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3211 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3212 # Fast installation is not supported
3213 enable_fast_install=no
3214 elif test "$shlibpath_overrides_runpath" = yes ||
3215 test "$enable_shared" = no; then
3216 # Fast installation is not necessary
3217 enable_fast_install=needless
3219 _LT_TAGDECL([], [hardcode_action], [0],
3220 [How to hardcode a shared library path into an executable])
3221 ])# _LT_LINKER_HARDCODE_LIBPATH
3226 m4_defun([_LT_CMD_STRIPLIB],
3227 [m4_require([_LT_DECL_EGREP])
3230 AC_MSG_CHECKING([whether stripping libraries is possible])
3231 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3232 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3233 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3234 AC_MSG_RESULT([yes])
3236 # FIXME - insert some real tests, host_os isn't really good enough
3239 if test -n "$STRIP" ; then
3240 striplib="$STRIP -x"
3241 old_striplib="$STRIP -S"
3242 AC_MSG_RESULT([yes])
3252 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3253 _LT_DECL([], [striplib], [1])
3254 ])# _LT_CMD_STRIPLIB
3257 # _LT_SYS_DYNAMIC_LINKER([TAG])
3258 # -----------------------------
3259 # PORTME Fill in your ld.so characteristics
3260 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3261 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3262 m4_require([_LT_DECL_EGREP])dnl
3263 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3264 m4_require([_LT_DECL_OBJDUMP])dnl
3265 m4_require([_LT_DECL_SED])dnl
3266 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3267 AC_MSG_CHECKING([dynamic linker characteristics])
3270 if test "$GCC" = yes; then
3272 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3273 *) lt_awk_arg="/^libraries:/" ;;
3276 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3277 *) lt_sed_strip_eq="s,=/,/,g" ;;
3279 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3280 case $lt_search_path_spec in
3282 # if the path contains ";" then we assume it to be the separator
3283 # otherwise default to the standard path separator (i.e. ":") - it is
3284 # assumed that no part of a normal pathname contains ";" but that should
3285 # okay in the real world where ";" in dirpaths is itself problematic.
3286 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3289 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3292 # Ok, now we have the path, separated by spaces, we can step through it
3293 # and add multilib dir if necessary.
3294 lt_tmp_lt_search_path_spec=
3295 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3296 for lt_sys_path in $lt_search_path_spec; do
3297 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3298 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3300 test -d "$lt_sys_path" && \
3301 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3304 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3305 BEGIN {RS=" "; FS="/|\n";} {
3308 for (lt_i = NF; lt_i > 0; lt_i--) {
3309 if ($lt_i != "" && $lt_i != ".") {
3310 if ($lt_i == "..") {
3313 if (lt_count == 0) {
3314 lt_foo="/" $lt_i lt_foo;
3321 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3322 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3324 # AWK program above erroneously prepends '/' to C:/dos/paths
3327 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3328 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3330 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3332 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3335 libname_spec='lib$name'
3343 shlibpath_overrides_runpath=unknown
3345 dynamic_linker="$host_os ld.so"
3346 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3347 need_lib_prefix=unknown
3348 hardcode_into_libs=no
3350 # when you set need_version to no, make sure it does not cause -set_version
3351 # flags to be left without arguments
3352 need_version=unknown
3357 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3358 shlibpath_var=LIBPATH
3360 # AIX 3 has no versioning support, so we append a major version to the name.
3361 soname_spec='${libname}${release}${shared_ext}$major'
3368 hardcode_into_libs=yes
3369 if test "$host_cpu" = ia64; then
3370 # AIX 5 supports IA64
3371 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3372 shlibpath_var=LD_LIBRARY_PATH
3374 # With GCC up to 2.95.x, collect2 would create an import file
3375 # for dependence libraries. The import file would start with
3376 # the line `#! .'. This would cause the generated library to
3377 # depend on `.', always an invalid library. This was fixed in
3378 # development snapshots of GCC prior to 3.0.
3380 aix4 | aix4.[[01]] | aix4.[[01]].*)
3381 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3383 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3390 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3391 # soname into executable. Probably we can add versioning support to
3392 # collect2, so additional links can be useful in future.
3393 if test "$aix_use_runtimelinking" = yes; then
3394 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3395 # instead of lib<name>.a to let people know that these are not
3396 # typical AIX shared libraries.
3397 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3399 # We preserve .a as extension for shared libraries through AIX4.2
3400 # and later when we are not doing run time linking.
3401 library_names_spec='${libname}${release}.a $libname.a'
3402 soname_spec='${libname}${release}${shared_ext}$major'
3404 shlibpath_var=LIBPATH
3411 # Since July 2007 AmigaOS4 officially supports .so libraries.
3412 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3413 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3416 library_names_spec='$libname.ixlibrary $libname.a'
3417 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3418 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'
3424 library_names_spec='${libname}${shared_ext}'
3425 dynamic_linker="$host_os ld.so"
3426 shlibpath_var=LIBRARY_PATH
3432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3433 soname_spec='${libname}${release}${shared_ext}$major'
3434 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3435 shlibpath_var=LD_LIBRARY_PATH
3436 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3437 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3438 # the default ld.so.conf also contains /usr/contrib/lib and
3439 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3440 # libtool to hard-code these into programs
3443 cygwin* | mingw* | pw32* | cegcc*)
3444 version_type=windows
3449 case $GCC,$cc_basename in
3452 library_names_spec='$libname.dll.a'
3453 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3454 postinstall_cmds='base_file=`basename \${file}`~
3455 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3456 dldir=$destdir/`dirname \$dlpath`~
3457 test -d \$dldir || mkdir -p \$dldir~
3458 $install_prog $dir/$dlname \$dldir/$dlname~
3459 chmod a+x \$dldir/$dlname~
3460 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3461 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3463 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3464 dlpath=$dir/\$dldll~
3466 shlibpath_overrides_runpath=yes
3470 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3471 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3473 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3476 # MinGW DLLs use traditional 'lib' prefix
3477 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3480 # pw32 DLLs use 'pw' prefix rather than 'lib'
3481 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3484 dynamic_linker='Win32 ld.exe'
3489 libname_spec='$name'
3490 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3491 library_names_spec='${libname}.dll.lib'
3495 sys_lib_search_path_spec=
3501 # Let DOS variable expansion print the short 8.3 style file name.
3502 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3503 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3506 # Convert to MSYS style.
3507 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3510 # Convert to unix form, then to dos form, then back to unix form
3511 # but this time dos style (no spaces!) so that the unix form looks
3512 # like /cygdrive/c/PROGRA~1:/cygdr...
3513 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3514 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3515 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3518 sys_lib_search_path_spec="$LIB"
3519 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3520 # It is most probably a Windows format PATH.
3521 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3523 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3525 # FIXME: find the short name or the path components, as spaces are
3526 # common. (e.g. "Program Files" -> "PROGRA~1")
3530 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3531 postinstall_cmds='base_file=`basename \${file}`~
3532 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3533 dldir=$destdir/`dirname \$dlpath`~
3534 test -d \$dldir || mkdir -p \$dldir~
3535 $install_prog $dir/$dlname \$dldir/$dlname'
3536 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3537 dlpath=$dir/\$dldll~
3539 shlibpath_overrides_runpath=yes
3540 dynamic_linker='Win32 link.exe'
3544 # Assume MSVC wrapper
3545 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3546 dynamic_linker='Win32 ld.exe'
3549 # FIXME: first we should search . and the directory the executable is in
3553 darwin* | rhapsody*)
3554 dynamic_linker="$host_os dyld"
3558 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3559 soname_spec='${libname}${release}${major}$shared_ext'
3560 shlibpath_overrides_runpath=yes
3561 shlibpath_var=DYLD_LIBRARY_PATH
3562 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3564 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3565 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3572 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3573 soname_spec='${libname}${release}${shared_ext}$major'
3574 shlibpath_var=LD_LIBRARY_PATH
3581 freebsd* | dragonfly*)
3582 # DragonFly does not have aout. When/if they implement a new
3583 # versioning mechanism, adjust this.
3584 if test -x /usr/bin/objformat; then
3585 objformat=`/usr/bin/objformat`
3588 freebsd[[123]]*) objformat=aout ;;
3592 version_type=freebsd-$objformat
3593 case $version_type in
3595 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3600 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3604 shlibpath_var=LD_LIBRARY_PATH
3607 shlibpath_overrides_runpath=yes
3609 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3610 shlibpath_overrides_runpath=yes
3611 hardcode_into_libs=yes
3613 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3614 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3615 shlibpath_overrides_runpath=no
3616 hardcode_into_libs=yes
3618 *) # from 4.6 on, and DragonFly
3619 shlibpath_overrides_runpath=yes
3620 hardcode_into_libs=yes
3629 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3630 soname_spec='${libname}${release}${shared_ext}$major'
3631 shlibpath_var=LD_LIBRARY_PATH
3632 hardcode_into_libs=yes
3639 dynamic_linker="$host_os runtime_loader"
3640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3641 soname_spec='${libname}${release}${shared_ext}$major'
3642 shlibpath_var=LIBRARY_PATH
3643 shlibpath_overrides_runpath=yes
3644 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3645 hardcode_into_libs=yes
3648 hpux9* | hpux10* | hpux11*)
3649 # Give a soname corresponding to the major version so that dld.sl refuses to
3650 # link against other versions.
3657 hardcode_into_libs=yes
3658 dynamic_linker="$host_os dld.so"
3659 shlibpath_var=LD_LIBRARY_PATH
3660 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3662 soname_spec='${libname}${release}${shared_ext}$major'
3663 if test "X$HPUX_IA64_MODE" = X32; then
3664 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3666 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3668 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3672 hardcode_into_libs=yes
3673 dynamic_linker="$host_os dld.sl"
3674 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3675 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3677 soname_spec='${libname}${release}${shared_ext}$major'
3678 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3679 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3683 dynamic_linker="$host_os dld.sl"
3684 shlibpath_var=SHLIB_PATH
3685 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3686 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3687 soname_spec='${libname}${release}${shared_ext}$major'
3690 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3691 postinstall_cmds='chmod 555 $lib'
3692 # or fails outright, so override atomically:
3693 install_override_mode=555
3700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3701 soname_spec='${libname}${release}${shared_ext}$major'
3702 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3703 shlibpath_var=LD_LIBRARY_PATH
3704 shlibpath_overrides_runpath=no
3705 hardcode_into_libs=yes
3708 irix5* | irix6* | nonstopux*)
3710 nonstopux*) version_type=nonstopux ;;
3712 if test "$lt_cv_prog_gnu_ld" = yes; then
3720 soname_spec='${libname}${release}${shared_ext}$major'
3721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3723 irix5* | nonstopux*)
3727 case $LD in # libtool.m4 will add one of these switches to LD
3728 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3729 libsuff= shlibsuff= libmagic=32-bit;;
3730 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3731 libsuff=32 shlibsuff=N32 libmagic=N32;;
3732 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3733 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3734 *) libsuff= shlibsuff= libmagic=never-match;;
3738 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3739 shlibpath_overrides_runpath=no
3740 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3741 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3742 hardcode_into_libs=yes
3745 # No shared lib support for Linux oldld, aout, or coff.
3746 linux*oldld* | linux*aout* | linux*coff*)
3750 # This must be Linux ELF.
3751 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3756 soname_spec='${libname}${release}${shared_ext}$major'
3757 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3758 shlibpath_var=LD_LIBRARY_PATH
3759 shlibpath_overrides_runpath=no
3761 # Some binutils ld are patched to set DT_RUNPATH
3762 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3763 [lt_cv_shlibpath_overrides_runpath=no
3764 save_LDFLAGS=$LDFLAGS
3766 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3767 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3768 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3769 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3770 [lt_cv_shlibpath_overrides_runpath=yes])])
3771 LDFLAGS=$save_LDFLAGS
3774 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3776 # This implies no fast_install, which is unacceptable.
3777 # Some rework will be needed to allow for fast_install
3778 # before this can be enabled.
3779 hardcode_into_libs=yes
3781 # Append ld.so.conf contents to the search path
3782 if test -f /etc/ld.so.conf; then
3783 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' ' '`
3784 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3787 # We used to test for /lib/ld.so.1 and disable shared libraries on
3788 # powerpc, because MkLinux only supported shared libraries with the
3789 # GNU dynamic linker. Since this was broken with cross compilers,
3790 # most powerpc-linux boxes support dynamic linking these days and
3791 # people can always --disable-shared, the test was removed, and we
3792 # assume the GNU/Linux dynamic linker is in use.
3793 dynamic_linker='GNU/Linux ld.so'
3800 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3802 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3803 dynamic_linker='NetBSD (a.out) ld.so'
3805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3806 soname_spec='${libname}${release}${shared_ext}$major'
3807 dynamic_linker='NetBSD ld.elf_so'
3809 shlibpath_var=LD_LIBRARY_PATH
3810 shlibpath_overrides_runpath=yes
3811 hardcode_into_libs=yes
3816 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3817 shlibpath_var=LD_LIBRARY_PATH
3818 shlibpath_overrides_runpath=yes
3825 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3826 soname_spec='${libname}${release}${shared_ext}$major'
3827 shlibpath_var=LD_LIBRARY_PATH
3828 shlibpath_overrides_runpath=no
3829 hardcode_into_libs=yes
3830 dynamic_linker='ldqnx.so'
3835 sys_lib_dlsearch_path_spec="/usr/lib"
3837 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3839 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3840 *) need_version=no ;;
3842 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3843 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3844 shlibpath_var=LD_LIBRARY_PATH
3845 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3847 openbsd2.[[89]] | openbsd2.[[89]].*)
3848 shlibpath_overrides_runpath=no
3851 shlibpath_overrides_runpath=yes
3855 shlibpath_overrides_runpath=yes
3860 libname_spec='$name'
3863 library_names_spec='$libname${shared_ext} $libname.a'
3864 dynamic_linker='OS/2 ld.exe'
3865 shlibpath_var=LIBPATH
3868 osf3* | osf4* | osf5*)
3872 soname_spec='${libname}${release}${shared_ext}$major'
3873 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3874 shlibpath_var=LD_LIBRARY_PATH
3875 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3876 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3887 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3888 soname_spec='${libname}${release}${shared_ext}$major'
3889 shlibpath_var=LD_LIBRARY_PATH
3890 shlibpath_overrides_runpath=yes
3891 hardcode_into_libs=yes
3892 # ldd complains unless libraries are executable
3893 postinstall_cmds='chmod +x $lib'
3898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3899 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3900 shlibpath_var=LD_LIBRARY_PATH
3901 shlibpath_overrides_runpath=yes
3902 if test "$with_gnu_ld" = yes; then
3910 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3911 soname_spec='${libname}${release}${shared_ext}$major'
3912 shlibpath_var=LD_LIBRARY_PATH
3913 case $host_vendor in
3915 shlibpath_overrides_runpath=no
3917 runpath_var=LD_RUN_PATH
3925 shlibpath_overrides_runpath=no
3926 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3932 if test -d /usr/nec ;then
3934 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3935 soname_spec='$libname${shared_ext}.$major'
3936 shlibpath_var=LD_LIBRARY_PATH
3940 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3941 version_type=freebsd-elf
3944 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3945 soname_spec='${libname}${release}${shared_ext}$major'
3946 shlibpath_var=LD_LIBRARY_PATH
3947 shlibpath_overrides_runpath=yes
3948 hardcode_into_libs=yes
3949 if test "$with_gnu_ld" = yes; then
3950 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3952 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3955 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3959 sys_lib_dlsearch_path_spec='/usr/lib'
3963 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3967 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3968 shlibpath_var=LD_LIBRARY_PATH
3969 shlibpath_overrides_runpath=no
3970 hardcode_into_libs=yes
3975 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3976 soname_spec='${libname}${release}${shared_ext}$major'
3977 shlibpath_var=LD_LIBRARY_PATH
3984 AC_MSG_RESULT([$dynamic_linker])
3985 test "$dynamic_linker" = no && can_build_shared=no
3987 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3988 if test "$GCC" = yes; then
3989 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3992 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3993 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3995 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3996 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3999 _LT_DECL([], [variables_saved_for_relink], [1],
4000 [Variables whose values should be saved in libtool wrapper scripts and
4001 restored at link time])
4002 _LT_DECL([], [need_lib_prefix], [0],
4003 [Do we need the "lib" prefix for modules?])
4004 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4005 _LT_DECL([], [version_type], [0], [Library versioning type])
4006 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4007 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4008 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4009 [Is shlibpath searched before the hard-coded library search path?])
4010 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4011 _LT_DECL([], [library_names_spec], [1],
4012 [[List of archive names. First name is the real one, the rest are links.
4013 The last name is the one that the linker finds with -lNAME]])
4014 _LT_DECL([], [soname_spec], [1],
4015 [[The coded name of the library, if different from the real name]])
4016 _LT_DECL([], [install_override_mode], [1],
4017 [Permission mode override for installation of shared libraries])
4018 _LT_DECL([], [postinstall_cmds], [2],
4019 [Command to use after installation of a shared archive])
4020 _LT_DECL([], [postuninstall_cmds], [2],
4021 [Command to use after uninstallation of a shared archive])
4022 _LT_DECL([], [finish_cmds], [2],
4023 [Commands used to finish a libtool library installation in a directory])
4024 _LT_DECL([], [finish_eval], [1],
4025 [[As "finish_cmds", except a single script fragment to be evaled but
4027 _LT_DECL([], [hardcode_into_libs], [0],
4028 [Whether we should hardcode library paths into libraries])
4029 _LT_DECL([], [sys_lib_search_path_spec], [2],
4030 [Compile-time system search path for libraries])
4031 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4032 [Run-time system search path for libraries])
4033 ])# _LT_SYS_DYNAMIC_LINKER
4036 # _LT_PATH_TOOL_PREFIX(TOOL)
4037 # --------------------------
4038 # find a file program which can recognize shared library
4039 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4040 [m4_require([_LT_DECL_EGREP])dnl
4041 AC_MSG_CHECKING([for $1])
4042 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4044 [[\\/*] | ?:[\\/]*])
4045 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4048 lt_save_MAGIC_CMD="$MAGIC_CMD"
4049 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4050 dnl $ac_dummy forces splitting on constant user-supplied paths.
4051 dnl POSIX.2 word splitting is done only on the output of word expansions,
4052 dnl not every word. This closes a longstanding sh security hole.
4053 ac_dummy="m4_if([$2], , $PATH, [$2])"
4054 for ac_dir in $ac_dummy; do
4056 test -z "$ac_dir" && ac_dir=.
4057 if test -f $ac_dir/$1; then
4058 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4059 if test -n "$file_magic_test_file"; then
4060 case $deplibs_check_method in
4062 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4063 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4064 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4065 $EGREP "$file_magic_regex" > /dev/null; then
4070 *** Warning: the command libtool uses to detect shared libraries,
4071 *** $file_magic_cmd, produces output that libtool cannot recognize.
4072 *** The result is that libtool may fail to recognize shared libraries
4073 *** as such. This will affect the creation of libtool libraries that
4074 *** depend on shared libraries, but programs linked with such libtool
4075 *** libraries will work regardless of this problem. Nevertheless, you
4076 *** may want to report the problem to your system manager and/or to
4077 *** bug-libtool@gnu.org
4087 MAGIC_CMD="$lt_save_MAGIC_CMD"
4090 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4091 if test -n "$MAGIC_CMD"; then
4092 AC_MSG_RESULT($MAGIC_CMD)
4096 _LT_DECL([], [MAGIC_CMD], [0],
4097 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4098 ])# _LT_PATH_TOOL_PREFIX
4101 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4102 dnl aclocal-1.4 backwards compatibility:
4103 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4108 # find a file program which can recognize a shared library
4109 m4_defun([_LT_PATH_MAGIC],
4110 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4111 if test -z "$lt_cv_path_MAGIC_CMD"; then
4112 if test -n "$ac_tool_prefix"; then
4113 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4123 # find the pathname to the GNU or non-GNU linker
4124 AC_DEFUN([LT_PATH_LD],
4125 [AC_REQUIRE([AC_PROG_CC])dnl
4126 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4127 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4128 m4_require([_LT_DECL_SED])dnl
4129 m4_require([_LT_DECL_EGREP])dnl
4130 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4132 AC_ARG_WITH([gnu-ld],
4133 [AS_HELP_STRING([--with-gnu-ld],
4134 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4135 [test "$withval" = no || with_gnu_ld=yes],
4136 [with_gnu_ld=no])dnl
4139 if test "$GCC" = yes; then
4140 # Check if gcc -print-prog-name=ld gives a path.
4141 AC_MSG_CHECKING([for ld used by $CC])
4144 # gcc leaves a trailing carriage return which upsets mingw
4145 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4147 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4150 # Accept absolute paths.
4151 [[\\/]]* | ?:[[\\/]]*)
4152 re_direlt='/[[^/]][[^/]]*/\.\./'
4153 # Canonicalize the pathname of ld
4154 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4155 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4156 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4158 test -z "$LD" && LD="$ac_prog"
4161 # If it fails, then pretend we aren't using GCC.
4165 # If it is relative, then search for the first ld in PATH.
4169 elif test "$with_gnu_ld" = yes; then
4170 AC_MSG_CHECKING([for GNU ld])
4172 AC_MSG_CHECKING([for non-GNU ld])
4174 AC_CACHE_VAL(lt_cv_path_LD,
4175 [if test -z "$LD"; then
4176 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4177 for ac_dir in $PATH; do
4179 test -z "$ac_dir" && ac_dir=.
4180 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4181 lt_cv_path_LD="$ac_dir/$ac_prog"
4182 # Check to see if the program is GNU ld. I'd rather use --version,
4183 # but apparently some variants of GNU ld only accept -v.
4184 # Break only if it was the GNU/non-GNU ld that we prefer.
4185 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4186 *GNU* | *'with BFD'*)
4187 test "$with_gnu_ld" != no && break
4190 test "$with_gnu_ld" != yes && break
4197 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4200 if test -n "$LD"; then
4205 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4209 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4213 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4214 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4215 dnl aclocal-1.4 backwards compatibility:
4216 dnl AC_DEFUN([AM_PROG_LD], [])
4217 dnl AC_DEFUN([AC_PROG_LD], [])
4222 m4_defun([_LT_PATH_LD_GNU],
4223 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4224 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4225 case `$LD -v 2>&1 </dev/null` in
4226 *GNU* | *'with BFD'*)
4227 lt_cv_prog_gnu_ld=yes
4230 lt_cv_prog_gnu_ld=no
4233 with_gnu_ld=$lt_cv_prog_gnu_ld
4239 # find reload flag for linker
4240 # -- PORTME Some linkers may need a different reload flag.
4241 m4_defun([_LT_CMD_RELOAD],
4242 [AC_CACHE_CHECK([for $LD option to reload object files],
4243 lt_cv_ld_reload_flag,
4244 [lt_cv_ld_reload_flag='-r'])
4245 reload_flag=$lt_cv_ld_reload_flag
4246 case $reload_flag in
4248 *) reload_flag=" $reload_flag" ;;
4250 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4252 cygwin* | mingw* | pw32* | cegcc*)
4253 if test "$GCC" != yes; then
4258 if test "$GCC" = yes; then
4259 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4261 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4265 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4266 _LT_TAGDECL([], [reload_cmds], [2])dnl
4270 # _LT_CHECK_MAGIC_METHOD
4271 # ----------------------
4272 # how to check for library dependencies
4273 # -- PORTME fill in with the dynamic library characteristics
4274 m4_defun([_LT_CHECK_MAGIC_METHOD],
4275 [m4_require([_LT_DECL_EGREP])
4276 m4_require([_LT_DECL_OBJDUMP])
4277 AC_CACHE_CHECK([how to recognize dependent libraries],
4278 lt_cv_deplibs_check_method,
4279 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4280 lt_cv_file_magic_test_file=
4281 lt_cv_deplibs_check_method='unknown'
4282 # Need to set the preceding variable on all platforms that support
4283 # interlibrary dependencies.
4284 # 'none' -- dependencies not supported.
4285 # `unknown' -- same as none, but documents that we really don't know.
4286 # 'pass_all' -- all dependencies passed with no checks.
4287 # 'test_compile' -- check by making test program.
4288 # 'file_magic [[regex]]' -- check by looking for files in library path
4289 # which responds to the $file_magic_cmd with a given extended regex.
4290 # If you have `file' or equivalent on your system and you're not sure
4291 # whether `pass_all' will *always* work, you probably want this one.
4295 lt_cv_deplibs_check_method=pass_all
4299 lt_cv_deplibs_check_method=pass_all
4303 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4304 lt_cv_file_magic_cmd='/usr/bin/file -L'
4305 lt_cv_file_magic_test_file=/shlib/libc.so
4309 # func_win32_libid is a shell function defined in ltmain.sh
4310 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4311 lt_cv_file_magic_cmd='func_win32_libid'
4315 # Base MSYS/MinGW do not provide the 'file' command needed by
4316 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4317 # unless we find 'file', for example because we are cross-compiling.
4318 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4319 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4320 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4321 lt_cv_file_magic_cmd='func_win32_libid'
4323 # Keep this pattern in sync with the one in func_win32_libid.
4324 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4325 lt_cv_file_magic_cmd='$OBJDUMP -f'
4330 # use the weaker test based on 'objdump'. See mingw*.
4331 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4332 lt_cv_file_magic_cmd='$OBJDUMP -f'
4335 darwin* | rhapsody*)
4336 lt_cv_deplibs_check_method=pass_all
4339 freebsd* | dragonfly*)
4340 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4343 # Not sure whether the presence of OpenBSD here was a mistake.
4344 # Let's accept both of them until this is cleared up.
4345 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4346 lt_cv_file_magic_cmd=/usr/bin/file
4347 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4351 lt_cv_deplibs_check_method=pass_all
4356 lt_cv_deplibs_check_method=pass_all
4360 lt_cv_deplibs_check_method=pass_all
4363 hpux10.20* | hpux11*)
4364 lt_cv_file_magic_cmd=/usr/bin/file
4367 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4368 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4371 [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]']
4372 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4375 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4376 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4382 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4383 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4386 irix5* | irix6* | nonstopux*)
4388 *-32|*"-32 ") libmagic=32-bit;;
4389 *-n32|*"-n32 ") libmagic=N32;;
4390 *-64|*"-64 ") libmagic=64-bit;;
4391 *) libmagic=never-match;;
4393 lt_cv_deplibs_check_method=pass_all
4396 # This must be Linux ELF.
4397 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4398 lt_cv_deplibs_check_method=pass_all
4402 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4403 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4405 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4410 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4411 lt_cv_file_magic_cmd=/usr/bin/file
4412 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4416 lt_cv_deplibs_check_method=pass_all
4420 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4421 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4423 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4427 osf3* | osf4* | osf5*)
4428 lt_cv_deplibs_check_method=pass_all
4432 lt_cv_deplibs_check_method=pass_all
4436 lt_cv_deplibs_check_method=pass_all
4439 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4440 lt_cv_deplibs_check_method=pass_all
4444 case $host_vendor in
4446 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]]'
4447 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4450 lt_cv_deplibs_check_method=pass_all
4453 lt_cv_file_magic_cmd='/bin/file'
4454 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4457 lt_cv_file_magic_cmd='/bin/file'
4458 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4459 lt_cv_file_magic_test_file=/lib/libc.so
4462 lt_cv_deplibs_check_method=pass_all
4465 lt_cv_deplibs_check_method=pass_all
4471 lt_cv_deplibs_check_method=pass_all
4478 if test "$build" = "$host"; then
4481 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4484 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4490 file_magic_cmd=$lt_cv_file_magic_cmd
4491 deplibs_check_method=$lt_cv_deplibs_check_method
4492 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4494 _LT_DECL([], [deplibs_check_method], [1],
4495 [Method to check whether dependent libraries are shared objects])
4496 _LT_DECL([], [file_magic_cmd], [1],
4497 [Command to use when deplibs_check_method = "file_magic"])
4498 _LT_DECL([], [file_magic_glob], [1],
4499 [How to find potential files when deplibs_check_method = "file_magic"])
4500 _LT_DECL([], [want_nocaseglob], [1],
4501 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4502 ])# _LT_CHECK_MAGIC_METHOD
4507 # find the pathname to a BSD- or MS-compatible name lister
4508 AC_DEFUN([LT_PATH_NM],
4509 [AC_REQUIRE([AC_PROG_CC])dnl
4510 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4511 [if test -n "$NM"; then
4512 # Let the user override the test.
4515 lt_nm_to_check="${ac_tool_prefix}nm"
4516 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4517 lt_nm_to_check="$lt_nm_to_check nm"
4519 for lt_tmp_nm in $lt_nm_to_check; do
4520 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4521 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4523 test -z "$ac_dir" && ac_dir=.
4524 tmp_nm="$ac_dir/$lt_tmp_nm"
4525 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4526 # Check to see if the nm accepts a BSD-compat flag.
4527 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4528 # nm: unknown option "B" ignored
4529 # Tru64's nm complains that /dev/null is an invalid object file
4530 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4531 */dev/null* | *'Invalid file or object type'*)
4532 lt_cv_path_NM="$tmp_nm -B"
4536 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4538 lt_cv_path_NM="$tmp_nm -p"
4542 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4543 continue # so that we can try to find one that supports BSD flags
4552 : ${lt_cv_path_NM=no}
4554 if test "$lt_cv_path_NM" != "no"; then
4557 # Didn't find any BSD compatible name lister, look for dumpbin.
4558 if test -n "$DUMPBIN"; then :
4559 # Let the user override the test.
4561 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4562 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4564 DUMPBIN="$DUMPBIN -symbols"
4572 if test "$DUMPBIN" != ":"; then
4576 test -z "$NM" && NM=nm
4578 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4580 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4581 [lt_cv_nm_interface="BSD nm"
4582 echo "int some_variable = 0;" > conftest.$ac_ext
4583 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4584 (eval "$ac_compile" 2>conftest.err)
4585 cat conftest.err >&AS_MESSAGE_LOG_FD
4586 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4587 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4588 cat conftest.err >&AS_MESSAGE_LOG_FD
4589 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4590 cat conftest.out >&AS_MESSAGE_LOG_FD
4591 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4592 lt_cv_nm_interface="MS dumpbin"
4598 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4599 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4600 dnl aclocal-1.4 backwards compatibility:
4601 dnl AC_DEFUN([AM_PROG_NM], [])
4602 dnl AC_DEFUN([AC_PROG_NM], [])
4604 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4605 # --------------------------------
4606 # how to determine the name of the shared library
4607 # associated with a specific link library.
4608 # -- PORTME fill in with the dynamic library characteristics
4609 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4610 [m4_require([_LT_DECL_EGREP])
4611 m4_require([_LT_DECL_OBJDUMP])
4612 m4_require([_LT_DECL_DLLTOOL])
4613 AC_CACHE_CHECK([how to associate runtime and link libraries],
4614 lt_cv_sharedlib_from_linklib_cmd,
4615 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4618 cygwin* | mingw* | pw32* | cegcc*)
4619 # two different shell functions defined in ltmain.sh
4620 # decide which to use based on capabilities of $DLLTOOL
4621 case `$DLLTOOL --help 2>&1` in
4622 *--identify-strict*)
4623 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4626 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4631 # fallback: assume linklib IS sharedlib
4632 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4636 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4637 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4639 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4640 [Command to associate shared and link libraries])
4641 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4644 # _LT_PATH_MANIFEST_TOOL
4645 # ----------------------
4646 # locate the manifest tool
4647 m4_defun([_LT_PATH_MANIFEST_TOOL],
4648 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4649 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4650 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4651 [lt_cv_path_mainfest_tool=no
4652 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4653 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4654 cat conftest.err >&AS_MESSAGE_LOG_FD
4655 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4656 lt_cv_path_mainfest_tool=yes
4659 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4662 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4663 ])# _LT_PATH_MANIFEST_TOOL
4668 # check for math library
4669 AC_DEFUN([LT_LIB_M],
4670 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4673 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4674 # These system don't have libm, or don't need it
4677 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4678 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4681 AC_CHECK_LIB(m, cos, LIBM="-lm")
4688 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4689 dnl aclocal-1.4 backwards compatibility:
4690 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4693 # _LT_COMPILER_NO_RTTI([TAGNAME])
4694 # -------------------------------
4695 m4_defun([_LT_COMPILER_NO_RTTI],
4696 [m4_require([_LT_TAG_COMPILER])dnl
4698 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4700 if test "$GCC" = yes; then
4701 case $cc_basename in
4703 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4705 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4708 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4709 lt_cv_prog_compiler_rtti_exceptions,
4710 [-fno-rtti -fno-exceptions], [],
4711 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4713 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4714 [Compiler flag to turn off builtin functions])
4715 ])# _LT_COMPILER_NO_RTTI
4718 # _LT_CMD_GLOBAL_SYMBOLS
4719 # ----------------------
4720 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4721 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4722 AC_REQUIRE([AC_PROG_CC])dnl
4723 AC_REQUIRE([AC_PROG_AWK])dnl
4724 AC_REQUIRE([LT_PATH_NM])dnl
4725 AC_REQUIRE([LT_PATH_LD])dnl
4726 m4_require([_LT_DECL_SED])dnl
4727 m4_require([_LT_DECL_EGREP])dnl
4728 m4_require([_LT_TAG_COMPILER])dnl
4730 # Check for command to grab the raw symbol name followed by C symbol from nm.
4731 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4732 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4734 # These are sane defaults that work on at least a few old systems.
4735 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4737 # Character class describing NM global symbol codes.
4738 symcode='[[BCDEGRST]]'
4740 # Regexp to match symbols that can be accessed directly from C.
4741 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4743 # Define system-specific variables.
4748 cygwin* | mingw* | pw32* | cegcc*)
4749 symcode='[[ABCDGISTW]]'
4752 if test "$host_cpu" = ia64; then
4753 symcode='[[ABCDEGRST]]'
4757 symcode='[[BCDEGRST]]'
4760 symcode='[[BCDEGQRST]]'
4771 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4775 symcode='[[DFNSTU]]'
4779 # If we're using GNU nm, then use its standard symbol codes.
4780 case `$NM -V 2>&1` in
4781 *GNU* | *'with BFD'*)
4782 symcode='[[ABCDGIRSTW]]' ;;
4785 # Transform an extracted symbol line into a proper C declaration.
4786 # Some systems (esp. on ia64) link data and code symbols differently,
4787 # so use this general approach.
4788 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4790 # Transform an extracted symbol line into symbol name and symbol address
4791 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4792 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'"
4794 # Handle CRLF in mingw tool chain
4798 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4802 # Try without a prefix underscore, then with it.
4803 for ac_symprfx in "" "_"; do
4805 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4806 symxfrm="\\1 $ac_symprfx\\2 \\2"
4808 # Write the raw and C identifiers.
4809 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4810 # Fake it for dumpbin and say T for any non-static function
4811 # and D for any global variable.
4812 # Also find C++ and __fastcall symbols from MSVC++,
4813 # which start with @ or ?.
4814 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4815 " {last_section=section; section=\$ 3};"\
4816 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4817 " \$ 0!~/External *\|/{next};"\
4818 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4819 " {if(hide[section]) next};"\
4820 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4821 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4822 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
4823 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4824 " ' prfx=^$ac_symprfx]"
4826 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4828 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4830 # Check to see that the pipe works correctly.
4834 cat > conftest.$ac_ext <<_LT_EOF
4839 void nm_test_func(void);
4840 void nm_test_func(void){}
4844 int main(){nm_test_var='a';nm_test_func();return(0);}
4847 if AC_TRY_EVAL(ac_compile); then
4848 # Now try to grab the symbols.
4850 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4851 # Try sorting and uniquifying the output.
4852 if sort "$nlist" | uniq > "$nlist"T; then
4853 mv -f "$nlist"T "$nlist"
4858 # Make sure that we snagged all the symbols we need.
4859 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4860 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4861 cat <<_LT_EOF > conftest.$ac_ext
4862 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4863 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4864 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4865 relocations are performed -- see ld's documentation on pseudo-relocs. */
4866 # define LT@&t@_DLSYM_CONST
4867 #elif defined(__osf__)
4868 /* This system does not cope well with relocations in const data. */
4869 # define LT@&t@_DLSYM_CONST
4871 # define LT@&t@_DLSYM_CONST const
4879 # Now generate the symbol file.
4880 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4882 cat <<_LT_EOF >> conftest.$ac_ext
4884 /* The mapping between symbol names and symbols. */
4885 LT@&t@_DLSYM_CONST struct {
4889 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4891 { "@PROGRAM@", (void *) 0 },
4893 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4894 cat <<\_LT_EOF >> conftest.$ac_ext
4898 /* This works around a problem in FreeBSD linker */
4899 #ifdef FREEBSD_WORKAROUND
4900 static const void *lt_preloaded_setup() {
4901 return lt__PROGRAM__LTX_preloaded_symbols;
4909 # Now try linking the two files.
4910 mv conftest.$ac_objext conftstm.$ac_objext
4911 lt_globsym_save_LIBS=$LIBS
4912 lt_globsym_save_CFLAGS=$CFLAGS
4913 LIBS="conftstm.$ac_objext"
4914 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4915 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4918 LIBS=$lt_globsym_save_LIBS
4919 CFLAGS=$lt_globsym_save_CFLAGS
4921 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4924 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4927 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4930 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4931 cat conftest.$ac_ext >&5
4933 rm -rf conftest* conftst*
4935 # Do not use the global_symbol_pipe unless it works.
4936 if test "$pipe_works" = yes; then
4939 lt_cv_sys_global_symbol_pipe=
4943 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4944 lt_cv_sys_global_symbol_to_cdecl=
4946 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4947 AC_MSG_RESULT(failed)
4952 # Response file support.
4953 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4954 nm_file_list_spec='@'
4955 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4956 nm_file_list_spec='@'
4959 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4960 [Take the output of nm and produce a listing of raw symbols and C names])
4961 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4962 [Transform the output of nm in a proper C declaration])
4963 _LT_DECL([global_symbol_to_c_name_address],
4964 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4965 [Transform the output of nm in a C name address pair])
4966 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4967 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4968 [Transform the output of nm in a C name address pair when lib prefix is needed])
4969 _LT_DECL([], [nm_file_list_spec], [1],
4970 [Specify filename containing input files for $NM])
4971 ]) # _LT_CMD_GLOBAL_SYMBOLS
4974 # _LT_COMPILER_PIC([TAGNAME])
4975 # ---------------------------
4976 m4_defun([_LT_COMPILER_PIC],
4977 [m4_require([_LT_TAG_COMPILER])dnl
4978 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4979 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4980 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4982 m4_if([$1], [CXX], [
4983 # C++ specific cases for pic, static, wl, etc.
4984 if test "$GXX" = yes; then
4985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4986 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4990 # All AIX code is PIC.
4991 if test "$host_cpu" = ia64; then
4992 # AIX 5 now supports IA64 processor
4993 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5000 # see comment about AmigaOS4 .so support
5001 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5004 # FIXME: we need at least 68020 code to build shared libraries, but
5005 # adding the `-m68020' flag to GCC prevents building anything better,
5007 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5012 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5013 # PIC is the default for these OSes.
5015 mingw* | cygwin* | os2* | pw32* | cegcc*)
5016 # This hack is so that the source file can tell whether it is being
5017 # built for inclusion in a dll (and should export symbols for example).
5018 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5019 # (--disable-auto-import) libraries
5020 m4_if([$1], [GCJ], [],
5021 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5023 darwin* | rhapsody*)
5024 # PIC is the default on this platform
5025 # Common symbols not allowed in MH_DYLIB files
5026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5029 # DJGPP does not support shared libraries at all
5030 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5033 # PIC is the default for Haiku.
5034 # The "-static" flag exists, but is broken.
5035 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5038 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5039 # Instead, we relocate shared libraries at runtime.
5042 if test -d /usr/nec; then
5043 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5047 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5048 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5049 # sets the default TLS model and affects inlining.
5054 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5059 # QNX uses GNU C++, but need to define -shared option too, otherwise
5061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5064 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5070 # All AIX code is PIC.
5071 if test "$host_cpu" = ia64; then
5072 # AIX 5 now supports IA64 processor
5073 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5079 case $cc_basename in
5081 # Green Hills C++ Compiler
5082 # _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"
5086 mingw* | cygwin* | os2* | pw32* | cegcc*)
5087 # This hack is so that the source file can tell whether it is being
5088 # built for inclusion in a dll (and should export symbols for example).
5089 m4_if([$1], [GCJ], [],
5090 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5093 case $cc_basename in
5095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5098 # Green Hills C++ Compiler
5099 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5105 freebsd* | dragonfly*)
5106 # FreeBSD uses GNU C++
5108 hpux9* | hpux10* | hpux11*)
5109 case $cc_basename in
5111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5113 if test "$host_cpu" != ia64; then
5114 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5118 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5125 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5134 # This is c89, which is MS Visual C++ (no shared libs)
5135 # Anyone wants to do a port?
5137 irix5* | irix6* | nonstopux*)
5138 case $cc_basename in
5140 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5141 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5142 # CC pic flag -KPIC is the default.
5148 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5149 case $cc_basename in
5152 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5156 # old Intel C++ for x86_64 which still supported -KPIC.
5157 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5159 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5162 # Intel C++, used to be incompatible with GCC.
5163 # ICC 10 doesn't accept -KPIC any more.
5164 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5165 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5166 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5169 # Portland Group C++ compiler
5170 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5171 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5172 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176 # Make sure the PIC flag is empty. It appears that all Alpha
5177 # Linux and Compaq Tru64 Unix objects are PIC.
5178 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5179 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5181 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5182 # IBM XL 8.0, 9.0 on PPC and BlueGene
5183 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5184 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5185 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5188 case `$CC -V 2>&1 | sed 5q` in
5191 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5192 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5193 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5204 case $cc_basename in
5206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5215 # QNX uses GNU C++, but need to define -shared option too, otherwise
5217 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5219 osf3* | osf4* | osf5*)
5220 case $cc_basename in
5222 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5225 # Rational C++ 2.4.1
5226 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5229 # Digital/Compaq C++
5230 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231 # Make sure the PIC flag is empty. It appears that all Alpha
5232 # Linux and Compaq Tru64 Unix objects are PIC.
5233 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5234 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5243 case $cc_basename in
5245 # Sun C++ 4.2, 5.x and Centerline C++
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5247 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5248 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5251 # Green Hills C++ Compiler
5252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5259 case $cc_basename in
5262 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5263 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5273 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5274 case $cc_basename in
5276 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5277 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5278 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5283 case $cc_basename in
5285 # NonStop-UX NCC 3.20
5286 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5295 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5301 if test "$GCC" = yes; then
5302 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5307 # All AIX code is PIC.
5308 if test "$host_cpu" = ia64; then
5309 # AIX 5 now supports IA64 processor
5310 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5317 # see comment about AmigaOS4 .so support
5318 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5321 # FIXME: we need at least 68020 code to build shared libraries, but
5322 # adding the `-m68020' flag to GCC prevents building anything better,
5324 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5329 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5330 # PIC is the default for these OSes.
5333 mingw* | cygwin* | pw32* | os2* | cegcc*)
5334 # This hack is so that the source file can tell whether it is being
5335 # built for inclusion in a dll (and should export symbols for example).
5336 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5337 # (--disable-auto-import) libraries
5338 m4_if([$1], [GCJ], [],
5339 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5342 darwin* | rhapsody*)
5343 # PIC is the default on this platform
5344 # Common symbols not allowed in MH_DYLIB files
5345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5349 # PIC is the default for Haiku.
5350 # The "-static" flag exists, but is broken.
5351 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5355 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5356 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5357 # sets the default TLS model and affects inlining.
5363 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5369 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5370 # Instead, we relocate shared libraries at runtime.
5374 # Just because we use GCC doesn't mean we suddenly get shared libraries
5375 # on systems that don't support them.
5376 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5381 # QNX uses GNU C++, but need to define -shared option too, otherwise
5383 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5387 if test -d /usr/nec; then
5388 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5397 case $cc_basename in
5398 nvcc*) # Cuda Compiler Driver 2.2
5399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5404 # PORTME Check for flag to pass linker flags through the system compiler.
5407 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5408 if test "$host_cpu" = ia64; then
5409 # AIX 5 now supports IA64 processor
5410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5416 mingw* | cygwin* | pw32* | os2* | cegcc*)
5417 # This hack is so that the source file can tell whether it is being
5418 # built for inclusion in a dll (and should export symbols for example).
5419 m4_if([$1], [GCJ], [],
5420 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5423 hpux9* | hpux10* | hpux11*)
5424 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5425 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5435 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5436 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5439 irix5* | irix6* | nonstopux*)
5440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5441 # PIC (with -KPIC) is the default.
5442 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5445 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5446 case $cc_basename in
5447 # old Intel for x86_64 which still supported -KPIC.
5449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5451 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5453 # icc used to be incompatible with GCC.
5454 # ICC 10 doesn't accept -KPIC any more.
5456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5457 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5458 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5460 # Lahey Fortran 8.1.
5462 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5463 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5464 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5467 # NAG Fortran compiler
5468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5472 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5473 # Portland Group compilers (*not* the Pentium gcc compiler,
5474 # which looks to be a dead project)
5475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5476 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5477 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5481 # All Alpha code is PIC.
5482 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5484 xl* | bgxl* | bgf* | mpixl*)
5485 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5486 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5491 case `$CC -V 2>&1 | sed 5q` in
5492 *Sun\ F* | *Sun*Fortran*)
5493 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5495 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5496 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5501 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5510 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5511 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5515 # QNX uses GNU C++, but need to define -shared option too, otherwise
5517 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5520 osf3* | osf4* | osf5*)
5521 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5522 # All OSF/1 code is PIC.
5523 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5527 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5531 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5532 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5533 case $cc_basename in
5534 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5535 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5537 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5542 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5543 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5544 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5547 sysv4 | sysv4.2uw2* | sysv4.3*)
5548 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5549 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5550 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5554 if test -d /usr/nec ;then
5555 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5556 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5560 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5561 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5562 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5563 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5567 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5568 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5572 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5573 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5577 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5583 # For platforms which do not support PIC, -DPIC is meaningless:
5585 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5588 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5592 AC_CACHE_CHECK([for $compiler option to produce PIC],
5593 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5594 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5595 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5598 # Check to make sure the PIC flag actually works.
5600 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5601 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5602 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5603 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5604 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5606 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5608 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5609 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5611 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5612 [Additional compiler flags for building library objects])
5614 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5615 [How to pass a linker flag through the compiler])
5617 # Check to make sure the static flag actually works.
5619 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5620 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5621 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5622 $lt_tmp_static_flag,
5624 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5625 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5626 [Compiler flag to prevent dynamic linking])
5627 ])# _LT_COMPILER_PIC
5630 # _LT_LINKER_SHLIBS([TAGNAME])
5631 # ----------------------------
5632 # See if the linker supports building shared libraries.
5633 m4_defun([_LT_LINKER_SHLIBS],
5634 [AC_REQUIRE([LT_PATH_LD])dnl
5635 AC_REQUIRE([LT_PATH_NM])dnl
5636 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5637 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5638 m4_require([_LT_DECL_EGREP])dnl
5639 m4_require([_LT_DECL_SED])dnl
5640 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5641 m4_require([_LT_TAG_COMPILER])dnl
5642 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5643 m4_if([$1], [CXX], [
5644 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5645 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5648 # If we're using GNU nm, then we don't want the "-C" option.
5649 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5650 # Also, AIX nm treats weak defined symbols like other global defined
5651 # symbols, whereas GNU nm marks them as "W".
5652 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5653 _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'
5655 _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'
5659 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5661 cygwin* | mingw* | cegcc*)
5662 case $cc_basename in
5665 _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'
5666 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5671 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5676 _LT_TAGVAR(allow_undefined_flag, $1)=
5677 _LT_TAGVAR(always_export_symbols, $1)=no
5678 _LT_TAGVAR(archive_cmds, $1)=
5679 _LT_TAGVAR(archive_expsym_cmds, $1)=
5680 _LT_TAGVAR(compiler_needs_object, $1)=no
5681 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5682 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5683 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5684 _LT_TAGVAR(hardcode_automatic, $1)=no
5685 _LT_TAGVAR(hardcode_direct, $1)=no
5686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5688 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5689 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5690 _LT_TAGVAR(hardcode_minus_L, $1)=no
5691 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5692 _LT_TAGVAR(inherit_rpath, $1)=no
5693 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5694 _LT_TAGVAR(module_cmds, $1)=
5695 _LT_TAGVAR(module_expsym_cmds, $1)=
5696 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5697 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5698 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5700 # include_expsyms should be a list of space-separated symbols to be *always*
5701 # included in the symbol list
5702 _LT_TAGVAR(include_expsyms, $1)=
5703 # exclude_expsyms can be an extended regexp of symbols to exclude
5704 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5705 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5706 # as well as any symbol that contains `d'.
5707 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5708 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5709 # platforms (ab)use it in PIC code, but their linkers get confused if
5710 # the symbol is explicitly referenced. Since portable code cannot
5711 # rely on this symbol name, it's probably fine to never include it in
5712 # preloaded symbol tables.
5713 # Exclude shared library initialization/finalization symbols.
5714 dnl Note also adjust exclude_expsyms for C++ above.
5715 extract_expsyms_cmds=
5718 cygwin* | mingw* | pw32* | cegcc*)
5719 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5720 # When not using gcc, we currently assume that we are using
5721 # Microsoft Visual C++.
5722 if test "$GCC" != yes; then
5727 # we just hope/assume this is gcc and not c89 (= MSVC++)
5735 _LT_TAGVAR(ld_shlibs, $1)=yes
5737 # On some targets, GNU ld is compatible enough with the native linker
5738 # that we're better off using the native interface for both.
5739 lt_use_gnu_ld_interface=no
5740 if test "$with_gnu_ld" = yes; then
5743 # The AIX port of GNU ld has always aspired to compatibility
5744 # with the native linker. However, as the warning in the GNU ld
5745 # block says, versions before 2.19.5* couldn't really create working
5746 # shared libraries, regardless of the interface used.
5747 case `$LD -v 2>&1` in
5748 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5749 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5750 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5752 lt_use_gnu_ld_interface=yes
5757 lt_use_gnu_ld_interface=yes
5762 if test "$lt_use_gnu_ld_interface" = yes; then
5763 # If archive_cmds runs LD, not CC, wlarc should be empty
5766 # Set some defaults for GNU ld with shared library support. These
5767 # are reset later if shared libraries are not supported. Putting them
5768 # here allows them to be overridden if necessary.
5769 runpath_var=LD_RUN_PATH
5770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5772 # ancient GNU ld didn't support --whole-archive et. al.
5773 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5774 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5776 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5778 supports_anon_versioning=no
5779 case `$LD -v 2>&1` in
5780 *GNU\ gold*) supports_anon_versioning=yes ;;
5781 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5782 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5783 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5784 *\ 2.11.*) ;; # other 2.11 versions
5785 *) supports_anon_versioning=yes ;;
5788 # See if GNU ld supports shared libraries.
5791 # On AIX/PPC, the GNU linker is very broken
5792 if test "$host_cpu" != ia64; then
5793 _LT_TAGVAR(ld_shlibs, $1)=no
5796 *** Warning: the GNU linker, at least up to release 2.19, is reported
5797 *** to be unable to reliably create shared libraries on AIX.
5798 *** Therefore, libtool is disabling shared libraries support. If you
5799 *** really care for shared libraries, you may want to install binutils
5800 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5801 *** You will then need to restart the configuration process.
5810 # see comment about AmigaOS4 .so support
5811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5812 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5815 _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)'
5816 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5817 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5823 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5824 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5825 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5826 # support --undefined. This deserves some investigation. FIXME
5827 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5829 _LT_TAGVAR(ld_shlibs, $1)=no
5833 cygwin* | mingw* | pw32* | cegcc*)
5834 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5835 # as there is no search path for DLLs.
5836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5837 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5838 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5839 _LT_TAGVAR(always_export_symbols, $1)=no
5840 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5841 _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'
5842 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5844 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5845 _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'
5846 # If the export-symbols file already is a .def file (1st line
5847 # is EXPORTS), use it as is; otherwise, prepend...
5848 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5849 cp $export_symbols $output_objdir/$soname.def;
5851 echo EXPORTS > $output_objdir/$soname.def;
5852 cat $export_symbols >> $output_objdir/$soname.def;
5854 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5856 _LT_TAGVAR(ld_shlibs, $1)=no
5861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5862 _LT_TAGVAR(link_all_deplibs, $1)=yes
5866 _LT_TAGVAR(hardcode_direct, $1)=no
5867 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5869 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5870 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5871 # Instead, shared libraries are loaded at an image base (0x10000000 by
5872 # default) and relocated if they conflict, which is a slow very memory
5873 # consuming and fragmenting process. To avoid this, we pick a random,
5874 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5875 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5876 _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'
5877 _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'
5880 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5882 if test "$host_os" = linux-dietlibc; then
5883 case $cc_basename in
5884 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5887 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5888 && test "$tmp_diet" = no
5890 tmp_addflag=' $pic_flag'
5891 tmp_sharedflag='-shared'
5892 case $cc_basename,$host_cpu in
5893 pgcc*) # Portland Group C compiler
5894 _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'
5895 tmp_addflag=' $pic_flag'
5897 pgf77* | pgf90* | pgf95* | pgfortran*)
5898 # Portland Group f77 and f90 compilers
5899 _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'
5900 tmp_addflag=' $pic_flag -Mnomain' ;;
5901 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5902 tmp_addflag=' -i_dynamic' ;;
5903 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5904 tmp_addflag=' -i_dynamic -nofor_main' ;;
5905 ifc* | ifort*) # Intel Fortran compiler
5906 tmp_addflag=' -nofor_main' ;;
5907 lf95*) # Lahey Fortran 8.1
5908 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5909 tmp_sharedflag='--shared' ;;
5910 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5911 tmp_sharedflag='-qmkshrobj'
5913 nvcc*) # Cuda Compiler Driver 2.2
5914 _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'
5915 _LT_TAGVAR(compiler_needs_object, $1)=yes
5918 case `$CC -V 2>&1 | sed 5q` in
5919 *Sun\ C*) # Sun C 5.9
5920 _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'
5921 _LT_TAGVAR(compiler_needs_object, $1)=yes
5922 tmp_sharedflag='-G' ;;
5923 *Sun\ F*) # Sun Fortran 8.3
5924 tmp_sharedflag='-G' ;;
5926 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5928 if test "x$supports_anon_versioning" = xyes; then
5929 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5930 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5931 echo "local: *; };" >> $output_objdir/$libname.ver~
5932 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5935 case $cc_basename in
5936 xlf* | bgf* | bgxlf* | mpixlf*)
5937 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5938 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5939 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5940 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5941 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5942 if test "x$supports_anon_versioning" = xyes; then
5943 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5944 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5945 echo "local: *; };" >> $output_objdir/$libname.ver~
5946 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5951 _LT_TAGVAR(ld_shlibs, $1)=no
5956 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5957 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5961 _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'
5966 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5967 _LT_TAGVAR(ld_shlibs, $1)=no
5970 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5971 *** create shared libraries on Solaris systems. Therefore, libtool
5972 *** is disabling shared libraries support. We urge you to upgrade GNU
5973 *** binutils to release 2.9.1 or newer. Another option is to modify
5974 *** your PATH or compiler configuration so that the native linker is
5975 *** used, and then restart.
5978 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5979 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5980 _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'
5982 _LT_TAGVAR(ld_shlibs, $1)=no
5986 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5987 case `$LD -v 2>&1` in
5988 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5989 _LT_TAGVAR(ld_shlibs, $1)=no
5992 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5993 *** reliably create shared libraries on SCO systems. Therefore, libtool
5994 *** is disabling shared libraries support. We urge you to upgrade GNU
5995 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5996 *** your PATH or compiler configuration so that the native linker is
5997 *** used, and then restart.
6002 # For security reasons, it is highly recommended that you always
6003 # use absolute paths for naming shared libraries, and exclude the
6004 # DT_RUNPATH tag from executables and libraries. But doing so
6005 # requires that you compile everything twice, which is a pain.
6006 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6007 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6008 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6009 _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'
6011 _LT_TAGVAR(ld_shlibs, $1)=no
6018 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6020 _LT_TAGVAR(hardcode_direct, $1)=yes
6021 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6025 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6026 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6027 _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'
6029 _LT_TAGVAR(ld_shlibs, $1)=no
6034 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6036 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6037 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6038 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6041 # PORTME fill in a description of your system's linker (not GNU ld)
6044 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6045 _LT_TAGVAR(always_export_symbols, $1)=yes
6046 _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'
6047 # Note: this linker hardcodes the directories in LIBPATH if there
6048 # are no directories specified by -L.
6049 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6050 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6051 # Neither direct hardcoding nor static linking is supported with a
6053 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6058 if test "$host_cpu" = ia64; then
6059 # On IA64, the linker does run time linking by default, so we don't
6060 # have to do anything special.
6061 aix_use_runtimelinking=no
6062 exp_sym_flag='-Bexport'
6065 # If we're using GNU nm, then we don't want the "-C" option.
6066 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6067 # Also, AIX nm treats weak defined symbols like other global
6068 # defined symbols, whereas GNU nm marks them as "W".
6069 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6070 _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'
6072 _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'
6074 aix_use_runtimelinking=no
6076 # Test if we are trying to use run time linking or normal
6077 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6078 # need to do runtime linking.
6079 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6080 for ld_flag in $LDFLAGS; do
6081 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6082 aix_use_runtimelinking=yes
6089 exp_sym_flag='-bexport'
6090 no_entry_flag='-bnoentry'
6093 # When large executables or shared objects are built, AIX ld can
6094 # have problems creating the table of contents. If linking a library
6095 # or program results in "error TOC overflow" add -mminimal-toc to
6096 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6097 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6099 _LT_TAGVAR(archive_cmds, $1)=''
6100 _LT_TAGVAR(hardcode_direct, $1)=yes
6101 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6102 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6103 _LT_TAGVAR(link_all_deplibs, $1)=yes
6104 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6106 if test "$GCC" = yes; then
6107 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6108 # We only want to do this on AIX 4.2 and lower, the check
6109 # below for broken collect2 doesn't work under 4.3+
6110 collect2name=`${CC} -print-prog-name=collect2`
6111 if test -f "$collect2name" &&
6112 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6114 # We have reworked collect2
6117 # We have old collect2
6118 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6119 # It fails to find uninstalled libraries when the uninstalled
6120 # path is not listed in the libpath. Setting hardcode_minus_L
6121 # to unsupported forces relinking
6122 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6124 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6128 shared_flag='-shared'
6129 if test "$aix_use_runtimelinking" = yes; then
6130 shared_flag="$shared_flag "'${wl}-G'
6134 if test "$host_cpu" = ia64; then
6135 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6136 # chokes on -Wl,-G. The following line is correct:
6139 if test "$aix_use_runtimelinking" = yes; then
6140 shared_flag='${wl}-G'
6142 shared_flag='${wl}-bM:SRE'
6147 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6148 # It seems that -bexpall does not export symbols beginning with
6149 # underscore (_), so it is better to generate a list of symbols to export.
6150 _LT_TAGVAR(always_export_symbols, $1)=yes
6151 if test "$aix_use_runtimelinking" = yes; then
6152 # Warning - without using the other runtime loading flags (-brtl),
6153 # -berok will link without error, but may produce a broken library.
6154 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6155 # Determine the default libpath from the value encoded in an
6157 _LT_SYS_MODULE_PATH_AIX([$1])
6158 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6159 _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"
6161 if test "$host_cpu" = ia64; then
6162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6163 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6164 _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"
6166 # Determine the default libpath from the value encoded in an
6168 _LT_SYS_MODULE_PATH_AIX([$1])
6169 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6170 # Warning - without using the other run time loading flags,
6171 # -berok will link without error, but may produce a broken library.
6172 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6173 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6174 if test "$with_gnu_ld" = yes; then
6175 # We only use this code for GNU lds that support --whole-archive.
6176 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6178 # Exported symbols can be pulled into shared objects from archives
6179 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6181 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6182 # This is similar to how AIX traditionally builds its shared libraries.
6183 _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'
6191 # see comment about AmigaOS4 .so support
6192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6193 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6196 _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)'
6197 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6198 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6204 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6207 cygwin* | mingw* | pw32* | cegcc*)
6208 # When not using gcc, we currently assume that we are using
6209 # Microsoft Visual C++.
6210 # hardcode_libdir_flag_spec is actually meaningless, as there is
6211 # no search path for DLLs.
6212 case $cc_basename in
6215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6216 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6217 _LT_TAGVAR(always_export_symbols, $1)=yes
6218 _LT_TAGVAR(file_list_spec, $1)='@'
6219 # Tell ltmain to make .lib files, not .a files.
6221 # Tell ltmain to make .dll files, not .so files.
6223 # FIXME: Setting linknames here is a bad hack.
6224 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6225 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6226 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6228 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6230 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6232 # The linker will not automatically build a static lib if we build a DLL.
6233 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6234 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6235 _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'
6237 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6238 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6239 lt_tool_outputfile="@TOOL_OUTPUT@"~
6240 case $lt_outputfile in
6243 lt_outputfile="$lt_outputfile.exe"
6244 lt_tool_outputfile="$lt_tool_outputfile.exe"
6247 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6248 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6249 $RM "$lt_outputfile.manifest";
6253 # Assume MSVC wrapper
6254 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6255 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6256 # Tell ltmain to make .lib files, not .a files.
6258 # Tell ltmain to make .dll files, not .so files.
6260 # FIXME: Setting linknames here is a bad hack.
6261 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6262 # The linker will automatically build a .lib file if we build a DLL.
6263 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6264 # FIXME: Should let the user specify the lib program.
6265 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6266 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6271 darwin* | rhapsody*)
6272 _LT_DARWIN_LINKER_FEATURES($1)
6276 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6278 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6282 _LT_TAGVAR(ld_shlibs, $1)=no
6285 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6286 # support. Future versions do this automatically, but an explicit c++rt0.o
6287 # does not break anything, and helps significantly (at the cost of a little
6290 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6292 _LT_TAGVAR(hardcode_direct, $1)=yes
6293 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6296 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6298 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6299 _LT_TAGVAR(hardcode_direct, $1)=yes
6300 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6301 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6304 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6305 freebsd* | dragonfly*)
6306 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6307 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6308 _LT_TAGVAR(hardcode_direct, $1)=yes
6309 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6313 if test "$GCC" = yes; then
6314 _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'
6316 _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'
6318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6319 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6320 _LT_TAGVAR(hardcode_direct, $1)=yes
6322 # hardcode_minus_L: Not really in the search PATH,
6323 # but as the default location of the library.
6324 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6325 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6329 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6330 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6332 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6334 if test "$with_gnu_ld" = no; then
6335 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6336 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6337 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6338 _LT_TAGVAR(hardcode_direct, $1)=yes
6339 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6340 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6341 # hardcode_minus_L: Not really in the search PATH,
6342 # but as the default location of the library.
6343 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6348 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6351 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6354 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6357 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6363 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6366 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6370 # Older versions of the 11.00 compiler do not understand -b yet
6371 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6372 _LT_LINKER_OPTION([if $CC understands -b],
6373 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6374 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6375 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6376 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6380 if test "$with_gnu_ld" = no; then
6381 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6382 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6386 _LT_TAGVAR(hardcode_direct, $1)=no
6387 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6390 _LT_TAGVAR(hardcode_direct, $1)=yes
6391 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6392 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6394 # hardcode_minus_L: Not really in the search PATH,
6395 # but as the default location of the library.
6396 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6402 irix5* | irix6* | nonstopux*)
6403 if test "$GCC" = yes; then
6404 _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'
6405 # Try to use the -exported_symbol ld option, if it does not
6406 # work, assume that -exports_file does not work either and
6407 # implicitly export all symbols.
6408 # This should be the same for all languages, so no per-tag cache variable.
6409 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6410 [lt_cv_irix_exported_symbol],
6411 [save_LDFLAGS="$LDFLAGS"
6412 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6415 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6416 [C++], [[int foo (void) { return 0; }]],
6423 [lt_cv_irix_exported_symbol=yes],
6424 [lt_cv_irix_exported_symbol=no])
6425 LDFLAGS="$save_LDFLAGS"])
6426 if test "$lt_cv_irix_exported_symbol" = yes; then
6427 _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'
6430 _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'
6431 _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'
6433 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6435 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6436 _LT_TAGVAR(inherit_rpath, $1)=yes
6437 _LT_TAGVAR(link_all_deplibs, $1)=yes
6441 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6442 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6444 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6447 _LT_TAGVAR(hardcode_direct, $1)=yes
6448 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6452 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6453 _LT_TAGVAR(hardcode_direct, $1)=yes
6454 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6455 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6456 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6463 if test -f /usr/libexec/ld.so; then
6464 _LT_TAGVAR(hardcode_direct, $1)=yes
6465 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6466 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6467 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6468 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6469 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6470 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6471 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6474 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6475 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6476 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6479 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6480 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6485 _LT_TAGVAR(ld_shlibs, $1)=no
6490 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6491 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6492 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6493 _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'
6494 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6498 if test "$GCC" = yes; then
6499 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6500 _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'
6502 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6503 _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'
6505 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6506 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6507 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6510 osf4* | osf5*) # as osf3* with the addition of -msym flag
6511 if test "$GCC" = yes; then
6512 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6513 _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'
6514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6516 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6517 _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'
6518 _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~
6519 $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'
6521 # Both c and cxx compiler support -rpath directly
6522 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6524 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6525 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6529 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6530 if test "$GCC" = yes; then
6532 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6533 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6534 $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'
6536 case `$CC -V 2>&1` in
6539 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6540 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6541 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6545 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6546 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6547 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6551 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6554 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6556 # The compiler driver will combine and reorder linker options,
6557 # but understands `-z linker_flag'. GCC discards it without `$wl',
6558 # but is careful enough not to reorder.
6559 # Supported since Solaris 2.6 (maybe 2.5.1?)
6560 if test "$GCC" = yes; then
6561 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6563 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6567 _LT_TAGVAR(link_all_deplibs, $1)=yes
6571 if test "x$host_vendor" = xsequent; then
6572 # Use $CC to link under sequent, because it throws in some extra .o
6573 # files that make .init and .fini sections work.
6574 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6576 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6578 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6579 _LT_TAGVAR(hardcode_direct, $1)=yes
6580 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6581 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6585 case $host_vendor in
6587 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6588 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6591 ## LD is ld it makes a PLAMLIB
6592 ## CC just makes a GrossModule.
6593 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6594 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6595 _LT_TAGVAR(hardcode_direct, $1)=no
6598 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6599 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6602 runpath_var='LD_RUN_PATH'
6603 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6607 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6608 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6609 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6613 if test -d /usr/nec; then
6614 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6615 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6616 runpath_var=LD_RUN_PATH
6617 hardcode_runpath_var=yes
6618 _LT_TAGVAR(ld_shlibs, $1)=yes
6622 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6623 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6624 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6625 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6626 runpath_var='LD_RUN_PATH'
6628 if test "$GCC" = yes; then
6629 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6630 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6632 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6633 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6637 sysv5* | sco3.2v5* | sco5v6*)
6638 # Note: We can NOT use -z defs as we might desire, because we do not
6639 # link with -lc, and that would cause any symbols used from libc to
6640 # always be unresolved, which means just about no library would
6641 # ever link correctly. If we're not using GNU ld we use -z text
6642 # though, which does catch some bad symbols but isn't as heavy-handed
6644 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6645 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6646 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6648 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6649 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6650 _LT_TAGVAR(link_all_deplibs, $1)=yes
6651 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6652 runpath_var='LD_RUN_PATH'
6654 if test "$GCC" = yes; then
6655 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6656 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6658 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6659 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6664 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6665 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6670 _LT_TAGVAR(ld_shlibs, $1)=no
6674 if test x$host_vendor = xsni; then
6676 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6677 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6683 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6684 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6686 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6688 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6689 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6690 _LT_DECL([], [extract_expsyms_cmds], [2],
6691 [The commands to extract the exported symbol list from a shared archive])
6694 # Do we need to explicitly link libc?
6696 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6698 # Assume -lc should be added
6699 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6701 if test "$enable_shared" = yes && test "$GCC" = yes; then
6702 case $_LT_TAGVAR(archive_cmds, $1) in
6704 # FIXME: we may have to deal with multi-command sequences.
6707 # Test whether the compiler implicitly links with -lc since on some
6708 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6709 # to ld, don't add -lc before -lgcc.
6710 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6711 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6713 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6715 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6718 libobjs=conftest.$ac_objext
6720 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6721 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6727 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6728 _LT_TAGVAR(allow_undefined_flag, $1)=
6729 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6731 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6733 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6735 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6737 cat conftest.err 1>&5
6741 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6748 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6749 [Whether or not to add -lc for building shared libraries])
6750 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6751 [enable_shared_with_static_runtimes], [0],
6752 [Whether or not to disallow shared libs when runtime libs are static])
6753 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6754 [Compiler flag to allow reflexive dlopens])
6755 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6756 [Compiler flag to generate shared objects directly from archives])
6757 _LT_TAGDECL([], [compiler_needs_object], [1],
6758 [Whether the compiler copes with passing no objects directly])
6759 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6760 [Create an old-style archive from a shared archive])
6761 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6762 [Create a temporary old-style archive to link instead of a shared archive])
6763 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6764 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6765 _LT_TAGDECL([], [module_cmds], [2],
6766 [Commands used to build a loadable module if different from building
6768 _LT_TAGDECL([], [module_expsym_cmds], [2])
6769 _LT_TAGDECL([], [with_gnu_ld], [1],
6770 [Whether we are building with GNU ld or not])
6771 _LT_TAGDECL([], [allow_undefined_flag], [1],
6772 [Flag that allows shared libraries with undefined symbols to be built])
6773 _LT_TAGDECL([], [no_undefined_flag], [1],
6774 [Flag that enforces no undefined symbols])
6775 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6776 [Flag to hardcode $libdir into a binary during linking.
6777 This must work even if $libdir does not exist])
6778 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6779 [[If ld is used when linking, flag to hardcode $libdir into a binary
6780 during linking. This must work even if $libdir does not exist]])
6781 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6782 [Whether we need a single "-rpath" flag with a separated argument])
6783 _LT_TAGDECL([], [hardcode_direct], [0],
6784 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6785 DIR into the resulting binary])
6786 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6787 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6788 DIR into the resulting binary and the resulting library dependency is
6789 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6790 library is relocated])
6791 _LT_TAGDECL([], [hardcode_minus_L], [0],
6792 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6793 into the resulting binary])
6794 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6795 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6796 into the resulting binary])
6797 _LT_TAGDECL([], [hardcode_automatic], [0],
6798 [Set to "yes" if building a shared library automatically hardcodes DIR
6799 into the library and all subsequent libraries and executables linked
6801 _LT_TAGDECL([], [inherit_rpath], [0],
6802 [Set to yes if linker adds runtime paths of dependent libraries
6803 to runtime path list])
6804 _LT_TAGDECL([], [link_all_deplibs], [0],
6805 [Whether libtool must link a program against all its dependency libraries])
6806 _LT_TAGDECL([], [always_export_symbols], [0],
6807 [Set to "yes" if exported symbols are required])
6808 _LT_TAGDECL([], [export_symbols_cmds], [2],
6809 [The commands to list exported symbols])
6810 _LT_TAGDECL([], [exclude_expsyms], [1],
6811 [Symbols that should not be listed in the preloaded symbols])
6812 _LT_TAGDECL([], [include_expsyms], [1],
6813 [Symbols that must always be exported])
6814 _LT_TAGDECL([], [prelink_cmds], [2],
6815 [Commands necessary for linking programs (against libraries) with templates])
6816 _LT_TAGDECL([], [postlink_cmds], [2],
6817 [Commands necessary for finishing linking programs])
6818 _LT_TAGDECL([], [file_list_spec], [1],
6819 [Specify filename containing input files])
6820 dnl FIXME: Not yet implemented
6821 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6822 dnl [Compiler flag to generate thread safe objects])
6823 ])# _LT_LINKER_SHLIBS
6826 # _LT_LANG_C_CONFIG([TAG])
6827 # ------------------------
6828 # Ensure that the configuration variables for a C compiler are suitably
6829 # defined. These variables are subsequently used by _LT_CONFIG to write
6830 # the compiler configuration to `libtool'.
6831 m4_defun([_LT_LANG_C_CONFIG],
6832 [m4_require([_LT_DECL_EGREP])dnl
6836 # Source file extension for C test sources.
6839 # Object file extension for compiled C test sources.
6841 _LT_TAGVAR(objext, $1)=$objext
6843 # Code to be used in simple compile tests
6844 lt_simple_compile_test_code="int some_variable = 0;"
6846 # Code to be used in simple link tests
6847 lt_simple_link_test_code='int main(){return(0);}'
6850 # Save the default compiler, since it gets overwritten when the other
6851 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6852 compiler_DEFAULT=$CC
6854 # save warnings/boilerplate of simple test code
6855 _LT_COMPILER_BOILERPLATE
6856 _LT_LINKER_BOILERPLATE
6858 if test -n "$compiler"; then
6859 _LT_COMPILER_NO_RTTI($1)
6860 _LT_COMPILER_PIC($1)
6861 _LT_COMPILER_C_O($1)
6862 _LT_COMPILER_FILE_LOCKS($1)
6863 _LT_LINKER_SHLIBS($1)
6864 _LT_SYS_DYNAMIC_LINKER($1)
6865 _LT_LINKER_HARDCODE_LIBPATH($1)
6869 # Report which library types will actually be built
6870 AC_MSG_CHECKING([if libtool supports shared libraries])
6871 AC_MSG_RESULT([$can_build_shared])
6873 AC_MSG_CHECKING([whether to build shared libraries])
6874 test "$can_build_shared" = "no" && enable_shared=no
6876 # On AIX, shared libraries and static libraries use the same namespace, and
6877 # are all built from PIC.
6880 test "$enable_shared" = yes && enable_static=no
6881 if test -n "$RANLIB"; then
6882 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6883 postinstall_cmds='$RANLIB $lib'
6888 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6889 test "$enable_shared" = yes && enable_static=no
6893 AC_MSG_RESULT([$enable_shared])
6895 AC_MSG_CHECKING([whether to build static libraries])
6896 # Make sure either enable_shared or enable_static is yes.
6897 test "$enable_shared" = yes || enable_static=yes
6898 AC_MSG_RESULT([$enable_static])
6904 ])# _LT_LANG_C_CONFIG
6907 # _LT_LANG_CXX_CONFIG([TAG])
6908 # --------------------------
6909 # Ensure that the configuration variables for a C++ compiler are suitably
6910 # defined. These variables are subsequently used by _LT_CONFIG to write
6911 # the compiler configuration to `libtool'.
6912 m4_defun([_LT_LANG_CXX_CONFIG],
6913 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6914 m4_require([_LT_DECL_EGREP])dnl
6915 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6916 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6917 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6918 (test "X$CXX" != "Xg++"))) ; then
6921 _lt_caught_CXX_error=yes
6925 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6926 _LT_TAGVAR(allow_undefined_flag, $1)=
6927 _LT_TAGVAR(always_export_symbols, $1)=no
6928 _LT_TAGVAR(archive_expsym_cmds, $1)=
6929 _LT_TAGVAR(compiler_needs_object, $1)=no
6930 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6931 _LT_TAGVAR(hardcode_direct, $1)=no
6932 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6934 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6935 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6936 _LT_TAGVAR(hardcode_minus_L, $1)=no
6937 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6938 _LT_TAGVAR(hardcode_automatic, $1)=no
6939 _LT_TAGVAR(inherit_rpath, $1)=no
6940 _LT_TAGVAR(module_cmds, $1)=
6941 _LT_TAGVAR(module_expsym_cmds, $1)=
6942 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6943 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6944 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6945 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6946 _LT_TAGVAR(no_undefined_flag, $1)=
6947 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6948 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6950 # Source file extension for C++ test sources.
6953 # Object file extension for compiled C++ test sources.
6955 _LT_TAGVAR(objext, $1)=$objext
6957 # No sense in running all these tests if we already determined that
6958 # the CXX compiler isn't working. Some variables (like enable_shared)
6959 # are currently assumed to apply to all compilers on this platform,
6960 # and will be corrupted by setting them based on a non-working compiler.
6961 if test "$_lt_caught_CXX_error" != yes; then
6962 # Code to be used in simple compile tests
6963 lt_simple_compile_test_code="int some_variable = 0;"
6965 # Code to be used in simple link tests
6966 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6968 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6971 # save warnings/boilerplate of simple test code
6972 _LT_COMPILER_BOILERPLATE
6973 _LT_LINKER_BOILERPLATE
6975 # Allow CC to be a program name with arguments.
6977 lt_save_CFLAGS=$CFLAGS
6981 lt_save_with_gnu_ld=$with_gnu_ld
6982 lt_save_path_LD=$lt_cv_path_LD
6983 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6984 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6986 $as_unset lt_cv_prog_gnu_ld
6988 if test -n "${lt_cv_path_LDCXX+set}"; then
6989 lt_cv_path_LD=$lt_cv_path_LDCXX
6991 $as_unset lt_cv_path_LD
6993 test -z "${LDCXX+set}" || LD=$LDCXX
6997 _LT_TAGVAR(compiler, $1)=$CC
6998 _LT_CC_BASENAME([$compiler])
7000 if test -n "$compiler"; then
7001 # We don't want -fno-exception when compiling C++ code, so set the
7002 # no_builtin_flag separately
7003 if test "$GXX" = yes; then
7004 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7006 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7009 if test "$GXX" = yes; then
7010 # Set up default GNU C++ configuration
7014 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7015 # archiving commands below assume that GNU ld is being used.
7016 if test "$with_gnu_ld" = yes; then
7017 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7018 _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'
7020 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7021 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7023 # If archive_cmds runs LD, not CC, wlarc should be empty
7024 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7025 # investigate it a little bit more. (MM)
7028 # ancient GNU ld didn't support --whole-archive et. al.
7029 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7030 $GREP 'no-whole-archive' > /dev/null; then
7031 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7033 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7039 # A generic and very simple default shared library creation
7040 # command for GNU C++ for the case where it uses the native
7041 # linker, instead of GNU ld. If possible, this setting should
7042 # overridden to take advantage of the native linker features on
7043 # the platform it is being used on.
7044 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7047 # Commands to make compiler produce verbose output that lists
7048 # what "hidden" libraries, object files and flags are used when
7049 # linking a shared library.
7050 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7058 # PORTME: fill in a description of your system's C++ link characteristics
7059 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7060 _LT_TAGVAR(ld_shlibs, $1)=yes
7063 # FIXME: insert proper C++ library support
7064 _LT_TAGVAR(ld_shlibs, $1)=no
7067 if test "$host_cpu" = ia64; then
7068 # On IA64, the linker does run time linking by default, so we don't
7069 # have to do anything special.
7070 aix_use_runtimelinking=no
7071 exp_sym_flag='-Bexport'
7074 aix_use_runtimelinking=no
7076 # Test if we are trying to use run time linking or normal
7077 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7078 # need to do runtime linking.
7079 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7080 for ld_flag in $LDFLAGS; do
7083 aix_use_runtimelinking=yes
7091 exp_sym_flag='-bexport'
7092 no_entry_flag='-bnoentry'
7095 # When large executables or shared objects are built, AIX ld can
7096 # have problems creating the table of contents. If linking a library
7097 # or program results in "error TOC overflow" add -mminimal-toc to
7098 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7099 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7101 _LT_TAGVAR(archive_cmds, $1)=''
7102 _LT_TAGVAR(hardcode_direct, $1)=yes
7103 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7104 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7105 _LT_TAGVAR(link_all_deplibs, $1)=yes
7106 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7108 if test "$GXX" = yes; then
7109 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7110 # We only want to do this on AIX 4.2 and lower, the check
7111 # below for broken collect2 doesn't work under 4.3+
7112 collect2name=`${CC} -print-prog-name=collect2`
7113 if test -f "$collect2name" &&
7114 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7116 # We have reworked collect2
7119 # We have old collect2
7120 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7121 # It fails to find uninstalled libraries when the uninstalled
7122 # path is not listed in the libpath. Setting hardcode_minus_L
7123 # to unsupported forces relinking
7124 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7125 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7126 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7129 shared_flag='-shared'
7130 if test "$aix_use_runtimelinking" = yes; then
7131 shared_flag="$shared_flag "'${wl}-G'
7135 if test "$host_cpu" = ia64; then
7136 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7137 # chokes on -Wl,-G. The following line is correct:
7140 if test "$aix_use_runtimelinking" = yes; then
7141 shared_flag='${wl}-G'
7143 shared_flag='${wl}-bM:SRE'
7148 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7149 # It seems that -bexpall does not export symbols beginning with
7150 # underscore (_), so it is better to generate a list of symbols to
7152 _LT_TAGVAR(always_export_symbols, $1)=yes
7153 if test "$aix_use_runtimelinking" = yes; then
7154 # Warning - without using the other runtime loading flags (-brtl),
7155 # -berok will link without error, but may produce a broken library.
7156 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7157 # Determine the default libpath from the value encoded in an empty
7159 _LT_SYS_MODULE_PATH_AIX([$1])
7160 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7162 _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"
7164 if test "$host_cpu" = ia64; then
7165 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7166 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7167 _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"
7169 # Determine the default libpath from the value encoded in an
7171 _LT_SYS_MODULE_PATH_AIX([$1])
7172 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7173 # Warning - without using the other run time loading flags,
7174 # -berok will link without error, but may produce a broken library.
7175 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7176 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7177 if test "$with_gnu_ld" = yes; then
7178 # We only use this code for GNU lds that support --whole-archive.
7179 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7181 # Exported symbols can be pulled into shared objects from archives
7182 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7184 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7185 # This is similar to how AIX traditionally builds its shared
7187 _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'
7193 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7194 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7195 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7196 # support --undefined. This deserves some investigation. FIXME
7197 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7199 _LT_TAGVAR(ld_shlibs, $1)=no
7204 case $cc_basename in
7206 # FIXME: insert proper C++ library support
7207 _LT_TAGVAR(ld_shlibs, $1)=no
7212 cygwin* | mingw* | pw32* | cegcc*)
7213 case $GXX,$cc_basename in
7216 # hardcode_libdir_flag_spec is actually meaningless, as there is
7217 # no search path for DLLs.
7218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7219 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7220 _LT_TAGVAR(always_export_symbols, $1)=yes
7221 _LT_TAGVAR(file_list_spec, $1)='@'
7222 # Tell ltmain to make .lib files, not .a files.
7224 # Tell ltmain to make .dll files, not .so files.
7226 # FIXME: Setting linknames here is a bad hack.
7227 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7228 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7229 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7231 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7233 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7235 # The linker will not automatically build a static lib if we build a DLL.
7236 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7237 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7239 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7240 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7241 lt_tool_outputfile="@TOOL_OUTPUT@"~
7242 case $lt_outputfile in
7245 lt_outputfile="$lt_outputfile.exe"
7246 lt_tool_outputfile="$lt_tool_outputfile.exe"
7249 func_to_tool_file "$lt_outputfile"~
7250 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7251 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7252 $RM "$lt_outputfile.manifest";
7257 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7258 # as there is no search path for DLLs.
7259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7260 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7261 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7262 _LT_TAGVAR(always_export_symbols, $1)=no
7263 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7265 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7266 _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'
7267 # If the export-symbols file already is a .def file (1st line
7268 # is EXPORTS), use it as is; otherwise, prepend...
7269 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7270 cp $export_symbols $output_objdir/$soname.def;
7272 echo EXPORTS > $output_objdir/$soname.def;
7273 cat $export_symbols >> $output_objdir/$soname.def;
7275 $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'
7277 _LT_TAGVAR(ld_shlibs, $1)=no
7282 darwin* | rhapsody*)
7283 _LT_DARWIN_LINKER_FEATURES($1)
7287 case $cc_basename in
7289 # FIXME: insert proper C++ library support
7290 _LT_TAGVAR(ld_shlibs, $1)=no
7293 # Green Hills C++ Compiler
7294 # FIXME: insert proper C++ library support
7295 _LT_TAGVAR(ld_shlibs, $1)=no
7298 # FIXME: insert proper C++ library support
7299 _LT_TAGVAR(ld_shlibs, $1)=no
7305 # C++ shared libraries reported to be fairly broken before
7307 _LT_TAGVAR(ld_shlibs, $1)=no
7311 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7314 freebsd* | dragonfly*)
7315 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7317 _LT_TAGVAR(ld_shlibs, $1)=yes
7324 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7325 _LT_TAGVAR(link_all_deplibs, $1)=yes
7329 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7330 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7331 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7332 _LT_TAGVAR(hardcode_direct, $1)=yes
7333 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7334 # but as the default
7335 # location of the library.
7337 case $cc_basename in
7339 # FIXME: insert proper C++ library support
7340 _LT_TAGVAR(ld_shlibs, $1)=no
7343 _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'
7344 # Commands to make compiler produce verbose output that lists
7345 # what "hidden" libraries, object files and flags are used when
7346 # linking a shared library.
7348 # There doesn't appear to be a way to prevent this compiler from
7349 # explicitly linking system object files so we need to strip them
7350 # from the output so that they don't get included in the library
7352 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"'
7355 if test "$GXX" = yes; then
7356 _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'
7358 # FIXME: insert proper C++ library support
7359 _LT_TAGVAR(ld_shlibs, $1)=no
7366 if test $with_gnu_ld = no; then
7367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7368 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7374 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7380 _LT_TAGVAR(hardcode_direct, $1)=no
7381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7384 _LT_TAGVAR(hardcode_direct, $1)=yes
7385 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7386 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7387 # but as the default
7388 # location of the library.
7392 case $cc_basename in
7394 # FIXME: insert proper C++ library support
7395 _LT_TAGVAR(ld_shlibs, $1)=no
7400 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7403 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7406 _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'
7409 # Commands to make compiler produce verbose output that lists
7410 # what "hidden" libraries, object files and flags are used when
7411 # linking a shared library.
7413 # There doesn't appear to be a way to prevent this compiler from
7414 # explicitly linking system object files so we need to strip them
7415 # from the output so that they don't get included in the library
7417 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"'
7420 if test "$GXX" = yes; then
7421 if test $with_gnu_ld = no; then
7424 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7427 _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'
7430 _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'
7435 # FIXME: insert proper C++ library support
7436 _LT_TAGVAR(ld_shlibs, $1)=no
7443 _LT_TAGVAR(hardcode_direct, $1)=no
7444 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7446 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7447 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7448 # Instead, shared libraries are loaded at an image base (0x10000000 by
7449 # default) and relocated if they conflict, which is a slow very memory
7450 # consuming and fragmenting process. To avoid this, we pick a random,
7451 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7452 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7453 _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'
7454 _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'
7457 case $cc_basename in
7460 _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'
7462 # Archives containing C++ object files must be created using
7463 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7464 # necessary to make sure instantiated templates are included
7466 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7469 if test "$GXX" = yes; then
7470 if test "$with_gnu_ld" = no; then
7471 _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'
7473 _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'
7476 _LT_TAGVAR(link_all_deplibs, $1)=yes
7479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7480 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7481 _LT_TAGVAR(inherit_rpath, $1)=yes
7484 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7485 case $cc_basename in
7487 # Kuck and Associates, Inc. (KAI) C++ Compiler
7489 # KCC will only create a shared library if the output file
7490 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7491 # to its proper name (with version) after linking.
7492 _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'
7493 _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'
7494 # Commands to make compiler produce verbose output that lists
7495 # what "hidden" libraries, object files and flags are used when
7496 # linking a shared library.
7498 # There doesn't appear to be a way to prevent this compiler from
7499 # explicitly linking system object files so we need to strip them
7500 # from the output so that they don't get included in the library
7502 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"'
7504 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7505 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7507 # Archives containing C++ object files must be created using
7508 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7509 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7514 # version 8.0 and above of icpc choke on multiply defined symbols
7515 # if we add $predep_objects and $postdep_objects, however 7.1 and
7516 # earlier do not add the objects themselves.
7517 case `$CC -V 2>&1` in
7519 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7520 _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'
7522 *) # Version 8.0 or newer
7525 ia64*) tmp_idyn=' -i_dynamic';;
7527 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7528 _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'
7531 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7532 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7533 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7534 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7537 # Portland Group C++ compiler
7539 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7540 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7542 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7543 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7544 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7546 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7547 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7549 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7551 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7552 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7553 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7555 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7556 $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'
7558 *) # Version 6 and above use weak symbols
7559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7560 _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'
7564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7565 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7566 _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'
7570 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7571 _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'
7573 runpath_var=LD_RUN_PATH
7574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7575 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7577 # Commands to make compiler produce verbose output that lists
7578 # what "hidden" libraries, object files and flags are used when
7579 # linking a shared library.
7581 # There doesn't appear to be a way to prevent this compiler from
7582 # explicitly linking system object files so we need to strip them
7583 # from the output so that they don't get included in the library
7585 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'
7587 xl* | mpixl* | bgxl*)
7588 # IBM XL 8.0 on PPC, with GNU ld
7589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7590 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7591 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7592 if test "x$supports_anon_versioning" = xyes; then
7593 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7594 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7595 echo "local: *; };" >> $output_objdir/$libname.ver~
7596 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7600 case `$CC -V 2>&1 | sed 5q` in
7603 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7604 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7605 _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'
7606 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7607 _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'
7608 _LT_TAGVAR(compiler_needs_object, $1)=yes
7610 # Not sure whether something based on
7611 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7613 output_verbose_link_cmd='func_echo_all'
7615 # Archives containing C++ object files must be created using
7616 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7617 # necessary to make sure instantiated templates are included
7619 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7627 # FIXME: insert proper C++ library support
7628 _LT_TAGVAR(ld_shlibs, $1)=no
7632 # FIXME: insert proper C++ library support
7633 _LT_TAGVAR(ld_shlibs, $1)=no
7637 case $cc_basename in
7639 # FIXME: insert proper C++ library support
7640 _LT_TAGVAR(ld_shlibs, $1)=no
7643 # FIXME: insert proper C++ library support
7644 _LT_TAGVAR(ld_shlibs, $1)=no
7650 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7651 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7653 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7654 _LT_TAGVAR(hardcode_direct, $1)=yes
7655 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7657 # Workaround some broken pre-1.5 toolchains
7658 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7662 _LT_TAGVAR(ld_shlibs, $1)=yes
7666 # C++ shared libraries are fairly broken
7667 _LT_TAGVAR(ld_shlibs, $1)=no
7671 if test -f /usr/libexec/ld.so; then
7672 _LT_TAGVAR(hardcode_direct, $1)=yes
7673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7674 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7675 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7676 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7677 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7678 _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'
7679 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7680 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7682 output_verbose_link_cmd=func_echo_all
7684 _LT_TAGVAR(ld_shlibs, $1)=no
7688 osf3* | osf4* | osf5*)
7689 case $cc_basename in
7691 # Kuck and Associates, Inc. (KAI) C++ Compiler
7693 # KCC will only create a shared library if the output file
7694 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7695 # to its proper name (with version) after linking.
7696 _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'
7698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7699 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7701 # Archives containing C++ object files must be created using
7702 # the KAI C++ compiler.
7704 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7705 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7709 # Rational C++ 2.4.1
7710 # FIXME: insert proper C++ library support
7711 _LT_TAGVAR(ld_shlibs, $1)=no
7716 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7717 _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'
7718 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7721 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7722 _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'
7723 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7724 echo "-hidden">> $lib.exp~
7725 $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~
7727 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7731 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7733 # Commands to make compiler produce verbose output that lists
7734 # what "hidden" libraries, object files and flags are used when
7735 # linking a shared library.
7737 # There doesn't appear to be a way to prevent this compiler from
7738 # explicitly linking system object files so we need to strip them
7739 # from the output so that they don't get included in the library
7741 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"'
7744 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7745 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7748 _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'
7751 _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'
7755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7756 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7758 # Commands to make compiler produce verbose output that lists
7759 # what "hidden" libraries, object files and flags are used when
7760 # linking a shared library.
7761 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7764 # FIXME: insert proper C++ library support
7765 _LT_TAGVAR(ld_shlibs, $1)=no
7772 # FIXME: insert proper C++ library support
7773 _LT_TAGVAR(ld_shlibs, $1)=no
7777 case $cc_basename in
7780 # FIXME: insert proper C++ library support
7781 _LT_TAGVAR(ld_shlibs, $1)=no
7785 # FIXME: insert proper C++ library support
7786 _LT_TAGVAR(ld_shlibs, $1)=no
7789 # FIXME: insert proper C++ library support
7790 _LT_TAGVAR(ld_shlibs, $1)=no
7796 case $cc_basename in
7798 # Sun C++ 4.2, 5.x and Centerline C++
7799 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7800 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7801 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7802 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7803 $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'
7805 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7806 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7808 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7810 # The compiler driver will combine and reorder linker options,
7811 # but understands `-z linker_flag'.
7812 # Supported since Solaris 2.6 (maybe 2.5.1?)
7813 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7816 _LT_TAGVAR(link_all_deplibs, $1)=yes
7818 output_verbose_link_cmd='func_echo_all'
7820 # Archives containing C++ object files must be created using
7821 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7822 # necessary to make sure instantiated templates are included
7824 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7827 # Green Hills C++ Compiler
7828 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7830 # The C++ compiler must be used to create the archive.
7831 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7834 # GNU C++ compiler with Solaris linker
7835 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7836 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7837 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7838 _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'
7839 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7840 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7842 # Commands to make compiler produce verbose output that lists
7843 # what "hidden" libraries, object files and flags are used when
7844 # linking a shared library.
7845 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7847 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7849 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7850 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7851 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7853 # Commands to make compiler produce verbose output that lists
7854 # what "hidden" libraries, object files and flags are used when
7855 # linking a shared library.
7856 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7861 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7863 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7871 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7872 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7873 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7874 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7875 runpath_var='LD_RUN_PATH'
7877 case $cc_basename in
7879 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7880 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7883 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7884 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7889 sysv5* | sco3.2v5* | sco5v6*)
7890 # Note: We can NOT use -z defs as we might desire, because we do not
7891 # link with -lc, and that would cause any symbols used from libc to
7892 # always be unresolved, which means just about no library would
7893 # ever link correctly. If we're not using GNU ld we use -z text
7894 # though, which does catch some bad symbols but isn't as heavy-handed
7896 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7897 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7898 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7899 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7901 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7902 _LT_TAGVAR(link_all_deplibs, $1)=yes
7903 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7904 runpath_var='LD_RUN_PATH'
7906 case $cc_basename in
7908 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7909 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7910 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7911 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7912 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7913 '"$_LT_TAGVAR(reload_cmds, $1)"
7916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7917 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7923 case $cc_basename in
7925 # NonStop-UX NCC 3.20
7926 # FIXME: insert proper C++ library support
7927 _LT_TAGVAR(ld_shlibs, $1)=no
7930 # FIXME: insert proper C++ library support
7931 _LT_TAGVAR(ld_shlibs, $1)=no
7937 # FIXME: insert proper C++ library support
7938 _LT_TAGVAR(ld_shlibs, $1)=no
7942 # FIXME: insert proper C++ library support
7943 _LT_TAGVAR(ld_shlibs, $1)=no
7947 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7948 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7950 _LT_TAGVAR(GCC, $1)="$GXX"
7951 _LT_TAGVAR(LD, $1)="$LD"
7954 ## There is no encapsulation within the following macros, do not change
7955 ## the running order or otherwise move them around unless you know exactly
7956 ## what you are doing...
7957 _LT_SYS_HIDDEN_LIBDEPS($1)
7958 _LT_COMPILER_PIC($1)
7959 _LT_COMPILER_C_O($1)
7960 _LT_COMPILER_FILE_LOCKS($1)
7961 _LT_LINKER_SHLIBS($1)
7962 _LT_SYS_DYNAMIC_LINKER($1)
7963 _LT_LINKER_HARDCODE_LIBPATH($1)
7966 fi # test -n "$compiler"
7969 CFLAGS=$lt_save_CFLAGS
7973 with_gnu_ld=$lt_save_with_gnu_ld
7974 lt_cv_path_LDCXX=$lt_cv_path_LD
7975 lt_cv_path_LD=$lt_save_path_LD
7976 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7977 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7978 fi # test "$_lt_caught_CXX_error" != yes
7981 ])# _LT_LANG_CXX_CONFIG
7984 # _LT_FUNC_STRIPNAME_CNF
7985 # ----------------------
7986 # func_stripname_cnf prefix suffix name
7987 # strip PREFIX and SUFFIX off of NAME.
7988 # PREFIX and SUFFIX must not contain globbing or regex special
7989 # characters, hashes, percent signs, but SUFFIX may contain a leading
7990 # dot (in which case that matches only a dot).
7992 # This function is identical to the (non-XSI) version of func_stripname,
7993 # except this one can be used by m4 code that may be executed by configure,
7994 # rather than the libtool script.
7995 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7996 AC_REQUIRE([_LT_DECL_SED])
7997 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7998 func_stripname_cnf ()
8001 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8002 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8004 } # func_stripname_cnf
8005 ])# _LT_FUNC_STRIPNAME_CNF
8007 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8008 # ---------------------------------
8009 # Figure out "hidden" library dependencies from verbose
8010 # compiler output when linking a shared library.
8011 # Parse the compiler output and extract the necessary
8012 # objects, libraries and library flags.
8013 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8014 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8015 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8016 # Dependencies to place before and after the object being linked:
8017 _LT_TAGVAR(predep_objects, $1)=
8018 _LT_TAGVAR(postdep_objects, $1)=
8019 _LT_TAGVAR(predeps, $1)=
8020 _LT_TAGVAR(postdeps, $1)=
8021 _LT_TAGVAR(compiler_lib_search_path, $1)=
8023 dnl we can't use the lt_simple_compile_test_code here,
8024 dnl because it contains code intended for an executable,
8025 dnl not a library. It's possible we should let each
8026 dnl tag define a new lt_????_link_test_code variable,
8027 dnl but it's only used here...
8028 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8030 void foo (void) { a = 0; }
8032 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8036 Foo (void) { a = 0; }
8041 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8049 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8057 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8060 public void bar (void) {
8067 _lt_libdeps_save_CFLAGS=$CFLAGS
8068 case "$CC $CFLAGS " in #(
8069 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8070 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8073 dnl Parse the compiler output and extract the necessary
8074 dnl objects, libraries and library flags.
8075 if AC_TRY_EVAL(ac_compile); then
8076 # Parse the compiler output and extract the necessary
8077 # objects, libraries and library flags.
8079 # Sentinel used to keep track of whether or not we are before
8080 # the conftest object file.
8081 pre_test_object_deps_done=no
8083 for p in `eval "$output_verbose_link_cmd"`; do
8087 # Some compilers place space between "-{L,R}" and the path.
8089 if test $p = "-L" ||
8090 test $p = "-R"; then
8095 # Expand the sysroot to ease extracting the directories later.
8096 if test -z "$prev"; then
8098 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8099 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8100 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8104 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8106 if test "$pre_test_object_deps_done" = no; then
8109 # Internal compiler library paths should come after those
8110 # provided the user. The postdeps already come after the
8111 # user supplied libs so there is no need to process them.
8112 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8113 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8115 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8118 # The "-l" case would never come before the object being
8119 # linked, so don't bother handling this case.
8122 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8123 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8125 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8131 *.lto.$objext) ;; # Ignore GCC LTO objects
8133 # This assumes that the test object file only shows up
8134 # once in the compiler output.
8135 if test "$p" = "conftest.$objext"; then
8136 pre_test_object_deps_done=yes
8140 if test "$pre_test_object_deps_done" = no; then
8141 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8142 _LT_TAGVAR(predep_objects, $1)="$p"
8144 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8147 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8148 _LT_TAGVAR(postdep_objects, $1)="$p"
8150 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8155 *) ;; # Ignore the rest.
8163 echo "libtool.m4: error: problem compiling $1 test program"
8166 $RM -f confest.$objext
8167 CFLAGS=$_lt_libdeps_save_CFLAGS
8169 # PORTME: override above test on systems where it is broken
8173 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8174 # hack all around it, let's just trust "g++" to DTRT.
8175 _LT_TAGVAR(predep_objects,$1)=
8176 _LT_TAGVAR(postdep_objects,$1)=
8177 _LT_TAGVAR(postdeps,$1)=
8181 case `$CC -V 2>&1 | sed 5q` in
8185 # The more standards-conforming stlport4 library is
8186 # incompatible with the Cstd library. Avoid specifying
8187 # it if it's in CXXFLAGS. Ignore libCrun as
8188 # -library=stlport4 depends on it.
8189 case " $CXX $CXXFLAGS " in
8190 *" -library=stlport4 "*)
8191 solaris_use_stlport4=yes
8195 if test "$solaris_use_stlport4" != yes; then
8196 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8203 case $cc_basename in
8205 # The more standards-conforming stlport4 library is
8206 # incompatible with the Cstd library. Avoid specifying
8207 # it if it's in CXXFLAGS. Ignore libCrun as
8208 # -library=stlport4 depends on it.
8209 case " $CXX $CXXFLAGS " in
8210 *" -library=stlport4 "*)
8211 solaris_use_stlport4=yes
8215 # Adding this requires a known-good setup of shared libraries for
8216 # Sun compiler versions before 5.6, else PIC objects from an old
8217 # archive will be linked into the output, leading to subtle bugs.
8218 if test "$solaris_use_stlport4" != yes; then
8219 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8227 case " $_LT_TAGVAR(postdeps, $1) " in
8228 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8230 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8231 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8232 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8234 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8235 [The directories searched by this compiler when creating a shared library])
8236 _LT_TAGDECL([], [predep_objects], [1],
8237 [Dependencies to place before and after the objects being linked to
8238 create a shared library])
8239 _LT_TAGDECL([], [postdep_objects], [1])
8240 _LT_TAGDECL([], [predeps], [1])
8241 _LT_TAGDECL([], [postdeps], [1])
8242 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8243 [The library search path used internally by the compiler when linking
8245 ])# _LT_SYS_HIDDEN_LIBDEPS
8248 # _LT_LANG_F77_CONFIG([TAG])
8249 # --------------------------
8250 # Ensure that the configuration variables for a Fortran 77 compiler are
8251 # suitably defined. These variables are subsequently used by _LT_CONFIG
8252 # to write the compiler configuration to `libtool'.
8253 m4_defun([_LT_LANG_F77_CONFIG],
8254 [AC_LANG_PUSH(Fortran 77)
8255 if test -z "$F77" || test "X$F77" = "Xno"; then
8259 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8260 _LT_TAGVAR(allow_undefined_flag, $1)=
8261 _LT_TAGVAR(always_export_symbols, $1)=no
8262 _LT_TAGVAR(archive_expsym_cmds, $1)=
8263 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8264 _LT_TAGVAR(hardcode_direct, $1)=no
8265 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8266 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8267 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8268 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8269 _LT_TAGVAR(hardcode_minus_L, $1)=no
8270 _LT_TAGVAR(hardcode_automatic, $1)=no
8271 _LT_TAGVAR(inherit_rpath, $1)=no
8272 _LT_TAGVAR(module_cmds, $1)=
8273 _LT_TAGVAR(module_expsym_cmds, $1)=
8274 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8275 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8276 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8277 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8278 _LT_TAGVAR(no_undefined_flag, $1)=
8279 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8280 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8282 # Source file extension for f77 test sources.
8285 # Object file extension for compiled f77 test sources.
8287 _LT_TAGVAR(objext, $1)=$objext
8289 # No sense in running all these tests if we already determined that
8290 # the F77 compiler isn't working. Some variables (like enable_shared)
8291 # are currently assumed to apply to all compilers on this platform,
8292 # and will be corrupted by setting them based on a non-working compiler.
8293 if test "$_lt_disable_F77" != yes; then
8294 # Code to be used in simple compile tests
8295 lt_simple_compile_test_code="\
8301 # Code to be used in simple link tests
8302 lt_simple_link_test_code="\
8307 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8310 # save warnings/boilerplate of simple test code
8311 _LT_COMPILER_BOILERPLATE
8312 _LT_LINKER_BOILERPLATE
8314 # Allow CC to be a program name with arguments.
8317 lt_save_CFLAGS=$CFLAGS
8321 _LT_TAGVAR(compiler, $1)=$CC
8322 _LT_CC_BASENAME([$compiler])
8324 if test -n "$compiler"; then
8325 AC_MSG_CHECKING([if libtool supports shared libraries])
8326 AC_MSG_RESULT([$can_build_shared])
8328 AC_MSG_CHECKING([whether to build shared libraries])
8329 test "$can_build_shared" = "no" && enable_shared=no
8331 # On AIX, shared libraries and static libraries use the same namespace, and
8332 # are all built from PIC.
8335 test "$enable_shared" = yes && enable_static=no
8336 if test -n "$RANLIB"; then
8337 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8338 postinstall_cmds='$RANLIB $lib'
8342 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8343 test "$enable_shared" = yes && enable_static=no
8347 AC_MSG_RESULT([$enable_shared])
8349 AC_MSG_CHECKING([whether to build static libraries])
8350 # Make sure either enable_shared or enable_static is yes.
8351 test "$enable_shared" = yes || enable_static=yes
8352 AC_MSG_RESULT([$enable_static])
8354 _LT_TAGVAR(GCC, $1)="$G77"
8355 _LT_TAGVAR(LD, $1)="$LD"
8358 ## There is no encapsulation within the following macros, do not change
8359 ## the running order or otherwise move them around unless you know exactly
8360 ## what you are doing...
8361 _LT_COMPILER_PIC($1)
8362 _LT_COMPILER_C_O($1)
8363 _LT_COMPILER_FILE_LOCKS($1)
8364 _LT_LINKER_SHLIBS($1)
8365 _LT_SYS_DYNAMIC_LINKER($1)
8366 _LT_LINKER_HARDCODE_LIBPATH($1)
8369 fi # test -n "$compiler"
8373 CFLAGS="$lt_save_CFLAGS"
8374 fi # test "$_lt_disable_F77" != yes
8377 ])# _LT_LANG_F77_CONFIG
8380 # _LT_LANG_FC_CONFIG([TAG])
8381 # -------------------------
8382 # Ensure that the configuration variables for a Fortran compiler are
8383 # suitably defined. These variables are subsequently used by _LT_CONFIG
8384 # to write the compiler configuration to `libtool'.
8385 m4_defun([_LT_LANG_FC_CONFIG],
8386 [AC_LANG_PUSH(Fortran)
8388 if test -z "$FC" || test "X$FC" = "Xno"; then
8392 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8393 _LT_TAGVAR(allow_undefined_flag, $1)=
8394 _LT_TAGVAR(always_export_symbols, $1)=no
8395 _LT_TAGVAR(archive_expsym_cmds, $1)=
8396 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8397 _LT_TAGVAR(hardcode_direct, $1)=no
8398 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8400 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8401 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8402 _LT_TAGVAR(hardcode_minus_L, $1)=no
8403 _LT_TAGVAR(hardcode_automatic, $1)=no
8404 _LT_TAGVAR(inherit_rpath, $1)=no
8405 _LT_TAGVAR(module_cmds, $1)=
8406 _LT_TAGVAR(module_expsym_cmds, $1)=
8407 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8408 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8409 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8410 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8411 _LT_TAGVAR(no_undefined_flag, $1)=
8412 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8413 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8415 # Source file extension for fc test sources.
8416 ac_ext=${ac_fc_srcext-f}
8418 # Object file extension for compiled fc test sources.
8420 _LT_TAGVAR(objext, $1)=$objext
8422 # No sense in running all these tests if we already determined that
8423 # the FC compiler isn't working. Some variables (like enable_shared)
8424 # are currently assumed to apply to all compilers on this platform,
8425 # and will be corrupted by setting them based on a non-working compiler.
8426 if test "$_lt_disable_FC" != yes; then
8427 # Code to be used in simple compile tests
8428 lt_simple_compile_test_code="\
8434 # Code to be used in simple link tests
8435 lt_simple_link_test_code="\
8440 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8443 # save warnings/boilerplate of simple test code
8444 _LT_COMPILER_BOILERPLATE
8445 _LT_LINKER_BOILERPLATE
8447 # Allow CC to be a program name with arguments.
8450 lt_save_CFLAGS=$CFLAGS
8454 GCC=$ac_cv_fc_compiler_gnu
8456 _LT_TAGVAR(compiler, $1)=$CC
8457 _LT_CC_BASENAME([$compiler])
8459 if test -n "$compiler"; then
8460 AC_MSG_CHECKING([if libtool supports shared libraries])
8461 AC_MSG_RESULT([$can_build_shared])
8463 AC_MSG_CHECKING([whether to build shared libraries])
8464 test "$can_build_shared" = "no" && enable_shared=no
8466 # On AIX, shared libraries and static libraries use the same namespace, and
8467 # are all built from PIC.
8470 test "$enable_shared" = yes && enable_static=no
8471 if test -n "$RANLIB"; then
8472 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8473 postinstall_cmds='$RANLIB $lib'
8477 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8478 test "$enable_shared" = yes && enable_static=no
8482 AC_MSG_RESULT([$enable_shared])
8484 AC_MSG_CHECKING([whether to build static libraries])
8485 # Make sure either enable_shared or enable_static is yes.
8486 test "$enable_shared" = yes || enable_static=yes
8487 AC_MSG_RESULT([$enable_static])
8489 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8490 _LT_TAGVAR(LD, $1)="$LD"
8493 ## There is no encapsulation within the following macros, do not change
8494 ## the running order or otherwise move them around unless you know exactly
8495 ## what you are doing...
8496 _LT_SYS_HIDDEN_LIBDEPS($1)
8497 _LT_COMPILER_PIC($1)
8498 _LT_COMPILER_C_O($1)
8499 _LT_COMPILER_FILE_LOCKS($1)
8500 _LT_LINKER_SHLIBS($1)
8501 _LT_SYS_DYNAMIC_LINKER($1)
8502 _LT_LINKER_HARDCODE_LIBPATH($1)
8505 fi # test -n "$compiler"
8509 CFLAGS=$lt_save_CFLAGS
8510 fi # test "$_lt_disable_FC" != yes
8513 ])# _LT_LANG_FC_CONFIG
8516 # _LT_LANG_GCJ_CONFIG([TAG])
8517 # --------------------------
8518 # Ensure that the configuration variables for the GNU Java Compiler compiler
8519 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8520 # to write the compiler configuration to `libtool'.
8521 m4_defun([_LT_LANG_GCJ_CONFIG],
8522 [AC_REQUIRE([LT_PROG_GCJ])dnl
8525 # Source file extension for Java test sources.
8528 # Object file extension for compiled Java test sources.
8530 _LT_TAGVAR(objext, $1)=$objext
8532 # Code to be used in simple compile tests
8533 lt_simple_compile_test_code="class foo {}"
8535 # Code to be used in simple link tests
8536 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8538 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8541 # save warnings/boilerplate of simple test code
8542 _LT_COMPILER_BOILERPLATE
8543 _LT_LINKER_BOILERPLATE
8545 # Allow CC to be a program name with arguments.
8547 lt_save_CFLAGS=$CFLAGS
8553 _LT_TAGVAR(compiler, $1)=$CC
8554 _LT_TAGVAR(LD, $1)="$LD"
8555 _LT_CC_BASENAME([$compiler])
8557 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8558 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8560 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8561 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8562 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8564 if test -n "$compiler"; then
8565 _LT_COMPILER_NO_RTTI($1)
8566 _LT_COMPILER_PIC($1)
8567 _LT_COMPILER_C_O($1)
8568 _LT_COMPILER_FILE_LOCKS($1)
8569 _LT_LINKER_SHLIBS($1)
8570 _LT_LINKER_HARDCODE_LIBPATH($1)
8579 CFLAGS=$lt_save_CFLAGS
8580 ])# _LT_LANG_GCJ_CONFIG
8583 # _LT_LANG_RC_CONFIG([TAG])
8584 # -------------------------
8585 # Ensure that the configuration variables for the Windows resource compiler
8586 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8587 # to write the compiler configuration to `libtool'.
8588 m4_defun([_LT_LANG_RC_CONFIG],
8589 [AC_REQUIRE([LT_PROG_RC])dnl
8592 # Source file extension for RC test sources.
8595 # Object file extension for compiled RC test sources.
8597 _LT_TAGVAR(objext, $1)=$objext
8599 # Code to be used in simple compile tests
8600 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8602 # Code to be used in simple link tests
8603 lt_simple_link_test_code="$lt_simple_compile_test_code"
8605 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8608 # save warnings/boilerplate of simple test code
8609 _LT_COMPILER_BOILERPLATE
8610 _LT_LINKER_BOILERPLATE
8612 # Allow CC to be a program name with arguments.
8614 lt_save_CFLAGS=$CFLAGS
8620 _LT_TAGVAR(compiler, $1)=$CC
8621 _LT_CC_BASENAME([$compiler])
8622 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8624 if test -n "$compiler"; then
8632 CFLAGS=$lt_save_CFLAGS
8633 ])# _LT_LANG_RC_CONFIG
8638 AC_DEFUN([LT_PROG_GCJ],
8639 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8640 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8641 [AC_CHECK_TOOL(GCJ, gcj,)
8642 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8643 AC_SUBST(GCJFLAGS)])])[]dnl
8647 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8648 dnl aclocal-1.4 backwards compatibility:
8649 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8654 AC_DEFUN([LT_PROG_RC],
8655 [AC_CHECK_TOOL(RC, windres,)
8659 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8660 dnl aclocal-1.4 backwards compatibility:
8661 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8666 # If we don't have a new enough Autoconf to choose the best grep
8667 # available, choose the one first in the user's PATH.
8668 m4_defun([_LT_DECL_EGREP],
8669 [AC_REQUIRE([AC_PROG_EGREP])dnl
8670 AC_REQUIRE([AC_PROG_FGREP])dnl
8671 test -z "$GREP" && GREP=grep
8672 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8673 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8674 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8675 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8682 # If we don't have a new enough Autoconf to choose the best objdump
8683 # available, choose the one first in the user's PATH.
8684 m4_defun([_LT_DECL_OBJDUMP],
8685 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8686 test -z "$OBJDUMP" && OBJDUMP=objdump
8687 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8693 # Ensure DLLTOOL variable is set.
8694 m4_defun([_LT_DECL_DLLTOOL],
8695 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8696 test -z "$DLLTOOL" && DLLTOOL=dlltool
8697 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8703 # Check for a fully-functional sed program, that truncates
8704 # as few characters as possible. Prefer GNU sed if found.
8705 m4_defun([_LT_DECL_SED],
8707 test -z "$SED" && SED=sed
8708 Xsed="$SED -e 1s/^X//"
8709 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8710 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8711 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8714 m4_ifndef([AC_PROG_SED], [
8715 # NOTE: This macro has been submitted for inclusion into #
8716 # GNU Autoconf as AC_PROG_SED. When it is available in #
8717 # a released version of Autoconf we should remove this #
8718 # macro and use it instead. #
8720 m4_defun([AC_PROG_SED],
8721 [AC_MSG_CHECKING([for a sed that does not truncate output])
8722 AC_CACHE_VAL(lt_cv_path_SED,
8723 [# Loop through the user's path and test for sed and gsed.
8724 # Then use that list of sed's as ones to test for truncation.
8725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8729 test -z "$as_dir" && as_dir=.
8730 for lt_ac_prog in sed gsed; do
8731 for ac_exec_ext in '' $ac_executable_extensions; do
8732 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8733 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8741 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8742 # along with /bin/sed that truncates output.
8743 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8744 test ! -f $lt_ac_sed && continue
8745 cat /dev/null > conftest.in
8747 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8748 # Check for GNU sed and select it if it is found.
8749 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8750 lt_cv_path_SED=$lt_ac_sed
8754 cat conftest.in conftest.in >conftest.tmp
8755 mv conftest.tmp conftest.in
8756 cp conftest.in conftest.nl
8758 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8759 cmp -s conftest.out conftest.nl || break
8760 # 10000 chars as input seems more than enough
8761 test $lt_ac_count -gt 10 && break
8762 lt_ac_count=`expr $lt_ac_count + 1`
8763 if test $lt_ac_count -gt $lt_ac_max; then
8764 lt_ac_max=$lt_ac_count
8765 lt_cv_path_SED=$lt_ac_sed
8772 AC_MSG_RESULT([$SED])
8777 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8778 dnl aclocal-1.4 backwards compatibility:
8779 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8782 # _LT_CHECK_SHELL_FEATURES
8783 # ------------------------
8784 # Find out whether the shell is Bourne or XSI compatible,
8785 # or has some other useful features.
8786 m4_defun([_LT_CHECK_SHELL_FEATURES],
8787 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8788 # Try some XSI features
8791 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8793 && eval 'test $(( 1 + 1 )) -eq 2 \
8794 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8796 AC_MSG_RESULT([$xsi_shell])
8797 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8799 AC_MSG_CHECKING([whether the shell understands "+="])
8801 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8803 && lt_shell_append=yes
8804 AC_MSG_RESULT([$lt_shell_append])
8805 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8807 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8812 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8814 # test EBCDIC or ASCII
8815 case `echo X|tr X '\101'` in
8816 A) # ASCII based system
8817 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8818 lt_SP2NL='tr \040 \012'
8819 lt_NL2SP='tr \015\012 \040\040'
8821 *) # EBCDIC based system
8822 lt_SP2NL='tr \100 \n'
8823 lt_NL2SP='tr \r\n \100\100'
8826 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8827 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8828 ])# _LT_CHECK_SHELL_FEATURES
8831 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8832 # ------------------------------------------------------
8833 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8834 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8835 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8837 sed -e '/^$1 ()$/,/^} # $1 /c\
8840 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8841 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8842 && mv -f "$cfgfile.tmp" "$cfgfile" \
8843 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8844 test 0 -eq $? || _lt_function_replace_fail=:
8848 # _LT_PROG_REPLACE_SHELLFNS
8849 # -------------------------
8850 # Replace existing portable implementations of several shell functions with
8851 # equivalent extended shell implementations where those features are available..
8852 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8853 [if test x"$xsi_shell" = xyes; then
8854 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8856 */*) func_dirname_result="${1%/*}${2}" ;;
8857 * ) func_dirname_result="${3}" ;;
8860 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8861 func_basename_result="${1##*/}"])
8863 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8865 */*) func_dirname_result="${1%/*}${2}" ;;
8866 * ) func_dirname_result="${3}" ;;
8868 func_basename_result="${1##*/}"])
8870 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8871 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8872 # positional parameters, so assign one to ordinary parameter first.
8873 func_stripname_result=${3}
8874 func_stripname_result=${func_stripname_result#"${1}"}
8875 func_stripname_result=${func_stripname_result%"${2}"}])
8877 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8878 func_split_long_opt_name=${1%%=*}
8879 func_split_long_opt_arg=${1#*=}])
8881 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8882 func_split_short_opt_arg=${1#??}
8883 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8885 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8887 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8888 *) func_lo2o_result=${1} ;;
8891 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8893 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8895 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8898 if test x"$lt_shell_append" = xyes; then
8899 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8901 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8902 func_quote_for_eval "${2}"
8903 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8904 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8906 # Save a `func_append' function call where possible by direct use of '+='
8907 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8908 && mv -f "$cfgfile.tmp" "$cfgfile" \
8909 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8910 test 0 -eq $? || _lt_function_replace_fail=:
8912 # Save a `func_append' function call even when '+=' is not available
8913 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8914 && mv -f "$cfgfile.tmp" "$cfgfile" \
8915 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8916 test 0 -eq $? || _lt_function_replace_fail=:
8919 if test x"$_lt_function_replace_fail" = x":"; then
8920 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8924 # _LT_PATH_CONVERSION_FUNCTIONS
8925 # -----------------------------
8926 # Determine which file name conversion functions should be used by
8927 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8928 # for certain cross-compile configurations and native mingw.
8929 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8930 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8931 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8932 AC_MSG_CHECKING([how to convert $build file names to $host format])
8933 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8937 *-*-mingw* ) # actually msys
8938 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8941 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8943 * ) # otherwise, assume *nix
8944 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8950 *-*-mingw* ) # actually msys
8951 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8954 lt_cv_to_host_file_cmd=func_convert_file_noop
8956 * ) # otherwise, assume *nix
8957 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8961 * ) # unhandled hosts (and "normal" native builds)
8962 lt_cv_to_host_file_cmd=func_convert_file_noop
8966 to_host_file_cmd=$lt_cv_to_host_file_cmd
8967 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8968 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8969 [0], [convert $build file names to $host format])dnl
8971 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8972 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8973 [#assume ordinary cross tools, or native build.
8974 lt_cv_to_tool_file_cmd=func_convert_file_noop
8978 *-*-mingw* ) # actually msys
8979 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8985 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8986 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8987 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8988 [0], [convert $build files to toolchain format])dnl
8989 ])# _LT_PATH_CONVERSION_FUNCTIONS
8991 # Helper functions for option handling. -*- Autoconf -*-
8993 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8995 # Written by Gary V. Vaughan, 2004
8997 # This file is free software; the Free Software Foundation gives
8998 # unlimited permission to copy and/or distribute it, with or without
8999 # modifications, as long as this notice is preserved.
9001 # serial 7 ltoptions.m4
9003 # This is to help aclocal find these macros, as it can't see m4_define.
9004 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9007 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9008 # ------------------------------------------
9009 m4_define([_LT_MANGLE_OPTION],
9010 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9013 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9014 # ---------------------------------------
9015 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9016 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9018 m4_define([_LT_SET_OPTION],
9019 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9020 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9021 _LT_MANGLE_DEFUN([$1], [$2]),
9022 [m4_warning([Unknown $1 option `$2'])])[]dnl
9026 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9027 # ------------------------------------------------------------
9028 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9029 m4_define([_LT_IF_OPTION],
9030 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9033 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9034 # -------------------------------------------------------
9035 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9037 m4_define([_LT_UNLESS_OPTIONS],
9038 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9039 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9040 [m4_define([$0_found])])])[]dnl
9041 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9046 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9047 # ----------------------------------------
9048 # OPTION-LIST is a space-separated list of Libtool options associated
9049 # with MACRO-NAME. If any OPTION has a matching handler declared with
9050 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9051 # the unknown option and exit.
9052 m4_defun([_LT_SET_OPTIONS],
9054 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9055 [_LT_SET_OPTION([$1], _LT_Option)])
9057 m4_if([$1],[LT_INIT],[
9059 dnl Simply set some default values (i.e off) if boolean options were not
9061 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9063 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9066 dnl If no reference was made to various pairs of opposing options, then
9067 dnl we run the default mode handler for the pair. For example, if neither
9068 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9069 dnl archives by default:
9070 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9071 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9072 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9073 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9074 [_LT_ENABLE_FAST_INSTALL])
9080 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9081 # -----------------------------------------
9082 m4_define([_LT_MANGLE_DEFUN],
9083 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9086 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9087 # -----------------------------------------------
9088 m4_define([LT_OPTION_DEFINE],
9089 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9090 ])# LT_OPTION_DEFINE
9095 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9098 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9099 [_LT_SET_OPTION([LT_INIT], [dlopen])
9100 AC_DIAGNOSE([obsolete],
9101 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9102 put the `dlopen' option into LT_INIT's first parameter.])
9105 dnl aclocal-1.4 backwards compatibility:
9106 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9111 # Declare package support for building win32 dll's.
9112 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9113 [enable_win32_dll=yes
9116 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9117 AC_CHECK_TOOL(AS, as, false)
9118 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9119 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9123 test -z "$AS" && AS=as
9124 _LT_DECL([], [AS], [1], [Assembler program])dnl
9126 test -z "$DLLTOOL" && DLLTOOL=dlltool
9127 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9129 test -z "$OBJDUMP" && OBJDUMP=objdump
9130 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9133 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9134 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9135 _LT_SET_OPTION([LT_INIT], [win32-dll])
9136 AC_DIAGNOSE([obsolete],
9137 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9138 put the `win32-dll' option into LT_INIT's first parameter.])
9141 dnl aclocal-1.4 backwards compatibility:
9142 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9145 # _LT_ENABLE_SHARED([DEFAULT])
9146 # ----------------------------
9147 # implement the --enable-shared flag, and supports the `shared' and
9148 # `disable-shared' LT_INIT options.
9149 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9150 m4_define([_LT_ENABLE_SHARED],
9151 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9152 AC_ARG_ENABLE([shared],
9153 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9154 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9155 [p=${PACKAGE-default}
9157 yes) enable_shared=yes ;;
9158 no) enable_shared=no ;;
9161 # Look at the argument we got. We use all the common list separators.
9162 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9163 for pkg in $enableval; do
9165 if test "X$pkg" = "X$p"; then
9172 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9174 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9175 [Whether or not to build shared libraries])
9176 ])# _LT_ENABLE_SHARED
9178 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9179 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9182 AC_DEFUN([AC_ENABLE_SHARED],
9183 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9186 AC_DEFUN([AC_DISABLE_SHARED],
9187 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9190 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9191 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9193 dnl aclocal-1.4 backwards compatibility:
9194 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9195 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9199 # _LT_ENABLE_STATIC([DEFAULT])
9200 # ----------------------------
9201 # implement the --enable-static flag, and support the `static' and
9202 # `disable-static' LT_INIT options.
9203 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9204 m4_define([_LT_ENABLE_STATIC],
9205 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9206 AC_ARG_ENABLE([static],
9207 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9208 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9209 [p=${PACKAGE-default}
9211 yes) enable_static=yes ;;
9212 no) enable_static=no ;;
9215 # Look at the argument we got. We use all the common list separators.
9216 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9217 for pkg in $enableval; do
9219 if test "X$pkg" = "X$p"; then
9226 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9228 _LT_DECL([build_old_libs], [enable_static], [0],
9229 [Whether or not to build static libraries])
9230 ])# _LT_ENABLE_STATIC
9232 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9233 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9236 AC_DEFUN([AC_ENABLE_STATIC],
9237 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9240 AC_DEFUN([AC_DISABLE_STATIC],
9241 [_LT_SET_OPTION([LT_INIT], [disable-static])
9244 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9245 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9247 dnl aclocal-1.4 backwards compatibility:
9248 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9249 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9253 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9254 # ----------------------------------
9255 # implement the --enable-fast-install flag, and support the `fast-install'
9256 # and `disable-fast-install' LT_INIT options.
9257 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9258 m4_define([_LT_ENABLE_FAST_INSTALL],
9259 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9260 AC_ARG_ENABLE([fast-install],
9261 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9262 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9263 [p=${PACKAGE-default}
9265 yes) enable_fast_install=yes ;;
9266 no) enable_fast_install=no ;;
9268 enable_fast_install=no
9269 # Look at the argument we got. We use all the common list separators.
9270 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9271 for pkg in $enableval; do
9273 if test "X$pkg" = "X$p"; then
9274 enable_fast_install=yes
9280 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9282 _LT_DECL([fast_install], [enable_fast_install], [0],
9283 [Whether or not to optimize for fast installation])dnl
9284 ])# _LT_ENABLE_FAST_INSTALL
9286 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9287 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9290 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9291 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9292 AC_DIAGNOSE([obsolete],
9293 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9294 the `fast-install' option into LT_INIT's first parameter.])
9297 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9298 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9299 AC_DIAGNOSE([obsolete],
9300 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9301 the `disable-fast-install' option into LT_INIT's first parameter.])
9304 dnl aclocal-1.4 backwards compatibility:
9305 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9306 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9309 # _LT_WITH_PIC([MODE])
9310 # --------------------
9311 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9313 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9314 m4_define([_LT_WITH_PIC],
9316 [AS_HELP_STRING([--with-pic],
9317 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9318 [pic_mode="$withval"],
9321 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9323 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9326 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9327 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9330 AU_DEFUN([AC_LIBTOOL_PICMODE],
9331 [_LT_SET_OPTION([LT_INIT], [pic-only])
9332 AC_DIAGNOSE([obsolete],
9333 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9334 put the `pic-only' option into LT_INIT's first parameter.])
9337 dnl aclocal-1.4 backwards compatibility:
9338 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9341 m4_define([_LTDL_MODE], [])
9342 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9343 [m4_define([_LTDL_MODE], [nonrecursive])])
9344 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9345 [m4_define([_LTDL_MODE], [recursive])])
9346 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9347 [m4_define([_LTDL_MODE], [subproject])])
9349 m4_define([_LTDL_TYPE], [])
9350 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9351 [m4_define([_LTDL_TYPE], [installable])])
9352 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9353 [m4_define([_LTDL_TYPE], [convenience])])
9355 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9357 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9358 # Written by Gary V. Vaughan, 2004
9360 # This file is free software; the Free Software Foundation gives
9361 # unlimited permission to copy and/or distribute it, with or without
9362 # modifications, as long as this notice is preserved.
9364 # serial 6 ltsugar.m4
9366 # This is to help aclocal find these macros, as it can't see m4_define.
9367 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9370 # lt_join(SEP, ARG1, [ARG2...])
9371 # -----------------------------
9372 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9373 # associated separator.
9374 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9375 # versions in m4sugar had bugs.
9376 m4_define([lt_join],
9377 [m4_if([$#], [1], [],
9379 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9380 m4_define([_lt_join],
9381 [m4_if([$#$2], [2], [],
9382 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9388 # Manipulate m4 lists.
9389 # These macros are necessary as long as will still need to support
9390 # Autoconf-2.59 which quotes differently.
9391 m4_define([lt_car], [[$1]])
9393 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9395 [m4_dquote(m4_shift($@))])])
9396 m4_define([lt_unquote], $1)
9399 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9400 # ------------------------------------------
9401 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9402 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9403 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9404 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9405 # than defined and empty).
9407 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9408 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9409 m4_define([lt_append],
9411 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9415 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9416 # ----------------------------------------------------------
9417 # Produce a SEP delimited list of all paired combinations of elements of
9418 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9419 # has the form PREFIXmINFIXSUFFIXn.
9420 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9421 m4_define([lt_combine],
9422 [m4_if(m4_eval([$# > 3]), [1],
9423 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9424 [[m4_foreach([_Lt_prefix], [$2],
9425 [m4_foreach([_Lt_suffix],
9426 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9427 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9430 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9431 # -----------------------------------------------------------------------
9432 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9433 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9434 m4_define([lt_if_append_uniq],
9436 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9437 [lt_append([$1], [$2], [$3])$4],
9439 [lt_append([$1], [$2], [$3])$4])])
9442 # lt_dict_add(DICT, KEY, VALUE)
9443 # -----------------------------
9444 m4_define([lt_dict_add],
9445 [m4_define([$1($2)], [$3])])
9448 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9449 # --------------------------------------------
9450 m4_define([lt_dict_add_subkey],
9451 [m4_define([$1($2:$3)], [$4])])
9454 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9455 # ----------------------------------
9456 m4_define([lt_dict_fetch],
9458 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9459 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9462 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9463 # -----------------------------------------------------------------
9464 m4_define([lt_if_dict_fetch],
9465 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9470 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9471 # --------------------------------------------------------------
9472 m4_define([lt_dict_filter],
9473 [m4_if([$5], [], [],
9474 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9475 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9476 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9479 # ltversion.m4 -- version numbers -*- Autoconf -*-
9481 # Copyright (C) 2004 Free Software Foundation, Inc.
9482 # Written by Scott James Remnant, 2004
9484 # This file is free software; the Free Software Foundation gives
9485 # unlimited permission to copy and/or distribute it, with or without
9486 # modifications, as long as this notice is preserved.
9490 # serial 3293 ltversion.m4
9491 # This file is part of GNU Libtool
9493 m4_define([LT_PACKAGE_VERSION], [2.4])
9494 m4_define([LT_PACKAGE_REVISION], [1.3293])
9496 AC_DEFUN([LTVERSION_VERSION],
9497 [macro_version='2.4'
9498 macro_revision='1.3293'
9499 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9500 _LT_DECL(, macro_revision, 0)
9503 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9505 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9506 # Written by Scott James Remnant, 2004.
9508 # This file is free software; the Free Software Foundation gives
9509 # unlimited permission to copy and/or distribute it, with or without
9510 # modifications, as long as this notice is preserved.
9512 # serial 5 lt~obsolete.m4
9514 # These exist entirely to fool aclocal when bootstrapping libtool.
9516 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9517 # which have later been changed to m4_define as they aren't part of the
9518 # exported API, or moved to Autoconf or Automake where they belong.
9520 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9521 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9522 # using a macro with the same name in our local m4/libtool.m4 it'll
9523 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9524 # and doesn't know about Autoconf macros at all.)
9526 # So we provide this file, which has a silly filename so it's always
9527 # included after everything else. This provides aclocal with the
9528 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9529 # because those macros already exist, or will be overwritten later.
9530 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9532 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9533 # Yes, that means every name once taken will need to remain here until
9534 # we give up compatibility with versions before 1.7, at which point
9535 # we need to keep only those names which we still refer to.
9537 # This is to help aclocal find these macros, as it can't see m4_define.
9538 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9540 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9541 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9542 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9543 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9544 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9545 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9546 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9547 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9548 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9549 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9550 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9551 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9552 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9553 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9554 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9555 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9556 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9557 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9558 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9559 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9560 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9561 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9562 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9563 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9564 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9565 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9566 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9567 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9568 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9569 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9570 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9571 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9572 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9573 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9574 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9575 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9576 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9577 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9578 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9579 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9580 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9581 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9582 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9583 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9584 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9585 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9586 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9587 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9588 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9589 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9590 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9591 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9592 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9593 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9594 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9595 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9596 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9597 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9598 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9599 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9600 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9602 dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9604 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9606 dnl Permission is hereby granted, free of charge, to any person obtaining a
9607 dnl copy of this software and associated documentation files (the "Software"),
9608 dnl to deal in the Software without restriction, including without limitation
9609 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9610 dnl and/or sell copies of the Software, and to permit persons to whom the
9611 dnl Software is furnished to do so, subject to the following conditions:
9613 dnl The above copyright notice and this permission notice (including the next
9614 dnl paragraph) shall be included in all copies or substantial portions of the
9617 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9618 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9619 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
9620 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9621 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9622 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9623 dnl DEALINGS IN THE SOFTWARE.
9625 # XORG_MACROS_VERSION(required-version)
9626 # -------------------------------------
9627 # Minimum version: 1.1.0
9629 # If you're using a macro added in Version 1.1 or newer, include this in
9630 # your configure.ac with the minimum required version, such as:
9631 # XORG_MACROS_VERSION(1.1)
9633 # To ensure that this macro is defined, also add:
9634 # m4_ifndef([XORG_MACROS_VERSION],
9635 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9638 # See the "minimum version" comment for each macro you use to see what
9639 # version you require.
9640 m4_defun([XORG_MACROS_VERSION],[
9641 m4_define([vers_have], [1.16.2])
9642 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9643 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9644 m4_if(m4_cmp(maj_have, maj_needed), 0,,
9645 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9646 m4_if(m4_version_compare(vers_have, [$1]), -1,
9647 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9648 m4_undefine([vers_have])
9649 m4_undefine([maj_have])
9650 m4_undefine([maj_needed])
9651 ]) # XORG_MACROS_VERSION
9653 # XORG_PROG_RAWCPP()
9654 # ------------------
9655 # Minimum version: 1.0.0
9657 # Find cpp program and necessary flags for use in pre-processing text files
9658 # such as man pages and config files
9659 AC_DEFUN([XORG_PROG_RAWCPP],[
9660 AC_REQUIRE([AC_PROG_CPP])
9661 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
9662 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9664 # Check for flag to avoid builtin definitions - assumes unix is predefined,
9665 # which is not the best choice for supporting other OS'es, but covers most
9666 # of the ones we need for now.
9667 AC_MSG_CHECKING([if $RAWCPP requires -undef])
9668 AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9669 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9672 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9674 AC_MSG_RESULT([yes])
9675 # under Cygwin unix is still defined even with -undef
9676 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9677 RAWCPPFLAGS="-undef -ansi"
9678 AC_MSG_RESULT([yes, with -ansi])
9680 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
9683 rm -f conftest.$ac_ext
9685 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
9686 AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
9687 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
9690 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
9691 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9692 AC_MSG_RESULT([yes])
9694 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
9697 rm -f conftest.$ac_ext
9698 AC_SUBST(RAWCPPFLAGS)
9699 ]) # XORG_PROG_RAWCPP
9701 # XORG_MANPAGE_SECTIONS()
9702 # -----------------------
9703 # Minimum version: 1.0.0
9705 # Determine which sections man pages go in for the different man page types
9706 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9707 # Not sure if there's any better way than just hardcoding by OS name.
9708 # Override default settings by setting environment variables
9709 # Added MAN_SUBSTS in version 1.8
9710 # Added AC_PROG_SED in version 1.8
9712 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
9713 AC_REQUIRE([AC_CANONICAL_HOST])
9714 AC_REQUIRE([AC_PROG_SED])
9716 if test x$APP_MAN_SUFFIX = x ; then
9719 if test x$APP_MAN_DIR = x ; then
9720 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9723 if test x$LIB_MAN_SUFFIX = x ; then
9726 if test x$LIB_MAN_DIR = x ; then
9727 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9730 if test x$FILE_MAN_SUFFIX = x ; then
9732 solaris*) FILE_MAN_SUFFIX=4 ;;
9733 *) FILE_MAN_SUFFIX=5 ;;
9736 if test x$FILE_MAN_DIR = x ; then
9737 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9740 if test x$MISC_MAN_SUFFIX = x ; then
9742 solaris*) MISC_MAN_SUFFIX=5 ;;
9743 *) MISC_MAN_SUFFIX=7 ;;
9746 if test x$MISC_MAN_DIR = x ; then
9747 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9750 if test x$DRIVER_MAN_SUFFIX = x ; then
9752 solaris*) DRIVER_MAN_SUFFIX=7 ;;
9753 *) DRIVER_MAN_SUFFIX=4 ;;
9756 if test x$DRIVER_MAN_DIR = x ; then
9757 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9760 if test x$ADMIN_MAN_SUFFIX = x ; then
9762 solaris*) ADMIN_MAN_SUFFIX=1m ;;
9763 *) ADMIN_MAN_SUFFIX=8 ;;
9766 if test x$ADMIN_MAN_DIR = x ; then
9767 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9771 AC_SUBST([APP_MAN_SUFFIX])
9772 AC_SUBST([LIB_MAN_SUFFIX])
9773 AC_SUBST([FILE_MAN_SUFFIX])
9774 AC_SUBST([MISC_MAN_SUFFIX])
9775 AC_SUBST([DRIVER_MAN_SUFFIX])
9776 AC_SUBST([ADMIN_MAN_SUFFIX])
9777 AC_SUBST([APP_MAN_DIR])
9778 AC_SUBST([LIB_MAN_DIR])
9779 AC_SUBST([FILE_MAN_DIR])
9780 AC_SUBST([MISC_MAN_DIR])
9781 AC_SUBST([DRIVER_MAN_DIR])
9782 AC_SUBST([ADMIN_MAN_DIR])
9784 XORG_MAN_PAGE="X Version 11"
9785 AC_SUBST([XORG_MAN_PAGE])
9787 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9788 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9789 -e 's|__xservername__|Xorg|g' \
9790 -e 's|__xconfigfile__|xorg.conf|g' \
9791 -e 's|__projectroot__|\$(prefix)|g' \
9792 -e 's|__apploaddir__|\$(appdefaultdir)|g' \
9793 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
9794 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
9795 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
9796 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
9797 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
9798 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
9799 AC_SUBST([MAN_SUBSTS])
9801 ]) # XORG_MANPAGE_SECTIONS
9803 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
9804 # ------------------------
9805 # Minimum version: 1.7.0
9807 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
9808 # provided by xorg-sgml-doctools, if installed.
9809 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
9810 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
9812 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
9813 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
9815 [if test x"$cross_compiling" != x"yes" ; then
9816 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
9817 [XORG_SGML_PATH=$prefix/share/sgml])
9821 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
9822 # the path and the name of the doc stylesheet
9823 if test "x$XORG_SGML_PATH" != "x" ; then
9824 AC_MSG_RESULT([$XORG_SGML_PATH])
9825 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
9826 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
9831 AC_SUBST(XORG_SGML_PATH)
9832 AC_SUBST(STYLESHEET_SRCDIR)
9833 AC_SUBST(XSL_STYLESHEET)
9834 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
9835 ]) # XORG_CHECK_SGML_DOCTOOLS
9837 # XORG_CHECK_LINUXDOC
9838 # -------------------
9839 # Minimum version: 1.0.0
9841 # Defines the variable MAKE_TEXT if the necessary tools and
9842 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9843 # Whether or not the necessary tools and files are found can be checked
9844 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
9845 AC_DEFUN([XORG_CHECK_LINUXDOC],[
9846 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9847 AC_REQUIRE([XORG_WITH_PS2PDF])
9849 AC_PATH_PROG(LINUXDOC, linuxdoc)
9851 AC_MSG_CHECKING([whether to build documentation])
9853 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
9859 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9861 AC_MSG_RESULT([$BUILDDOC])
9863 AC_MSG_CHECKING([whether to build pdf documentation])
9865 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
9871 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9873 AC_MSG_RESULT([$BUILDPDFDOC])
9875 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
9876 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9878 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
9884 ]) # XORG_CHECK_LINUXDOC
9886 # XORG_CHECK_DOCBOOK
9887 # -------------------
9888 # Minimum version: 1.0.0
9890 # Checks for the ability to build output formats from SGML DocBook source.
9891 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9892 # indicates whether the necessary tools and files are found and, if set,
9893 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
9894 AC_DEFUN([XORG_CHECK_DOCBOOK],[
9895 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9902 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
9903 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9904 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
9905 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9907 AC_MSG_CHECKING([whether to build text documentation])
9908 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
9909 test x$BUILD_TXTDOC != xno; then
9912 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9913 AC_MSG_RESULT([$BUILDTXTDOC])
9915 AC_MSG_CHECKING([whether to build PDF documentation])
9916 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
9917 test x$BUILD_PDFDOC != xno; then
9920 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9921 AC_MSG_RESULT([$BUILDPDFDOC])
9923 AC_MSG_CHECKING([whether to build PostScript documentation])
9924 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
9925 test x$BUILD_PSDOC != xno; then
9928 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9929 AC_MSG_RESULT([$BUILDPSDOC])
9931 AC_MSG_CHECKING([whether to build HTML documentation])
9932 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
9933 test x$BUILD_HTMLDOC != xno; then
9936 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9937 AC_MSG_RESULT([$BUILDHTMLDOC])
9939 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9940 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9941 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9942 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9948 ]) # XORG_CHECK_DOCBOOK
9950 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
9952 # Minimum version: 1.5.0
9953 # Minimum version for optional DEFAULT argument: 1.11.0
9955 # Documentation tools are not always available on all platforms and sometimes
9956 # not at the appropriate level. This macro enables a module to test for the
9957 # presence of the tool and obtain it's path in separate variables. Coupled with
9958 # the --with-xmlto option, it allows maximum flexibilty in making decisions
9959 # as whether or not to use the xmlto package. When DEFAULT is not specified,
9960 # --with-xmlto assumes 'auto'.
9962 # Interface to module:
9963 # HAVE_XMLTO: used in makefiles to conditionally generate documentation
9964 # XMLTO: returns the path of the xmlto program found
9965 # returns the path set by the user in the environment
9966 # --with-xmlto: 'yes' user instructs the module to use xmlto
9967 # 'no' user instructs the module not to use xmlto
9969 # Added in version 1.10.0
9970 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
9971 # xmlto for text output requires either lynx, links, or w3m browsers
9973 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
9975 AC_DEFUN([XORG_WITH_XMLTO],[
9976 AC_ARG_VAR([XMLTO], [Path to xmlto command])
9977 m4_define([_defopt], m4_default([$2], [auto]))
9979 AS_HELP_STRING([--with-xmlto],
9980 [Use xmlto to regenerate documentation (default: ]_defopt[)]),
9981 [use_xmlto=$withval], [use_xmlto=]_defopt)
9982 m4_undefine([_defopt])
9984 if test "x$use_xmlto" = x"auto"; then
9985 AC_PATH_PROG([XMLTO], [xmlto])
9986 if test "x$XMLTO" = "x"; then
9987 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
9992 elif test "x$use_xmlto" = x"yes" ; then
9993 AC_PATH_PROG([XMLTO], [xmlto])
9994 if test "x$XMLTO" = "x"; then
9995 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
9998 elif test "x$use_xmlto" = x"no" ; then
9999 if test "x$XMLTO" != "x"; then
10000 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10004 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
10007 # Test for a minimum version of xmlto, if provided.
10009 [if test "$have_xmlto" = yes; then
10010 # scrape the xmlto version
10011 AC_MSG_CHECKING([the xmlto version])
10012 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10013 AC_MSG_RESULT([$xmlto_version])
10014 AS_VERSION_COMPARE([$xmlto_version], [$1],
10015 [if test "x$use_xmlto" = xauto; then
10016 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10019 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10023 # Test for the ability of xmlto to generate a text target
10025 cat > conftest.xml << "EOF"
10027 AS_IF([test "$have_xmlto" = yes],
10028 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10029 [have_xmlto_text=yes],
10030 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
10032 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10033 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10034 ]) # XORG_WITH_XMLTO
10036 # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10037 # --------------------------------------------
10038 # Minimum version: 1.12.0
10039 # Minimum version for optional DEFAULT argument: 1.12.0
10041 # XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10042 # XML-based language used for the transformation of XML documents.
10043 # The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10044 # It is used under the cover by xmlto to generate html files from DocBook/XML.
10045 # The XSLT processor is often used as a standalone tool for transformations.
10046 # It should not be assumed that this tool is used only to work with documnetation.
10047 # When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10049 # Interface to module:
10050 # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10051 # XSLTPROC: returns the path of the xsltproc program found
10052 # returns the path set by the user in the environment
10053 # --with-xsltproc: 'yes' user instructs the module to use xsltproc
10054 # 'no' user instructs the module not to use xsltproc
10055 # have_xsltproc: returns yes if xsltproc found in PATH or no
10057 # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10059 AC_DEFUN([XORG_WITH_XSLTPROC],[
10060 AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10061 # Preserves the interface, should it be implemented later
10062 m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
10063 m4_define([_defopt], m4_default([$2], [auto]))
10064 AC_ARG_WITH(xsltproc,
10065 AS_HELP_STRING([--with-xsltproc],
10066 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10067 [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10068 m4_undefine([_defopt])
10070 if test "x$use_xsltproc" = x"auto"; then
10071 AC_PATH_PROG([XSLTPROC], [xsltproc])
10072 if test "x$XSLTPROC" = "x"; then
10073 AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10078 elif test "x$use_xsltproc" = x"yes" ; then
10079 AC_PATH_PROG([XSLTPROC], [xsltproc])
10080 if test "x$XSLTPROC" = "x"; then
10081 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10084 elif test "x$use_xsltproc" = x"no" ; then
10085 if test "x$XSLTPROC" != "x"; then
10086 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10090 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
10093 AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10094 ]) # XORG_WITH_XSLTPROC
10096 # XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
10097 # ----------------------------------------
10098 # Minimum version: 1.15.0
10100 # PERL (Practical Extraction and Report Language) is a language optimized for
10101 # scanning arbitrary text files, extracting information from those text files,
10102 # and printing reports based on that information.
10104 # When DEFAULT is not specified, --with-perl assumes 'auto'.
10106 # Interface to module:
10107 # HAVE_PERL: used in makefiles to conditionally scan text files
10108 # PERL: returns the path of the perl program found
10109 # returns the path set by the user in the environment
10110 # --with-perl: 'yes' user instructs the module to use perl
10111 # 'no' user instructs the module not to use perl
10112 # have_perl: returns yes if perl found in PATH or no
10114 # If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
10116 AC_DEFUN([XORG_WITH_PERL],[
10117 AC_ARG_VAR([PERL], [Path to perl command])
10118 # Preserves the interface, should it be implemented later
10119 m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
10120 m4_define([_defopt], m4_default([$2], [auto]))
10122 AS_HELP_STRING([--with-perl],
10123 [Use perl for extracting information from files (default: ]_defopt[)]),
10124 [use_perl=$withval], [use_perl=]_defopt)
10125 m4_undefine([_defopt])
10127 if test "x$use_perl" = x"auto"; then
10128 AC_PATH_PROG([PERL], [perl])
10129 if test "x$PERL" = "x"; then
10130 AC_MSG_WARN([perl not found - cannot extract information and report])
10135 elif test "x$use_perl" = x"yes" ; then
10136 AC_PATH_PROG([PERL], [perl])
10137 if test "x$PERL" = "x"; then
10138 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10141 elif test "x$use_perl" = x"no" ; then
10142 if test "x$PERL" != "x"; then
10143 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10147 AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10150 AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10151 ]) # XORG_WITH_PERL
10153 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10155 # Minimum version: 1.5.0
10156 # Minimum version for optional DEFAULT argument: 1.11.0
10158 # Documentation tools are not always available on all platforms and sometimes
10159 # not at the appropriate level. This macro enables a module to test for the
10160 # presence of the tool and obtain it's path in separate variables. Coupled with
10161 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
10162 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
10163 # --with-asciidoc assumes 'auto'.
10165 # Interface to module:
10166 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10167 # ASCIIDOC: returns the path of the asciidoc program found
10168 # returns the path set by the user in the environment
10169 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
10170 # 'no' user instructs the module not to use asciidoc
10172 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10174 AC_DEFUN([XORG_WITH_ASCIIDOC],[
10175 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10176 m4_define([_defopt], m4_default([$2], [auto]))
10177 AC_ARG_WITH(asciidoc,
10178 AS_HELP_STRING([--with-asciidoc],
10179 [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10180 [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10181 m4_undefine([_defopt])
10183 if test "x$use_asciidoc" = x"auto"; then
10184 AC_PATH_PROG([ASCIIDOC], [asciidoc])
10185 if test "x$ASCIIDOC" = "x"; then
10186 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10191 elif test "x$use_asciidoc" = x"yes" ; then
10192 AC_PATH_PROG([ASCIIDOC], [asciidoc])
10193 if test "x$ASCIIDOC" = "x"; then
10194 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10197 elif test "x$use_asciidoc" = x"no" ; then
10198 if test "x$ASCIIDOC" != "x"; then
10199 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10203 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10206 [if test "$have_asciidoc" = yes; then
10207 # scrape the asciidoc version
10208 AC_MSG_CHECKING([the asciidoc version])
10209 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10210 AC_MSG_RESULT([$asciidoc_version])
10211 AS_VERSION_COMPARE([$asciidoc_version], [$1],
10212 [if test "x$use_asciidoc" = xauto; then
10213 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10216 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10219 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10220 ]) # XORG_WITH_ASCIIDOC
10222 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10223 # --------------------------------
10224 # Minimum version: 1.5.0
10225 # Minimum version for optional DEFAULT argument: 1.11.0
10227 # Documentation tools are not always available on all platforms and sometimes
10228 # not at the appropriate level. This macro enables a module to test for the
10229 # presence of the tool and obtain it's path in separate variables. Coupled with
10230 # the --with-doxygen option, it allows maximum flexibilty in making decisions
10231 # as whether or not to use the doxygen package. When DEFAULT is not specified,
10232 # --with-doxygen assumes 'auto'.
10234 # Interface to module:
10235 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10236 # DOXYGEN: returns the path of the doxygen program found
10237 # returns the path set by the user in the environment
10238 # --with-doxygen: 'yes' user instructs the module to use doxygen
10239 # 'no' user instructs the module not to use doxygen
10241 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10243 AC_DEFUN([XORG_WITH_DOXYGEN],[
10244 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10245 m4_define([_defopt], m4_default([$2], [auto]))
10246 AC_ARG_WITH(doxygen,
10247 AS_HELP_STRING([--with-doxygen],
10248 [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10249 [use_doxygen=$withval], [use_doxygen=]_defopt)
10250 m4_undefine([_defopt])
10252 if test "x$use_doxygen" = x"auto"; then
10253 AC_PATH_PROG([DOXYGEN], [doxygen])
10254 if test "x$DOXYGEN" = "x"; then
10255 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10260 elif test "x$use_doxygen" = x"yes" ; then
10261 AC_PATH_PROG([DOXYGEN], [doxygen])
10262 if test "x$DOXYGEN" = "x"; then
10263 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10266 elif test "x$use_doxygen" = x"no" ; then
10267 if test "x$DOXYGEN" != "x"; then
10268 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10272 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10275 [if test "$have_doxygen" = yes; then
10276 # scrape the doxygen version
10277 AC_MSG_CHECKING([the doxygen version])
10278 doxygen_version=`$DOXYGEN --version 2>/dev/null`
10279 AC_MSG_RESULT([$doxygen_version])
10280 AS_VERSION_COMPARE([$doxygen_version], [$1],
10281 [if test "x$use_doxygen" = xauto; then
10282 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10285 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10288 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10289 ]) # XORG_WITH_DOXYGEN
10291 # XORG_WITH_GROFF([DEFAULT])
10293 # Minimum version: 1.6.0
10294 # Minimum version for optional DEFAULT argument: 1.11.0
10296 # Documentation tools are not always available on all platforms and sometimes
10297 # not at the appropriate level. This macro enables a module to test for the
10298 # presence of the tool and obtain it's path in separate variables. Coupled with
10299 # the --with-groff option, it allows maximum flexibilty in making decisions
10300 # as whether or not to use the groff package. When DEFAULT is not specified,
10301 # --with-groff assumes 'auto'.
10303 # Interface to module:
10304 # HAVE_GROFF: used in makefiles to conditionally generate documentation
10305 # HAVE_GROFF_MM: the memorandum macros (-mm) package
10306 # HAVE_GROFF_MS: the -ms macros package
10307 # GROFF: returns the path of the groff program found
10308 # returns the path set by the user in the environment
10309 # --with-groff: 'yes' user instructs the module to use groff
10310 # 'no' user instructs the module not to use groff
10312 # Added in version 1.9.0:
10313 # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10314 # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10315 # psselect from the psutils package.
10316 # the ghostcript package. Refer to the grohtml man pages
10318 # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10320 # OS and distros often splits groff in a basic and full package, the former
10321 # having the groff program and the later having devices, fonts and macros
10322 # Checking for the groff executable is not enough.
10324 # If macros are missing, we cannot assume that groff is useless, so we don't
10325 # unset HAVE_GROFF or GROFF env variables.
10326 # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10328 AC_DEFUN([XORG_WITH_GROFF],[
10329 AC_ARG_VAR([GROFF], [Path to groff command])
10330 m4_define([_defopt], m4_default([$1], [auto]))
10332 AS_HELP_STRING([--with-groff],
10333 [Use groff to regenerate documentation (default: ]_defopt[)]),
10334 [use_groff=$withval], [use_groff=]_defopt)
10335 m4_undefine([_defopt])
10337 if test "x$use_groff" = x"auto"; then
10338 AC_PATH_PROG([GROFF], [groff])
10339 if test "x$GROFF" = "x"; then
10340 AC_MSG_WARN([groff not found - documentation targets will be skipped])
10345 elif test "x$use_groff" = x"yes" ; then
10346 AC_PATH_PROG([GROFF], [groff])
10347 if test "x$GROFF" = "x"; then
10348 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10351 elif test "x$use_groff" = x"no" ; then
10352 if test "x$GROFF" != "x"; then
10353 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10357 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10360 # We have groff, test for the presence of the macro packages
10361 if test "x$have_groff" = x"yes"; then
10362 AC_MSG_CHECKING([for ${GROFF} -ms macros])
10363 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10368 AC_MSG_RESULT([$groff_ms_works])
10369 AC_MSG_CHECKING([for ${GROFF} -mm macros])
10370 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10375 AC_MSG_RESULT([$groff_mm_works])
10378 # We have groff, test for HTML dependencies, one command per package
10379 if test "x$have_groff" = x"yes"; then
10380 AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10381 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10382 AC_PATH_PROG(PSSELECT_PATH, [psselect])
10383 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10384 have_groff_html=yes
10387 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10391 # Set Automake conditionals for Makefiles
10392 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10393 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10394 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10395 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10396 ]) # XORG_WITH_GROFF
10398 # XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10399 # ---------------------------------------
10400 # Minimum version: 1.6.0
10401 # Minimum version for optional DEFAULT argument: 1.11.0
10402 # Minimum version for optional MIN-VERSION argument: 1.15.0
10404 # Documentation tools are not always available on all platforms and sometimes
10405 # not at the appropriate level. This macro enables a module to test for the
10406 # presence of the tool and obtain it's path in separate variables. Coupled with
10407 # the --with-fop option, it allows maximum flexibilty in making decisions
10408 # as whether or not to use the fop package. When DEFAULT is not specified,
10409 # --with-fop assumes 'auto'.
10411 # Interface to module:
10412 # HAVE_FOP: used in makefiles to conditionally generate documentation
10413 # FOP: returns the path of the fop program found
10414 # returns the path set by the user in the environment
10415 # --with-fop: 'yes' user instructs the module to use fop
10416 # 'no' user instructs the module not to use fop
10418 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10420 AC_DEFUN([XORG_WITH_FOP],[
10421 AC_ARG_VAR([FOP], [Path to fop command])
10422 m4_define([_defopt], m4_default([$2], [auto]))
10424 AS_HELP_STRING([--with-fop],
10425 [Use fop to regenerate documentation (default: ]_defopt[)]),
10426 [use_fop=$withval], [use_fop=]_defopt)
10427 m4_undefine([_defopt])
10429 if test "x$use_fop" = x"auto"; then
10430 AC_PATH_PROG([FOP], [fop])
10431 if test "x$FOP" = "x"; then
10432 AC_MSG_WARN([fop not found - documentation targets will be skipped])
10437 elif test "x$use_fop" = x"yes" ; then
10438 AC_PATH_PROG([FOP], [fop])
10439 if test "x$FOP" = "x"; then
10440 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10443 elif test "x$use_fop" = x"no" ; then
10444 if test "x$FOP" != "x"; then
10445 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10449 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10452 # Test for a minimum version of fop, if provided.
10454 [if test "$have_fop" = yes; then
10455 # scrape the fop version
10456 AC_MSG_CHECKING([for fop minimum version])
10457 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10458 AC_MSG_RESULT([$fop_version])
10459 AS_VERSION_COMPARE([$fop_version], [$1],
10460 [if test "x$use_fop" = xauto; then
10461 AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10464 AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10467 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10470 # XORG_WITH_PS2PDF([DEFAULT])
10472 # Minimum version: 1.6.0
10473 # Minimum version for optional DEFAULT argument: 1.11.0
10475 # Documentation tools are not always available on all platforms and sometimes
10476 # not at the appropriate level. This macro enables a module to test for the
10477 # presence of the tool and obtain it's path in separate variables. Coupled with
10478 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10479 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10480 # --with-ps2pdf assumes 'auto'.
10482 # Interface to module:
10483 # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
10484 # PS2PDF: returns the path of the ps2pdf program found
10485 # returns the path set by the user in the environment
10486 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10487 # 'no' user instructs the module not to use ps2pdf
10489 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10491 AC_DEFUN([XORG_WITH_PS2PDF],[
10492 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10493 m4_define([_defopt], m4_default([$1], [auto]))
10494 AC_ARG_WITH(ps2pdf,
10495 AS_HELP_STRING([--with-ps2pdf],
10496 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10497 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10498 m4_undefine([_defopt])
10500 if test "x$use_ps2pdf" = x"auto"; then
10501 AC_PATH_PROG([PS2PDF], [ps2pdf])
10502 if test "x$PS2PDF" = "x"; then
10503 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10508 elif test "x$use_ps2pdf" = x"yes" ; then
10509 AC_PATH_PROG([PS2PDF], [ps2pdf])
10510 if test "x$PS2PDF" = "x"; then
10511 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10514 elif test "x$use_ps2pdf" = x"no" ; then
10515 if test "x$PS2PDF" != "x"; then
10516 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10520 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10522 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10523 ]) # XORG_WITH_PS2PDF
10525 # XORG_ENABLE_DOCS (enable_docs=yes)
10527 # Minimum version: 1.6.0
10529 # Documentation tools are not always available on all platforms and sometimes
10530 # not at the appropriate level. This macro enables a builder to skip all
10531 # documentation targets except traditional man pages.
10532 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10533 # maximum flexibilty in controlling documentation building.
10535 # XORG_WITH_XMLTO --with-xmlto
10536 # XORG_WITH_ASCIIDOC --with-asciidoc
10537 # XORG_WITH_DOXYGEN --with-doxygen
10538 # XORG_WITH_FOP --with-fop
10539 # XORG_WITH_GROFF --with-groff
10540 # XORG_WITH_PS2PDF --with-ps2pdf
10542 # Interface to module:
10543 # ENABLE_DOCS: used in makefiles to conditionally generate documentation
10544 # --enable-docs: 'yes' user instructs the module to generate docs
10545 # 'no' user instructs the module not to generate docs
10546 # parm1: specify the default value, yes or no.
10548 AC_DEFUN([XORG_ENABLE_DOCS],[
10549 m4_define([docs_default], m4_default([$1], [yes]))
10550 AC_ARG_ENABLE(docs,
10551 AS_HELP_STRING([--enable-docs],
10552 [Enable building the documentation (default: ]docs_default[)]),
10553 [build_docs=$enableval], [build_docs=]docs_default)
10554 m4_undefine([docs_default])
10555 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10556 AC_MSG_CHECKING([whether to build documentation])
10557 AC_MSG_RESULT([$build_docs])
10558 ]) # XORG_ENABLE_DOCS
10560 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10562 # Minimum version: 1.6.0
10564 # This macro enables a builder to skip all developer documentation.
10565 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10566 # maximum flexibilty in controlling documentation building.
10568 # XORG_WITH_XMLTO --with-xmlto
10569 # XORG_WITH_ASCIIDOC --with-asciidoc
10570 # XORG_WITH_DOXYGEN --with-doxygen
10571 # XORG_WITH_FOP --with-fop
10572 # XORG_WITH_GROFF --with-groff
10573 # XORG_WITH_PS2PDF --with-ps2pdf
10575 # Interface to module:
10576 # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
10577 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
10578 # 'no' user instructs the module not to generate developer docs
10579 # parm1: specify the default value, yes or no.
10581 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10582 m4_define([devel_default], m4_default([$1], [yes]))
10583 AC_ARG_ENABLE(devel-docs,
10584 AS_HELP_STRING([--enable-devel-docs],
10585 [Enable building the developer documentation (default: ]devel_default[)]),
10586 [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10587 m4_undefine([devel_default])
10588 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10589 AC_MSG_CHECKING([whether to build developer documentation])
10590 AC_MSG_RESULT([$build_devel_docs])
10591 ]) # XORG_ENABLE_DEVEL_DOCS
10593 # XORG_ENABLE_SPECS (enable_specs=yes)
10595 # Minimum version: 1.6.0
10597 # This macro enables a builder to skip all functional specification targets.
10598 # Combined with the specific tool checking macros XORG_WITH_*, it provides
10599 # maximum flexibilty in controlling documentation building.
10601 # XORG_WITH_XMLTO --with-xmlto
10602 # XORG_WITH_ASCIIDOC --with-asciidoc
10603 # XORG_WITH_DOXYGEN --with-doxygen
10604 # XORG_WITH_FOP --with-fop
10605 # XORG_WITH_GROFF --with-groff
10606 # XORG_WITH_PS2PDF --with-ps2pdf
10608 # Interface to module:
10609 # ENABLE_SPECS: used in makefiles to conditionally generate specs
10610 # --enable-specs: 'yes' user instructs the module to generate specs
10611 # 'no' user instructs the module not to generate specs
10612 # parm1: specify the default value, yes or no.
10614 AC_DEFUN([XORG_ENABLE_SPECS],[
10615 m4_define([spec_default], m4_default([$1], [yes]))
10616 AC_ARG_ENABLE(specs,
10617 AS_HELP_STRING([--enable-specs],
10618 [Enable building the specs (default: ]spec_default[)]),
10619 [build_specs=$enableval], [build_specs=]spec_default)
10620 m4_undefine([spec_default])
10621 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10622 AC_MSG_CHECKING([whether to build functional specifications])
10623 AC_MSG_RESULT([$build_specs])
10624 ]) # XORG_ENABLE_SPECS
10626 # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10627 # ----------------------------------------------
10628 # Minimum version: 1.13.0
10630 # This macro enables a builder to enable/disable unit testing
10631 # It makes no assumption about the test cases implementation
10632 # Test cases may or may not use Automake "Support for test suites"
10633 # They may or may not use the software utility library GLib
10635 # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10636 # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10637 # The variable enable_unit_tests is used by other macros in this file.
10639 # Interface to module:
10640 # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
10641 # enable_unit_tests: used in configure.ac for additional configuration
10642 # --enable-unit-tests: 'yes' user instructs the module to build tests
10643 # 'no' user instructs the module not to build tests
10644 # parm1: specify the default value, yes or no.
10646 AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10647 AC_BEFORE([$0], [XORG_WITH_GLIB])
10648 AC_BEFORE([$0], [XORG_LD_WRAP])
10649 AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10650 m4_define([_defopt], m4_default([$1], [auto]))
10651 AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10652 [Enable building unit test cases (default: ]_defopt[)]),
10653 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10654 m4_undefine([_defopt])
10655 AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10656 AC_MSG_CHECKING([whether to build unit test cases])
10657 AC_MSG_RESULT([$enable_unit_tests])
10658 ]) # XORG_ENABLE_UNIT_TESTS
10660 # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10661 # ----------------------------------------
10662 # Minimum version: 1.13.0
10664 # GLib is a library which provides advanced data structures and functions.
10665 # This macro enables a module to test for the presence of Glib.
10667 # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10668 # Otherwise the value of $enable_unit_tests is blank.
10670 # Interface to module:
10671 # HAVE_GLIB: used in makefiles to conditionally build targets
10672 # with_glib: used in configure.ac to know if GLib has been found
10673 # --with-glib: 'yes' user instructs the module to use glib
10674 # 'no' user instructs the module not to use glib
10676 AC_DEFUN([XORG_WITH_GLIB],[
10677 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10678 m4_define([_defopt], m4_default([$2], [auto]))
10679 AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
10680 [Use GLib library for unit testing (default: ]_defopt[)]),
10681 [with_glib=$withval], [with_glib=]_defopt)
10682 m4_undefine([_defopt])
10685 # Do not probe GLib if user explicitly disabled unit testing
10686 if test "x$enable_unit_tests" != x"no"; then
10687 # Do not probe GLib if user explicitly disabled it
10688 if test "x$with_glib" != x"no"; then
10691 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
10692 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
10697 # Not having GLib when unit testing has been explicitly requested is an error
10698 if test "x$enable_unit_tests" = x"yes"; then
10699 if test "x$have_glib" = x"no"; then
10700 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10704 # Having unit testing disabled when GLib has been explicitly requested is an error
10705 if test "x$enable_unit_tests" = x"no"; then
10706 if test "x$with_glib" = x"yes"; then
10707 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10711 # Not having GLib when it has been explicitly requested is an error
10712 if test "x$with_glib" = x"yes"; then
10713 if test "x$have_glib" = x"no"; then
10714 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
10718 AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
10719 ]) # XORG_WITH_GLIB
10721 # XORG_LD_WRAP([required|optional])
10722 # ---------------------------------
10723 # Minimum version: 1.13.0
10725 # Check if linker supports -wrap, passed via compiler flags
10727 # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
10728 # Otherwise the value of $enable_unit_tests is blank.
10730 # Argument added in 1.16.0 - default is "required", to match existing behavior
10731 # of returning an error if enable_unit_tests is yes, and ld -wrap is not
10732 # available, an argument of "optional" allows use when some unit tests require
10733 # ld -wrap and others do not.
10735 AC_DEFUN([XORG_LD_WRAP],[
10736 XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
10737 [AC_LANG_PROGRAM([#include <stdlib.h>
10738 void __wrap_exit(int status) { return; }],
10740 # Not having ld wrap when unit testing has been explicitly requested is an error
10741 if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
10742 if test "x$have_ld_wrap" = x"no"; then
10743 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
10746 AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
10750 # XORG_CHECK_LINKER_FLAGS
10751 # -----------------------
10754 # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
10758 # Check whether the given linker FLAGS work with the current language's
10759 # linker, or whether they give an error.
10761 # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
10764 # PROGRAM-SOURCE is the program source to link with, if needed
10766 # NOTE: Based on AX_CHECK_COMPILER_FLAGS.
10770 # Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
10771 # Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
10772 # Copyright (c) 2009 Matteo Frigo
10774 # This program is free software: you can redistribute it and/or modify it
10775 # under the terms of the GNU General Public License as published by the
10776 # Free Software Foundation, either version 3 of the License, or (at your
10777 # option) any later version.
10779 # This program is distributed in the hope that it will be useful, but
10780 # WITHOUT ANY WARRANTY; without even the implied warranty of
10781 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10782 # Public License for more details.
10784 # You should have received a copy of the GNU General Public License along
10785 # with this program. If not, see <http://www.gnu.org/licenses/>.
10787 # As a special exception, the respective Autoconf Macro's copyright owner
10788 # gives unlimited permission to copy, distribute and modify the configure
10789 # scripts that are the output of Autoconf when processing the Macro. You
10790 # need not follow the terms of the GNU General Public License when using
10791 # or distributing such scripts, even though portions of the text of the
10792 # Macro appear in them. The GNU General Public License (GPL) does govern
10793 # all other use of the material that constitutes the Autoconf Macro.
10795 # This special exception to the GPL applies to versions of the Autoconf
10796 # Macro released by the Autoconf Archive. When you make and distribute a
10797 # modified version of the Autoconf Macro, you may extend this special
10798 # exception to the GPL to apply to your modified version as well.#
10799 AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
10800 [AC_MSG_CHECKING([whether the linker accepts $1])
10801 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
10802 AS_LITERAL_IF([$1],
10803 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
10804 ax_save_FLAGS=$LDFLAGS
10806 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
10807 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10808 AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10809 LDFLAGS=$ax_save_FLAGS])],
10810 [ax_save_FLAGS=$LDFLAGS
10812 AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10813 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10814 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10815 LDFLAGS=$ax_save_FLAGS])
10816 eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
10817 AC_MSG_RESULT($xorg_check_linker_flags)
10818 if test "x$xorg_check_linker_flags" = xyes; then
10819 m4_default([$2], :)
10821 m4_default([$3], :)
10823 ]) # XORG_CHECK_LINKER_FLAGS
10825 # XORG_MEMORY_CHECK_FLAGS
10826 # -----------------------
10827 # Minimum version: 1.16.0
10829 # This macro attempts to find appropriate memory checking functionality
10830 # for various platforms which unit testing code may use to catch various
10831 # forms of memory allocation and access errors in testing.
10833 # Interface to module:
10834 # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
10835 # Usually added to TESTS_ENVIRONMENT in Makefile.am
10837 # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
10839 AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
10841 AC_REQUIRE([AC_CANONICAL_HOST])
10842 AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
10843 [Environment variables to enable memory checking in tests])
10845 # Check for different types of support on different platforms
10848 AC_CHECK_LIB([umem], [umem_alloc],
10849 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
10851 *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
10852 # both directly and inverted, so should not be 0 or 255.
10853 malloc_debug_env='MALLOC_PERTURB_=15'
10856 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
10859 malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
10863 # User supplied flags override default flags
10864 if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
10865 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
10868 AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
10869 ]) # XORG_WITH_LINT
10871 # XORG_CHECK_MALLOC_ZERO
10872 # ----------------------
10873 # Minimum version: 1.0.0
10875 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
10876 # malloc(0) returns NULL. Packages should add one of these cflags to
10877 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
10878 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
10879 AC_ARG_ENABLE(malloc0returnsnull,
10880 AS_HELP_STRING([--enable-malloc0returnsnull],
10881 [malloc(0) returns NULL (default: auto)]),
10882 [MALLOC_ZERO_RETURNS_NULL=$enableval],
10883 [MALLOC_ZERO_RETURNS_NULL=auto])
10885 AC_MSG_CHECKING([whether malloc(0) returns NULL])
10886 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
10887 AC_RUN_IFELSE([AC_LANG_PROGRAM([
10888 #include <stdlib.h>
10890 char *m0, *r0, *c0, *p;
10895 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
10897 [MALLOC_ZERO_RETURNS_NULL=yes],
10898 [MALLOC_ZERO_RETURNS_NULL=no],
10899 [MALLOC_ZERO_RETURNS_NULL=yes])
10901 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10903 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
10904 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
10905 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
10906 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
10908 MALLOC_ZERO_CFLAGS=""
10909 XMALLOC_ZERO_CFLAGS=""
10910 XTMALLOC_ZERO_CFLAGS=""
10913 AC_SUBST([MALLOC_ZERO_CFLAGS])
10914 AC_SUBST([XMALLOC_ZERO_CFLAGS])
10915 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
10916 ]) # XORG_CHECK_MALLOC_ZERO
10920 # Minimum version: 1.1.0
10922 # This macro enables the use of a tool that flags some suspicious and
10923 # non-portable constructs (likely to be bugs) in C language source code.
10924 # It will attempt to locate the tool and use appropriate options.
10925 # There are various lint type tools on different platforms.
10927 # Interface to module:
10928 # LINT: returns the path to the tool found on the platform
10929 # or the value set to LINT on the configure cmd line
10930 # also an Automake conditional
10931 # LINT_FLAGS: an Automake variable with appropriate flags
10933 # --with-lint: 'yes' user instructs the module to use lint
10934 # 'no' user instructs the module not to use lint (default)
10936 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
10937 # If the user sets the value of LINT_FLAGS, they are used verbatim.
10939 AC_DEFUN([XORG_WITH_LINT],[
10941 AC_ARG_VAR([LINT], [Path to a lint-style command])
10942 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
10943 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
10944 [Use a lint-style source code checker (default: disabled)])],
10945 [use_lint=$withval], [use_lint=no])
10947 # Obtain platform specific info like program name and options
10948 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
10950 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
10952 lint_options="-badflag"
10954 *freebsd* | *netbsd*)
10956 lint_options="-u -b"
10960 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
10964 # Test for the presence of the program (either guessed by the code or spelled out by the user)
10965 if test "x$use_lint" = x"yes" ; then
10966 AC_PATH_PROG([LINT], [$lint_name])
10967 if test "x$LINT" = "x"; then
10968 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
10970 elif test "x$use_lint" = x"no" ; then
10971 if test "x$LINT" != "x"; then
10972 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
10975 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
10978 # User supplied flags override default flags
10979 if test "x$LINT_FLAGS" != "x"; then
10980 lint_options=$LINT_FLAGS
10983 AC_SUBST([LINT_FLAGS],[$lint_options])
10984 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
10986 ]) # XORG_WITH_LINT
10988 # XORG_LINT_LIBRARY(LIBNAME)
10989 # --------------------------
10990 # Minimum version: 1.1.0
10992 # Sets up flags for building lint libraries for checking programs that call
10993 # functions in the library.
10995 # Interface to module:
10996 # LINTLIB - Automake variable with the name of lint library file to make
10997 # MAKE_LINT_LIB - Automake conditional
10999 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
11000 # - 'no' user instructs the module not to create a lint library (default)
11002 AC_DEFUN([XORG_LINT_LIBRARY],[
11003 AC_REQUIRE([XORG_WITH_LINT])
11004 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
11005 [Create lint library (default: disabled)])],
11006 [make_lint_lib=$enableval], [make_lint_lib=no])
11008 if test "x$make_lint_lib" = x"yes" ; then
11009 LINTLIB=llib-l$1.ln
11010 if test "x$LINT" = "x"; then
11011 AC_MSG_ERROR([Cannot make lint library without --with-lint])
11013 elif test "x$make_lint_lib" != x"no" ; then
11014 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
11018 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11020 ]) # XORG_LINT_LIBRARY
11022 # XORG_COMPILER_BRAND
11023 # -------------------
11024 # Minimum version: 1.14.0
11026 # Checks for various brands of compilers and sets flags as appropriate:
11027 # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
11028 # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
11029 # clang compiler - sets CLANGCC to "yes"
11030 # Intel compiler - sets INTELCC to "yes"
11031 # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11033 AC_DEFUN([XORG_COMPILER_BRAND], [
11036 AC_REQUIRE([AC_PROG_CC_C99])
11039 AC_REQUIRE([AC_PROG_CXX])
11042 AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11043 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11044 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11045 ]) # XORG_COMPILER_BRAND
11047 # XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
11049 # Minimum version: 1.16.0
11051 # Test if the compiler works when passed the given flag as a command line argument.
11052 # If it succeeds, the flag is appeneded to the given variable. If not, it tries the
11053 # next flag in the list until there are no more options.
11055 # Note that this does not guarantee that the compiler supports the flag as some
11056 # compilers will simply ignore arguments that they do not understand, but we do
11057 # attempt to weed out false positives by using -Werror=unknown-warning-option and
11058 # -Werror=unused-command-line-argument
11060 AC_DEFUN([XORG_TESTSET_CFLAG], [
11061 m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11062 m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11064 AC_LANG_COMPILER_REQUIRE
11068 AC_REQUIRE([AC_PROG_CC_C99])
11069 define([PREFIX], [C])
11072 define([PREFIX], [CXX])
11076 [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11078 if test "x$xorg_testset_unknown_warning_option" = "x" ; then
11079 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11080 AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
11081 xorg_cv_compiler_flag_unknown_warning_option,
11082 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11083 [xorg_cv_compiler_flag_unknown_warning_option=yes],
11084 [xorg_cv_compiler_flag_unknown_warning_option=no]))
11085 xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
11086 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11089 if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
11090 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11091 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11093 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11094 AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
11095 xorg_cv_compiler_flag_unused_command_line_argument,
11096 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11097 [xorg_cv_compiler_flag_unused_command_line_argument=yes],
11098 [xorg_cv_compiler_flag_unused_command_line_argument=no]))
11099 xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
11100 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11104 m4_foreach([flag], m4_cdr($@), [
11105 if test $found = "no" ; then
11106 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11107 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11110 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
11111 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11114 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11116 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11117 AC_MSG_CHECKING([if $CC supports ]flag[])
11118 cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
11119 AC_CACHE_VAL(AS_TR_SH($cacheid),
11120 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11121 [eval AS_TR_SH($cacheid)=yes],
11122 [eval AS_TR_SH($cacheid)=no])])
11124 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11126 eval supported=$AS_TR_SH($cacheid)
11127 AC_MSG_RESULT([$supported])
11128 if test "$supported" = "yes" ; then
11134 ]) # XORG_TESTSET_CFLAG
11136 # XORG_COMPILER_FLAGS
11138 # Minimum version: 1.16.0
11140 # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
11141 # arguments supported by the selected compiler which do NOT alter the generated
11142 # code. These arguments will cause the compiler to print various warnings
11143 # during compilation AND turn a conservative set of warnings into errors.
11145 # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
11146 # future versions of util-macros as options are added to new compilers.
11148 AC_DEFUN([XORG_COMPILER_FLAGS], [
11149 AC_REQUIRE([XORG_COMPILER_BRAND])
11151 AC_ARG_ENABLE(selective-werror,
11152 AS_HELP_STRING([--disable-selective-werror],
11153 [Turn off selective compiler errors. (default: enabled)]),
11154 [SELECTIVE_WERROR=$enableval],
11155 [SELECTIVE_WERROR=yes])
11159 define([PREFIX], [C])
11162 define([PREFIX], [CXX])
11165 # -v is too short to test reliably with XORG_TESTSET_CFLAG
11166 if test "x$SUNCC" = "xyes"; then
11167 [BASE_]PREFIX[FLAGS]="-v"
11169 [BASE_]PREFIX[FLAGS]=""
11172 # This chunk of warnings were those that existed in the legacy CWARNFLAGS
11173 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11174 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11175 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11176 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11180 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11181 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11182 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11183 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11184 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
11185 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11189 # This chunk adds additional warnings that could catch undesired effects.
11190 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11191 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11192 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11193 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11194 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11195 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11196 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11198 # These are currently disabled because they are noisy. They will be enabled
11199 # in the future once the codebase is sufficiently modernized to silence
11200 # them. For now, I don't want them to drown out the other warnings.
11201 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11202 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11203 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11205 # Turn some warnings into errors, so we don't accidently get successful builds
11206 # when there are problems that should be fixed.
11208 if test "x$SELECTIVE_WERROR" = "xyes" ; then
11209 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11210 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11211 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11212 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11213 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11214 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11215 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11216 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11217 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11218 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11219 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11220 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11221 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11223 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])
11224 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11225 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11226 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11227 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11228 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11229 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11230 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11231 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11232 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11233 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11234 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11235 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11236 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11239 AC_SUBST([BASE_]PREFIX[FLAGS])
11240 ]) # XORG_COMPILER_FLAGS
11244 # Minimum version: 1.2.0
11245 # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11247 # Defines CWARNFLAGS to enable C compiler warnings.
11249 # This function is deprecated because it defines -fno-strict-aliasing
11250 # which alters the code generated by the compiler. If -fno-strict-aliasing
11251 # is needed, then it should be added explicitly in the module when
11252 # it is updated to use BASE_CFLAGS.
11254 AC_DEFUN([XORG_CWARNFLAGS], [
11255 AC_REQUIRE([XORG_COMPILER_FLAGS])
11256 AC_REQUIRE([XORG_COMPILER_BRAND])
11259 CWARNFLAGS="$BASE_CFLAGS"
11260 if test "x$GCC" = xyes ; then
11261 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11263 AC_SUBST(CWARNFLAGS)
11266 ]) # XORG_CWARNFLAGS
11268 # XORG_STRICT_OPTION
11269 # -----------------------
11270 # Minimum version: 1.3.0
11272 # Add configure option to enable strict compilation flags, such as treating
11273 # warnings as fatal errors.
11274 # If --enable-strict-compilation is passed to configure, adds strict flags to
11275 # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11277 # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11278 # when strict compilation is unconditionally desired.
11279 AC_DEFUN([XORG_STRICT_OPTION], [
11280 AC_REQUIRE([XORG_CWARNFLAGS])
11281 AC_REQUIRE([XORG_COMPILER_FLAGS])
11283 AC_ARG_ENABLE(strict-compilation,
11284 AS_HELP_STRING([--enable-strict-compilation],
11285 [Enable all warnings from compiler and make them errors (default: disabled)]),
11286 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11290 define([PREFIX], [C])
11293 define([PREFIX], [CXX])
11297 [STRICT_]PREFIX[FLAGS]=""
11298 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
11299 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11301 # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11302 # activate it with -Werror, so we add it here explicitly.
11303 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11305 if test "x$STRICT_COMPILE" = "xyes"; then
11306 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
11307 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
11309 AC_SUBST([STRICT_]PREFIX[FLAGS])
11310 AC_SUBST([BASE_]PREFIX[FLAGS])
11311 AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
11312 ]) # XORG_STRICT_OPTION
11314 # XORG_DEFAULT_OPTIONS
11315 # --------------------
11316 # Minimum version: 1.3.0
11318 # Defines default options for X.Org modules.
11320 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11321 AC_REQUIRE([AC_PROG_INSTALL])
11322 XORG_COMPILER_FLAGS
11325 XORG_RELEASE_VERSION
11328 XORG_MANPAGE_SECTIONS
11329 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11330 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11331 ]) # XORG_DEFAULT_OPTIONS
11335 # Minimum version: 1.4.0
11337 # Defines the variable INSTALL_CMD as the command to copy
11338 # INSTALL from $prefix/share/util-macros.
11340 AC_DEFUN([XORG_INSTALL], [
11341 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11342 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11343 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11344 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11345 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
11346 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
11347 AC_SUBST([INSTALL_CMD])
11349 dnl Copyright 2005 Red Hat, Inc
11351 dnl Permission to use, copy, modify, distribute, and sell this software and its
11352 dnl documentation for any purpose is hereby granted without fee, provided that
11353 dnl the above copyright notice appear in all copies and that both that
11354 dnl copyright notice and this permission notice appear in supporting
11357 dnl The above copyright notice and this permission notice shall be included
11358 dnl in all copies or substantial portions of the Software.
11360 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11361 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11362 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11363 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11364 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11365 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11366 dnl OTHER DEALINGS IN THE SOFTWARE.
11368 dnl Except as contained in this notice, the name of the copyright holders shall
11369 dnl not be used in advertising or otherwise to promote the sale, use or
11370 dnl other dealings in this Software without prior written authorization
11371 dnl from the copyright holders.
11374 # XORG_RELEASE_VERSION
11375 # --------------------
11376 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11378 AC_DEFUN([XORG_RELEASE_VERSION],[
11379 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11380 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
11381 [Major version of this package])
11382 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11383 if test "x$PVM" = "x"; then
11386 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11388 [Minor version of this package])
11389 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11390 if test "x$PVP" = "x"; then
11393 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11395 [Patch version of this package])
11400 # Minimum version: 1.2.0
11402 # Defines the variable CHANGELOG_CMD as the command to generate
11403 # ChangeLog from git.
11406 AC_DEFUN([XORG_CHANGELOG], [
11407 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
11408 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11409 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
11410 echo 'git directory not found: installing possibly empty changelog.' >&2)"
11411 AC_SUBST([CHANGELOG_CMD])
11412 ]) # XORG_CHANGELOG