Debian Codegraph @

aclocal.m4

raw
1 # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
4
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.
8
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
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # Copyright (C) 2002-2021 Free Software Foundation, Inc.
24 #
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
28
29 # AM_AUTOMAKE_VERSION(VERSION)
30 # ----------------------------
31 # Automake X.Y traces this macro to ensure aclocal.m4 has been
32 # generated from the m4 files accompanying Automake X.Y.
33 # (This private macro should not be called outside this file.)
34 AC_DEFUN([AM_AUTOMAKE_VERSION],
35 [am__api_version='1.16'
36 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 dnl require some minimum version. Point them to the right macro.
38 m4_if([$1], [1.16.5], [],
39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40 ])
41
42 # _AM_AUTOCONF_VERSION(VERSION)
43 # -----------------------------
44 # aclocal traces this macro to find the Autoconf version.
45 # This is a private macro too. Using m4_define simplifies
46 # the logic in aclocal, which can simply ignore this definition.
47 m4_define([_AM_AUTOCONF_VERSION], [])
48
49 # AM_SET_CURRENT_AUTOMAKE_VERSION
50 # -------------------------------
51 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54 [AM_AUTOMAKE_VERSION([1.16.5])dnl
55 m4_ifndef([AC_AUTOCONF_VERSION],
56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
61 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
62 #
63 # This file is free software; the Free Software Foundation
64 # gives unlimited permission to copy and/or distribute it,
65 # with or without modifications, as long as this notice is preserved.
66
67 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70 #
71 # Of course, Automake must honor this variable whenever it calls a
72 # tool from the auxiliary directory. The problem is that $srcdir (and
73 # therefore $ac_aux_dir as well) can be either absolute or relative,
74 # depending on how configure is run. This is pretty annoying, since
75 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
76 # source directory, any form will work fine, but in subdirectories a
77 # relative path needs to be adjusted first.
78 #
79 # $ac_aux_dir/missing
80 # fails when called from a subdirectory if $ac_aux_dir is relative
81 # $top_srcdir/$ac_aux_dir/missing
82 # fails if $ac_aux_dir is absolute,
83 # fails when called from a subdirectory in a VPATH build with
84 # a relative $ac_aux_dir
85 #
86 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87 # are both prefixed by $srcdir. In an in-source build this is usually
88 # harmless because $srcdir is '.', but things will broke when you
89 # start a VPATH build or use an absolute $srcdir.
90 #
91 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94 # and then we would define $MISSING as
95 # MISSING="\${SHELL} $am_aux_dir/missing"
96 # This will work as long as MISSING is not called from configure, because
97 # unfortunately $(top_srcdir) has no meaning in configure.
98 # However there are other variables, like CC, which are often used in
99 # configure, and could therefore not use this "fixed" $ac_aux_dir.
100 #
101 # Another solution, used here, is to always expand $ac_aux_dir to an
102 # absolute PATH. The drawback is that using absolute paths prevent a
103 # configured tree to be moved without reconfiguration.
104
105 AC_DEFUN([AM_AUX_DIR_EXPAND],
106 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107 # Expand $ac_aux_dir to an absolute path.
108 am_aux_dir=`cd "$ac_aux_dir" && pwd`
109 ])
110
111 # AM_CONDITIONAL -*- Autoconf -*-
112
113 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
118
119 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
120 # -------------------------------------
121 # Define a conditional.
122 AC_DEFUN([AM_CONDITIONAL],
123 [AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126 AC_SUBST([$1_TRUE])dnl
127 AC_SUBST([$1_FALSE])dnl
128 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
129 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
130 m4_define([_AM_COND_VALUE_$1], [$2])dnl
131 if $2; then
132 $1_TRUE=
133 $1_FALSE='#'
134 else
135 $1_TRUE='#'
136 $1_FALSE=
137 fi
138 AC_CONFIG_COMMANDS_PRE(
139 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140 AC_MSG_ERROR([[conditional "$1" was never defined.
141 Usually this means the macro was only invoked conditionally.]])
142 fi])])
143
144 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
145 #
146 # This file is free software; the Free Software Foundation
147 # gives unlimited permission to copy and/or distribute it,
148 # with or without modifications, as long as this notice is preserved.
149
150
151 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152 # written in clear, in which case automake, when reading aclocal.m4,
153 # will think it sees a *use*, and therefore will trigger all it's
154 # C support machinery. Also note that it means that autoscan, seeing
155 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156
157
158 # _AM_DEPENDENCIES(NAME)
159 # ----------------------
160 # See how the compiler implements dependency checking.
161 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162 # We try a few techniques and use that to set a single cache variable.
163 #
164 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166 # dependency, and given that the user is not expected to run this macro,
167 # just rely on AC_PROG_CC.
168 AC_DEFUN([_AM_DEPENDENCIES],
169 [AC_REQUIRE([AM_SET_DEPDIR])dnl
170 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
172 AC_REQUIRE([AM_DEP_TRACK])dnl
173
174 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
175 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
180 [depcc="$$1" am_compiler_list=])
181
182 AC_CACHE_CHECK([dependency style of $depcc],
183 [am_cv_$1_dependencies_compiler_type],
184 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185 # We make a subdir and do the tests there. Otherwise we can end up
186 # making bogus files that we don't know about and never remove. For
187 # instance it was reported that on HP-UX the gcc test will end up
188 # making a dummy file named 'D' -- because '-MD' means "put the output
189 # in D".
190 rm -rf conftest.dir
191 mkdir conftest.dir
192 # Copy depcomp to subdir because otherwise we won't find it if we're
193 # using a relative directory.
194 cp "$am_depcomp" conftest.dir
195 cd conftest.dir
196 # We will build objects and dependencies in a subdirectory because
197 # it helps to detect inapplicable dependency modes. For instance
198 # both Tru64's cc and ICC support -MD to output dependencies as a
199 # side effect of compilation, but ICC will put the dependencies in
200 # the current directory while Tru64 will put them in the object
201 # directory.
202 mkdir sub
203
204 am_cv_$1_dependencies_compiler_type=none
205 if test "$am_compiler_list" = ""; then
206 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207 fi
208 am__universal=false
209 m4_case([$1], [CC],
210 [case " $depcc " in #(
211 *\ -arch\ *\ -arch\ *) am__universal=true ;;
212 esac],
213 [CXX],
214 [case " $depcc " in #(
215 *\ -arch\ *\ -arch\ *) am__universal=true ;;
216 esac])
217
218 for depmode in $am_compiler_list; do
219 # Setup a source with many dependencies, because some compilers
220 # like to wrap large dependency lists on column 80 (with \), and
221 # we should not choose a depcomp mode which is confused by this.
222 #
223 # We need to recreate these files for each test, as the compiler may
224 # overwrite some of them when testing with obscure command lines.
225 # This happens at least with the AIX C compiler.
226 : > sub/conftest.c
227 for i in 1 2 3 4 5 6; do
228 echo '#include "conftst'$i'.h"' >> sub/conftest.c
229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230 # Solaris 10 /bin/sh.
231 echo '/* dummy */' > sub/conftst$i.h
232 done
233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234
235 # We check with '-c' and '-o' for the sake of the "dashmstdout"
236 # mode. It turns out that the SunPro C++ compiler does not properly
237 # handle '-M -o', and we need to detect this. Also, some Intel
238 # versions had trouble with output in subdirs.
239 am__obj=sub/conftest.${OBJEXT-o}
240 am__minus_obj="-o $am__obj"
241 case $depmode in
242 gcc)
243 # This depmode causes a compiler race in universal mode.
244 test "$am__universal" = false || continue
245 ;;
246 nosideeffect)
247 # After this tag, mechanisms are not by side-effect, so they'll
248 # only be used when explicitly requested.
249 if test "x$enable_dependency_tracking" = xyes; then
250 continue
251 else
252 break
253 fi
254 ;;
255 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256 # This compiler won't grok '-c -o', but also, the minuso test has
257 # not run yet. These depmodes are late enough in the game, and
258 # so weak that their functioning should not be impacted.
259 am__obj=conftest.${OBJEXT-o}
260 am__minus_obj=
261 ;;
262 none) break ;;
263 esac
264 if depmode=$depmode \
265 source=sub/conftest.c object=$am__obj \
266 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268 >/dev/null 2>conftest.err &&
269 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273 # icc doesn't choke on unknown options, it will just issue warnings
274 # or remarks (even with -Werror). So we grep stderr for any message
275 # that says an option was ignored or not supported.
276 # When given -MP, icc 7.0 and 7.1 complain thusly:
277 # icc: Command line warning: ignoring option '-M'; no argument required
278 # The diagnosis changed in icc 8.0:
279 # icc: Command line remark: option '-MP' not supported
280 if (grep 'ignoring option' conftest.err ||
281 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282 am_cv_$1_dependencies_compiler_type=$depmode
283 break
284 fi
285 fi
286 done
287
288 cd ..
289 rm -rf conftest.dir
290 else
291 am_cv_$1_dependencies_compiler_type=none
292 fi
293 ])
294 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295 AM_CONDITIONAL([am__fastdep$1], [
296 test "x$enable_dependency_tracking" != xno \
297 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298 ])
299
300
301 # AM_SET_DEPDIR
302 # -------------
303 # Choose a directory name for dependency files.
304 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305 AC_DEFUN([AM_SET_DEPDIR],
306 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308 ])
309
310
311 # AM_DEP_TRACK
312 # ------------
313 AC_DEFUN([AM_DEP_TRACK],
314 [AC_ARG_ENABLE([dependency-tracking], [dnl
315 AS_HELP_STRING(
316 [--enable-dependency-tracking],
317 [do not reject slow dependency extractors])
318 AS_HELP_STRING(
319 [--disable-dependency-tracking],
320 [speeds up one-time build])])
321 if test "x$enable_dependency_tracking" != xno; then
322 am_depcomp="$ac_aux_dir/depcomp"
323 AMDEPBACKSLASH='\'
324 am__nodep='_no'
325 fi
326 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327 AC_SUBST([AMDEPBACKSLASH])dnl
328 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329 AC_SUBST([am__nodep])dnl
330 _AM_SUBST_NOTMAKE([am__nodep])dnl
331 ])
332
333 # Generate code to set up dependency tracking. -*- Autoconf -*-
334
335 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
336 #
337 # This file is free software; the Free Software Foundation
338 # gives unlimited permission to copy and/or distribute it,
339 # with or without modifications, as long as this notice is preserved.
340
341 # _AM_OUTPUT_DEPENDENCY_COMMANDS
342 # ------------------------------
343 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344 [{
345 # Older Autoconf quotes --file arguments for eval, but not when files
346 # are listed without --file. Let's play safe and only enable the eval
347 # if we detect the quoting.
348 # TODO: see whether this extra hack can be removed once we start
349 # requiring Autoconf 2.70 or later.
350 AS_CASE([$CONFIG_FILES],
351 [*\'*], [eval set x "$CONFIG_FILES"],
352 [*], [set x $CONFIG_FILES])
353 shift
354 # Used to flag and report bootstrapping failures.
355 am_rc=0
356 for am_mf
357 do
358 # Strip MF so we end up with the name of the file.
359 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360 # Check whether this is an Automake generated Makefile which includes
361 # dependency-tracking related rules and includes.
362 # Grep'ing the whole file directly is not great: AIX grep has a line
363 # limit of 2048, but all sed's we know have understand at least 4000.
364 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365 || continue
366 am_dirpart=`AS_DIRNAME(["$am_mf"])`
367 am_filepart=`AS_BASENAME(["$am_mf"])`
368 AM_RUN_LOG([cd "$am_dirpart" \
369 && sed -e '/# am--include-marker/d' "$am_filepart" \
370 | $MAKE -f - am--depfiles]) || am_rc=$?
371 done
372 if test $am_rc -ne 0; then
373 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374 for automatic dependency tracking. If GNU make was not used, consider
375 re-running the configure script with MAKE="gmake" (or whatever is
376 necessary). You can also try re-running configure with the
377 '--disable-dependency-tracking' option to at least be able to build
378 the package (albeit without support for automatic dependency tracking).])
379 fi
380 AS_UNSET([am_dirpart])
381 AS_UNSET([am_filepart])
382 AS_UNSET([am_mf])
383 AS_UNSET([am_rc])
384 rm -f conftest-deps.mk
385 }
386 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
387
388
389 # AM_OUTPUT_DEPENDENCY_COMMANDS
390 # -----------------------------
391 # This macro should only be invoked once -- use via AC_REQUIRE.
392 #
393 # This code is only required when automatic dependency tracking is enabled.
394 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
395 # order to bootstrap the dependency handling code.
396 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
397 [AC_CONFIG_COMMANDS([depfiles],
398 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
399 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
400
401 # Do all the work for Automake. -*- Autoconf -*-
402
403 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
404 #
405 # This file is free software; the Free Software Foundation
406 # gives unlimited permission to copy and/or distribute it,
407 # with or without modifications, as long as this notice is preserved.
408
409 # This macro actually does too much. Some checks are only needed if
410 # your package does certain things. But this isn't really a big deal.
411
412 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
413 m4_define([AC_PROG_CC],
414 m4_defn([AC_PROG_CC])
415 [_AM_PROG_CC_C_O
416 ])
417
418 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
419 # AM_INIT_AUTOMAKE([OPTIONS])
420 # -----------------------------------------------
421 # The call with PACKAGE and VERSION arguments is the old style
422 # call (pre autoconf-2.50), which is being phased out. PACKAGE
423 # and VERSION should now be passed to AC_INIT and removed from
424 # the call to AM_INIT_AUTOMAKE.
425 # We support both call styles for the transition. After
426 # the next Automake release, Autoconf can make the AC_INIT
427 # arguments mandatory, and then we can depend on a new Autoconf
428 # release and drop the old call support.
429 AC_DEFUN([AM_INIT_AUTOMAKE],
430 [AC_PREREQ([2.65])dnl
431 m4_ifdef([_$0_ALREADY_INIT],
432 [m4_fatal([$0 expanded multiple times
433 ]m4_defn([_$0_ALREADY_INIT]))],
434 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
435 dnl Autoconf wants to disallow AM_ names. We explicitly allow
436 dnl the ones we care about.
437 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
438 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
439 AC_REQUIRE([AC_PROG_INSTALL])dnl
440 if test "`cd $srcdir && pwd`" != "`pwd`"; then
441 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
442 # is not polluted with repeated "-I."
443 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
444 # test to see if srcdir already configured
445 if test -f $srcdir/config.status; then
446 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
447 fi
448 fi
449
450 # test whether we have cygpath
451 if test -z "$CYGPATH_W"; then
452 if (cygpath --version) >/dev/null 2>/dev/null; then
453 CYGPATH_W='cygpath -w'
454 else
455 CYGPATH_W=echo
456 fi
457 fi
458 AC_SUBST([CYGPATH_W])
459
460 # Define the identity of the package.
461 dnl Distinguish between old-style and new-style calls.
462 m4_ifval([$2],
463 [AC_DIAGNOSE([obsolete],
464 [$0: two- and three-arguments forms are deprecated.])
465 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
466 AC_SUBST([PACKAGE], [$1])dnl
467 AC_SUBST([VERSION], [$2])],
468 [_AM_SET_OPTIONS([$1])dnl
469 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
470 m4_if(
471 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
472 [ok:ok],,
473 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
474 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
475 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
476
477 _AM_IF_OPTION([no-define],,
478 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
479 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
480
481 # Some tools Automake needs.
482 AC_REQUIRE([AM_SANITY_CHECK])dnl
483 AC_REQUIRE([AC_ARG_PROGRAM])dnl
484 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
485 AM_MISSING_PROG([AUTOCONF], [autoconf])
486 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
487 AM_MISSING_PROG([AUTOHEADER], [autoheader])
488 AM_MISSING_PROG([MAKEINFO], [makeinfo])
489 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
490 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
491 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
492 # For better backward compatibility. To be removed once Automake 1.9.x
493 # dies out for good. For more background, see:
494 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
495 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
496 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
497 # We need awk for the "check" target (and possibly the TAP driver). The
498 # system "awk" is bad on some platforms.
499 AC_REQUIRE([AC_PROG_AWK])dnl
500 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
501 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
502 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
503 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
504 [_AM_PROG_TAR([v7])])])
505 _AM_IF_OPTION([no-dependencies],,
506 [AC_PROVIDE_IFELSE([AC_PROG_CC],
507 [_AM_DEPENDENCIES([CC])],
508 [m4_define([AC_PROG_CC],
509 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
510 AC_PROVIDE_IFELSE([AC_PROG_CXX],
511 [_AM_DEPENDENCIES([CXX])],
512 [m4_define([AC_PROG_CXX],
513 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
514 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
515 [_AM_DEPENDENCIES([OBJC])],
516 [m4_define([AC_PROG_OBJC],
517 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
518 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
519 [_AM_DEPENDENCIES([OBJCXX])],
520 [m4_define([AC_PROG_OBJCXX],
521 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
522 ])
523 # Variables for tags utilities; see am/tags.am
524 if test -z "$CTAGS"; then
525 CTAGS=ctags
526 fi
527 AC_SUBST([CTAGS])
528 if test -z "$ETAGS"; then
529 ETAGS=etags
530 fi
531 AC_SUBST([ETAGS])
532 if test -z "$CSCOPE"; then
533 CSCOPE=cscope
534 fi
535 AC_SUBST([CSCOPE])
536
537 AC_REQUIRE([AM_SILENT_RULES])dnl
538 dnl The testsuite driver may need to know about EXEEXT, so add the
539 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
540 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
541 AC_CONFIG_COMMANDS_PRE(dnl
542 [m4_provide_if([_AM_COMPILER_EXEEXT],
543 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
544
545 # POSIX will say in a future version that running "rm -f" with no argument
546 # is OK; and we want to be able to make that assumption in our Makefile
547 # recipes. So use an aggressive probe to check that the usage we want is
548 # actually supported "in the wild" to an acceptable degree.
549 # See automake bug#10828.
550 # To make any issue more visible, cause the running configure to be aborted
551 # by default if the 'rm' program in use doesn't match our expectations; the
552 # user can still override this though.
553 if rm -f && rm -fr && rm -rf; then : OK; else
554 cat >&2 <<'END'
555 Oops!
556
557 Your 'rm' program seems unable to run without file operands specified
558 on the command line, even when the '-f' option is present. This is contrary
559 to the behaviour of most rm programs out there, and not conforming with
560 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
561
562 Please tell [email protected] about your system, including the value
563 of your $PATH and any error possibly output before this message. This
564 can help us improve future automake versions.
565
566 END
567 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
568 echo 'Configuration will proceed anyway, since you have set the' >&2
569 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
570 echo >&2
571 else
572 cat >&2 <<'END'
573 Aborting the configuration process, to ensure you take notice of the issue.
574
575 You can download and install GNU coreutils to get an 'rm' implementation
576 that behaves properly: <https://www.gnu.org/software/coreutils/>.
577
578 If you want to complete the configuration process using your problematic
579 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
580 to "yes", and re-run configure.
581
582 END
583 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
584 fi
585 fi
586 dnl The trailing newline in this macro's definition is deliberate, for
587 dnl backward compatibility and to allow trailing 'dnl'-style comments
588 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
589 ])
590
591 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
592 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
593 dnl mangled by Autoconf and run in a shell conditional statement.
594 m4_define([_AC_COMPILER_EXEEXT],
595 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
596
597 # When config.status generates a header, we must update the stamp-h file.
598 # This file resides in the same directory as the config header
599 # that is generated. The stamp files are numbered to have different names.
600
601 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
602 # loop where config.status creates the headers, so we can generate
603 # our stamp files there.
604 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
605 [# Compute $1's index in $config_headers.
606 _am_arg=$1
607 _am_stamp_count=1
608 for _am_header in $config_headers :; do
609 case $_am_header in
610 $_am_arg | $_am_arg:* )
611 break ;;
612 * )
613 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
614 esac
615 done
616 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
617
618 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
619 #
620 # This file is free software; the Free Software Foundation
621 # gives unlimited permission to copy and/or distribute it,
622 # with or without modifications, as long as this notice is preserved.
623
624 # AM_PROG_INSTALL_SH
625 # ------------------
626 # Define $install_sh.
627 AC_DEFUN([AM_PROG_INSTALL_SH],
628 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
629 if test x"${install_sh+set}" != xset; then
630 case $am_aux_dir in
631 *\ * | *\ *)
632 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
633 *)
634 install_sh="\${SHELL} $am_aux_dir/install-sh"
635 esac
636 fi
637 AC_SUBST([install_sh])])
638
639 # Copyright (C) 2003-2021 Free Software Foundation, Inc.
640 #
641 # This file is free software; the Free Software Foundation
642 # gives unlimited permission to copy and/or distribute it,
643 # with or without modifications, as long as this notice is preserved.
644
645 # Check whether the underlying file-system supports filenames
646 # with a leading dot. For instance MS-DOS doesn't.
647 AC_DEFUN([AM_SET_LEADING_DOT],
648 [rm -rf .tst 2>/dev/null
649 mkdir .tst 2>/dev/null
650 if test -d .tst; then
651 am__leading_dot=.
652 else
653 am__leading_dot=_
654 fi
655 rmdir .tst 2>/dev/null
656 AC_SUBST([am__leading_dot])])
657
658 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
659 # From Jim Meyering
660
661 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
662 #
663 # This file is free software; the Free Software Foundation
664 # gives unlimited permission to copy and/or distribute it,
665 # with or without modifications, as long as this notice is preserved.
666
667 # AM_MAINTAINER_MODE([DEFAULT-MODE])
668 # ----------------------------------
669 # Control maintainer-specific portions of Makefiles.
670 # Default is to disable them, unless 'enable' is passed literally.
671 # For symmetry, 'disable' may be passed as well. Anyway, the user
672 # can override the default with the --enable/--disable switch.
673 AC_DEFUN([AM_MAINTAINER_MODE],
674 [m4_case(m4_default([$1], [disable]),
675 [enable], [m4_define([am_maintainer_other], [disable])],
676 [disable], [m4_define([am_maintainer_other], [enable])],
677 [m4_define([am_maintainer_other], [enable])
678 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
679 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
680 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
681 AC_ARG_ENABLE([maintainer-mode],
682 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
683 am_maintainer_other[ make rules and dependencies not useful
684 (and sometimes confusing) to the casual installer])],
685 [USE_MAINTAINER_MODE=$enableval],
686 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
687 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
688 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
689 MAINT=$MAINTAINER_MODE_TRUE
690 AC_SUBST([MAINT])dnl
691 ]
692 )
693
694 # Check to see how 'make' treats includes. -*- Autoconf -*-
695
696 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
697 #
698 # This file is free software; the Free Software Foundation
699 # gives unlimited permission to copy and/or distribute it,
700 # with or without modifications, as long as this notice is preserved.
701
702 # AM_MAKE_INCLUDE()
703 # -----------------
704 # Check whether make has an 'include' directive that can support all
705 # the idioms we need for our automatic dependency tracking code.
706 AC_DEFUN([AM_MAKE_INCLUDE],
707 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
708 cat > confinc.mk << 'END'
709 am__doit:
710 @echo this is the am__doit target >confinc.out
711 .PHONY: am__doit
712 END
713 am__include="#"
714 am__quote=
715 # BSD make does it like this.
716 echo '.include "confinc.mk" # ignored' > confmf.BSD
717 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
718 echo 'include confinc.mk # ignored' > confmf.GNU
719 _am_result=no
720 for s in GNU BSD; do
721 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
722 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
723 ['0:this is the am__doit target'],
724 [AS_CASE([$s],
725 [BSD], [am__include='.include' am__quote='"'],
726 [am__include='include' am__quote=''])])
727 if test "$am__include" != "#"; then
728 _am_result="yes ($s style)"
729 break
730 fi
731 done
732 rm -f confinc.* confmf.*
733 AC_MSG_RESULT([${_am_result}])
734 AC_SUBST([am__include])])
735 AC_SUBST([am__quote])])
736
737 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
738
739 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
740 #
741 # This file is free software; the Free Software Foundation
742 # gives unlimited permission to copy and/or distribute it,
743 # with or without modifications, as long as this notice is preserved.
744
745 # AM_MISSING_PROG(NAME, PROGRAM)
746 # ------------------------------
747 AC_DEFUN([AM_MISSING_PROG],
748 [AC_REQUIRE([AM_MISSING_HAS_RUN])
749 $1=${$1-"${am_missing_run}$2"}
750 AC_SUBST($1)])
751
752 # AM_MISSING_HAS_RUN
753 # ------------------
754 # Define MISSING if not defined so far and test if it is modern enough.
755 # If it is, set am_missing_run to use it, otherwise, to nothing.
756 AC_DEFUN([AM_MISSING_HAS_RUN],
757 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
758 AC_REQUIRE_AUX_FILE([missing])dnl
759 if test x"${MISSING+set}" != xset; then
760 MISSING="\${SHELL} '$am_aux_dir/missing'"
761 fi
762 # Use eval to expand $SHELL
763 if eval "$MISSING --is-lightweight"; then
764 am_missing_run="$MISSING "
765 else
766 am_missing_run=
767 AC_MSG_WARN(['missing' script is too old or missing])
768 fi
769 ])
770
771 # -*- Autoconf -*-
772 # Obsolete and "removed" macros, that must however still report explicit
773 # error messages when used, to smooth transition.
774 #
775 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
776 #
777 # This file is free software; the Free Software Foundation
778 # gives unlimited permission to copy and/or distribute it,
779 # with or without modifications, as long as this notice is preserved.
780
781 AC_DEFUN([AM_CONFIG_HEADER],
782 [AC_DIAGNOSE([obsolete],
783 ['$0': this macro is obsolete.
784 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
785 AC_CONFIG_HEADERS($@)])
786
787 AC_DEFUN([AM_PROG_CC_STDC],
788 [AC_PROG_CC
789 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
790 AC_DIAGNOSE([obsolete],
791 ['$0': this macro is obsolete.
792 You should simply use the 'AC][_PROG_CC' macro instead.
793 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
794 but upon 'ac_cv_prog_cc_stdc'.])])
795
796 AC_DEFUN([AM_C_PROTOTYPES],
797 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
798 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
799
800 # Helper functions for option handling. -*- Autoconf -*-
801
802 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
803 #
804 # This file is free software; the Free Software Foundation
805 # gives unlimited permission to copy and/or distribute it,
806 # with or without modifications, as long as this notice is preserved.
807
808 # _AM_MANGLE_OPTION(NAME)
809 # -----------------------
810 AC_DEFUN([_AM_MANGLE_OPTION],
811 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
812
813 # _AM_SET_OPTION(NAME)
814 # --------------------
815 # Set option NAME. Presently that only means defining a flag for this option.
816 AC_DEFUN([_AM_SET_OPTION],
817 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
818
819 # _AM_SET_OPTIONS(OPTIONS)
820 # ------------------------
821 # OPTIONS is a space-separated list of Automake options.
822 AC_DEFUN([_AM_SET_OPTIONS],
823 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
824
825 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
826 # -------------------------------------------
827 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
828 AC_DEFUN([_AM_IF_OPTION],
829 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
830
831 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
832 #
833 # This file is free software; the Free Software Foundation
834 # gives unlimited permission to copy and/or distribute it,
835 # with or without modifications, as long as this notice is preserved.
836
837 # _AM_PROG_CC_C_O
838 # ---------------
839 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
840 # to automatically call this.
841 AC_DEFUN([_AM_PROG_CC_C_O],
842 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
843 AC_REQUIRE_AUX_FILE([compile])dnl
844 AC_LANG_PUSH([C])dnl
845 AC_CACHE_CHECK(
846 [whether $CC understands -c and -o together],
847 [am_cv_prog_cc_c_o],
848 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
849 # Make sure it works both with $CC and with simple cc.
850 # Following AC_PROG_CC_C_O, we do the test twice because some
851 # compilers refuse to overwrite an existing .o file with -o,
852 # though they will create one.
853 am_cv_prog_cc_c_o=yes
854 for am_i in 1 2; do
855 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
856 && test -f conftest2.$ac_objext; then
857 : OK
858 else
859 am_cv_prog_cc_c_o=no
860 break
861 fi
862 done
863 rm -f core conftest*
864 unset am_i])
865 if test "$am_cv_prog_cc_c_o" != yes; then
866 # Losing compiler, so override with the script.
867 # FIXME: It is wrong to rewrite CC.
868 # But if we don't then we get into trouble of one sort or another.
869 # A longer-term fix would be to have automake use am__CC in this case,
870 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
871 CC="$am_aux_dir/compile $CC"
872 fi
873 AC_LANG_POP([C])])
874
875 # For backward compatibility.
876 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
877
878 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
879 #
880 # This file is free software; the Free Software Foundation
881 # gives unlimited permission to copy and/or distribute it,
882 # with or without modifications, as long as this notice is preserved.
883
884
885 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
886 # ---------------------------------------------------------------------------
887 # Adds support for distributing Python modules and packages. To
888 # install modules, copy them to $(pythondir), using the python_PYTHON
889 # automake variable. To install a package with the same name as the
890 # automake package, install to $(pkgpythondir), or use the
891 # pkgpython_PYTHON automake variable.
892 #
893 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
894 # locations to install python extension modules (shared libraries).
895 # Another macro is required to find the appropriate flags to compile
896 # extension modules.
897 #
898 # If your package is configured with a different prefix to python,
899 # users will have to add the install directory to the PYTHONPATH
900 # environment variable, or create a .pth file (see the python
901 # documentation for details).
902 #
903 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
904 # cause an error if the version of python installed on the system
905 # doesn't meet the requirement. MINIMUM-VERSION should consist of
906 # numbers and dots only.
907 AC_DEFUN([AM_PATH_PYTHON],
908 [
909 dnl Find a Python interpreter. Python versions prior to 2.0 are not
910 dnl supported. (2.0 was released on October 16, 2000).
911 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
912 [python python2 python3 dnl
913 python3.11 python3.10 dnl
914 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
915 python3.2 python3.1 python3.0 dnl
916 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
917 python2.0])
918
919 AC_ARG_VAR([PYTHON], [the Python interpreter])
920
921 m4_if([$1],[],[
922 dnl No version check is needed.
923 # Find any Python interpreter.
924 if test -z "$PYTHON"; then
925 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
926 fi
927 am_display_PYTHON=python
928 ], [
929 dnl A version check is needed.
930 if test -n "$PYTHON"; then
931 # If the user set $PYTHON, use it and don't search something else.
932 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
933 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
934 [AC_MSG_RESULT([yes])],
935 [AC_MSG_RESULT([no])
936 AC_MSG_ERROR([Python interpreter is too old])])
937 am_display_PYTHON=$PYTHON
938 else
939 # Otherwise, try each interpreter until we find one that satisfies
940 # VERSION.
941 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
942 [am_cv_pathless_PYTHON],[
943 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
944 test "$am_cv_pathless_PYTHON" = none && break
945 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
946 done])
947 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
948 if test "$am_cv_pathless_PYTHON" = none; then
949 PYTHON=:
950 else
951 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
952 fi
953 am_display_PYTHON=$am_cv_pathless_PYTHON
954 fi
955 ])
956
957 if test "$PYTHON" = :; then
958 dnl Run any user-specified action, or abort.
959 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
960 else
961
962 dnl Query Python for its version number. Although site.py simply uses
963 dnl sys.version[:3], printing that failed with Python 3.10, since the
964 dnl trailing zero was eliminated. So now we output just the major
965 dnl and minor version numbers, as numbers. Apparently the tertiary
966 dnl version is not of interest.
967 dnl
968 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
969 [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
970 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
971
972 dnl At times, e.g., when building shared libraries, you may want
973 dnl to know which OS platform Python thinks this is.
974 dnl
975 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
976 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
977 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
978
979 dnl emacs-page
980 dnl If --with-python-sys-prefix is given, use the values of sys.prefix
981 dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX
982 dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and
983 dnl ${exec_prefix} variables.
984 dnl
985 dnl The two are made distinct variables so they can be overridden if
986 dnl need be, although general consensus is that you shouldn't need
987 dnl this separation.
988 dnl
989 dnl Also allow directly setting the prefixes via configure options,
990 dnl overriding any default.
991 dnl
992 if test "x$prefix" = xNONE; then
993 am__usable_prefix=$ac_default_prefix
994 else
995 am__usable_prefix=$prefix
996 fi
997
998 # Allow user to request using sys.* values from Python,
999 # instead of the GNU $prefix values.
1000 AC_ARG_WITH([python-sys-prefix],
1001 [AS_HELP_STRING([--with-python-sys-prefix],
1002 [use Python's sys.prefix and sys.exec_prefix values])],
1003 [am_use_python_sys=:],
1004 [am_use_python_sys=false])
1005
1006 # Allow user to override whatever the default Python prefix is.
1007 AC_ARG_WITH([python_prefix],
1008 [AS_HELP_STRING([--with-python_prefix],
1009 [override the default PYTHON_PREFIX])],
1010 [am_python_prefix_subst=$withval
1011 am_cv_python_prefix=$withval
1012 AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix])
1013 AC_MSG_RESULT([$am_cv_python_prefix])],
1014 [
1015 if $am_use_python_sys; then
1016 # using python sys.prefix value, not GNU
1017 AC_CACHE_CHECK([for python default $am_display_PYTHON prefix],
1018 [am_cv_python_prefix],
1019 [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`])
1020
1021 dnl If sys.prefix is a subdir of $prefix, replace the literal value of
1022 dnl $prefix with a variable reference so it can be overridden.
1023 case $am_cv_python_prefix in
1024 $am__usable_prefix*)
1025 am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
1026 am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
1027 ;;
1028 *)
1029 am_python_prefix_subst=$am_cv_python_prefix
1030 ;;
1031 esac
1032 else # using GNU prefix value, not python sys.prefix
1033 am_python_prefix_subst='${prefix}'
1034 am_python_prefix=$am_python_prefix_subst
1035 AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix])
1036 AC_MSG_RESULT([$am_python_prefix])
1037 fi])
1038 # Substituting python_prefix_subst value.
1039 AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst])
1040
1041 # emacs-page Now do it all over again for Python exec_prefix, but with yet
1042 # another conditional: fall back to regular prefix if that was specified.
1043 AC_ARG_WITH([python_exec_prefix],
1044 [AS_HELP_STRING([--with-python_exec_prefix],
1045 [override the default PYTHON_EXEC_PREFIX])],
1046 [am_python_exec_prefix_subst=$withval
1047 am_cv_python_exec_prefix=$withval
1048 AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix])
1049 AC_MSG_RESULT([$am_cv_python_exec_prefix])],
1050 [
1051 # no explicit --with-python_exec_prefix, but if
1052 # --with-python_prefix was given, use its value for python_exec_prefix too.
1053 AS_IF([test -n "$with_python_prefix"],
1054 [am_python_exec_prefix_subst=$with_python_prefix
1055 am_cv_python_exec_prefix=$with_python_prefix
1056 AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix])
1057 AC_MSG_RESULT([$am_cv_python_exec_prefix])],
1058 [
1059 # Set am__usable_exec_prefix whether using GNU or Python values,
1060 # since we use that variable for pyexecdir.
1061 if test "x$exec_prefix" = xNONE; then
1062 am__usable_exec_prefix=$am__usable_prefix
1063 else
1064 am__usable_exec_prefix=$exec_prefix
1065 fi
1066 #
1067 if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
1068 AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix],
1069 [am_cv_python_exec_prefix],
1070 [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`])
1071 dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the
1072 dnl literal value of $exec_prefix with a variable reference so it can
1073 dnl be overridden.
1074 case $am_cv_python_exec_prefix in
1075 $am__usable_exec_prefix*)
1076 am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
1077 am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
1078 ;;
1079 *)
1080 am_python_exec_prefix_subst=$am_cv_python_exec_prefix
1081 ;;
1082 esac
1083 else # using GNU $exec_prefix, not python sys.exec_prefix
1084 am_python_exec_prefix_subst='${exec_prefix}'
1085 am_python_exec_prefix=$am_python_exec_prefix_subst
1086 AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix])
1087 AC_MSG_RESULT([$am_python_exec_prefix])
1088 fi])])
1089 # Substituting python_exec_prefix_subst.
1090 AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
1091
1092 # Factor out some code duplication into this shell variable.
1093 am_python_setup_sysconfig="\
1094 import sys
1095 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1096 # with python 3.x. See automake bug#10227.
1097 try:
1098 import sysconfig
1099 except ImportError:
1100 can_use_sysconfig = 0
1101 else:
1102 can_use_sysconfig = 1
1103 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1104 # <https://github.com/pypa/virtualenv/issues/118>
1105 try:
1106 from platform import python_implementation
1107 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1108 can_use_sysconfig = 0
1109 except ImportError:
1110 pass"
1111
1112 dnl emacs-page Set up 4 directories:
1113
1114 dnl 1. pythondir: where to install python scripts. This is the
1115 dnl site-packages directory, not the python standard library
1116 dnl directory like in previous automake betas. This behavior
1117 dnl is more consistent with lispdir.m4 for example.
1118 dnl Query distutils for this directory.
1119 dnl
1120 AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
1121 [am_cv_python_pythondir],
1122 [if test "x$am_cv_python_prefix" = x; then
1123 am_py_prefix=$am__usable_prefix
1124 else
1125 am_py_prefix=$am_cv_python_prefix
1126 fi
1127 am_cv_python_pythondir=`$PYTHON -c "
1128 $am_python_setup_sysconfig
1129 if can_use_sysconfig:
1130 if hasattr(sysconfig, 'get_default_scheme'):
1131 scheme = sysconfig.get_default_scheme()
1132 else:
1133 scheme = sysconfig._get_default_scheme()
1134 if scheme == 'posix_local':
1135 # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
1136 scheme = 'posix_prefix'
1137 sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
1138 else:
1139 from distutils import sysconfig
1140 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1141 sys.stdout.write(sitedir)"`
1142 #
1143 case $am_cv_python_pythondir in
1144 $am_py_prefix*)
1145 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1146 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
1147 ;;
1148 *)
1149 case $am_py_prefix in
1150 /usr|/System*) ;;
1151 *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
1152 ;;
1153 esac
1154 ;;
1155 esac
1156 ])
1157 AC_SUBST([pythondir], [$am_cv_python_pythondir])
1158
1159 dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was
1160 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1161 dnl more consistent with the rest of automake.
1162 dnl
1163 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1164
1165 dnl 3. pyexecdir: directory for installing python extension modules
1166 dnl (shared libraries).
1167 dnl Query distutils for this directory.
1168 dnl
1169 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
1170 [am_cv_python_pyexecdir],
1171 [if test "x$am_cv_python_exec_prefix" = x; then
1172 am_py_exec_prefix=$am__usable_exec_prefix
1173 else
1174 am_py_exec_prefix=$am_cv_python_exec_prefix
1175 fi
1176 am_cv_python_pyexecdir=`$PYTHON -c "
1177 $am_python_setup_sysconfig
1178 if can_use_sysconfig:
1179 if hasattr(sysconfig, 'get_default_scheme'):
1180 scheme = sysconfig.get_default_scheme()
1181 else:
1182 scheme = sysconfig._get_default_scheme()
1183 if scheme == 'posix_local':
1184 # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
1185 scheme = 'posix_prefix'
1186 sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
1187 else:
1188 from distutils import sysconfig
1189 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
1190 sys.stdout.write(sitedir)"`
1191 #
1192 case $am_cv_python_pyexecdir in
1193 $am_py_exec_prefix*)
1194 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1195 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
1196 ;;
1197 *)
1198 case $am_py_exec_prefix in
1199 /usr|/System*) ;;
1200 *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
1201 ;;
1202 esac
1203 ;;
1204 esac
1205 ])
1206 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1207
1208 dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE)
1209 dnl
1210 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1211
1212 dnl Run any user-specified action.
1213 $2
1214 fi
1215 ])
1216
1217
1218 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1219 # ---------------------------------------------------------------------------
1220 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1221 # Run ACTION-IF-FALSE otherwise.
1222 # This test uses sys.hexversion instead of the string equivalent (first
1223 # word of sys.version), in order to cope with versions such as 2.2c1.
1224 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1225 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1226 [prog="import sys
1227 # split strings by '.' and convert to numeric. Append some zeros
1228 # because we need at least 4 digits for the hex conversion.
1229 # map returns an iterator in Python 3.0 and a list in 2.x
1230 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1231 minverhex = 0
1232 # xrange is not present in Python 3.0 and range returns an iterator
1233 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1234 sys.exit(sys.hexversion < minverhex)"
1235 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1236
1237 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
1238 #
1239 # This file is free software; the Free Software Foundation
1240 # gives unlimited permission to copy and/or distribute it,
1241 # with or without modifications, as long as this notice is preserved.
1242
1243 # AM_RUN_LOG(COMMAND)
1244 # -------------------
1245 # Run COMMAND, save the exit status in ac_status, and log it.
1246 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1247 AC_DEFUN([AM_RUN_LOG],
1248 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1249 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1250 ac_status=$?
1251 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1252 (exit $ac_status); }])
1253
1254 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1255
1256 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
1257 #
1258 # This file is free software; the Free Software Foundation
1259 # gives unlimited permission to copy and/or distribute it,
1260 # with or without modifications, as long as this notice is preserved.
1261
1262 # AM_SANITY_CHECK
1263 # ---------------
1264 AC_DEFUN([AM_SANITY_CHECK],
1265 [AC_MSG_CHECKING([whether build environment is sane])
1266 # Reject unsafe characters in $srcdir or the absolute working directory
1267 # name. Accept space and tab only in the latter.
1268 am_lf='
1269 '
1270 case `pwd` in
1271 *[[\\\"\#\$\&\'\`$am_lf]]*)
1272 AC_MSG_ERROR([unsafe absolute working directory name]);;
1273 esac
1274 case $srcdir in
1275 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1276 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1277 esac
1278
1279 # Do 'set' in a subshell so we don't clobber the current shell's
1280 # arguments. Must try -L first in case configure is actually a
1281 # symlink; some systems play weird games with the mod time of symlinks
1282 # (eg FreeBSD returns the mod time of the symlink's containing
1283 # directory).
1284 if (
1285 am_has_slept=no
1286 for am_try in 1 2; do
1287 echo "timestamp, slept: $am_has_slept" > conftest.file
1288 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1289 if test "$[*]" = "X"; then
1290 # -L didn't work.
1291 set X `ls -t "$srcdir/configure" conftest.file`
1292 fi
1293 if test "$[*]" != "X $srcdir/configure conftest.file" \
1294 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1295
1296 # If neither matched, then we have a broken ls. This can happen
1297 # if, for instance, CONFIG_SHELL is bash and it inherits a
1298 # broken ls alias from the environment. This has actually
1299 # happened. Such a system could not be considered "sane".
1300 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1301 alias in your environment])
1302 fi
1303 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1304 break
1305 fi
1306 # Just in case.
1307 sleep 1
1308 am_has_slept=yes
1309 done
1310 test "$[2]" = conftest.file
1311 )
1312 then
1313 # Ok.
1314 :
1315 else
1316 AC_MSG_ERROR([newly created file is older than distributed files!
1317 Check your system clock])
1318 fi
1319 AC_MSG_RESULT([yes])
1320 # If we didn't sleep, we still need to ensure time stamps of config.status and
1321 # generated files are strictly newer.
1322 am_sleep_pid=
1323 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1324 ( sleep 1 ) &
1325 am_sleep_pid=$!
1326 fi
1327 AC_CONFIG_COMMANDS_PRE(
1328 [AC_MSG_CHECKING([that generated files are newer than configure])
1329 if test -n "$am_sleep_pid"; then
1330 # Hide warnings about reused PIDs.
1331 wait $am_sleep_pid 2>/dev/null
1332 fi
1333 AC_MSG_RESULT([done])])
1334 rm -f conftest.file
1335 ])
1336
1337 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
1338 #
1339 # This file is free software; the Free Software Foundation
1340 # gives unlimited permission to copy and/or distribute it,
1341 # with or without modifications, as long as this notice is preserved.
1342
1343 # AM_SILENT_RULES([DEFAULT])
1344 # --------------------------
1345 # Enable less verbose build rules; with the default set to DEFAULT
1346 # ("yes" being less verbose, "no" or empty being verbose).
1347 AC_DEFUN([AM_SILENT_RULES],
1348 [AC_ARG_ENABLE([silent-rules], [dnl
1349 AS_HELP_STRING(
1350 [--enable-silent-rules],
1351 [less verbose build output (undo: "make V=1")])
1352 AS_HELP_STRING(
1353 [--disable-silent-rules],
1354 [verbose build output (undo: "make V=0")])dnl
1355 ])
1356 case $enable_silent_rules in @%:@ (((
1357 yes) AM_DEFAULT_VERBOSITY=0;;
1358 no) AM_DEFAULT_VERBOSITY=1;;
1359 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1360 esac
1361 dnl
1362 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1363 dnl do not support nested variable expansions.
1364 dnl See automake bug#9928 and bug#10237.
1365 am_make=${MAKE-make}
1366 AC_CACHE_CHECK([whether $am_make supports nested variables],
1367 [am_cv_make_support_nested_variables],
1368 [if AS_ECHO([['TRUE=$(BAR$(V))
1369 BAR0=false
1370 BAR1=true
1371 V=1
1372 am__doit:
1373 @$(TRUE)
1374 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1375 am_cv_make_support_nested_variables=yes
1376 else
1377 am_cv_make_support_nested_variables=no
1378 fi])
1379 if test $am_cv_make_support_nested_variables = yes; then
1380 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1381 AM_V='$(V)'
1382 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1383 else
1384 AM_V=$AM_DEFAULT_VERBOSITY
1385 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1386 fi
1387 AC_SUBST([AM_V])dnl
1388 AM_SUBST_NOTMAKE([AM_V])dnl
1389 AC_SUBST([AM_DEFAULT_V])dnl
1390 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1391 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1392 AM_BACKSLASH='\'
1393 AC_SUBST([AM_BACKSLASH])dnl
1394 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1395 ])
1396
1397 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
1398 #
1399 # This file is free software; the Free Software Foundation
1400 # gives unlimited permission to copy and/or distribute it,
1401 # with or without modifications, as long as this notice is preserved.
1402
1403 # AM_PROG_INSTALL_STRIP
1404 # ---------------------
1405 # One issue with vendor 'install' (even GNU) is that you can't
1406 # specify the program used to strip binaries. This is especially
1407 # annoying in cross-compiling environments, where the build's strip
1408 # is unlikely to handle the host's binaries.
1409 # Fortunately install-sh will honor a STRIPPROG variable, so we
1410 # always use install-sh in "make install-strip", and initialize
1411 # STRIPPROG with the value of the STRIP variable (set by the user).
1412 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1413 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1414 # Installed binaries are usually stripped using 'strip' when the user
1415 # run "make install-strip". However 'strip' might not be the right
1416 # tool to use in cross-compilation environments, therefore Automake
1417 # will honor the 'STRIP' environment variable to overrule this program.
1418 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1419 if test "$cross_compiling" != no; then
1420 AC_CHECK_TOOL([STRIP], [strip], :)
1421 fi
1422 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1423 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1424
1425 # Copyright (C) 2006-2021 Free Software Foundation, Inc.
1426 #
1427 # This file is free software; the Free Software Foundation
1428 # gives unlimited permission to copy and/or distribute it,
1429 # with or without modifications, as long as this notice is preserved.
1430
1431 # _AM_SUBST_NOTMAKE(VARIABLE)
1432 # ---------------------------
1433 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1434 # This macro is traced by Automake.
1435 AC_DEFUN([_AM_SUBST_NOTMAKE])
1436
1437 # AM_SUBST_NOTMAKE(VARIABLE)
1438 # --------------------------
1439 # Public sister of _AM_SUBST_NOTMAKE.
1440 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1441
1442 # Check how to create a tarball. -*- Autoconf -*-
1443
1444 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
1445 #
1446 # This file is free software; the Free Software Foundation
1447 # gives unlimited permission to copy and/or distribute it,
1448 # with or without modifications, as long as this notice is preserved.
1449
1450 # _AM_PROG_TAR(FORMAT)
1451 # --------------------
1452 # Check how to create a tarball in format FORMAT.
1453 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1454 #
1455 # Substitute a variable $(am__tar) that is a command
1456 # writing to stdout a FORMAT-tarball containing the directory
1457 # $tardir.
1458 # tardir=directory && $(am__tar) > result.tar
1459 #
1460 # Substitute a variable $(am__untar) that extract such
1461 # a tarball read from stdin.
1462 # $(am__untar) < result.tar
1463 #
1464 AC_DEFUN([_AM_PROG_TAR],
1465 [# Always define AMTAR for backward compatibility. Yes, it's still used
1466 # in the wild :-( We should find a proper way to deprecate it ...
1467 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1468
1469 # We'll loop over all known methods to create a tar archive until one works.
1470 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1471
1472 m4_if([$1], [v7],
1473 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1474
1475 [m4_case([$1],
1476 [ustar],
1477 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1478 # There is notably a 21 bits limit for the UID and the GID. In fact,
1479 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1480 # and bug#13588).
1481 am_max_uid=2097151 # 2^21 - 1
1482 am_max_gid=$am_max_uid
1483 # The $UID and $GID variables are not portable, so we need to resort
1484 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1485 # below are definitely unexpected, so allow the users to see them
1486 # (that is, avoid stderr redirection).
1487 am_uid=`id -u || echo unknown`
1488 am_gid=`id -g || echo unknown`
1489 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1490 if test $am_uid -le $am_max_uid; then
1491 AC_MSG_RESULT([yes])
1492 else
1493 AC_MSG_RESULT([no])
1494 _am_tools=none
1495 fi
1496 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1497 if test $am_gid -le $am_max_gid; then
1498 AC_MSG_RESULT([yes])
1499 else
1500 AC_MSG_RESULT([no])
1501 _am_tools=none
1502 fi],
1503
1504 [pax],
1505 [],
1506
1507 [m4_fatal([Unknown tar format])])
1508
1509 AC_MSG_CHECKING([how to create a $1 tar archive])
1510
1511 # Go ahead even if we have the value already cached. We do so because we
1512 # need to set the values for the 'am__tar' and 'am__untar' variables.
1513 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1514
1515 for _am_tool in $_am_tools; do
1516 case $_am_tool in
1517 gnutar)
1518 for _am_tar in tar gnutar gtar; do
1519 AM_RUN_LOG([$_am_tar --version]) && break
1520 done
1521 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1522 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1523 am__untar="$_am_tar -xf -"
1524 ;;
1525 plaintar)
1526 # Must skip GNU tar: if it does not support --format= it doesn't create
1527 # ustar tarball either.
1528 (tar --version) >/dev/null 2>&1 && continue
1529 am__tar='tar chf - "$$tardir"'
1530 am__tar_='tar chf - "$tardir"'
1531 am__untar='tar xf -'
1532 ;;
1533 pax)
1534 am__tar='pax -L -x $1 -w "$$tardir"'
1535 am__tar_='pax -L -x $1 -w "$tardir"'
1536 am__untar='pax -r'
1537 ;;
1538 cpio)
1539 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1540 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1541 am__untar='cpio -i -H $1 -d'
1542 ;;
1543 none)
1544 am__tar=false
1545 am__tar_=false
1546 am__untar=false
1547 ;;
1548 esac
1549
1550 # If the value was cached, stop now. We just wanted to have am__tar
1551 # and am__untar set.
1552 test -n "${am_cv_prog_tar_$1}" && break
1553
1554 # tar/untar a dummy directory, and stop if the command works.
1555 rm -rf conftest.dir
1556 mkdir conftest.dir
1557 echo GrepMe > conftest.dir/file
1558 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1559 rm -rf conftest.dir
1560 if test -s conftest.tar; then
1561 AM_RUN_LOG([$am__untar <conftest.tar])
1562 AM_RUN_LOG([cat conftest.dir/file])
1563 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1564 fi
1565 done
1566 rm -rf conftest.dir
1567
1568 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1569 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1570
1571 AC_SUBST([am__tar])
1572 AC_SUBST([am__untar])
1573 ]) # _AM_PROG_TAR
1574
1575 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1576 #
1577 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
1578 # Written by Gordon Matzigkeit, 1996
1579 #
1580 # This file is free software; the Free Software Foundation gives
1581 # unlimited permission to copy and/or distribute it, with or without
1582 # modifications, as long as this notice is preserved.
1583
1584 m4_define([_LT_COPYING], [dnl
1585 # Copyright (C) 2014 Free Software Foundation, Inc.
1586 # This is free software; see the source for copying conditions. There is NO
1587 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1588
1589 # GNU Libtool is free software; you can redistribute it and/or modify
1590 # it under the terms of the GNU General Public License as published by
1591 # the Free Software Foundation; either version 2 of of the License, or
1592 # (at your option) any later version.
1593 #
1594 # As a special exception to the GNU General Public License, if you
1595 # distribute this file as part of a program or library that is built
1596 # using GNU Libtool, you may include this file under the same
1597 # distribution terms that you use for the rest of that program.
1598 #
1599 # GNU Libtool is distributed in the hope that it will be useful, but
1600 # WITHOUT ANY WARRANTY; without even the implied warranty of
1601 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1602 # GNU General Public License for more details.
1603 #
1604 # You should have received a copy of the GNU General Public License
1605 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1606 ])
1607
1608 # serial 58 LT_INIT
1609
1610
1611 # LT_PREREQ(VERSION)
1612 # ------------------
1613 # Complain and exit if this libtool version is less that VERSION.
1614 m4_defun([LT_PREREQ],
1615 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1616 [m4_default([$3],
1617 [m4_fatal([Libtool version $1 or higher is required],
1618 63)])],
1619 [$2])])
1620
1621
1622 # _LT_CHECK_BUILDDIR
1623 # ------------------
1624 # Complain if the absolute build directory name contains unusual characters
1625 m4_defun([_LT_CHECK_BUILDDIR],
1626 [case `pwd` in
1627 *\ * | *\ *)
1628 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1629 esac
1630 ])
1631
1632
1633 # LT_INIT([OPTIONS])
1634 # ------------------
1635 AC_DEFUN([LT_INIT],
1636 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
1637 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1638 AC_BEFORE([$0], [LT_LANG])dnl
1639 AC_BEFORE([$0], [LT_OUTPUT])dnl
1640 AC_BEFORE([$0], [LTDL_INIT])dnl
1641 m4_require([_LT_CHECK_BUILDDIR])dnl
1642
1643 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1644 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1645 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1646 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1647 dnl unless we require an AC_DEFUNed macro:
1648 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1649 AC_REQUIRE([LTSUGAR_VERSION])dnl
1650 AC_REQUIRE([LTVERSION_VERSION])dnl
1651 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1652 m4_require([_LT_PROG_LTMAIN])dnl
1653
1654 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1655
1656 dnl Parse OPTIONS
1657 _LT_SET_OPTIONS([$0], [$1])
1658
1659 # This can be used to rebuild libtool when needed
1660 LIBTOOL_DEPS=$ltmain
1661
1662 # Always use our own libtool.
1663 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1664 AC_SUBST(LIBTOOL)dnl
1665
1666 _LT_SETUP
1667
1668 # Only expand once:
1669 m4_define([LT_INIT])
1670 ])# LT_INIT
1671
1672 # Old names:
1673 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1674 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1675 dnl aclocal-1.4 backwards compatibility:
1676 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1677 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1678
1679
1680 # _LT_PREPARE_CC_BASENAME
1681 # -----------------------
1682 m4_defun([_LT_PREPARE_CC_BASENAME], [
1683 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1684 func_cc_basename ()
1685 {
1686 for cc_temp in @S|@*""; do
1687 case $cc_temp in
1688 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1689 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1690 \-*) ;;
1691 *) break;;
1692 esac
1693 done
1694 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1695 }
1696 ])# _LT_PREPARE_CC_BASENAME
1697
1698
1699 # _LT_CC_BASENAME(CC)
1700 # -------------------
1701 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1702 # but that macro is also expanded into generated libtool script, which
1703 # arranges for $SED and $ECHO to be set by different means.
1704 m4_defun([_LT_CC_BASENAME],
1705 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
1706 AC_REQUIRE([_LT_DECL_SED])dnl
1707 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1708 func_cc_basename $1
1709 cc_basename=$func_cc_basename_result
1710 ])
1711
1712
1713 # _LT_FILEUTILS_DEFAULTS
1714 # ----------------------
1715 # It is okay to use these file commands and assume they have been set
1716 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1717 m4_defun([_LT_FILEUTILS_DEFAULTS],
1718 [: ${CP="cp -f"}
1719 : ${MV="mv -f"}
1720 : ${RM="rm -f"}
1721 ])# _LT_FILEUTILS_DEFAULTS
1722
1723
1724 # _LT_SETUP
1725 # ---------
1726 m4_defun([_LT_SETUP],
1727 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1728 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1729 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1730 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1731
1732 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1733 dnl
1734 _LT_DECL([], [host_alias], [0], [The host system])dnl
1735 _LT_DECL([], [host], [0])dnl
1736 _LT_DECL([], [host_os], [0])dnl
1737 dnl
1738 _LT_DECL([], [build_alias], [0], [The build system])dnl
1739 _LT_DECL([], [build], [0])dnl
1740 _LT_DECL([], [build_os], [0])dnl
1741 dnl
1742 AC_REQUIRE([AC_PROG_CC])dnl
1743 AC_REQUIRE([LT_PATH_LD])dnl
1744 AC_REQUIRE([LT_PATH_NM])dnl
1745 dnl
1746 AC_REQUIRE([AC_PROG_LN_S])dnl
1747 test -z "$LN_S" && LN_S="ln -s"
1748 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1749 dnl
1750 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1751 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1752 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1753 dnl
1754 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1755 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1756 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1757 m4_require([_LT_CMD_RELOAD])dnl
1758 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1759 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1760 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1761 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1762 m4_require([_LT_WITH_SYSROOT])dnl
1763 m4_require([_LT_CMD_TRUNCATE])dnl
1764
1765 _LT_CONFIG_LIBTOOL_INIT([
1766 # See if we are running on zsh, and set the options that allow our
1767 # commands through without removal of \ escapes INIT.
1768 if test -n "\${ZSH_VERSION+set}"; then
1769 setopt NO_GLOB_SUBST
1770 fi
1771 ])
1772 if test -n "${ZSH_VERSION+set}"; then
1773 setopt NO_GLOB_SUBST
1774 fi
1775
1776 _LT_CHECK_OBJDIR
1777
1778 m4_require([_LT_TAG_COMPILER])dnl
1779
1780 case $host_os in
1781 aix3*)
1782 # AIX sometimes has problems with the GCC collect2 program. For some
1783 # reason, if we set the COLLECT_NAMES environment variable, the problems
1784 # vanish in a puff of smoke.
1785 if test set != "${COLLECT_NAMES+set}"; then
1786 COLLECT_NAMES=
1787 export COLLECT_NAMES
1788 fi
1789 ;;
1790 esac
1791
1792 # Global variables:
1793 ofile=libtool
1794 can_build_shared=yes
1795
1796 # All known linkers require a '.a' archive for static linking (except MSVC,
1797 # which needs '.lib').
1798 libext=a
1799
1800 with_gnu_ld=$lt_cv_prog_gnu_ld
1801
1802 old_CC=$CC
1803 old_CFLAGS=$CFLAGS
1804
1805 # Set sane defaults for various variables
1806 test -z "$CC" && CC=cc
1807 test -z "$LTCC" && LTCC=$CC
1808 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1809 test -z "$LD" && LD=ld
1810 test -z "$ac_objext" && ac_objext=o
1811
1812 _LT_CC_BASENAME([$compiler])
1813
1814 # Only perform the check for file, if the check method requires it
1815 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1816 case $deplibs_check_method in
1817 file_magic*)
1818 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1819 _LT_PATH_MAGIC
1820 fi
1821 ;;
1822 esac
1823
1824 # Use C for the default configuration in the libtool script
1825 LT_SUPPORTED_TAG([CC])
1826 _LT_LANG_C_CONFIG
1827 _LT_LANG_DEFAULT_CONFIG
1828 _LT_CONFIG_COMMANDS
1829 ])# _LT_SETUP
1830
1831
1832 # _LT_PREPARE_SED_QUOTE_VARS
1833 # --------------------------
1834 # Define a few sed substitution that help us do robust quoting.
1835 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1836 [# Backslashify metacharacters that are still active within
1837 # double-quoted strings.
1838 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1839
1840 # Same as above, but do not quote variable references.
1841 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1842
1843 # Sed substitution to delay expansion of an escaped shell variable in a
1844 # double_quote_subst'ed string.
1845 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1846
1847 # Sed substitution to delay expansion of an escaped single quote.
1848 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1849
1850 # Sed substitution to avoid accidental globbing in evaled expressions
1851 no_glob_subst='s/\*/\\\*/g'
1852 ])
1853
1854 # _LT_PROG_LTMAIN
1855 # ---------------
1856 # Note that this code is called both from 'configure', and 'config.status'
1857 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1858 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
1859 # so we pass a copy along to make sure it has a sensible value anyway.
1860 m4_defun([_LT_PROG_LTMAIN],
1861 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1862 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1863 ltmain=$ac_aux_dir/ltmain.sh
1864 ])# _LT_PROG_LTMAIN
1865
1866
1867
1868 # So that we can recreate a full libtool script including additional
1869 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1870 # in macros and then make a single call at the end using the 'libtool'
1871 # label.
1872
1873
1874 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1875 # ----------------------------------------
1876 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1877 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1878 [m4_ifval([$1],
1879 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1880 [$1
1881 ])])])
1882
1883 # Initialize.
1884 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1885
1886
1887 # _LT_CONFIG_LIBTOOL([COMMANDS])
1888 # ------------------------------
1889 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1890 m4_define([_LT_CONFIG_LIBTOOL],
1891 [m4_ifval([$1],
1892 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1893 [$1
1894 ])])])
1895
1896 # Initialize.
1897 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1898
1899
1900 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1901 # -----------------------------------------------------
1902 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1903 [_LT_CONFIG_LIBTOOL([$1])
1904 _LT_CONFIG_LIBTOOL_INIT([$2])
1905 ])
1906
1907
1908 # _LT_FORMAT_COMMENT([COMMENT])
1909 # -----------------------------
1910 # Add leading comment marks to the start of each line, and a trailing
1911 # full-stop to the whole comment if one is not present already.
1912 m4_define([_LT_FORMAT_COMMENT],
1913 [m4_ifval([$1], [
1914 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1915 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1916 )])
1917
1918
1919
1920
1921
1922 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1923 # -------------------------------------------------------------------
1924 # CONFIGNAME is the name given to the value in the libtool script.
1925 # VARNAME is the (base) name used in the configure script.
1926 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1927 # VARNAME. Any other value will be used directly.
1928 m4_define([_LT_DECL],
1929 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1930 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1931 [m4_ifval([$1], [$1], [$2])])
1932 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1933 m4_ifval([$4],
1934 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1935 lt_dict_add_subkey([lt_decl_dict], [$2],
1936 [tagged?], [m4_ifval([$5], [yes], [no])])])
1937 ])
1938
1939
1940 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1941 # --------------------------------------------------------
1942 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1943
1944
1945 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1946 # ------------------------------------------------
1947 m4_define([lt_decl_tag_varnames],
1948 [_lt_decl_filter([tagged?], [yes], $@)])
1949
1950
1951 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1952 # ---------------------------------------------------------
1953 m4_define([_lt_decl_filter],
1954 [m4_case([$#],
1955 [0], [m4_fatal([$0: too few arguments: $#])],
1956 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1957 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1958 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1959 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1960 ])
1961
1962
1963 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1964 # --------------------------------------------------
1965 m4_define([lt_decl_quote_varnames],
1966 [_lt_decl_filter([value], [1], $@)])
1967
1968
1969 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1970 # ---------------------------------------------------
1971 m4_define([lt_decl_dquote_varnames],
1972 [_lt_decl_filter([value], [2], $@)])
1973
1974
1975 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1976 # ---------------------------------------------------
1977 m4_define([lt_decl_varnames_tagged],
1978 [m4_assert([$# <= 2])dnl
1979 _$0(m4_quote(m4_default([$1], [[, ]])),
1980 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1981 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1982 m4_define([_lt_decl_varnames_tagged],
1983 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1984
1985
1986 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1987 # ------------------------------------------------
1988 m4_define([lt_decl_all_varnames],
1989 [_$0(m4_quote(m4_default([$1], [[, ]])),
1990 m4_if([$2], [],
1991 m4_quote(lt_decl_varnames),
1992 m4_quote(m4_shift($@))))[]dnl
1993 ])
1994 m4_define([_lt_decl_all_varnames],
1995 [lt_join($@, lt_decl_varnames_tagged([$1],
1996 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1997 ])
1998
1999
2000 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2001 # ------------------------------------
2002 # Quote a variable value, and forward it to 'config.status' so that its
2003 # declaration there will have the same value as in 'configure'. VARNAME
2004 # must have a single quote delimited value for this to work.
2005 m4_define([_LT_CONFIG_STATUS_DECLARE],
2006 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2007
2008
2009 # _LT_CONFIG_STATUS_DECLARATIONS
2010 # ------------------------------
2011 # We delimit libtool config variables with single quotes, so when
2012 # we write them to config.status, we have to be sure to quote all
2013 # embedded single quotes properly. In configure, this macro expands
2014 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2015 #
2016 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2017 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2018 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2019 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2020
2021
2022 # _LT_LIBTOOL_TAGS
2023 # ----------------
2024 # Output comment and list of tags supported by the script
2025 m4_defun([_LT_LIBTOOL_TAGS],
2026 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2027 available_tags='_LT_TAGS'dnl
2028 ])
2029
2030
2031 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2032 # -----------------------------------
2033 # Extract the dictionary values for VARNAME (optionally with TAG) and
2034 # expand to a commented shell variable setting:
2035 #
2036 # # Some comment about what VAR is for.
2037 # visible_name=$lt_internal_name
2038 m4_define([_LT_LIBTOOL_DECLARE],
2039 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2040 [description])))[]dnl
2041 m4_pushdef([_libtool_name],
2042 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2043 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2044 [0], [_libtool_name=[$]$1],
2045 [1], [_libtool_name=$lt_[]$1],
2046 [2], [_libtool_name=$lt_[]$1],
2047 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2048 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2049 ])
2050
2051
2052 # _LT_LIBTOOL_CONFIG_VARS
2053 # -----------------------
2054 # Produce commented declarations of non-tagged libtool config variables
2055 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
2056 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2057 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2058 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2059 [m4_foreach([_lt_var],
2060 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2061 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2062
2063
2064 # _LT_LIBTOOL_TAG_VARS(TAG)
2065 # -------------------------
2066 m4_define([_LT_LIBTOOL_TAG_VARS],
2067 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2068 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2069
2070
2071 # _LT_TAGVAR(VARNAME, [TAGNAME])
2072 # ------------------------------
2073 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2074
2075
2076 # _LT_CONFIG_COMMANDS
2077 # -------------------
2078 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2079 # variables for single and double quote escaping we saved from calls
2080 # to _LT_DECL, we can put quote escaped variables declarations
2081 # into 'config.status', and then the shell code to quote escape them in
2082 # for loops in 'config.status'. Finally, any additional code accumulated
2083 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2084 m4_defun([_LT_CONFIG_COMMANDS],
2085 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2086 dnl If the libtool generation code has been placed in $CONFIG_LT,
2087 dnl instead of duplicating it all over again into config.status,
2088 dnl then we will have config.status run $CONFIG_LT later, so it
2089 dnl needs to know what name is stored there:
2090 [AC_CONFIG_COMMANDS([libtool],
2091 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2092 dnl If the libtool generation code is destined for config.status,
2093 dnl expand the accumulated commands and init code now:
2094 [AC_CONFIG_COMMANDS([libtool],
2095 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2096 ])#_LT_CONFIG_COMMANDS
2097
2098
2099 # Initialize.
2100 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2101 [
2102
2103 # The HP-UX ksh and POSIX shell print the target directory to stdout
2104 # if CDPATH is set.
2105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2106
2107 sed_quote_subst='$sed_quote_subst'
2108 double_quote_subst='$double_quote_subst'
2109 delay_variable_subst='$delay_variable_subst'
2110 _LT_CONFIG_STATUS_DECLARATIONS
2111 LTCC='$LTCC'
2112 LTCFLAGS='$LTCFLAGS'
2113 compiler='$compiler_DEFAULT'
2114
2115 # A function that is used when there is no print builtin or printf.
2116 func_fallback_echo ()
2117 {
2118 eval 'cat <<_LTECHO_EOF
2119 \$[]1
2120 _LTECHO_EOF'
2121 }
2122
2123 # Quote evaled strings.
2124 for var in lt_decl_all_varnames([[ \
2125 ]], lt_decl_quote_varnames); do
2126 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2127 *[[\\\\\\\`\\"\\\$]]*)
2128 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2129 ;;
2130 *)
2131 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2132 ;;
2133 esac
2134 done
2135
2136 # Double-quote double-evaled strings.
2137 for var in lt_decl_all_varnames([[ \
2138 ]], lt_decl_dquote_varnames); do
2139 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2140 *[[\\\\\\\`\\"\\\$]]*)
2141 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2142 ;;
2143 *)
2144 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2145 ;;
2146 esac
2147 done
2148
2149 _LT_OUTPUT_LIBTOOL_INIT
2150 ])
2151
2152 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2153 # ------------------------------------
2154 # Generate a child script FILE with all initialization necessary to
2155 # reuse the environment learned by the parent script, and make the
2156 # file executable. If COMMENT is supplied, it is inserted after the
2157 # '#!' sequence but before initialization text begins. After this
2158 # macro, additional text can be appended to FILE to form the body of
2159 # the child script. The macro ends with non-zero status if the
2160 # file could not be fully written (such as if the disk is full).
2161 m4_ifdef([AS_INIT_GENERATED],
2162 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2163 [m4_defun([_LT_GENERATED_FILE_INIT],
2164 [m4_require([AS_PREPARE])]dnl
2165 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2166 [lt_write_fail=0
2167 cat >$1 <<_ASEOF || lt_write_fail=1
2168 #! $SHELL
2169 # Generated by $as_me.
2170 $2
2171 SHELL=\${CONFIG_SHELL-$SHELL}
2172 export SHELL
2173 _ASEOF
2174 cat >>$1 <<\_ASEOF || lt_write_fail=1
2175 AS_SHELL_SANITIZE
2176 _AS_PREPARE
2177 exec AS_MESSAGE_FD>&1
2178 _ASEOF
2179 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
2180 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2181
2182 # LT_OUTPUT
2183 # ---------
2184 # This macro allows early generation of the libtool script (before
2185 # AC_OUTPUT is called), incase it is used in configure for compilation
2186 # tests.
2187 AC_DEFUN([LT_OUTPUT],
2188 [: ${CONFIG_LT=./config.lt}
2189 AC_MSG_NOTICE([creating $CONFIG_LT])
2190 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2191 [# Run this file to recreate a libtool stub with the current configuration.])
2192
2193 cat >>"$CONFIG_LT" <<\_LTEOF
2194 lt_cl_silent=false
2195 exec AS_MESSAGE_LOG_FD>>config.log
2196 {
2197 echo
2198 AS_BOX([Running $as_me.])
2199 } >&AS_MESSAGE_LOG_FD
2200
2201 lt_cl_help="\
2202 '$as_me' creates a local libtool stub from the current configuration,
2203 for use in further configure time tests before the real libtool is
2204 generated.
2205
2206 Usage: $[0] [[OPTIONS]]
2207
2208 -h, --help print this help, then exit
2209 -V, --version print version number, then exit
2210 -q, --quiet do not print progress messages
2211 -d, --debug don't remove temporary files
2212
2213 Report bugs to <[email protected]>."
2214
2215 lt_cl_version="\
2216 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2217 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2218 configured by $[0], generated by m4_PACKAGE_STRING.
2219
2220 Copyright (C) 2011 Free Software Foundation, Inc.
2221 This config.lt script is free software; the Free Software Foundation
2222 gives unlimited permision to copy, distribute and modify it."
2223
2224 while test 0 != $[#]
2225 do
2226 case $[1] in
2227 --version | --v* | -V )
2228 echo "$lt_cl_version"; exit 0 ;;
2229 --help | --h* | -h )
2230 echo "$lt_cl_help"; exit 0 ;;
2231 --debug | --d* | -d )
2232 debug=: ;;
2233 --quiet | --q* | --silent | --s* | -q )
2234 lt_cl_silent=: ;;
2235
2236 -*) AC_MSG_ERROR([unrecognized option: $[1]
2237 Try '$[0] --help' for more information.]) ;;
2238
2239 *) AC_MSG_ERROR([unrecognized argument: $[1]
2240 Try '$[0] --help' for more information.]) ;;
2241 esac
2242 shift
2243 done
2244
2245 if $lt_cl_silent; then
2246 exec AS_MESSAGE_FD>/dev/null
2247 fi
2248 _LTEOF
2249
2250 cat >>"$CONFIG_LT" <<_LTEOF
2251 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2252 _LTEOF
2253
2254 cat >>"$CONFIG_LT" <<\_LTEOF
2255 AC_MSG_NOTICE([creating $ofile])
2256 _LT_OUTPUT_LIBTOOL_COMMANDS
2257 AS_EXIT(0)
2258 _LTEOF
2259 chmod +x "$CONFIG_LT"
2260
2261 # configure is writing to config.log, but config.lt does its own redirection,
2262 # appending to config.log, which fails on DOS, as config.log is still kept
2263 # open by configure. Here we exec the FD to /dev/null, effectively closing
2264 # config.log, so it can be properly (re)opened and appended to by config.lt.
2265 lt_cl_success=:
2266 test yes = "$silent" &&
2267 lt_config_lt_args="$lt_config_lt_args --quiet"
2268 exec AS_MESSAGE_LOG_FD>/dev/null
2269 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2270 exec AS_MESSAGE_LOG_FD>>config.log
2271 $lt_cl_success || AS_EXIT(1)
2272 ])# LT_OUTPUT
2273
2274
2275 # _LT_CONFIG(TAG)
2276 # ---------------
2277 # If TAG is the built-in tag, create an initial libtool script with a
2278 # default configuration from the untagged config vars. Otherwise add code
2279 # to config.status for appending the configuration named by TAG from the
2280 # matching tagged config vars.
2281 m4_defun([_LT_CONFIG],
2282 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2283 _LT_CONFIG_SAVE_COMMANDS([
2284 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2285 m4_if(_LT_TAG, [C], [
2286 # See if we are running on zsh, and set the options that allow our
2287 # commands through without removal of \ escapes.
2288 if test -n "${ZSH_VERSION+set}"; then
2289 setopt NO_GLOB_SUBST
2290 fi
2291
2292 cfgfile=${ofile}T
2293 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2294 $RM "$cfgfile"
2295
2296 cat <<_LT_EOF >> "$cfgfile"
2297 #! $SHELL
2298 # Generated automatically by $as_me ($PACKAGE) $VERSION
2299 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2300
2301 # Provide generalized library-building support services.
2302 # Written by Gordon Matzigkeit, 1996
2303
2304 _LT_COPYING
2305 _LT_LIBTOOL_TAGS
2306
2307 # Configured defaults for sys_lib_dlsearch_path munging.
2308 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
2309
2310 # ### BEGIN LIBTOOL CONFIG
2311 _LT_LIBTOOL_CONFIG_VARS
2312 _LT_LIBTOOL_TAG_VARS
2313 # ### END LIBTOOL CONFIG
2314
2315 _LT_EOF
2316
2317 cat <<'_LT_EOF' >> "$cfgfile"
2318
2319 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
2320
2321 _LT_PREPARE_MUNGE_PATH_LIST
2322 _LT_PREPARE_CC_BASENAME
2323
2324 # ### END FUNCTIONS SHARED WITH CONFIGURE
2325
2326 _LT_EOF
2327
2328 case $host_os in
2329 aix3*)
2330 cat <<\_LT_EOF >> "$cfgfile"
2331 # AIX sometimes has problems with the GCC collect2 program. For some
2332 # reason, if we set the COLLECT_NAMES environment variable, the problems
2333 # vanish in a puff of smoke.
2334 if test set != "${COLLECT_NAMES+set}"; then
2335 COLLECT_NAMES=
2336 export COLLECT_NAMES
2337 fi
2338 _LT_EOF
2339 ;;
2340 esac
2341
2342 _LT_PROG_LTMAIN
2343
2344 # We use sed instead of cat because bash on DJGPP gets confused if
2345 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2346 # text mode, it properly converts lines to CR/LF. This bash problem
2347 # is reportedly fixed, but why not run on old versions too?
2348 sed '$q' "$ltmain" >> "$cfgfile" \
2349 || (rm -f "$cfgfile"; exit 1)
2350
2351 mv -f "$cfgfile" "$ofile" ||
2352 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2353 chmod +x "$ofile"
2354 ],
2355 [cat <<_LT_EOF >> "$ofile"
2356
2357 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2358 dnl in a comment (ie after a #).
2359 # ### BEGIN LIBTOOL TAG CONFIG: $1
2360 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2361 # ### END LIBTOOL TAG CONFIG: $1
2362 _LT_EOF
2363 ])dnl /m4_if
2364 ],
2365 [m4_if([$1], [], [
2366 PACKAGE='$PACKAGE'
2367 VERSION='$VERSION'
2368 RM='$RM'
2369 ofile='$ofile'], [])
2370 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2371 ])# _LT_CONFIG
2372
2373
2374 # LT_SUPPORTED_TAG(TAG)
2375 # ---------------------
2376 # Trace this macro to discover what tags are supported by the libtool
2377 # --tag option, using:
2378 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
2379 AC_DEFUN([LT_SUPPORTED_TAG], [])
2380
2381
2382 # C support is built-in for now
2383 m4_define([_LT_LANG_C_enabled], [])
2384 m4_define([_LT_TAGS], [])
2385
2386
2387 # LT_LANG(LANG)
2388 # -------------
2389 # Enable libtool support for the given language if not already enabled.
2390 AC_DEFUN([LT_LANG],
2391 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2392 m4_case([$1],
2393 [C], [_LT_LANG(C)],
2394 [C++], [_LT_LANG(CXX)],
2395 [Go], [_LT_LANG(GO)],
2396 [Java], [_LT_LANG(GCJ)],
2397 [Fortran 77], [_LT_LANG(F77)],
2398 [Fortran], [_LT_LANG(FC)],
2399 [Windows Resource], [_LT_LANG(RC)],
2400 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2401 [_LT_LANG($1)],
2402 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2403 ])# LT_LANG
2404
2405
2406 # _LT_LANG(LANGNAME)
2407 # ------------------
2408 m4_defun([_LT_LANG],
2409 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2410 [LT_SUPPORTED_TAG([$1])dnl
2411 m4_append([_LT_TAGS], [$1 ])dnl
2412 m4_define([_LT_LANG_]$1[_enabled], [])dnl
2413 _LT_LANG_$1_CONFIG($1)])dnl
2414 ])# _LT_LANG
2415
2416
2417 m4_ifndef([AC_PROG_GO], [
2418 # NOTE: This macro has been submitted for inclusion into #
2419 # GNU Autoconf as AC_PROG_GO. When it is available in #
2420 # a released version of Autoconf we should remove this #
2421 # macro and use it instead. #
2422 m4_defun([AC_PROG_GO],
2423 [AC_LANG_PUSH(Go)dnl
2424 AC_ARG_VAR([GOC], [Go compiler command])dnl
2425 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2426 _AC_ARG_VAR_LDFLAGS()dnl
2427 AC_CHECK_TOOL(GOC, gccgo)
2428 if test -z "$GOC"; then
2429 if test -n "$ac_tool_prefix"; then
2430 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2431 fi
2432 fi
2433 if test -z "$GOC"; then
2434 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2435 fi
2436 ])#m4_defun
2437 ])#m4_ifndef
2438
2439
2440 # _LT_LANG_DEFAULT_CONFIG
2441 # -----------------------
2442 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2443 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2444 [LT_LANG(CXX)],
2445 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2446
2447 AC_PROVIDE_IFELSE([AC_PROG_F77],
2448 [LT_LANG(F77)],
2449 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2450
2451 AC_PROVIDE_IFELSE([AC_PROG_FC],
2452 [LT_LANG(FC)],
2453 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2454
2455 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2456 dnl pulling things in needlessly.
2457 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2458 [LT_LANG(GCJ)],
2459 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2460 [LT_LANG(GCJ)],
2461 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2462 [LT_LANG(GCJ)],
2463 [m4_ifdef([AC_PROG_GCJ],
2464 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2465 m4_ifdef([A][M_PROG_GCJ],
2466 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2467 m4_ifdef([LT_PROG_GCJ],
2468 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2469
2470 AC_PROVIDE_IFELSE([AC_PROG_GO],
2471 [LT_LANG(GO)],
2472 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2473
2474 AC_PROVIDE_IFELSE([LT_PROG_RC],
2475 [LT_LANG(RC)],
2476 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2477 ])# _LT_LANG_DEFAULT_CONFIG
2478
2479 # Obsolete macros:
2480 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2481 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2482 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2483 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2484 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2485 dnl aclocal-1.4 backwards compatibility:
2486 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2487 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2488 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2489 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2490 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2491
2492
2493 # _LT_TAG_COMPILER
2494 # ----------------
2495 m4_defun([_LT_TAG_COMPILER],
2496 [AC_REQUIRE([AC_PROG_CC])dnl
2497
2498 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2499 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2500 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2501 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2502
2503 # If no C compiler was specified, use CC.
2504 LTCC=${LTCC-"$CC"}
2505
2506 # If no C compiler flags were specified, use CFLAGS.
2507 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2508
2509 # Allow CC to be a program name with arguments.
2510 compiler=$CC
2511 ])# _LT_TAG_COMPILER
2512
2513
2514 # _LT_COMPILER_BOILERPLATE
2515 # ------------------------
2516 # Check for compiler boilerplate output or warnings with
2517 # the simple compiler test code.
2518 m4_defun([_LT_COMPILER_BOILERPLATE],
2519 [m4_require([_LT_DECL_SED])dnl
2520 ac_outfile=conftest.$ac_objext
2521 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2522 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2523 _lt_compiler_boilerplate=`cat conftest.err`
2524 $RM conftest*
2525 ])# _LT_COMPILER_BOILERPLATE
2526
2527
2528 # _LT_LINKER_BOILERPLATE
2529 # ----------------------
2530 # Check for linker boilerplate output or warnings with
2531 # the simple link test code.
2532 m4_defun([_LT_LINKER_BOILERPLATE],
2533 [m4_require([_LT_DECL_SED])dnl
2534 ac_outfile=conftest.$ac_objext
2535 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2536 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2537 _lt_linker_boilerplate=`cat conftest.err`
2538 $RM -r conftest*
2539 ])# _LT_LINKER_BOILERPLATE
2540
2541 # _LT_REQUIRED_DARWIN_CHECKS
2542 # -------------------------
2543 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2544 case $host_os in
2545 rhapsody* | darwin*)
2546 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2547 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2548 AC_CHECK_TOOL([LIPO], [lipo], [:])
2549 AC_CHECK_TOOL([OTOOL], [otool], [:])
2550 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2551 _LT_DECL([], [DSYMUTIL], [1],
2552 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2553 _LT_DECL([], [NMEDIT], [1],
2554 [Tool to change global to local symbols on Mac OS X])
2555 _LT_DECL([], [LIPO], [1],
2556 [Tool to manipulate fat objects and archives on Mac OS X])
2557 _LT_DECL([], [OTOOL], [1],
2558 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2559 _LT_DECL([], [OTOOL64], [1],
2560 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2561
2562 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2563 [lt_cv_apple_cc_single_mod=no
2564 if test -z "$LT_MULTI_MODULE"; then
2565 # By default we will add the -single_module flag. You can override
2566 # by either setting the environment variable LT_MULTI_MODULE
2567 # non-empty at configure time, or by adding -multi_module to the
2568 # link flags.
2569 rm -rf libconftest.dylib*
2570 echo "int foo(void){return 1;}" > conftest.c
2571 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2572 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2573 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2574 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2575 _lt_result=$?
2576 # If there is a non-empty error log, and "single_module"
2577 # appears in it, assume the flag caused a linker warning
2578 if test -s conftest.err && $GREP single_module conftest.err; then
2579 cat conftest.err >&AS_MESSAGE_LOG_FD
2580 # Otherwise, if the output was created with a 0 exit code from
2581 # the compiler, it worked.
2582 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
2583 lt_cv_apple_cc_single_mod=yes
2584 else
2585 cat conftest.err >&AS_MESSAGE_LOG_FD
2586 fi
2587 rm -rf libconftest.dylib*
2588 rm -f conftest.*
2589 fi])
2590
2591 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2592 [lt_cv_ld_exported_symbols_list],
2593 [lt_cv_ld_exported_symbols_list=no
2594 save_LDFLAGS=$LDFLAGS
2595 echo "_main" > conftest.sym
2596 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2597 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2598 [lt_cv_ld_exported_symbols_list=yes],
2599 [lt_cv_ld_exported_symbols_list=no])
2600 LDFLAGS=$save_LDFLAGS
2601 ])
2602
2603 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2604 [lt_cv_ld_force_load=no
2605 cat > conftest.c << _LT_EOF
2606 int forced_loaded() { return 2;}
2607 _LT_EOF
2608 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2609 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2610 echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2611 $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2612 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2613 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2614 cat > conftest.c << _LT_EOF
2615 int main() { return 0;}
2616 _LT_EOF
2617 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2618 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2619 _lt_result=$?
2620 if test -s conftest.err && $GREP force_load conftest.err; then
2621 cat conftest.err >&AS_MESSAGE_LOG_FD
2622 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
2623 lt_cv_ld_force_load=yes
2624 else
2625 cat conftest.err >&AS_MESSAGE_LOG_FD
2626 fi
2627 rm -f conftest.err libconftest.a conftest conftest.c
2628 rm -rf conftest.dSYM
2629 ])
2630 case $host_os in
2631 rhapsody* | darwin1.[[012]])
2632 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
2633 darwin1.*)
2634 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2635 darwin*) # darwin 5.x on
2636 # if running on 10.5 or later, the deployment target defaults
2637 # to the OS version, if on x86, and 10.4, the deployment
2638 # target defaults to 10.4. Don't you love it?
2639 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2640 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
2641 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2642 10.[[012]][[,.]]*)
2643 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2644 10.*|11.*)
2645 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2646 esac
2647 ;;
2648 esac
2649 if test yes = "$lt_cv_apple_cc_single_mod"; then
2650 _lt_dar_single_mod='$single_module'
2651 fi
2652 if test yes = "$lt_cv_ld_exported_symbols_list"; then
2653 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
2654 else
2655 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
2656 fi
2657 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
2658 _lt_dsymutil='~$DSYMUTIL $lib || :'
2659 else
2660 _lt_dsymutil=
2661 fi
2662 ;;
2663 esac
2664 ])
2665
2666
2667 # _LT_DARWIN_LINKER_FEATURES([TAG])
2668 # ---------------------------------
2669 # Checks for linker and compiler features on darwin
2670 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2671 [
2672 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2673 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2674 _LT_TAGVAR(hardcode_direct, $1)=no
2675 _LT_TAGVAR(hardcode_automatic, $1)=yes
2676 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2677 if test yes = "$lt_cv_ld_force_load"; then
2678 _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\"`'
2679 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2680 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2681 else
2682 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2683 fi
2684 _LT_TAGVAR(link_all_deplibs, $1)=yes
2685 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
2686 case $cc_basename in
2687 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
2688 *) _lt_dar_can_shared=$GCC ;;
2689 esac
2690 if test yes = "$_lt_dar_can_shared"; then
2691 output_verbose_link_cmd=func_echo_all
2692 _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"
2693 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
2694 _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"
2695 _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"
2696 m4_if([$1], [CXX],
2697 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
2698 _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"
2699 _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"
2700 fi
2701 ],[])
2702 else
2703 _LT_TAGVAR(ld_shlibs, $1)=no
2704 fi
2705 ])
2706
2707 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2708 # ----------------------------------
2709 # Links a minimal program and checks the executable
2710 # for the system default hardcoded library path. In most cases,
2711 # this is /usr/lib:/lib, but when the MPI compilers are used
2712 # the location of the communication and MPI libs are included too.
2713 # If we don't find anything, use the default library path according
2714 # to the aix ld manual.
2715 # Store the results from the different compilers for each TAGNAME.
2716 # Allow to override them for all tags through lt_cv_aix_libpath.
2717 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2718 [m4_require([_LT_DECL_SED])dnl
2719 if test set = "${lt_cv_aix_libpath+set}"; then
2720 aix_libpath=$lt_cv_aix_libpath
2721 else
2722 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2723 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2724 lt_aix_libpath_sed='[
2725 /Import File Strings/,/^$/ {
2726 /^0/ {
2727 s/^0 *\([^ ]*\) *$/\1/
2728 p
2729 }
2730 }]'
2731 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2732 # Check for a 64-bit object if we didn't find anything.
2733 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2734 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2735 fi],[])
2736 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2737 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
2738 fi
2739 ])
2740 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2741 fi
2742 ])# _LT_SYS_MODULE_PATH_AIX
2743
2744
2745 # _LT_SHELL_INIT(ARG)
2746 # -------------------
2747 m4_define([_LT_SHELL_INIT],
2748 [m4_divert_text([M4SH-INIT], [$1
2749 ])])# _LT_SHELL_INIT
2750
2751
2752
2753 # _LT_PROG_ECHO_BACKSLASH
2754 # -----------------------
2755 # Find how we can fake an echo command that does not interpret backslash.
2756 # In particular, with Autoconf 2.60 or later we add some code to the start
2757 # of the generated configure script that will find a shell with a builtin
2758 # printf (that we can use as an echo command).
2759 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2760 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2761 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2762 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2763
2764 AC_MSG_CHECKING([how to print strings])
2765 # Test print first, because it will be a builtin if present.
2766 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2767 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2768 ECHO='print -r --'
2769 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2770 ECHO='printf %s\n'
2771 else
2772 # Use this function as a fallback that always works.
2773 func_fallback_echo ()
2774 {
2775 eval 'cat <<_LTECHO_EOF
2776 $[]1
2777 _LTECHO_EOF'
2778 }
2779 ECHO='func_fallback_echo'
2780 fi
2781
2782 # func_echo_all arg...
2783 # Invoke $ECHO with all args, space-separated.
2784 func_echo_all ()
2785 {
2786 $ECHO "$*"
2787 }
2788
2789 case $ECHO in
2790 printf*) AC_MSG_RESULT([printf]) ;;
2791 print*) AC_MSG_RESULT([print -r]) ;;
2792 *) AC_MSG_RESULT([cat]) ;;
2793 esac
2794
2795 m4_ifdef([_AS_DETECT_SUGGESTED],
2796 [_AS_DETECT_SUGGESTED([
2797 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2798 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2799 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2800 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2801 PATH=/empty FPATH=/empty; export PATH FPATH
2802 test "X`printf %s $ECHO`" = "X$ECHO" \
2803 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2804
2805 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2806 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2807 ])# _LT_PROG_ECHO_BACKSLASH
2808
2809
2810 # _LT_WITH_SYSROOT
2811 # ----------------
2812 AC_DEFUN([_LT_WITH_SYSROOT],
2813 [AC_MSG_CHECKING([for sysroot])
2814 AC_ARG_WITH([sysroot],
2815 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
2816 [Search for dependent libraries within DIR (or the compiler's sysroot
2817 if not specified).])],
2818 [], [with_sysroot=no])
2819
2820 dnl lt_sysroot will always be passed unquoted. We quote it here
2821 dnl in case the user passed a directory name.
2822 lt_sysroot=
2823 case $with_sysroot in #(
2824 yes)
2825 if test yes = "$GCC"; then
2826 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2827 fi
2828 ;; #(
2829 /*)
2830 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2831 ;; #(
2832 no|'')
2833 ;; #(
2834 *)
2835 AC_MSG_RESULT([$with_sysroot])
2836 AC_MSG_ERROR([The sysroot must be an absolute path.])
2837 ;;
2838 esac
2839
2840 AC_MSG_RESULT([${lt_sysroot:-no}])
2841 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2842 [dependent libraries, and where our libraries should be installed.])])
2843
2844 # _LT_ENABLE_LOCK
2845 # ---------------
2846 m4_defun([_LT_ENABLE_LOCK],
2847 [AC_ARG_ENABLE([libtool-lock],
2848 [AS_HELP_STRING([--disable-libtool-lock],
2849 [avoid locking (might break parallel builds)])])
2850 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
2851
2852 # Some flags need to be propagated to the compiler or linker for good
2853 # libtool support.
2854 case $host in
2855 ia64-*-hpux*)
2856 # Find out what ABI is being produced by ac_compile, and set mode
2857 # options accordingly.
2858 echo 'int i;' > conftest.$ac_ext
2859 if AC_TRY_EVAL(ac_compile); then
2860 case `/usr/bin/file conftest.$ac_objext` in
2861 *ELF-32*)
2862 HPUX_IA64_MODE=32
2863 ;;
2864 *ELF-64*)
2865 HPUX_IA64_MODE=64
2866 ;;
2867 esac
2868 fi
2869 rm -rf conftest*
2870 ;;
2871 *-*-irix6*)
2872 # Find out what ABI is being produced by ac_compile, and set linker
2873 # options accordingly.
2874 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2875 if AC_TRY_EVAL(ac_compile); then
2876 if test yes = "$lt_cv_prog_gnu_ld"; then
2877 case `/usr/bin/file conftest.$ac_objext` in
2878 *32-bit*)
2879 LD="${LD-ld} -melf32bsmip"
2880 ;;
2881 *N32*)
2882 LD="${LD-ld} -melf32bmipn32"
2883 ;;
2884 *64-bit*)
2885 LD="${LD-ld} -melf64bmip"
2886 ;;
2887 esac
2888 else
2889 case `/usr/bin/file conftest.$ac_objext` in
2890 *32-bit*)
2891 LD="${LD-ld} -32"
2892 ;;
2893 *N32*)
2894 LD="${LD-ld} -n32"
2895 ;;
2896 *64-bit*)
2897 LD="${LD-ld} -64"
2898 ;;
2899 esac
2900 fi
2901 fi
2902 rm -rf conftest*
2903 ;;
2904
2905 mips64*-*linux*)
2906 # Find out what ABI is being produced by ac_compile, and set linker
2907 # options accordingly.
2908 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2909 if AC_TRY_EVAL(ac_compile); then
2910 emul=elf
2911 case `/usr/bin/file conftest.$ac_objext` in
2912 *32-bit*)
2913 emul="${emul}32"
2914 ;;
2915 *64-bit*)
2916 emul="${emul}64"
2917 ;;
2918 esac
2919 case `/usr/bin/file conftest.$ac_objext` in
2920 *MSB*)
2921 emul="${emul}btsmip"
2922 ;;
2923 *LSB*)
2924 emul="${emul}ltsmip"
2925 ;;
2926 esac
2927 case `/usr/bin/file conftest.$ac_objext` in
2928 *N32*)
2929 emul="${emul}n32"
2930 ;;
2931 esac
2932 LD="${LD-ld} -m $emul"
2933 fi
2934 rm -rf conftest*
2935 ;;
2936
2937 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2938 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2939 # Find out what ABI is being produced by ac_compile, and set linker
2940 # options accordingly. Note that the listed cases only cover the
2941 # situations where additional linker options are needed (such as when
2942 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
2943 # vice versa); the common cases where no linker options are needed do
2944 # not appear in the list.
2945 echo 'int i;' > conftest.$ac_ext
2946 if AC_TRY_EVAL(ac_compile); then
2947 case `/usr/bin/file conftest.o` in
2948 *32-bit*)
2949 case $host in
2950 x86_64-*kfreebsd*-gnu)
2951 LD="${LD-ld} -m elf_i386_fbsd"
2952 ;;
2953 x86_64-*linux*)
2954 case `/usr/bin/file conftest.o` in
2955 *x86-64*)
2956 LD="${LD-ld} -m elf32_x86_64"
2957 ;;
2958 *)
2959 LD="${LD-ld} -m elf_i386"
2960 ;;
2961 esac
2962 ;;
2963 powerpc64le-*linux*)
2964 LD="${LD-ld} -m elf32lppclinux"
2965 ;;
2966 powerpc64-*linux*)
2967 LD="${LD-ld} -m elf32ppclinux"
2968 ;;
2969 s390x-*linux*)
2970 LD="${LD-ld} -m elf_s390"
2971 ;;
2972 sparc64-*linux*)
2973 LD="${LD-ld} -m elf32_sparc"
2974 ;;
2975 esac
2976 ;;
2977 *64-bit*)
2978 case $host in
2979 x86_64-*kfreebsd*-gnu)
2980 LD="${LD-ld} -m elf_x86_64_fbsd"
2981 ;;
2982 x86_64-*linux*)
2983 LD="${LD-ld} -m elf_x86_64"
2984 ;;
2985 powerpcle-*linux*)
2986 LD="${LD-ld} -m elf64lppc"
2987 ;;
2988 powerpc-*linux*)
2989 LD="${LD-ld} -m elf64ppc"
2990 ;;
2991 s390*-*linux*|s390*-*tpf*)
2992 LD="${LD-ld} -m elf64_s390"
2993 ;;
2994 sparc*-*linux*)
2995 LD="${LD-ld} -m elf64_sparc"
2996 ;;
2997 esac
2998 ;;
2999 esac
3000 fi
3001 rm -rf conftest*
3002 ;;
3003
3004 *-*-sco3.2v5*)
3005 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3006 SAVE_CFLAGS=$CFLAGS
3007 CFLAGS="$CFLAGS -belf"
3008 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3009 [AC_LANG_PUSH(C)
3010 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3011 AC_LANG_POP])
3012 if test yes != "$lt_cv_cc_needs_belf"; then
3013 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3014 CFLAGS=$SAVE_CFLAGS
3015 fi
3016 ;;
3017 *-*solaris*)
3018 # Find out what ABI is being produced by ac_compile, and set linker
3019 # options accordingly.
3020 echo 'int i;' > conftest.$ac_ext
3021 if AC_TRY_EVAL(ac_compile); then
3022 case `/usr/bin/file conftest.o` in
3023 *64-bit*)
3024 case $lt_cv_prog_gnu_ld in
3025 yes*)
3026 case $host in
3027 i?86-*-solaris*|x86_64-*-solaris*)
3028 LD="${LD-ld} -m elf_x86_64"
3029 ;;
3030 sparc*-*-solaris*)
3031 LD="${LD-ld} -m elf64_sparc"
3032 ;;
3033 esac
3034 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
3035 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3036 LD=${LD-ld}_sol2
3037 fi
3038 ;;
3039 *)
3040 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3041 LD="${LD-ld} -64"
3042 fi
3043 ;;
3044 esac
3045 ;;
3046 esac
3047 fi
3048 rm -rf conftest*
3049 ;;
3050 esac
3051
3052 need_locks=$enable_libtool_lock
3053 ])# _LT_ENABLE_LOCK
3054
3055
3056 # _LT_PROG_AR
3057 # -----------
3058 m4_defun([_LT_PROG_AR],
3059 [AC_CHECK_TOOLS(AR, [ar], false)
3060 : ${AR=ar}
3061 : ${AR_FLAGS=cr}
3062 _LT_DECL([], [AR], [1], [The archiver])
3063 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3064
3065 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3066 [lt_cv_ar_at_file=no
3067 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3068 [echo conftest.$ac_objext > conftest.lst
3069 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3070 AC_TRY_EVAL([lt_ar_try])
3071 if test 0 -eq "$ac_status"; then
3072 # Ensure the archiver fails upon bogus file names.
3073 rm -f conftest.$ac_objext libconftest.a
3074 AC_TRY_EVAL([lt_ar_try])
3075 if test 0 -ne "$ac_status"; then
3076 lt_cv_ar_at_file=@
3077 fi
3078 fi
3079 rm -f conftest.* libconftest.a
3080 ])
3081 ])
3082
3083 if test no = "$lt_cv_ar_at_file"; then
3084 archiver_list_spec=
3085 else
3086 archiver_list_spec=$lt_cv_ar_at_file
3087 fi
3088 _LT_DECL([], [archiver_list_spec], [1],
3089 [How to feed a file listing to the archiver])
3090 ])# _LT_PROG_AR
3091
3092
3093 # _LT_CMD_OLD_ARCHIVE
3094 # -------------------
3095 m4_defun([_LT_CMD_OLD_ARCHIVE],
3096 [_LT_PROG_AR
3097
3098 AC_CHECK_TOOL(STRIP, strip, :)
3099 test -z "$STRIP" && STRIP=:
3100 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3101
3102 AC_CHECK_TOOL(RANLIB, ranlib, :)
3103 test -z "$RANLIB" && RANLIB=:
3104 _LT_DECL([], [RANLIB], [1],
3105 [Commands used to install an old-style archive])
3106
3107 # Determine commands to create old-style static archives.
3108 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3109 old_postinstall_cmds='chmod 644 $oldlib'
3110 old_postuninstall_cmds=
3111
3112 if test -n "$RANLIB"; then
3113 case $host_os in
3114 bitrig* | openbsd*)
3115 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
3116 ;;
3117 *)
3118 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
3119 ;;
3120 esac
3121 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
3122 fi
3123
3124 case $host_os in
3125 darwin*)
3126 lock_old_archive_extraction=yes ;;
3127 *)
3128 lock_old_archive_extraction=no ;;
3129 esac
3130 _LT_DECL([], [old_postinstall_cmds], [2])
3131 _LT_DECL([], [old_postuninstall_cmds], [2])
3132 _LT_TAGDECL([], [old_archive_cmds], [2],
3133 [Commands used to build an old-style archive])
3134 _LT_DECL([], [lock_old_archive_extraction], [0],
3135 [Whether to use a lock for old archive extraction])
3136 ])# _LT_CMD_OLD_ARCHIVE
3137
3138
3139 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3140 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3141 # ----------------------------------------------------------------
3142 # Check whether the given compiler option works
3143 AC_DEFUN([_LT_COMPILER_OPTION],
3144 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3145 m4_require([_LT_DECL_SED])dnl
3146 AC_CACHE_CHECK([$1], [$2],
3147 [$2=no
3148 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3149 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3150 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
3151 # Insert the option either (1) after the last *FLAGS variable, or
3152 # (2) before a word containing "conftest.", or (3) at the end.
3153 # Note that $ac_compile itself does not contain backslashes and begins
3154 # with a dollar sign (not a hyphen), so the echo should work correctly.
3155 # The option is referenced via a variable to avoid confusing sed.
3156 lt_compile=`echo "$ac_compile" | $SED \
3157 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3158 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3159 -e 's:$: $lt_compiler_flag:'`
3160 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3161 (eval "$lt_compile" 2>conftest.err)
3162 ac_status=$?
3163 cat conftest.err >&AS_MESSAGE_LOG_FD
3164 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3165 if (exit $ac_status) && test -s "$ac_outfile"; then
3166 # The compiler can only warn and ignore the option if not recognized
3167 # So say no if there are warnings other than the usual output.
3168 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3169 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3170 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3171 $2=yes
3172 fi
3173 fi
3174 $RM conftest*
3175 ])
3176
3177 if test yes = "[$]$2"; then
3178 m4_if([$5], , :, [$5])
3179 else
3180 m4_if([$6], , :, [$6])
3181 fi
3182 ])# _LT_COMPILER_OPTION
3183
3184 # Old name:
3185 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3186 dnl aclocal-1.4 backwards compatibility:
3187 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3188
3189
3190 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3191 # [ACTION-SUCCESS], [ACTION-FAILURE])
3192 # ----------------------------------------------------
3193 # Check whether the given linker option works
3194 AC_DEFUN([_LT_LINKER_OPTION],
3195 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3196 m4_require([_LT_DECL_SED])dnl
3197 AC_CACHE_CHECK([$1], [$2],
3198 [$2=no
3199 save_LDFLAGS=$LDFLAGS
3200 LDFLAGS="$LDFLAGS $3"
3201 echo "$lt_simple_link_test_code" > conftest.$ac_ext
3202 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3203 # The linker can only warn and ignore the option if not recognized
3204 # So say no if there are warnings
3205 if test -s conftest.err; then
3206 # Append any errors to the config.log.
3207 cat conftest.err 1>&AS_MESSAGE_LOG_FD
3208 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3209 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3210 if diff conftest.exp conftest.er2 >/dev/null; then
3211 $2=yes
3212 fi
3213 else
3214 $2=yes
3215 fi
3216 fi
3217 $RM -r conftest*
3218 LDFLAGS=$save_LDFLAGS
3219 ])
3220
3221 if test yes = "[$]$2"; then
3222 m4_if([$4], , :, [$4])
3223 else
3224 m4_if([$5], , :, [$5])
3225 fi
3226 ])# _LT_LINKER_OPTION
3227
3228 # Old name:
3229 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3230 dnl aclocal-1.4 backwards compatibility:
3231 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3232
3233
3234 # LT_CMD_MAX_LEN
3235 #---------------
3236 AC_DEFUN([LT_CMD_MAX_LEN],
3237 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3238 # find the maximum length of command line arguments
3239 AC_MSG_CHECKING([the maximum length of command line arguments])
3240 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3241 i=0
3242 teststring=ABCD
3243
3244 case $build_os in
3245 msdosdjgpp*)
3246 # On DJGPP, this test can blow up pretty badly due to problems in libc
3247 # (any single argument exceeding 2000 bytes causes a buffer overrun
3248 # during glob expansion). Even if it were fixed, the result of this
3249 # check would be larger than it should be.
3250 lt_cv_sys_max_cmd_len=12288; # 12K is about right
3251 ;;
3252
3253 gnu*)
3254 # Under GNU Hurd, this test is not required because there is
3255 # no limit to the length of command line arguments.
3256 # Libtool will interpret -1 as no limit whatsoever
3257 lt_cv_sys_max_cmd_len=-1;
3258 ;;
3259
3260 cygwin* | mingw* | cegcc*)
3261 # On Win9x/ME, this test blows up -- it succeeds, but takes
3262 # about 5 minutes as the teststring grows exponentially.
3263 # Worse, since 9x/ME are not pre-emptively multitasking,
3264 # you end up with a "frozen" computer, even though with patience
3265 # the test eventually succeeds (with a max line length of 256k).
3266 # Instead, let's just punt: use the minimum linelength reported by
3267 # all of the supported platforms: 8192 (on NT/2K/XP).
3268 lt_cv_sys_max_cmd_len=8192;
3269 ;;
3270
3271 mint*)
3272 # On MiNT this can take a long time and run out of memory.
3273 lt_cv_sys_max_cmd_len=8192;
3274 ;;
3275
3276 amigaos*)
3277 # On AmigaOS with pdksh, this test takes hours, literally.
3278 # So we just punt and use a minimum line length of 8192.
3279 lt_cv_sys_max_cmd_len=8192;
3280 ;;
3281
3282 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
3283 # This has been around since 386BSD, at least. Likely further.
3284 if test -x /sbin/sysctl; then
3285 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3286 elif test -x /usr/sbin/sysctl; then
3287 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3288 else
3289 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3290 fi
3291 # And add a safety zone
3292 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3293 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3294 ;;
3295
3296 interix*)
3297 # We know the value 262144 and hardcode it with a safety zone (like BSD)
3298 lt_cv_sys_max_cmd_len=196608
3299 ;;
3300
3301 os2*)
3302 # The test takes a long time on OS/2.
3303 lt_cv_sys_max_cmd_len=8192
3304 ;;
3305
3306 osf*)
3307 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3308 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3309 # nice to cause kernel panics so lets avoid the loop below.
3310 # First set a reasonable default.
3311 lt_cv_sys_max_cmd_len=16384
3312 #
3313 if test -x /sbin/sysconfig; then
3314 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3315 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3316 esac
3317 fi
3318 ;;
3319 sco3.2v5*)
3320 lt_cv_sys_max_cmd_len=102400
3321 ;;
3322 sysv5* | sco5v6* | sysv4.2uw2*)
3323 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3324 if test -n "$kargmax"; then
3325 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3326 else
3327 lt_cv_sys_max_cmd_len=32768
3328 fi
3329 ;;
3330 *)
3331 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3332 if test -n "$lt_cv_sys_max_cmd_len" && \
3333 test undefined != "$lt_cv_sys_max_cmd_len"; then
3334 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3335 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3336 else
3337 # Make teststring a little bigger before we do anything with it.
3338 # a 1K string should be a reasonable start.
3339 for i in 1 2 3 4 5 6 7 8; do
3340 teststring=$teststring$teststring
3341 done
3342 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3343 # If test is not a shell built-in, we'll probably end up computing a
3344 # maximum length that is only half of the actual maximum length, but
3345 # we can't tell.
3346 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
3347 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3348 test 17 != "$i" # 1/2 MB should be enough
3349 do
3350 i=`expr $i + 1`
3351 teststring=$teststring$teststring
3352 done
3353 # Only check the string length outside the loop.
3354 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3355 teststring=
3356 # Add a significant safety factor because C++ compilers can tack on
3357 # massive amounts of additional arguments before passing them to the
3358 # linker. It appears as though 1/2 is a usable value.
3359 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3360 fi
3361 ;;
3362 esac
3363 ])
3364 if test -n "$lt_cv_sys_max_cmd_len"; then
3365 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3366 else
3367 AC_MSG_RESULT(none)
3368 fi
3369 max_cmd_len=$lt_cv_sys_max_cmd_len
3370 _LT_DECL([], [max_cmd_len], [0],
3371 [What is the maximum length of a command?])
3372 ])# LT_CMD_MAX_LEN
3373
3374 # Old name:
3375 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3376 dnl aclocal-1.4 backwards compatibility:
3377 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3378
3379
3380 # _LT_HEADER_DLFCN
3381 # ----------------
3382 m4_defun([_LT_HEADER_DLFCN],
3383 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3384 ])# _LT_HEADER_DLFCN
3385
3386
3387 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3388 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3389 # ----------------------------------------------------------------
3390 m4_defun([_LT_TRY_DLOPEN_SELF],
3391 [m4_require([_LT_HEADER_DLFCN])dnl
3392 if test yes = "$cross_compiling"; then :
3393 [$4]
3394 else
3395 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3396 lt_status=$lt_dlunknown
3397 cat > conftest.$ac_ext <<_LT_EOF
3398 [#line $LINENO "configure"
3399 #include "confdefs.h"
3400
3401 #if HAVE_DLFCN_H
3402 #include <dlfcn.h>
3403 #endif
3404
3405 #include <stdio.h>
3406
3407 #ifdef RTLD_GLOBAL
3408 # define LT_DLGLOBAL RTLD_GLOBAL
3409 #else
3410 # ifdef DL_GLOBAL
3411 # define LT_DLGLOBAL DL_GLOBAL
3412 # else
3413 # define LT_DLGLOBAL 0
3414 # endif
3415 #endif
3416
3417 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3418 find out it does not work in some platform. */
3419 #ifndef LT_DLLAZY_OR_NOW
3420 # ifdef RTLD_LAZY
3421 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3422 # else
3423 # ifdef DL_LAZY
3424 # define LT_DLLAZY_OR_NOW DL_LAZY
3425 # else
3426 # ifdef RTLD_NOW
3427 # define LT_DLLAZY_OR_NOW RTLD_NOW
3428 # else
3429 # ifdef DL_NOW
3430 # define LT_DLLAZY_OR_NOW DL_NOW
3431 # else
3432 # define LT_DLLAZY_OR_NOW 0
3433 # endif
3434 # endif
3435 # endif
3436 # endif
3437 #endif
3438
3439 /* When -fvisibility=hidden is used, assume the code has been annotated
3440 correspondingly for the symbols needed. */
3441 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3442 int fnord () __attribute__((visibility("default")));
3443 #endif
3444
3445 int fnord () { return 42; }
3446 int main ()
3447 {
3448 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3449 int status = $lt_dlunknown;
3450
3451 if (self)
3452 {
3453 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3454 else
3455 {
3456 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3457 else puts (dlerror ());
3458 }
3459 /* dlclose (self); */
3460 }
3461 else
3462 puts (dlerror ());
3463
3464 return status;
3465 }]
3466 _LT_EOF
3467 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
3468 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3469 lt_status=$?
3470 case x$lt_status in
3471 x$lt_dlno_uscore) $1 ;;
3472 x$lt_dlneed_uscore) $2 ;;
3473 x$lt_dlunknown|x*) $3 ;;
3474 esac
3475 else :
3476 # compilation failed
3477 $3
3478 fi
3479 fi
3480 rm -fr conftest*
3481 ])# _LT_TRY_DLOPEN_SELF
3482
3483
3484 # LT_SYS_DLOPEN_SELF
3485 # ------------------
3486 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3487 [m4_require([_LT_HEADER_DLFCN])dnl
3488 if test yes != "$enable_dlopen"; then
3489 enable_dlopen=unknown
3490 enable_dlopen_self=unknown
3491 enable_dlopen_self_static=unknown
3492 else
3493 lt_cv_dlopen=no
3494 lt_cv_dlopen_libs=
3495
3496 case $host_os in
3497 beos*)
3498 lt_cv_dlopen=load_add_on
3499 lt_cv_dlopen_libs=
3500 lt_cv_dlopen_self=yes
3501 ;;
3502
3503 mingw* | pw32* | cegcc*)
3504 lt_cv_dlopen=LoadLibrary
3505 lt_cv_dlopen_libs=
3506 ;;
3507
3508 cygwin*)
3509 lt_cv_dlopen=dlopen
3510 lt_cv_dlopen_libs=
3511 ;;
3512
3513 darwin*)
3514 # if libdl is installed we need to link against it
3515 AC_CHECK_LIB([dl], [dlopen],
3516 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
3517 lt_cv_dlopen=dyld
3518 lt_cv_dlopen_libs=
3519 lt_cv_dlopen_self=yes
3520 ])
3521 ;;
3522
3523 tpf*)
3524 # Don't try to run any link tests for TPF. We know it's impossible
3525 # because TPF is a cross-compiler, and we know how we open DSOs.
3526 lt_cv_dlopen=dlopen
3527 lt_cv_dlopen_libs=
3528 lt_cv_dlopen_self=no
3529 ;;
3530
3531 *)
3532 AC_CHECK_FUNC([shl_load],
3533 [lt_cv_dlopen=shl_load],
3534 [AC_CHECK_LIB([dld], [shl_load],
3535 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
3536 [AC_CHECK_FUNC([dlopen],
3537 [lt_cv_dlopen=dlopen],
3538 [AC_CHECK_LIB([dl], [dlopen],
3539 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
3540 [AC_CHECK_LIB([svld], [dlopen],
3541 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
3542 [AC_CHECK_LIB([dld], [dld_link],
3543 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
3544 ])
3545 ])
3546 ])
3547 ])
3548 ])
3549 ;;
3550 esac
3551
3552 if test no = "$lt_cv_dlopen"; then
3553 enable_dlopen=no
3554 else
3555 enable_dlopen=yes
3556 fi
3557
3558 case $lt_cv_dlopen in
3559 dlopen)
3560 save_CPPFLAGS=$CPPFLAGS
3561 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3562
3563 save_LDFLAGS=$LDFLAGS
3564 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3565
3566 save_LIBS=$LIBS
3567 LIBS="$lt_cv_dlopen_libs $LIBS"
3568
3569 AC_CACHE_CHECK([whether a program can dlopen itself],
3570 lt_cv_dlopen_self, [dnl
3571 _LT_TRY_DLOPEN_SELF(
3572 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3573 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3574 ])
3575
3576 if test yes = "$lt_cv_dlopen_self"; then
3577 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3578 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3579 lt_cv_dlopen_self_static, [dnl
3580 _LT_TRY_DLOPEN_SELF(
3581 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3582 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3583 ])
3584 fi
3585
3586 CPPFLAGS=$save_CPPFLAGS
3587 LDFLAGS=$save_LDFLAGS
3588 LIBS=$save_LIBS
3589 ;;
3590 esac
3591
3592 case $lt_cv_dlopen_self in
3593 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3594 *) enable_dlopen_self=unknown ;;
3595 esac
3596
3597 case $lt_cv_dlopen_self_static in
3598 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3599 *) enable_dlopen_self_static=unknown ;;
3600 esac
3601 fi
3602 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3603 [Whether dlopen is supported])
3604 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3605 [Whether dlopen of programs is supported])
3606 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3607 [Whether dlopen of statically linked programs is supported])
3608 ])# LT_SYS_DLOPEN_SELF
3609
3610 # Old name:
3611 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3612 dnl aclocal-1.4 backwards compatibility:
3613 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3614
3615
3616 # _LT_COMPILER_C_O([TAGNAME])
3617 # ---------------------------
3618 # Check to see if options -c and -o are simultaneously supported by compiler.
3619 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3620 m4_defun([_LT_COMPILER_C_O],
3621 [m4_require([_LT_DECL_SED])dnl
3622 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3623 m4_require([_LT_TAG_COMPILER])dnl
3624 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3625 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3626 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3627 $RM -r conftest 2>/dev/null
3628 mkdir conftest
3629 cd conftest
3630 mkdir out
3631 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3632
3633 lt_compiler_flag="-o out/conftest2.$ac_objext"
3634 # Insert the option either (1) after the last *FLAGS variable, or
3635 # (2) before a word containing "conftest.", or (3) at the end.
3636 # Note that $ac_compile itself does not contain backslashes and begins
3637 # with a dollar sign (not a hyphen), so the echo should work correctly.
3638 lt_compile=`echo "$ac_compile" | $SED \
3639 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3640 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3641 -e 's:$: $lt_compiler_flag:'`
3642 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3643 (eval "$lt_compile" 2>out/conftest.err)
3644 ac_status=$?
3645 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3646 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3647 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3648 then
3649 # The compiler can only warn and ignore the option if not recognized
3650 # So say no if there are warnings
3651 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3652 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3653 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3654 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3655 fi
3656 fi
3657 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3658 $RM conftest*
3659 # SGI C++ compiler will create directory out/ii_files/ for
3660 # template instantiation
3661 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3662 $RM out/* && rmdir out
3663 cd ..
3664 $RM -r conftest
3665 $RM conftest*
3666 ])
3667 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3668 [Does compiler simultaneously support -c and -o options?])
3669 ])# _LT_COMPILER_C_O
3670
3671
3672 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3673 # ----------------------------------
3674 # Check to see if we can do hard links to lock some files if needed
3675 m4_defun([_LT_COMPILER_FILE_LOCKS],
3676 [m4_require([_LT_ENABLE_LOCK])dnl
3677 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3678 _LT_COMPILER_C_O([$1])
3679
3680 hard_links=nottested
3681 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
3682 # do not overwrite the value of need_locks provided by the user
3683 AC_MSG_CHECKING([if we can lock with hard links])
3684 hard_links=yes
3685 $RM conftest*
3686 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3687 touch conftest.a
3688 ln conftest.a conftest.b 2>&5 || hard_links=no
3689 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3690 AC_MSG_RESULT([$hard_links])
3691 if test no = "$hard_links"; then
3692 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
3693 need_locks=warn
3694 fi
3695 else
3696 need_locks=no
3697 fi
3698 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3699 ])# _LT_COMPILER_FILE_LOCKS
3700
3701
3702 # _LT_CHECK_OBJDIR
3703 # ----------------
3704 m4_defun([_LT_CHECK_OBJDIR],
3705 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3706 [rm -f .libs 2>/dev/null
3707 mkdir .libs 2>/dev/null
3708 if test -d .libs; then
3709 lt_cv_objdir=.libs
3710 else
3711 # MS-DOS does not allow filenames that begin with a dot.
3712 lt_cv_objdir=_libs
3713 fi
3714 rmdir .libs 2>/dev/null])
3715 objdir=$lt_cv_objdir
3716 _LT_DECL([], [objdir], [0],
3717 [The name of the directory that contains temporary libtool files])dnl
3718 m4_pattern_allow([LT_OBJDIR])dnl
3719 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
3720 [Define to the sub-directory where libtool stores uninstalled libraries.])
3721 ])# _LT_CHECK_OBJDIR
3722
3723
3724 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3725 # --------------------------------------
3726 # Check hardcoding attributes.
3727 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3728 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3729 _LT_TAGVAR(hardcode_action, $1)=
3730 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3731 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3732 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
3733
3734 # We can hardcode non-existent directories.
3735 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
3736 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3737 # have to relink, otherwise we might link with an installed library
3738 # when we should be linking with a yet-to-be-installed one
3739 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
3740 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
3741 # Linking always hardcodes the temporary library directory.
3742 _LT_TAGVAR(hardcode_action, $1)=relink
3743 else
3744 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3745 _LT_TAGVAR(hardcode_action, $1)=immediate
3746 fi
3747 else
3748 # We cannot hardcode anything, or else we can only hardcode existing
3749 # directories.
3750 _LT_TAGVAR(hardcode_action, $1)=unsupported
3751 fi
3752 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3753
3754 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
3755 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
3756 # Fast installation is not supported
3757 enable_fast_install=no
3758 elif test yes = "$shlibpath_overrides_runpath" ||
3759 test no = "$enable_shared"; then
3760 # Fast installation is not necessary
3761 enable_fast_install=needless
3762 fi
3763 _LT_TAGDECL([], [hardcode_action], [0],
3764 [How to hardcode a shared library path into an executable])
3765 ])# _LT_LINKER_HARDCODE_LIBPATH
3766
3767
3768 # _LT_CMD_STRIPLIB
3769 # ----------------
3770 m4_defun([_LT_CMD_STRIPLIB],
3771 [m4_require([_LT_DECL_EGREP])
3772 striplib=
3773 old_striplib=
3774 AC_MSG_CHECKING([whether stripping libraries is possible])
3775 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3776 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3777 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3778 AC_MSG_RESULT([yes])
3779 else
3780 # FIXME - insert some real tests, host_os isn't really good enough
3781 case $host_os in
3782 darwin*)
3783 if test -n "$STRIP"; then
3784 striplib="$STRIP -x"
3785 old_striplib="$STRIP -S"
3786 AC_MSG_RESULT([yes])
3787 else
3788 AC_MSG_RESULT([no])
3789 fi
3790 ;;
3791 *)
3792 AC_MSG_RESULT([no])
3793 ;;
3794 esac
3795 fi
3796 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3797 _LT_DECL([], [striplib], [1])
3798 ])# _LT_CMD_STRIPLIB
3799
3800
3801 # _LT_PREPARE_MUNGE_PATH_LIST
3802 # ---------------------------
3803 # Make sure func_munge_path_list() is defined correctly.
3804 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
3805 [[# func_munge_path_list VARIABLE PATH
3806 # -----------------------------------
3807 # VARIABLE is name of variable containing _space_ separated list of
3808 # directories to be munged by the contents of PATH, which is string
3809 # having a format:
3810 # "DIR[:DIR]:"
3811 # string "DIR[ DIR]" will be prepended to VARIABLE
3812 # ":DIR[:DIR]"
3813 # string "DIR[ DIR]" will be appended to VARIABLE
3814 # "DIRP[:DIRP]::[DIRA:]DIRA"
3815 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
3816 # "DIRA[ DIRA]" will be appended to VARIABLE
3817 # "DIR[:DIR]"
3818 # VARIABLE will be replaced by "DIR[ DIR]"
3819 func_munge_path_list ()
3820 {
3821 case x@S|@2 in
3822 x)
3823 ;;
3824 *:)
3825 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
3826 ;;
3827 x:*)
3828 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
3829 ;;
3830 *::*)
3831 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
3832 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
3833 ;;
3834 *)
3835 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
3836 ;;
3837 esac
3838 }
3839 ]])# _LT_PREPARE_PATH_LIST
3840
3841
3842 # _LT_SYS_DYNAMIC_LINKER([TAG])
3843 # -----------------------------
3844 # PORTME Fill in your ld.so characteristics
3845 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3846 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3847 m4_require([_LT_DECL_EGREP])dnl
3848 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3849 m4_require([_LT_DECL_OBJDUMP])dnl
3850 m4_require([_LT_DECL_SED])dnl
3851 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3852 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
3853 AC_MSG_CHECKING([dynamic linker characteristics])
3854 m4_if([$1],
3855 [], [
3856 if test yes = "$GCC"; then
3857 case $host_os in
3858 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
3859 *) lt_awk_arg='/^libraries:/' ;;
3860 esac
3861 case $host_os in
3862 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
3863 *) lt_sed_strip_eq='s|=/|/|g' ;;
3864 esac
3865 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3866 case $lt_search_path_spec in
3867 *\;*)
3868 # if the path contains ";" then we assume it to be the separator
3869 # otherwise default to the standard path separator (i.e. ":") - it is
3870 # assumed that no part of a normal pathname contains ";" but that should
3871 # okay in the real world where ";" in dirpaths is itself problematic.
3872 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3873 ;;
3874 *)
3875 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3876 ;;
3877 esac
3878 # Ok, now we have the path, separated by spaces, we can step through it
3879 # and add multilib dir if necessary...
3880 lt_tmp_lt_search_path_spec=
3881 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3882 # ...but if some path component already ends with the multilib dir we assume
3883 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
3884 case "$lt_multi_os_dir; $lt_search_path_spec " in
3885 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
3886 lt_multi_os_dir=
3887 ;;
3888 esac
3889 for lt_sys_path in $lt_search_path_spec; do
3890 if test -d "$lt_sys_path$lt_multi_os_dir"; then
3891 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
3892 elif test -n "$lt_multi_os_dir"; then
3893 test -d "$lt_sys_path" && \
3894 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3895 fi
3896 done
3897 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3898 BEGIN {RS = " "; FS = "/|\n";} {
3899 lt_foo = "";
3900 lt_count = 0;
3901 for (lt_i = NF; lt_i > 0; lt_i--) {
3902 if ($lt_i != "" && $lt_i != ".") {
3903 if ($lt_i == "..") {
3904 lt_count++;
3905 } else {
3906 if (lt_count == 0) {
3907 lt_foo = "/" $lt_i lt_foo;
3908 } else {
3909 lt_count--;
3910 }
3911 }
3912 }
3913 }
3914 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3915 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3916 }'`
3917 # AWK program above erroneously prepends '/' to C:/dos/paths
3918 # for these hosts.
3919 case $host_os in
3920 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3921 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
3922 esac
3923 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3924 else
3925 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3926 fi])
3927 library_names_spec=
3928 libname_spec='lib$name'
3929 soname_spec=
3930 shrext_cmds=.so
3931 postinstall_cmds=
3932 postuninstall_cmds=
3933 finish_cmds=
3934 finish_eval=
3935 shlibpath_var=
3936 shlibpath_overrides_runpath=unknown
3937 version_type=none
3938 dynamic_linker="$host_os ld.so"
3939 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3940 need_lib_prefix=unknown
3941 hardcode_into_libs=no
3942
3943 # when you set need_version to no, make sure it does not cause -set_version
3944 # flags to be left without arguments
3945 need_version=unknown
3946
3947 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
3948 [User-defined run-time library search path.])
3949
3950 case $host_os in
3951 aix3*)
3952 version_type=linux # correct to gnu/linux during the next big refactor
3953 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
3954 shlibpath_var=LIBPATH
3955
3956 # AIX 3 has no versioning support, so we append a major version to the name.
3957 soname_spec='$libname$release$shared_ext$major'
3958 ;;
3959
3960 aix[[4-9]]*)
3961 version_type=linux # correct to gnu/linux during the next big refactor
3962 need_lib_prefix=no
3963 need_version=no
3964 hardcode_into_libs=yes
3965 if test ia64 = "$host_cpu"; then
3966 # AIX 5 supports IA64
3967 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
3968 shlibpath_var=LD_LIBRARY_PATH
3969 else
3970 # With GCC up to 2.95.x, collect2 would create an import file
3971 # for dependence libraries. The import file would start with
3972 # the line '#! .'. This would cause the generated library to
3973 # depend on '.', always an invalid library. This was fixed in
3974 # development snapshots of GCC prior to 3.0.
3975 case $host_os in
3976 aix4 | aix4.[[01]] | aix4.[[01]].*)
3977 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3978 echo ' yes '
3979 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
3980 :
3981 else
3982 can_build_shared=no
3983 fi
3984 ;;
3985 esac
3986 # Using Import Files as archive members, it is possible to support
3987 # filename-based versioning of shared library archives on AIX. While
3988 # this would work for both with and without runtime linking, it will
3989 # prevent static linking of such archives. So we do filename-based
3990 # shared library versioning with .so extension only, which is used
3991 # when both runtime linking and shared linking is enabled.
3992 # Unfortunately, runtime linking may impact performance, so we do
3993 # not want this to be the default eventually. Also, we use the
3994 # versioned .so libs for executables only if there is the -brtl
3995 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
3996 # To allow for filename-based versioning support, we need to create
3997 # libNAME.so.V as an archive file, containing:
3998 # *) an Import File, referring to the versioned filename of the
3999 # archive as well as the shared archive member, telling the
4000 # bitwidth (32 or 64) of that shared object, and providing the
4001 # list of exported symbols of that shared object, eventually
4002 # decorated with the 'weak' keyword
4003 # *) the shared object with the F_LOADONLY flag set, to really avoid
4004 # it being seen by the linker.
4005 # At run time we better use the real file rather than another symlink,
4006 # but for link time we create the symlink libNAME.so -> libNAME.so.V
4007
4008 case $with_aix_soname,$aix_use_runtimelinking in
4009 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
4010 # soname into executable. Probably we can add versioning support to
4011 # collect2, so additional links can be useful in future.
4012 aix,yes) # traditional libtool
4013 dynamic_linker='AIX unversionable lib.so'
4014 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4015 # instead of lib<name>.a to let people know that these are not
4016 # typical AIX shared libraries.
4017 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4018 ;;
4019 aix,no) # traditional AIX only
4020 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
4021 # We preserve .a as extension for shared libraries through AIX4.2
4022 # and later when we are not doing run time linking.
4023 library_names_spec='$libname$release.a $libname.a'
4024 soname_spec='$libname$release$shared_ext$major'
4025 ;;
4026 svr4,*) # full svr4 only
4027 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
4028 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4029 # We do not specify a path in Import Files, so LIBPATH fires.
4030 shlibpath_overrides_runpath=yes
4031 ;;
4032 *,yes) # both, prefer svr4
4033 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
4034 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4035 # unpreferred sharedlib libNAME.a needs extra handling
4036 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
4037 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
4038 # We do not specify a path in Import Files, so LIBPATH fires.
4039 shlibpath_overrides_runpath=yes
4040 ;;
4041 *,no) # both, prefer aix
4042 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
4043 library_names_spec='$libname$release.a $libname.a'
4044 soname_spec='$libname$release$shared_ext$major'
4045 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
4046 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
4047 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
4048 ;;
4049 esac
4050 shlibpath_var=LIBPATH
4051 fi
4052 ;;
4053
4054 amigaos*)
4055 case $host_cpu in
4056 powerpc)
4057 # Since July 2007 AmigaOS4 officially supports .so libraries.
4058 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4060 ;;
4061 m68k)
4062 library_names_spec='$libname.ixlibrary $libname.a'
4063 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4064 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
4065 ;;
4066 esac
4067 ;;
4068
4069 beos*)
4070 library_names_spec='$libname$shared_ext'
4071 dynamic_linker="$host_os ld.so"
4072 shlibpath_var=LIBRARY_PATH
4073 ;;
4074
4075 bsdi[[45]]*)
4076 version_type=linux # correct to gnu/linux during the next big refactor
4077 need_version=no
4078 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4079 soname_spec='$libname$release$shared_ext$major'
4080 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4081 shlibpath_var=LD_LIBRARY_PATH
4082 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4083 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4084 # the default ld.so.conf also contains /usr/contrib/lib and
4085 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4086 # libtool to hard-code these into programs
4087 ;;
4088
4089 cygwin* | mingw* | pw32* | cegcc*)
4090 version_type=windows
4091 shrext_cmds=.dll
4092 need_version=no
4093 need_lib_prefix=no
4094
4095 case $GCC,$cc_basename in
4096 yes,*)
4097 # gcc
4098 library_names_spec='$libname.dll.a'
4099 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4100 postinstall_cmds='base_file=`basename \$file`~
4101 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4102 dldir=$destdir/`dirname \$dlpath`~
4103 test -d \$dldir || mkdir -p \$dldir~
4104 $install_prog $dir/$dlname \$dldir/$dlname~
4105 chmod a+x \$dldir/$dlname~
4106 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4107 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4108 fi'
4109 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4110 dlpath=$dir/\$dldll~
4111 $RM \$dlpath'
4112 shlibpath_overrides_runpath=yes
4113
4114 case $host_os in
4115 cygwin*)
4116 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4117 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4118 m4_if([$1], [],[
4119 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4120 ;;
4121 mingw* | cegcc*)
4122 # MinGW DLLs use traditional 'lib' prefix
4123 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4124 ;;
4125 pw32*)
4126 # pw32 DLLs use 'pw' prefix rather than 'lib'
4127 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4128 ;;
4129 esac
4130 dynamic_linker='Win32 ld.exe'
4131 ;;
4132
4133 *,cl*)
4134 # Native MSVC
4135 libname_spec='$name'
4136 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4137 library_names_spec='$libname.dll.lib'
4138
4139 case $build_os in
4140 mingw*)
4141 sys_lib_search_path_spec=
4142 lt_save_ifs=$IFS
4143 IFS=';'
4144 for lt_path in $LIB
4145 do
4146 IFS=$lt_save_ifs
4147 # Let DOS variable expansion print the short 8.3 style file name.
4148 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4149 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4150 done
4151 IFS=$lt_save_ifs
4152 # Convert to MSYS style.
4153 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4154 ;;
4155 cygwin*)
4156 # Convert to unix form, then to dos form, then back to unix form
4157 # but this time dos style (no spaces!) so that the unix form looks
4158 # like /cygdrive/c/PROGRA~1:/cygdr...
4159 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4160 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4161 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4162 ;;
4163 *)
4164 sys_lib_search_path_spec=$LIB
4165 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4166 # It is most probably a Windows format PATH.
4167 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4168 else
4169 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4170 fi
4171 # FIXME: find the short name or the path components, as spaces are
4172 # common. (e.g. "Program Files" -> "PROGRA~1")
4173 ;;
4174 esac
4175
4176 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4177 postinstall_cmds='base_file=`basename \$file`~
4178 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4179 dldir=$destdir/`dirname \$dlpath`~
4180 test -d \$dldir || mkdir -p \$dldir~
4181 $install_prog $dir/$dlname \$dldir/$dlname'
4182 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4183 dlpath=$dir/\$dldll~
4184 $RM \$dlpath'
4185 shlibpath_overrides_runpath=yes
4186 dynamic_linker='Win32 link.exe'
4187 ;;
4188
4189 *)
4190 # Assume MSVC wrapper
4191 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
4192 dynamic_linker='Win32 ld.exe'
4193 ;;
4194 esac
4195 # FIXME: first we should search . and the directory the executable is in
4196 shlibpath_var=PATH
4197 ;;
4198
4199 darwin* | rhapsody*)
4200 dynamic_linker="$host_os dyld"
4201 version_type=darwin
4202 need_lib_prefix=no
4203 need_version=no
4204 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
4205 soname_spec='$libname$release$major$shared_ext'
4206 shlibpath_overrides_runpath=yes
4207 shlibpath_var=DYLD_LIBRARY_PATH
4208 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4209 m4_if([$1], [],[
4210 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4211 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4212 ;;
4213
4214 dgux*)
4215 version_type=linux # correct to gnu/linux during the next big refactor
4216 need_lib_prefix=no
4217 need_version=no
4218 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4219 soname_spec='$libname$release$shared_ext$major'
4220 shlibpath_var=LD_LIBRARY_PATH
4221 ;;
4222
4223 freebsd* | dragonfly*)
4224 # DragonFly does not have aout. When/if they implement a new
4225 # versioning mechanism, adjust this.
4226 if test -x /usr/bin/objformat; then
4227 objformat=`/usr/bin/objformat`
4228 else
4229 case $host_os in
4230 freebsd[[23]].*) objformat=aout ;;
4231 *) objformat=elf ;;
4232 esac
4233 fi
4234 version_type=freebsd-$objformat
4235 case $version_type in
4236 freebsd-elf*)
4237 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4238 soname_spec='$libname$release$shared_ext$major'
4239 need_version=no
4240 need_lib_prefix=no
4241 ;;
4242 freebsd-*)
4243 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4244 need_version=yes
4245 ;;
4246 esac
4247 shlibpath_var=LD_LIBRARY_PATH
4248 case $host_os in
4249 freebsd2.*)
4250 shlibpath_overrides_runpath=yes
4251 ;;
4252 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4253 shlibpath_overrides_runpath=yes
4254 hardcode_into_libs=yes
4255 ;;
4256 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4257 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4258 shlibpath_overrides_runpath=no
4259 hardcode_into_libs=yes
4260 ;;
4261 *) # from 4.6 on, and DragonFly
4262 shlibpath_overrides_runpath=yes
4263 hardcode_into_libs=yes
4264 ;;
4265 esac
4266 ;;
4267
4268 haiku*)
4269 version_type=linux # correct to gnu/linux during the next big refactor
4270 need_lib_prefix=no
4271 need_version=no
4272 dynamic_linker="$host_os runtime_loader"
4273 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4274 soname_spec='$libname$release$shared_ext$major'
4275 shlibpath_var=LIBRARY_PATH
4276 shlibpath_overrides_runpath=no
4277 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4278 hardcode_into_libs=yes
4279 ;;
4280
4281 hpux9* | hpux10* | hpux11*)
4282 # Give a soname corresponding to the major version so that dld.sl refuses to
4283 # link against other versions.
4284 version_type=sunos
4285 need_lib_prefix=no
4286 need_version=no
4287 case $host_cpu in
4288 ia64*)
4289 shrext_cmds='.so'
4290 hardcode_into_libs=yes
4291 dynamic_linker="$host_os dld.so"
4292 shlibpath_var=LD_LIBRARY_PATH
4293 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4294 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4295 soname_spec='$libname$release$shared_ext$major'
4296 if test 32 = "$HPUX_IA64_MODE"; then
4297 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4298 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
4299 else
4300 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4301 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
4302 fi
4303 ;;
4304 hppa*64*)
4305 shrext_cmds='.sl'
4306 hardcode_into_libs=yes
4307 dynamic_linker="$host_os dld.sl"
4308 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4309 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4310 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4311 soname_spec='$libname$release$shared_ext$major'
4312 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4313 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4314 ;;
4315 *)
4316 shrext_cmds='.sl'
4317 dynamic_linker="$host_os dld.sl"
4318 shlibpath_var=SHLIB_PATH
4319 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4320 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4321 soname_spec='$libname$release$shared_ext$major'
4322 ;;
4323 esac
4324 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4325 postinstall_cmds='chmod 555 $lib'
4326 # or fails outright, so override atomically:
4327 install_override_mode=555
4328 ;;
4329
4330 interix[[3-9]]*)
4331 version_type=linux # correct to gnu/linux during the next big refactor
4332 need_lib_prefix=no
4333 need_version=no
4334 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4335 soname_spec='$libname$release$shared_ext$major'
4336 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4337 shlibpath_var=LD_LIBRARY_PATH
4338 shlibpath_overrides_runpath=no
4339 hardcode_into_libs=yes
4340 ;;
4341
4342 irix5* | irix6* | nonstopux*)
4343 case $host_os in
4344 nonstopux*) version_type=nonstopux ;;
4345 *)
4346 if test yes = "$lt_cv_prog_gnu_ld"; then
4347 version_type=linux # correct to gnu/linux during the next big refactor
4348 else
4349 version_type=irix
4350 fi ;;
4351 esac
4352 need_lib_prefix=no
4353 need_version=no
4354 soname_spec='$libname$release$shared_ext$major'
4355 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
4356 case $host_os in
4357 irix5* | nonstopux*)
4358 libsuff= shlibsuff=
4359 ;;
4360 *)
4361 case $LD in # libtool.m4 will add one of these switches to LD
4362 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4363 libsuff= shlibsuff= libmagic=32-bit;;
4364 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4365 libsuff=32 shlibsuff=N32 libmagic=N32;;
4366 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4367 libsuff=64 shlibsuff=64 libmagic=64-bit;;
4368 *) libsuff= shlibsuff= libmagic=never-match;;
4369 esac
4370 ;;
4371 esac
4372 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4373 shlibpath_overrides_runpath=no
4374 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
4375 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
4376 hardcode_into_libs=yes
4377 ;;
4378
4379 # No shared lib support for Linux oldld, aout, or coff.
4380 linux*oldld* | linux*aout* | linux*coff*)
4381 dynamic_linker=no
4382 ;;
4383
4384 linux*android*)
4385 version_type=none # Android doesn't support versioned libraries.
4386 need_lib_prefix=no
4387 need_version=no
4388 library_names_spec='$libname$release$shared_ext'
4389 soname_spec='$libname$release$shared_ext'
4390 finish_cmds=
4391 shlibpath_var=LD_LIBRARY_PATH
4392 shlibpath_overrides_runpath=yes
4393
4394 # This implies no fast_install, which is unacceptable.
4395 # Some rework will be needed to allow for fast_install
4396 # before this can be enabled.
4397 hardcode_into_libs=yes
4398
4399 dynamic_linker='Android linker'
4400 # Don't embed -rpath directories since the linker doesn't support them.
4401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4402 ;;
4403
4404 # This must be glibc/ELF.
4405 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4406 version_type=linux # correct to gnu/linux during the next big refactor
4407 need_lib_prefix=no
4408 need_version=no
4409 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4410 soname_spec='$libname$release$shared_ext$major'
4411 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4412 shlibpath_var=LD_LIBRARY_PATH
4413 shlibpath_overrides_runpath=no
4414
4415 # Some binutils ld are patched to set DT_RUNPATH
4416 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4417 [lt_cv_shlibpath_overrides_runpath=no
4418 save_LDFLAGS=$LDFLAGS
4419 save_libdir=$libdir
4420 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4421 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4422 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4423 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4424 [lt_cv_shlibpath_overrides_runpath=yes])])
4425 LDFLAGS=$save_LDFLAGS
4426 libdir=$save_libdir
4427 ])
4428 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4429
4430 # This implies no fast_install, which is unacceptable.
4431 # Some rework will be needed to allow for fast_install
4432 # before this can be enabled.
4433 hardcode_into_libs=yes
4434
4435 # Ideally, we could use ldconfig to report *all* directores which are
4436 # searched for libraries, however this is still not possible. Aside from not
4437 # being certain /sbin/ldconfig is available, command
4438 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
4439 # even though it is searched at run-time. Try to do the best guess by
4440 # appending ld.so.conf contents (and includes) to the search path.
4441 if test -f /etc/ld.so.conf; then
4442 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' ' '`
4443 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4444 fi
4445
4446 # We used to test for /lib/ld.so.1 and disable shared libraries on
4447 # powerpc, because MkLinux only supported shared libraries with the
4448 # GNU dynamic linker. Since this was broken with cross compilers,
4449 # most powerpc-linux boxes support dynamic linking these days and
4450 # people can always --disable-shared, the test was removed, and we
4451 # assume the GNU/Linux dynamic linker is in use.
4452 dynamic_linker='GNU/Linux ld.so'
4453 ;;
4454
4455 netbsdelf*-gnu)
4456 version_type=linux
4457 need_lib_prefix=no
4458 need_version=no
4459 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4460 soname_spec='${libname}${release}${shared_ext}$major'
4461 shlibpath_var=LD_LIBRARY_PATH
4462 shlibpath_overrides_runpath=no
4463 hardcode_into_libs=yes
4464 dynamic_linker='NetBSD ld.elf_so'
4465 ;;
4466
4467 netbsd*)
4468 version_type=sunos
4469 need_lib_prefix=no
4470 need_version=no
4471 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4472 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4473 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4474 dynamic_linker='NetBSD (a.out) ld.so'
4475 else
4476 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4477 soname_spec='$libname$release$shared_ext$major'
4478 dynamic_linker='NetBSD ld.elf_so'
4479 fi
4480 shlibpath_var=LD_LIBRARY_PATH
4481 shlibpath_overrides_runpath=yes
4482 hardcode_into_libs=yes
4483 ;;
4484
4485 newsos6)
4486 version_type=linux # correct to gnu/linux during the next big refactor
4487 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4488 shlibpath_var=LD_LIBRARY_PATH
4489 shlibpath_overrides_runpath=yes
4490 ;;
4491
4492 *nto* | *qnx*)
4493 version_type=qnx
4494 need_lib_prefix=no
4495 need_version=no
4496 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4497 soname_spec='$libname$release$shared_ext$major'
4498 shlibpath_var=LD_LIBRARY_PATH
4499 shlibpath_overrides_runpath=no
4500 hardcode_into_libs=yes
4501 dynamic_linker='ldqnx.so'
4502 ;;
4503
4504 openbsd* | bitrig*)
4505 version_type=sunos
4506 sys_lib_dlsearch_path_spec=/usr/lib
4507 need_lib_prefix=no
4508 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4509 need_version=no
4510 else
4511 need_version=yes
4512 fi
4513 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4514 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4515 shlibpath_var=LD_LIBRARY_PATH
4516 shlibpath_overrides_runpath=yes
4517 ;;
4518
4519 os2*)
4520 libname_spec='$name'
4521 version_type=windows
4522 shrext_cmds=.dll
4523 need_version=no
4524 need_lib_prefix=no
4525 # OS/2 can only load a DLL with a base name of 8 characters or less.
4526 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
4527 v=$($ECHO $release$versuffix | tr -d .-);
4528 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
4529 $ECHO $n$v`$shared_ext'
4530 library_names_spec='${libname}_dll.$libext'
4531 dynamic_linker='OS/2 ld.exe'
4532 shlibpath_var=BEGINLIBPATH
4533 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4534 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4535 postinstall_cmds='base_file=`basename \$file`~
4536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
4537 dldir=$destdir/`dirname \$dlpath`~
4538 test -d \$dldir || mkdir -p \$dldir~
4539 $install_prog $dir/$dlname \$dldir/$dlname~
4540 chmod a+x \$dldir/$dlname~
4541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4543 fi'
4544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
4545 dlpath=$dir/\$dldll~
4546 $RM \$dlpath'
4547 ;;
4548
4549 osf3* | osf4* | osf5*)
4550 version_type=osf
4551 need_lib_prefix=no
4552 need_version=no
4553 soname_spec='$libname$release$shared_ext$major'
4554 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4555 shlibpath_var=LD_LIBRARY_PATH
4556 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4557 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4558 ;;
4559
4560 rdos*)
4561 dynamic_linker=no
4562 ;;
4563
4564 solaris*)
4565 version_type=linux # correct to gnu/linux during the next big refactor
4566 need_lib_prefix=no
4567 need_version=no
4568 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4569 soname_spec='$libname$release$shared_ext$major'
4570 shlibpath_var=LD_LIBRARY_PATH
4571 shlibpath_overrides_runpath=yes
4572 hardcode_into_libs=yes
4573 # ldd complains unless libraries are executable
4574 postinstall_cmds='chmod +x $lib'
4575 ;;
4576
4577 sunos4*)
4578 version_type=sunos
4579 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4580 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4581 shlibpath_var=LD_LIBRARY_PATH
4582 shlibpath_overrides_runpath=yes
4583 if test yes = "$with_gnu_ld"; then
4584 need_lib_prefix=no
4585 fi
4586 need_version=yes
4587 ;;
4588
4589 sysv4 | sysv4.3*)
4590 version_type=linux # correct to gnu/linux during the next big refactor
4591 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4592 soname_spec='$libname$release$shared_ext$major'
4593 shlibpath_var=LD_LIBRARY_PATH
4594 case $host_vendor in
4595 sni)
4596 shlibpath_overrides_runpath=no
4597 need_lib_prefix=no
4598 runpath_var=LD_RUN_PATH
4599 ;;
4600 siemens)
4601 need_lib_prefix=no
4602 ;;
4603 motorola)
4604 need_lib_prefix=no
4605 need_version=no
4606 shlibpath_overrides_runpath=no
4607 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4608 ;;
4609 esac
4610 ;;
4611
4612 sysv4*MP*)
4613 if test -d /usr/nec; then
4614 version_type=linux # correct to gnu/linux during the next big refactor
4615 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
4616 soname_spec='$libname$shared_ext.$major'
4617 shlibpath_var=LD_LIBRARY_PATH
4618 fi
4619 ;;
4620
4621 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4622 version_type=sco
4623 need_lib_prefix=no
4624 need_version=no
4625 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
4626 soname_spec='$libname$release$shared_ext$major'
4627 shlibpath_var=LD_LIBRARY_PATH
4628 shlibpath_overrides_runpath=yes
4629 hardcode_into_libs=yes
4630 if test yes = "$with_gnu_ld"; then
4631 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4632 else
4633 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4634 case $host_os in
4635 sco3.2v5*)
4636 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4637 ;;
4638 esac
4639 fi
4640 sys_lib_dlsearch_path_spec='/usr/lib'
4641 ;;
4642
4643 tpf*)
4644 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4645 version_type=linux # correct to gnu/linux during the next big refactor
4646 need_lib_prefix=no
4647 need_version=no
4648 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4649 shlibpath_var=LD_LIBRARY_PATH
4650 shlibpath_overrides_runpath=no
4651 hardcode_into_libs=yes
4652 ;;
4653
4654 uts4*)
4655 version_type=linux # correct to gnu/linux during the next big refactor
4656 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4657 soname_spec='$libname$release$shared_ext$major'
4658 shlibpath_var=LD_LIBRARY_PATH
4659 ;;
4660
4661 *)
4662 dynamic_linker=no
4663 ;;
4664 esac
4665 AC_MSG_RESULT([$dynamic_linker])
4666 test no = "$dynamic_linker" && can_build_shared=no
4667
4668 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4669 if test yes = "$GCC"; then
4670 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4671 fi
4672
4673 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
4674 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
4675 fi
4676
4677 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
4678 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
4679 fi
4680
4681 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
4682 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
4683
4684 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
4685 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
4686
4687 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
4688 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
4689
4690 _LT_DECL([], [variables_saved_for_relink], [1],
4691 [Variables whose values should be saved in libtool wrapper scripts and
4692 restored at link time])
4693 _LT_DECL([], [need_lib_prefix], [0],
4694 [Do we need the "lib" prefix for modules?])
4695 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4696 _LT_DECL([], [version_type], [0], [Library versioning type])
4697 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4698 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4699 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4700 [Is shlibpath searched before the hard-coded library search path?])
4701 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4702 _LT_DECL([], [library_names_spec], [1],
4703 [[List of archive names. First name is the real one, the rest are links.
4704 The last name is the one that the linker finds with -lNAME]])
4705 _LT_DECL([], [soname_spec], [1],
4706 [[The coded name of the library, if different from the real name]])
4707 _LT_DECL([], [install_override_mode], [1],
4708 [Permission mode override for installation of shared libraries])
4709 _LT_DECL([], [postinstall_cmds], [2],
4710 [Command to use after installation of a shared archive])
4711 _LT_DECL([], [postuninstall_cmds], [2],
4712 [Command to use after uninstallation of a shared archive])
4713 _LT_DECL([], [finish_cmds], [2],
4714 [Commands used to finish a libtool library installation in a directory])
4715 _LT_DECL([], [finish_eval], [1],
4716 [[As "finish_cmds", except a single script fragment to be evaled but
4717 not shown]])
4718 _LT_DECL([], [hardcode_into_libs], [0],
4719 [Whether we should hardcode library paths into libraries])
4720 _LT_DECL([], [sys_lib_search_path_spec], [2],
4721 [Compile-time system search path for libraries])
4722 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
4723 [Detected run-time system search path for libraries])
4724 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
4725 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
4726 ])# _LT_SYS_DYNAMIC_LINKER
4727
4728
4729 # _LT_PATH_TOOL_PREFIX(TOOL)
4730 # --------------------------
4731 # find a file program that can recognize shared library
4732 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4733 [m4_require([_LT_DECL_EGREP])dnl
4734 AC_MSG_CHECKING([for $1])
4735 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4736 [case $MAGIC_CMD in
4737 [[\\/*] | ?:[\\/]*])
4738 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
4739 ;;
4740 *)
4741 lt_save_MAGIC_CMD=$MAGIC_CMD
4742 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4743 dnl $ac_dummy forces splitting on constant user-supplied paths.
4744 dnl POSIX.2 word splitting is done only on the output of word expansions,
4745 dnl not every word. This closes a longstanding sh security hole.
4746 ac_dummy="m4_if([$2], , $PATH, [$2])"
4747 for ac_dir in $ac_dummy; do
4748 IFS=$lt_save_ifs
4749 test -z "$ac_dir" && ac_dir=.
4750 if test -f "$ac_dir/$1"; then
4751 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
4752 if test -n "$file_magic_test_file"; then
4753 case $deplibs_check_method in
4754 "file_magic "*)
4755 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4756 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
4757 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4758 $EGREP "$file_magic_regex" > /dev/null; then
4759 :
4760 else
4761 cat <<_LT_EOF 1>&2
4762
4763 *** Warning: the command libtool uses to detect shared libraries,
4764 *** $file_magic_cmd, produces output that libtool cannot recognize.
4765 *** The result is that libtool may fail to recognize shared libraries
4766 *** as such. This will affect the creation of libtool libraries that
4767 *** depend on shared libraries, but programs linked with such libtool
4768 *** libraries will work regardless of this problem. Nevertheless, you
4769 *** may want to report the problem to your system manager and/or to
4770 *** [email protected]
4771
4772 _LT_EOF
4773 fi ;;
4774 esac
4775 fi
4776 break
4777 fi
4778 done
4779 IFS=$lt_save_ifs
4780 MAGIC_CMD=$lt_save_MAGIC_CMD
4781 ;;
4782 esac])
4783 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
4784 if test -n "$MAGIC_CMD"; then
4785 AC_MSG_RESULT($MAGIC_CMD)
4786 else
4787 AC_MSG_RESULT(no)
4788 fi
4789 _LT_DECL([], [MAGIC_CMD], [0],
4790 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4791 ])# _LT_PATH_TOOL_PREFIX
4792
4793 # Old name:
4794 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4795 dnl aclocal-1.4 backwards compatibility:
4796 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4797
4798
4799 # _LT_PATH_MAGIC
4800 # --------------
4801 # find a file program that can recognize a shared library
4802 m4_defun([_LT_PATH_MAGIC],
4803 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4804 if test -z "$lt_cv_path_MAGIC_CMD"; then
4805 if test -n "$ac_tool_prefix"; then
4806 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4807 else
4808 MAGIC_CMD=:
4809 fi
4810 fi
4811 ])# _LT_PATH_MAGIC
4812
4813
4814 # LT_PATH_LD
4815 # ----------
4816 # find the pathname to the GNU or non-GNU linker
4817 AC_DEFUN([LT_PATH_LD],
4818 [AC_REQUIRE([AC_PROG_CC])dnl
4819 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4820 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4821 m4_require([_LT_DECL_SED])dnl
4822 m4_require([_LT_DECL_EGREP])dnl
4823 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4824
4825 AC_ARG_WITH([gnu-ld],
4826 [AS_HELP_STRING([--with-gnu-ld],
4827 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4828 [test no = "$withval" || with_gnu_ld=yes],
4829 [with_gnu_ld=no])dnl
4830
4831 ac_prog=ld
4832 if test yes = "$GCC"; then
4833 # Check if gcc -print-prog-name=ld gives a path.
4834 AC_MSG_CHECKING([for ld used by $CC])
4835 case $host in
4836 *-*-mingw*)
4837 # gcc leaves a trailing carriage return, which upsets mingw
4838 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4839 *)
4840 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4841 esac
4842 case $ac_prog in
4843 # Accept absolute paths.
4844 [[\\/]]* | ?:[[\\/]]*)
4845 re_direlt='/[[^/]][[^/]]*/\.\./'
4846 # Canonicalize the pathname of ld
4847 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4848 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4849 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4850 done
4851 test -z "$LD" && LD=$ac_prog
4852 ;;
4853 "")
4854 # If it fails, then pretend we aren't using GCC.
4855 ac_prog=ld
4856 ;;
4857 *)
4858 # If it is relative, then search for the first ld in PATH.
4859 with_gnu_ld=unknown
4860 ;;
4861 esac
4862 elif test yes = "$with_gnu_ld"; then
4863 AC_MSG_CHECKING([for GNU ld])
4864 else
4865 AC_MSG_CHECKING([for non-GNU ld])
4866 fi
4867 AC_CACHE_VAL(lt_cv_path_LD,
4868 [if test -z "$LD"; then
4869 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4870 for ac_dir in $PATH; do
4871 IFS=$lt_save_ifs
4872 test -z "$ac_dir" && ac_dir=.
4873 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4874 lt_cv_path_LD=$ac_dir/$ac_prog
4875 # Check to see if the program is GNU ld. I'd rather use --version,
4876 # but apparently some variants of GNU ld only accept -v.
4877 # Break only if it was the GNU/non-GNU ld that we prefer.
4878 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4879 *GNU* | *'with BFD'*)
4880 test no != "$with_gnu_ld" && break
4881 ;;
4882 *)
4883 test yes != "$with_gnu_ld" && break
4884 ;;
4885 esac
4886 fi
4887 done
4888 IFS=$lt_save_ifs
4889 else
4890 lt_cv_path_LD=$LD # Let the user override the test with a path.
4891 fi])
4892 LD=$lt_cv_path_LD
4893 if test -n "$LD"; then
4894 AC_MSG_RESULT($LD)
4895 else
4896 AC_MSG_RESULT(no)
4897 fi
4898 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4899 _LT_PATH_LD_GNU
4900 AC_SUBST([LD])
4901
4902 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4903 ])# LT_PATH_LD
4904
4905 # Old names:
4906 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4907 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4908 dnl aclocal-1.4 backwards compatibility:
4909 dnl AC_DEFUN([AM_PROG_LD], [])
4910 dnl AC_DEFUN([AC_PROG_LD], [])
4911
4912
4913 # _LT_PATH_LD_GNU
4914 #- --------------
4915 m4_defun([_LT_PATH_LD_GNU],
4916 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4917 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4918 case `$LD -v 2>&1 </dev/null` in
4919 *GNU* | *'with BFD'*)
4920 lt_cv_prog_gnu_ld=yes
4921 ;;
4922 *)
4923 lt_cv_prog_gnu_ld=no
4924 ;;
4925 esac])
4926 with_gnu_ld=$lt_cv_prog_gnu_ld
4927 ])# _LT_PATH_LD_GNU
4928
4929
4930 # _LT_CMD_RELOAD
4931 # --------------
4932 # find reload flag for linker
4933 # -- PORTME Some linkers may need a different reload flag.
4934 m4_defun([_LT_CMD_RELOAD],
4935 [AC_CACHE_CHECK([for $LD option to reload object files],
4936 lt_cv_ld_reload_flag,
4937 [lt_cv_ld_reload_flag='-r'])
4938 reload_flag=$lt_cv_ld_reload_flag
4939 case $reload_flag in
4940 "" | " "*) ;;
4941 *) reload_flag=" $reload_flag" ;;
4942 esac
4943 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4944 case $host_os in
4945 cygwin* | mingw* | pw32* | cegcc*)
4946 if test yes != "$GCC"; then
4947 reload_cmds=false
4948 fi
4949 ;;
4950 darwin*)
4951 if test yes = "$GCC"; then
4952 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
4953 else
4954 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4955 fi
4956 ;;
4957 esac
4958 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4959 _LT_TAGDECL([], [reload_cmds], [2])dnl
4960 ])# _LT_CMD_RELOAD
4961
4962
4963 # _LT_PATH_DD
4964 # -----------
4965 # find a working dd
4966 m4_defun([_LT_PATH_DD],
4967 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
4968 [printf 0123456789abcdef0123456789abcdef >conftest.i
4969 cat conftest.i conftest.i >conftest2.i
4970 : ${lt_DD:=$DD}
4971 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
4972 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4973 cmp -s conftest.i conftest.out \
4974 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
4975 fi])
4976 rm -f conftest.i conftest2.i conftest.out])
4977 ])# _LT_PATH_DD
4978
4979
4980 # _LT_CMD_TRUNCATE
4981 # ----------------
4982 # find command to truncate a binary pipe
4983 m4_defun([_LT_CMD_TRUNCATE],
4984 [m4_require([_LT_PATH_DD])
4985 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
4986 [printf 0123456789abcdef0123456789abcdef >conftest.i
4987 cat conftest.i conftest.i >conftest2.i
4988 lt_cv_truncate_bin=
4989 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4990 cmp -s conftest.i conftest.out \
4991 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
4992 fi
4993 rm -f conftest.i conftest2.i conftest.out
4994 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
4995 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
4996 [Command to truncate a binary pipe])
4997 ])# _LT_CMD_TRUNCATE
4998
4999
5000 # _LT_CHECK_MAGIC_METHOD
5001 # ----------------------
5002 # how to check for library dependencies
5003 # -- PORTME fill in with the dynamic library characteristics
5004 m4_defun([_LT_CHECK_MAGIC_METHOD],
5005 [m4_require([_LT_DECL_EGREP])
5006 m4_require([_LT_DECL_OBJDUMP])
5007 AC_CACHE_CHECK([how to recognize dependent libraries],
5008 lt_cv_deplibs_check_method,
5009 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5010 lt_cv_file_magic_test_file=
5011 lt_cv_deplibs_check_method='unknown'
5012 # Need to set the preceding variable on all platforms that support
5013 # interlibrary dependencies.
5014 # 'none' -- dependencies not supported.
5015 # 'unknown' -- same as none, but documents that we really don't know.
5016 # 'pass_all' -- all dependencies passed with no checks.
5017 # 'test_compile' -- check by making test program.
5018 # 'file_magic [[regex]]' -- check by looking for files in library path
5019 # that responds to the $file_magic_cmd with a given extended regex.
5020 # If you have 'file' or equivalent on your system and you're not sure
5021 # whether 'pass_all' will *always* work, you probably want this one.
5022
5023 case $host_os in
5024 aix[[4-9]]*)
5025 lt_cv_deplibs_check_method=pass_all
5026 ;;
5027
5028 beos*)
5029 lt_cv_deplibs_check_method=pass_all
5030 ;;
5031
5032 bsdi[[45]]*)
5033 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5034 lt_cv_file_magic_cmd='/usr/bin/file -L'
5035 lt_cv_file_magic_test_file=/shlib/libc.so
5036 ;;
5037
5038 cygwin*)
5039 # func_win32_libid is a shell function defined in ltmain.sh
5040 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5041 lt_cv_file_magic_cmd='func_win32_libid'
5042 ;;
5043
5044 mingw* | pw32*)
5045 # Base MSYS/MinGW do not provide the 'file' command needed by
5046 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5047 # unless we find 'file', for example because we are cross-compiling.
5048 if ( file / ) >/dev/null 2>&1; then
5049 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5050 lt_cv_file_magic_cmd='func_win32_libid'
5051 else
5052 # Keep this pattern in sync with the one in func_win32_libid.
5053 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5054 lt_cv_file_magic_cmd='$OBJDUMP -f'
5055 fi
5056 ;;
5057
5058 cegcc*)
5059 # use the weaker test based on 'objdump'. See mingw*.
5060 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5061 lt_cv_file_magic_cmd='$OBJDUMP -f'
5062 ;;
5063
5064 darwin* | rhapsody*)
5065 lt_cv_deplibs_check_method=pass_all
5066 ;;
5067
5068 freebsd* | dragonfly*)
5069 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5070 case $host_cpu in
5071 i*86 )
5072 # Not sure whether the presence of OpenBSD here was a mistake.
5073 # Let's accept both of them until this is cleared up.
5074 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5075 lt_cv_file_magic_cmd=/usr/bin/file
5076 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5077 ;;
5078 esac
5079 else
5080 lt_cv_deplibs_check_method=pass_all
5081 fi
5082 ;;
5083
5084 haiku*)
5085 lt_cv_deplibs_check_method=pass_all
5086 ;;
5087
5088 hpux10.20* | hpux11*)
5089 lt_cv_file_magic_cmd=/usr/bin/file
5090 case $host_cpu in
5091 ia64*)
5092 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5093 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5094 ;;
5095 hppa*64*)
5096 [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]']
5097 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5098 ;;
5099 *)
5100 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5101 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5102 ;;
5103 esac
5104 ;;
5105
5106 interix[[3-9]]*)
5107 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5108 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5109 ;;
5110
5111 irix5* | irix6* | nonstopux*)
5112 case $LD in
5113 *-32|*"-32 ") libmagic=32-bit;;
5114 *-n32|*"-n32 ") libmagic=N32;;
5115 *-64|*"-64 ") libmagic=64-bit;;
5116 *) libmagic=never-match;;
5117 esac
5118 lt_cv_deplibs_check_method=pass_all
5119 ;;
5120
5121 # This must be glibc/ELF.
5122 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5123 lt_cv_deplibs_check_method=pass_all
5124 ;;
5125
5126 netbsd* | netbsdelf*-gnu)
5127 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5128 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5129 else
5130 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5131 fi
5132 ;;
5133
5134 newos6*)
5135 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5136 lt_cv_file_magic_cmd=/usr/bin/file
5137 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5138 ;;
5139
5140 *nto* | *qnx*)
5141 lt_cv_deplibs_check_method=pass_all
5142 ;;
5143
5144 openbsd* | bitrig*)
5145 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5146 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5147 else
5148 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5149 fi
5150 ;;
5151
5152 osf3* | osf4* | osf5*)
5153 lt_cv_deplibs_check_method=pass_all
5154 ;;
5155
5156 rdos*)
5157 lt_cv_deplibs_check_method=pass_all
5158 ;;
5159
5160 solaris*)
5161 lt_cv_deplibs_check_method=pass_all
5162 ;;
5163
5164 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5165 lt_cv_deplibs_check_method=pass_all
5166 ;;
5167
5168 sysv4 | sysv4.3*)
5169 case $host_vendor in
5170 motorola)
5171 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]]'
5172 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5173 ;;
5174 ncr)
5175 lt_cv_deplibs_check_method=pass_all
5176 ;;
5177 sequent)
5178 lt_cv_file_magic_cmd='/bin/file'
5179 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5180 ;;
5181 sni)
5182 lt_cv_file_magic_cmd='/bin/file'
5183 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5184 lt_cv_file_magic_test_file=/lib/libc.so
5185 ;;
5186 siemens)
5187 lt_cv_deplibs_check_method=pass_all
5188 ;;
5189 pc)
5190 lt_cv_deplibs_check_method=pass_all
5191 ;;
5192 esac
5193 ;;
5194
5195 tpf*)
5196 lt_cv_deplibs_check_method=pass_all
5197 ;;
5198 os2*)
5199 lt_cv_deplibs_check_method=pass_all
5200 ;;
5201 esac
5202 ])
5203
5204 file_magic_glob=
5205 want_nocaseglob=no
5206 if test "$build" = "$host"; then
5207 case $host_os in
5208 mingw* | pw32*)
5209 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5210 want_nocaseglob=yes
5211 else
5212 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5213 fi
5214 ;;
5215 esac
5216 fi
5217
5218 file_magic_cmd=$lt_cv_file_magic_cmd
5219 deplibs_check_method=$lt_cv_deplibs_check_method
5220 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5221
5222 _LT_DECL([], [deplibs_check_method], [1],
5223 [Method to check whether dependent libraries are shared objects])
5224 _LT_DECL([], [file_magic_cmd], [1],
5225 [Command to use when deplibs_check_method = "file_magic"])
5226 _LT_DECL([], [file_magic_glob], [1],
5227 [How to find potential files when deplibs_check_method = "file_magic"])
5228 _LT_DECL([], [want_nocaseglob], [1],
5229 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5230 ])# _LT_CHECK_MAGIC_METHOD
5231
5232
5233 # LT_PATH_NM
5234 # ----------
5235 # find the pathname to a BSD- or MS-compatible name lister
5236 AC_DEFUN([LT_PATH_NM],
5237 [AC_REQUIRE([AC_PROG_CC])dnl
5238 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5239 [if test -n "$NM"; then
5240 # Let the user override the test.
5241 lt_cv_path_NM=$NM
5242 else
5243 lt_nm_to_check=${ac_tool_prefix}nm
5244 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5245 lt_nm_to_check="$lt_nm_to_check nm"
5246 fi
5247 for lt_tmp_nm in $lt_nm_to_check; do
5248 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5249 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5250 IFS=$lt_save_ifs
5251 test -z "$ac_dir" && ac_dir=.
5252 tmp_nm=$ac_dir/$lt_tmp_nm
5253 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
5254 # Check to see if the nm accepts a BSD-compat flag.
5255 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
5256 # nm: unknown option "B" ignored
5257 # Tru64's nm complains that /dev/null is an invalid object file
5258 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
5259 case $build_os in
5260 mingw*) lt_bad_file=conftest.nm/nofile ;;
5261 *) lt_bad_file=/dev/null ;;
5262 esac
5263 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5264 *$lt_bad_file* | *'Invalid file or object type'*)
5265 lt_cv_path_NM="$tmp_nm -B"
5266 break 2
5267 ;;
5268 *)
5269 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5270 */dev/null*)
5271 lt_cv_path_NM="$tmp_nm -p"
5272 break 2
5273 ;;
5274 *)
5275 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5276 continue # so that we can try to find one that supports BSD flags
5277 ;;
5278 esac
5279 ;;
5280 esac
5281 fi
5282 done
5283 IFS=$lt_save_ifs
5284 done
5285 : ${lt_cv_path_NM=no}
5286 fi])
5287 if test no != "$lt_cv_path_NM"; then
5288 NM=$lt_cv_path_NM
5289 else
5290 # Didn't find any BSD compatible name lister, look for dumpbin.
5291 if test -n "$DUMPBIN"; then :
5292 # Let the user override the test.
5293 else
5294 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5295 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
5296 *COFF*)
5297 DUMPBIN="$DUMPBIN -symbols -headers"
5298 ;;
5299 *)
5300 DUMPBIN=:
5301 ;;
5302 esac
5303 fi
5304 AC_SUBST([DUMPBIN])
5305 if test : != "$DUMPBIN"; then
5306 NM=$DUMPBIN
5307 fi
5308 fi
5309 test -z "$NM" && NM=nm
5310 AC_SUBST([NM])
5311 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5312
5313 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5314 [lt_cv_nm_interface="BSD nm"
5315 echo "int some_variable = 0;" > conftest.$ac_ext
5316 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5317 (eval "$ac_compile" 2>conftest.err)
5318 cat conftest.err >&AS_MESSAGE_LOG_FD
5319 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5320 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5321 cat conftest.err >&AS_MESSAGE_LOG_FD
5322 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5323 cat conftest.out >&AS_MESSAGE_LOG_FD
5324 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5325 lt_cv_nm_interface="MS dumpbin"
5326 fi
5327 rm -f conftest*])
5328 ])# LT_PATH_NM
5329
5330 # Old names:
5331 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5332 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5333 dnl aclocal-1.4 backwards compatibility:
5334 dnl AC_DEFUN([AM_PROG_NM], [])
5335 dnl AC_DEFUN([AC_PROG_NM], [])
5336
5337 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5338 # --------------------------------
5339 # how to determine the name of the shared library
5340 # associated with a specific link library.
5341 # -- PORTME fill in with the dynamic library characteristics
5342 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5343 [m4_require([_LT_DECL_EGREP])
5344 m4_require([_LT_DECL_OBJDUMP])
5345 m4_require([_LT_DECL_DLLTOOL])
5346 AC_CACHE_CHECK([how to associate runtime and link libraries],
5347 lt_cv_sharedlib_from_linklib_cmd,
5348 [lt_cv_sharedlib_from_linklib_cmd='unknown'
5349
5350 case $host_os in
5351 cygwin* | mingw* | pw32* | cegcc*)
5352 # two different shell functions defined in ltmain.sh;
5353 # decide which one to use based on capabilities of $DLLTOOL
5354 case `$DLLTOOL --help 2>&1` in
5355 *--identify-strict*)
5356 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5357 ;;
5358 *)
5359 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5360 ;;
5361 esac
5362 ;;
5363 *)
5364 # fallback: assume linklib IS sharedlib
5365 lt_cv_sharedlib_from_linklib_cmd=$ECHO
5366 ;;
5367 esac
5368 ])
5369 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5370 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5371
5372 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5373 [Command to associate shared and link libraries])
5374 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5375
5376
5377 # _LT_PATH_MANIFEST_TOOL
5378 # ----------------------
5379 # locate the manifest tool
5380 m4_defun([_LT_PATH_MANIFEST_TOOL],
5381 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5382 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5383 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5384 [lt_cv_path_mainfest_tool=no
5385 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5386 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5387 cat conftest.err >&AS_MESSAGE_LOG_FD
5388 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5389 lt_cv_path_mainfest_tool=yes
5390 fi
5391 rm -f conftest*])
5392 if test yes != "$lt_cv_path_mainfest_tool"; then
5393 MANIFEST_TOOL=:
5394 fi
5395 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5396 ])# _LT_PATH_MANIFEST_TOOL
5397
5398
5399 # _LT_DLL_DEF_P([FILE])
5400 # ---------------------
5401 # True iff FILE is a Windows DLL '.def' file.
5402 # Keep in sync with func_dll_def_p in the libtool script
5403 AC_DEFUN([_LT_DLL_DEF_P],
5404 [dnl
5405 test DEF = "`$SED -n dnl
5406 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
5407 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
5408 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
5409 -e q dnl Only consider the first "real" line
5410 $1`" dnl
5411 ])# _LT_DLL_DEF_P
5412
5413
5414 # LT_LIB_M
5415 # --------
5416 # check for math library
5417 AC_DEFUN([LT_LIB_M],
5418 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5419 LIBM=
5420 case $host in
5421 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5422 # These system don't have libm, or don't need it
5423 ;;
5424 *-ncr-sysv4.3*)
5425 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
5426 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5427 ;;
5428 *)
5429 AC_CHECK_LIB(m, cos, LIBM=-lm)
5430 ;;
5431 esac
5432 AC_SUBST([LIBM])
5433 ])# LT_LIB_M
5434
5435 # Old name:
5436 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5437 dnl aclocal-1.4 backwards compatibility:
5438 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5439
5440
5441 # _LT_COMPILER_NO_RTTI([TAGNAME])
5442 # -------------------------------
5443 m4_defun([_LT_COMPILER_NO_RTTI],
5444 [m4_require([_LT_TAG_COMPILER])dnl
5445
5446 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5447
5448 if test yes = "$GCC"; then
5449 case $cc_basename in
5450 nvcc*)
5451 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5452 *)
5453 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5454 esac
5455
5456 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5457 lt_cv_prog_compiler_rtti_exceptions,
5458 [-fno-rtti -fno-exceptions], [],
5459 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5460 fi
5461 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5462 [Compiler flag to turn off builtin functions])
5463 ])# _LT_COMPILER_NO_RTTI
5464
5465
5466 # _LT_CMD_GLOBAL_SYMBOLS
5467 # ----------------------
5468 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5469 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5470 AC_REQUIRE([AC_PROG_CC])dnl
5471 AC_REQUIRE([AC_PROG_AWK])dnl
5472 AC_REQUIRE([LT_PATH_NM])dnl
5473 AC_REQUIRE([LT_PATH_LD])dnl
5474 m4_require([_LT_DECL_SED])dnl
5475 m4_require([_LT_DECL_EGREP])dnl
5476 m4_require([_LT_TAG_COMPILER])dnl
5477
5478 # Check for command to grab the raw symbol name followed by C symbol from nm.
5479 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5480 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5481 [
5482 # These are sane defaults that work on at least a few old systems.
5483 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5484
5485 # Character class describing NM global symbol codes.
5486 symcode='[[BCDEGRST]]'
5487
5488 # Regexp to match symbols that can be accessed directly from C.
5489 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5490
5491 # Define system-specific variables.
5492 case $host_os in
5493 aix*)
5494 symcode='[[BCDT]]'
5495 ;;
5496 cygwin* | mingw* | pw32* | cegcc*)
5497 symcode='[[ABCDGISTW]]'
5498 ;;
5499 hpux*)
5500 if test ia64 = "$host_cpu"; then
5501 symcode='[[ABCDEGRST]]'
5502 fi
5503 ;;
5504 irix* | nonstopux*)
5505 symcode='[[BCDEGRST]]'
5506 ;;
5507 osf*)
5508 symcode='[[BCDEGQRST]]'
5509 ;;
5510 solaris*)
5511 symcode='[[BDRT]]'
5512 ;;
5513 sco3.2v5*)
5514 symcode='[[DT]]'
5515 ;;
5516 sysv4.2uw2*)
5517 symcode='[[DT]]'
5518 ;;
5519 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5520 symcode='[[ABDT]]'
5521 ;;
5522 sysv4)
5523 symcode='[[DFNSTU]]'
5524 ;;
5525 esac
5526
5527 # If we're using GNU nm, then use its standard symbol codes.
5528 case `$NM -V 2>&1` in
5529 *GNU* | *'with BFD'*)
5530 symcode='[[ABCDGIRSTW]]' ;;
5531 esac
5532
5533 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5534 # Gets list of data symbols to import.
5535 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
5536 # Adjust the below global symbol transforms to fixup imported variables.
5537 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
5538 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
5539 lt_c_name_lib_hook="\
5540 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
5541 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
5542 else
5543 # Disable hooks by default.
5544 lt_cv_sys_global_symbol_to_import=
5545 lt_cdecl_hook=
5546 lt_c_name_hook=
5547 lt_c_name_lib_hook=
5548 fi
5549
5550 # Transform an extracted symbol line into a proper C declaration.
5551 # Some systems (esp. on ia64) link data and code symbols differently,
5552 # so use this general approach.
5553 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
5554 $lt_cdecl_hook\
5555 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
5556 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
5557
5558 # Transform an extracted symbol line into symbol name and symbol address
5559 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
5560 $lt_c_name_hook\
5561 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
5562 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
5563
5564 # Transform an extracted symbol line into symbol name with lib prefix and
5565 # symbol address.
5566 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
5567 $lt_c_name_lib_hook\
5568 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
5569 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
5570 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
5571
5572 # Handle CRLF in mingw tool chain
5573 opt_cr=
5574 case $build_os in
5575 mingw*)
5576 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5577 ;;
5578 esac
5579
5580 # Try without a prefix underscore, then with it.
5581 for ac_symprfx in "" "_"; do
5582
5583 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5584 symxfrm="\\1 $ac_symprfx\\2 \\2"
5585
5586 # Write the raw and C identifiers.
5587 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5588 # Fake it for dumpbin and say T for any non-static function,
5589 # D for any global variable and I for any imported variable.
5590 # Also find C++ and __fastcall symbols from MSVC++,
5591 # which start with @ or ?.
5592 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5593 " {last_section=section; section=\$ 3};"\
5594 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5595 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5596 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
5597 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
5598 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
5599 " \$ 0!~/External *\|/{next};"\
5600 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5601 " {if(hide[section]) next};"\
5602 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
5603 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
5604 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
5605 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
5606 " ' prfx=^$ac_symprfx]"
5607 else
5608 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5609 fi
5610 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5611
5612 # Check to see that the pipe works correctly.
5613 pipe_works=no
5614
5615 rm -f conftest*
5616 cat > conftest.$ac_ext <<_LT_EOF
5617 #ifdef __cplusplus
5618 extern "C" {
5619 #endif
5620 char nm_test_var;
5621 void nm_test_func(void);
5622 void nm_test_func(void){}
5623 #ifdef __cplusplus
5624 }
5625 #endif
5626 int main(){nm_test_var='a';nm_test_func();return(0);}
5627 _LT_EOF
5628
5629 if AC_TRY_EVAL(ac_compile); then
5630 # Now try to grab the symbols.
5631 nlist=conftest.nm
5632 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
5633 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
5634 # Try sorting and uniquifying the output.
5635 if sort "$nlist" | uniq > "$nlist"T; then
5636 mv -f "$nlist"T "$nlist"
5637 else
5638 rm -f "$nlist"T
5639 fi
5640
5641 # Make sure that we snagged all the symbols we need.
5642 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5643 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5644 cat <<_LT_EOF > conftest.$ac_ext
5645 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5646 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
5647 /* DATA imports from DLLs on WIN32 can't be const, because runtime
5648 relocations are performed -- see ld's documentation on pseudo-relocs. */
5649 # define LT@&t@_DLSYM_CONST
5650 #elif defined __osf__
5651 /* This system does not cope well with relocations in const data. */
5652 # define LT@&t@_DLSYM_CONST
5653 #else
5654 # define LT@&t@_DLSYM_CONST const
5655 #endif
5656
5657 #ifdef __cplusplus
5658 extern "C" {
5659 #endif
5660
5661 _LT_EOF
5662 # Now generate the symbol file.
5663 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5664
5665 cat <<_LT_EOF >> conftest.$ac_ext
5666
5667 /* The mapping between symbol names and symbols. */
5668 LT@&t@_DLSYM_CONST struct {
5669 const char *name;
5670 void *address;
5671 }
5672 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5673 {
5674 { "@PROGRAM@", (void *) 0 },
5675 _LT_EOF
5676 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5677 cat <<\_LT_EOF >> conftest.$ac_ext
5678 {0, (void *) 0}
5679 };
5680
5681 /* This works around a problem in FreeBSD linker */
5682 #ifdef FREEBSD_WORKAROUND
5683 static const void *lt_preloaded_setup() {
5684 return lt__PROGRAM__LTX_preloaded_symbols;
5685 }
5686 #endif
5687
5688 #ifdef __cplusplus
5689 }
5690 #endif
5691 _LT_EOF
5692 # Now try linking the two files.
5693 mv conftest.$ac_objext conftstm.$ac_objext
5694 lt_globsym_save_LIBS=$LIBS
5695 lt_globsym_save_CFLAGS=$CFLAGS
5696 LIBS=conftstm.$ac_objext
5697 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5698 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
5699 pipe_works=yes
5700 fi
5701 LIBS=$lt_globsym_save_LIBS
5702 CFLAGS=$lt_globsym_save_CFLAGS
5703 else
5704 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5705 fi
5706 else
5707 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5708 fi
5709 else
5710 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5711 fi
5712 else
5713 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5714 cat conftest.$ac_ext >&5
5715 fi
5716 rm -rf conftest* conftst*
5717
5718 # Do not use the global_symbol_pipe unless it works.
5719 if test yes = "$pipe_works"; then
5720 break
5721 else
5722 lt_cv_sys_global_symbol_pipe=
5723 fi
5724 done
5725 ])
5726 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5727 lt_cv_sys_global_symbol_to_cdecl=
5728 fi
5729 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5730 AC_MSG_RESULT(failed)
5731 else
5732 AC_MSG_RESULT(ok)
5733 fi
5734
5735 # Response file support.
5736 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5737 nm_file_list_spec='@'
5738 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5739 nm_file_list_spec='@'
5740 fi
5741
5742 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5743 [Take the output of nm and produce a listing of raw symbols and C names])
5744 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5745 [Transform the output of nm in a proper C declaration])
5746 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
5747 [Transform the output of nm into a list of symbols to manually relocate])
5748 _LT_DECL([global_symbol_to_c_name_address],
5749 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5750 [Transform the output of nm in a C name address pair])
5751 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5752 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5753 [Transform the output of nm in a C name address pair when lib prefix is needed])
5754 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
5755 [The name lister interface])
5756 _LT_DECL([], [nm_file_list_spec], [1],
5757 [Specify filename containing input files for $NM])
5758 ]) # _LT_CMD_GLOBAL_SYMBOLS
5759
5760
5761 # _LT_COMPILER_PIC([TAGNAME])
5762 # ---------------------------
5763 m4_defun([_LT_COMPILER_PIC],
5764 [m4_require([_LT_TAG_COMPILER])dnl
5765 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5766 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5767 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5768
5769 m4_if([$1], [CXX], [
5770 # C++ specific cases for pic, static, wl, etc.
5771 if test yes = "$GXX"; then
5772 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5773 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5774
5775 case $host_os in
5776 aix*)
5777 # All AIX code is PIC.
5778 if test ia64 = "$host_cpu"; then
5779 # AIX 5 now supports IA64 processor
5780 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5781 fi
5782 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5783 ;;
5784
5785 amigaos*)
5786 case $host_cpu in
5787 powerpc)
5788 # see comment about AmigaOS4 .so support
5789 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5790 ;;
5791 m68k)
5792 # FIXME: we need at least 68020 code to build shared libraries, but
5793 # adding the '-m68020' flag to GCC prevents building anything better,
5794 # like '-m68040'.
5795 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5796 ;;
5797 esac
5798 ;;
5799
5800 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5801 # PIC is the default for these OSes.
5802 ;;
5803 mingw* | cygwin* | os2* | pw32* | cegcc*)
5804 # This hack is so that the source file can tell whether it is being
5805 # built for inclusion in a dll (and should export symbols for example).
5806 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5807 # (--disable-auto-import) libraries
5808 m4_if([$1], [GCJ], [],
5809 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5810 case $host_os in
5811 os2*)
5812 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5813 ;;
5814 esac
5815 ;;
5816 darwin* | rhapsody*)
5817 # PIC is the default on this platform
5818 # Common symbols not allowed in MH_DYLIB files
5819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5820 ;;
5821 *djgpp*)
5822 # DJGPP does not support shared libraries at all
5823 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5824 ;;
5825 haiku*)
5826 # PIC is the default for Haiku.
5827 # The "-static" flag exists, but is broken.
5828 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5829 ;;
5830 interix[[3-9]]*)
5831 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5832 # Instead, we relocate shared libraries at runtime.
5833 ;;
5834 sysv4*MP*)
5835 if test -d /usr/nec; then
5836 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5837 fi
5838 ;;
5839 hpux*)
5840 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5841 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5842 # sets the default TLS model and affects inlining.
5843 case $host_cpu in
5844 hppa*64*)
5845 ;;
5846 *)
5847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5848 ;;
5849 esac
5850 ;;
5851 *qnx* | *nto*)
5852 # QNX uses GNU C++, but need to define -shared option too, otherwise
5853 # it will coredump.
5854 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5855 ;;
5856 *)
5857 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5858 ;;
5859 esac
5860 else
5861 case $host_os in
5862 aix[[4-9]]*)
5863 # All AIX code is PIC.
5864 if test ia64 = "$host_cpu"; then
5865 # AIX 5 now supports IA64 processor
5866 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5867 else
5868 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5869 fi
5870 ;;
5871 chorus*)
5872 case $cc_basename in
5873 cxch68*)
5874 # Green Hills C++ Compiler
5875 # _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"
5876 ;;
5877 esac
5878 ;;
5879 mingw* | cygwin* | os2* | pw32* | cegcc*)
5880 # This hack is so that the source file can tell whether it is being
5881 # built for inclusion in a dll (and should export symbols for example).
5882 m4_if([$1], [GCJ], [],
5883 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5884 ;;
5885 dgux*)
5886 case $cc_basename in
5887 ec++*)
5888 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5889 ;;
5890 ghcx*)
5891 # Green Hills C++ Compiler
5892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5893 ;;
5894 *)
5895 ;;
5896 esac
5897 ;;
5898 freebsd* | dragonfly*)
5899 # FreeBSD uses GNU C++
5900 ;;
5901 hpux9* | hpux10* | hpux11*)
5902 case $cc_basename in
5903 CC*)
5904 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5905 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5906 if test ia64 != "$host_cpu"; then
5907 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5908 fi
5909 ;;
5910 aCC*)
5911 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5912 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5913 case $host_cpu in
5914 hppa*64*|ia64*)
5915 # +Z the default
5916 ;;
5917 *)
5918 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5919 ;;
5920 esac
5921 ;;
5922 *)
5923 ;;
5924 esac
5925 ;;
5926 interix*)
5927 # This is c89, which is MS Visual C++ (no shared libs)
5928 # Anyone wants to do a port?
5929 ;;
5930 irix5* | irix6* | nonstopux*)
5931 case $cc_basename in
5932 CC*)
5933 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5934 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5935 # CC pic flag -KPIC is the default.
5936 ;;
5937 *)
5938 ;;
5939 esac
5940 ;;
5941 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5942 case $cc_basename in
5943 KCC*)
5944 # KAI C++ Compiler
5945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5946 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5947 ;;
5948 ecpc* )
5949 # old Intel C++ for x86_64, which still supported -KPIC.
5950 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5951 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5952 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5953 ;;
5954 icpc* )
5955 # Intel C++, used to be incompatible with GCC.
5956 # ICC 10 doesn't accept -KPIC any more.
5957 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5958 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5959 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5960 ;;
5961 pgCC* | pgcpp*)
5962 # Portland Group C++ compiler
5963 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5964 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5965 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5966 ;;
5967 cxx*)
5968 # Compaq C++
5969 # Make sure the PIC flag is empty. It appears that all Alpha
5970 # Linux and Compaq Tru64 Unix objects are PIC.
5971 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5972 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5973 ;;
5974 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5975 # IBM XL 8.0, 9.0 on PPC and BlueGene
5976 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5977 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5978 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5979 ;;
5980 *)
5981 case `$CC -V 2>&1 | sed 5q` in
5982 *Sun\ C*)
5983 # Sun C++ 5.9
5984 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5985 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5986 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5987 ;;
5988 esac
5989 ;;
5990 esac
5991 ;;
5992 lynxos*)
5993 ;;
5994 m88k*)
5995 ;;
5996 mvs*)
5997 case $cc_basename in
5998 cxx*)
5999 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6000 ;;
6001 *)
6002 ;;
6003 esac
6004 ;;
6005 netbsd* | netbsdelf*-gnu)
6006 ;;
6007 *qnx* | *nto*)
6008 # QNX uses GNU C++, but need to define -shared option too, otherwise
6009 # it will coredump.
6010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6011 ;;
6012 osf3* | osf4* | osf5*)
6013 case $cc_basename in
6014 KCC*)
6015 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6016 ;;
6017 RCC*)
6018 # Rational C++ 2.4.1
6019 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6020 ;;
6021 cxx*)
6022 # Digital/Compaq C++
6023 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6024 # Make sure the PIC flag is empty. It appears that all Alpha
6025 # Linux and Compaq Tru64 Unix objects are PIC.
6026 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6027 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6028 ;;
6029 *)
6030 ;;
6031 esac
6032 ;;
6033 psos*)
6034 ;;
6035 solaris*)
6036 case $cc_basename in
6037 CC* | sunCC*)
6038 # Sun C++ 4.2, 5.x and Centerline C++
6039 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6040 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6041 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6042 ;;
6043 gcx*)
6044 # Green Hills C++ Compiler
6045 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6046 ;;
6047 *)
6048 ;;
6049 esac
6050 ;;
6051 sunos4*)
6052 case $cc_basename in
6053 CC*)
6054 # Sun C++ 4.x
6055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6056 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6057 ;;
6058 lcc*)
6059 # Lucid
6060 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6061 ;;
6062 *)
6063 ;;
6064 esac
6065 ;;
6066 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6067 case $cc_basename in
6068 CC*)
6069 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6070 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6071 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6072 ;;
6073 esac
6074 ;;
6075 tandem*)
6076 case $cc_basename in
6077 NCC*)
6078 # NonStop-UX NCC 3.20
6079 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6080 ;;
6081 *)
6082 ;;
6083 esac
6084 ;;
6085 vxworks*)
6086 ;;
6087 *)
6088 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6089 ;;
6090 esac
6091 fi
6092 ],
6093 [
6094 if test yes = "$GCC"; then
6095 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6096 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6097
6098 case $host_os in
6099 aix*)
6100 # All AIX code is PIC.
6101 if test ia64 = "$host_cpu"; then
6102 # AIX 5 now supports IA64 processor
6103 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6104 fi
6105 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6106 ;;
6107
6108 amigaos*)
6109 case $host_cpu in
6110 powerpc)
6111 # see comment about AmigaOS4 .so support
6112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6113 ;;
6114 m68k)
6115 # FIXME: we need at least 68020 code to build shared libraries, but
6116 # adding the '-m68020' flag to GCC prevents building anything better,
6117 # like '-m68040'.
6118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6119 ;;
6120 esac
6121 ;;
6122
6123 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6124 # PIC is the default for these OSes.
6125 ;;
6126
6127 mingw* | cygwin* | pw32* | os2* | cegcc*)
6128 # This hack is so that the source file can tell whether it is being
6129 # built for inclusion in a dll (and should export symbols for example).
6130 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6131 # (--disable-auto-import) libraries
6132 m4_if([$1], [GCJ], [],
6133 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6134 case $host_os in
6135 os2*)
6136 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6137 ;;
6138 esac
6139 ;;
6140
6141 darwin* | rhapsody*)
6142 # PIC is the default on this platform
6143 # Common symbols not allowed in MH_DYLIB files
6144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6145 ;;
6146
6147 haiku*)
6148 # PIC is the default for Haiku.
6149 # The "-static" flag exists, but is broken.
6150 _LT_TAGVAR(lt_prog_compiler_static, $1)=
6151 ;;
6152
6153 hpux*)
6154 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6155 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6156 # sets the default TLS model and affects inlining.
6157 case $host_cpu in
6158 hppa*64*)
6159 # +Z the default
6160 ;;
6161 *)
6162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6163 ;;
6164 esac
6165 ;;
6166
6167 interix[[3-9]]*)
6168 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6169 # Instead, we relocate shared libraries at runtime.
6170 ;;
6171
6172 msdosdjgpp*)
6173 # Just because we use GCC doesn't mean we suddenly get shared libraries
6174 # on systems that don't support them.
6175 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6176 enable_shared=no
6177 ;;
6178
6179 *nto* | *qnx*)
6180 # QNX uses GNU C++, but need to define -shared option too, otherwise
6181 # it will coredump.
6182 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6183 ;;
6184
6185 sysv4*MP*)
6186 if test -d /usr/nec; then
6187 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6188 fi
6189 ;;
6190
6191 *)
6192 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6193 ;;
6194 esac
6195
6196 case $cc_basename in
6197 nvcc*) # Cuda Compiler Driver 2.2
6198 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6199 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6200 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6201 fi
6202 ;;
6203 esac
6204 else
6205 # PORTME Check for flag to pass linker flags through the system compiler.
6206 case $host_os in
6207 aix*)
6208 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6209 if test ia64 = "$host_cpu"; then
6210 # AIX 5 now supports IA64 processor
6211 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6212 else
6213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6214 fi
6215 ;;
6216
6217 darwin* | rhapsody*)
6218 # PIC is the default on this platform
6219 # Common symbols not allowed in MH_DYLIB files
6220 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6221 case $cc_basename in
6222 nagfor*)
6223 # NAG Fortran compiler
6224 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6225 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6226 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6227 ;;
6228 esac
6229 ;;
6230
6231 mingw* | cygwin* | pw32* | os2* | cegcc*)
6232 # This hack is so that the source file can tell whether it is being
6233 # built for inclusion in a dll (and should export symbols for example).
6234 m4_if([$1], [GCJ], [],
6235 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6236 case $host_os in
6237 os2*)
6238 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6239 ;;
6240 esac
6241 ;;
6242
6243 hpux9* | hpux10* | hpux11*)
6244 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6245 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6246 # not for PA HP-UX.
6247 case $host_cpu in
6248 hppa*64*|ia64*)
6249 # +Z the default
6250 ;;
6251 *)
6252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6253 ;;
6254 esac
6255 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6256 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6257 ;;
6258
6259 irix5* | irix6* | nonstopux*)
6260 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6261 # PIC (with -KPIC) is the default.
6262 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6263 ;;
6264
6265 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6266 case $cc_basename in
6267 # old Intel for x86_64, which still supported -KPIC.
6268 ecc*)
6269 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6270 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6271 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6272 ;;
6273 # flang / f18. f95 an alias for gfortran or flang on Debian
6274 flang* | f18* | f95*)
6275 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6276 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6277 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6278 ;;
6279 # icc used to be incompatible with GCC.
6280 # ICC 10 doesn't accept -KPIC any more.
6281 icc* | ifort*)
6282 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6283 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6284 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6285 ;;
6286 # Lahey Fortran 8.1.
6287 lf95*)
6288 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6290 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6291 ;;
6292 nagfor*)
6293 # NAG Fortran compiler
6294 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6295 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6296 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6297 ;;
6298 tcc*)
6299 # Fabrice Bellard et al's Tiny C Compiler
6300 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6301 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6302 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6303 ;;
6304 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6305 # Portland Group compilers (*not* the Pentium gcc compiler,
6306 # which looks to be a dead project)
6307 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6308 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6309 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6310 ;;
6311 ccc*)
6312 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6313 # All Alpha code is PIC.
6314 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6315 ;;
6316 xl* | bgxl* | bgf* | mpixl*)
6317 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6318 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6319 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6320 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6321 ;;
6322 *)
6323 case `$CC -V 2>&1 | sed 5q` in
6324 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6325 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6326 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6327 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6328 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6329 ;;
6330 *Sun\ F* | *Sun*Fortran*)
6331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6332 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6333 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6334 ;;
6335 *Sun\ C*)
6336 # Sun C 5.9
6337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6338 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6339 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6340 ;;
6341 *Intel*\ [[CF]]*Compiler*)
6342 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6343 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6344 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6345 ;;
6346 *Portland\ Group*)
6347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6349 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6350 ;;
6351 esac
6352 ;;
6353 esac
6354 ;;
6355
6356 newsos6)
6357 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6359 ;;
6360
6361 *nto* | *qnx*)
6362 # QNX uses GNU C++, but need to define -shared option too, otherwise
6363 # it will coredump.
6364 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6365 ;;
6366
6367 osf3* | osf4* | osf5*)
6368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6369 # All OSF/1 code is PIC.
6370 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6371 ;;
6372
6373 rdos*)
6374 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6375 ;;
6376
6377 solaris*)
6378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6379 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6380 case $cc_basename in
6381 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6383 *)
6384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6385 esac
6386 ;;
6387
6388 sunos4*)
6389 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6392 ;;
6393
6394 sysv4 | sysv4.2uw2* | sysv4.3*)
6395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6396 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6398 ;;
6399
6400 sysv4*MP*)
6401 if test -d /usr/nec; then
6402 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6403 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6404 fi
6405 ;;
6406
6407 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6411 ;;
6412
6413 unicos*)
6414 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6415 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6416 ;;
6417
6418 uts4*)
6419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6421 ;;
6422
6423 *)
6424 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6425 ;;
6426 esac
6427 fi
6428 ])
6429 case $host_os in
6430 # For platforms that do not support PIC, -DPIC is meaningless:
6431 *djgpp*)
6432 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6433 ;;
6434 *)
6435 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6436 ;;
6437 esac
6438
6439 AC_CACHE_CHECK([for $compiler option to produce PIC],
6440 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6441 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6442 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6443
6444 #
6445 # Check to make sure the PIC flag actually works.
6446 #
6447 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6448 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6449 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6450 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6451 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6452 "" | " "*) ;;
6453 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6454 esac],
6455 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6456 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6457 fi
6458 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6459 [Additional compiler flags for building library objects])
6460
6461 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6462 [How to pass a linker flag through the compiler])
6463 #
6464 # Check to make sure the static flag actually works.
6465 #
6466 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6467 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6468 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6469 $lt_tmp_static_flag,
6470 [],
6471 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6472 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6473 [Compiler flag to prevent dynamic linking])
6474 ])# _LT_COMPILER_PIC
6475
6476
6477 # _LT_LINKER_SHLIBS([TAGNAME])
6478 # ----------------------------
6479 # See if the linker supports building shared libraries.
6480 m4_defun([_LT_LINKER_SHLIBS],
6481 [AC_REQUIRE([LT_PATH_LD])dnl
6482 AC_REQUIRE([LT_PATH_NM])dnl
6483 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6484 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6485 m4_require([_LT_DECL_EGREP])dnl
6486 m4_require([_LT_DECL_SED])dnl
6487 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6488 m4_require([_LT_TAG_COMPILER])dnl
6489 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6490 m4_if([$1], [CXX], [
6491 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6492 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6493 case $host_os in
6494 aix[[4-9]]*)
6495 # If we're using GNU nm, then we don't want the "-C" option.
6496 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
6497 # Without the "-l" option, or with the "-B" option, AIX nm treats
6498 # weak defined symbols like other global defined symbols, whereas
6499 # GNU nm marks them as "W".
6500 # While the 'weak' keyword is ignored in the Export File, we need
6501 # it in the Import File for the 'aix-soname' feature, so we have
6502 # to replace the "-B" option with "-P" for AIX nm.
6503 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6504 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
6505 else
6506 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
6507 fi
6508 ;;
6509 pw32*)
6510 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
6511 ;;
6512 cygwin* | mingw* | cegcc*)
6513 case $cc_basename in
6514 cl*)
6515 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6516 ;;
6517 *)
6518 _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'
6519 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6520 ;;
6521 esac
6522 ;;
6523 linux* | k*bsd*-gnu | gnu*)
6524 _LT_TAGVAR(link_all_deplibs, $1)=no
6525 ;;
6526 *)
6527 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6528 ;;
6529 esac
6530 ], [
6531 runpath_var=
6532 _LT_TAGVAR(allow_undefined_flag, $1)=
6533 _LT_TAGVAR(always_export_symbols, $1)=no
6534 _LT_TAGVAR(archive_cmds, $1)=
6535 _LT_TAGVAR(archive_expsym_cmds, $1)=
6536 _LT_TAGVAR(compiler_needs_object, $1)=no
6537 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6538 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6539 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6540 _LT_TAGVAR(hardcode_automatic, $1)=no
6541 _LT_TAGVAR(hardcode_direct, $1)=no
6542 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6545 _LT_TAGVAR(hardcode_minus_L, $1)=no
6546 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6547 _LT_TAGVAR(inherit_rpath, $1)=no
6548 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6549 _LT_TAGVAR(module_cmds, $1)=
6550 _LT_TAGVAR(module_expsym_cmds, $1)=
6551 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6552 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6553 _LT_TAGVAR(thread_safe_flag_spec, $1)=
6554 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6555 # include_expsyms should be a list of space-separated symbols to be *always*
6556 # included in the symbol list
6557 _LT_TAGVAR(include_expsyms, $1)=
6558 # exclude_expsyms can be an extended regexp of symbols to exclude
6559 # it will be wrapped by ' (' and ')$', so one must not match beginning or
6560 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
6561 # as well as any symbol that contains 'd'.
6562 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6563 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6564 # platforms (ab)use it in PIC code, but their linkers get confused if
6565 # the symbol is explicitly referenced. Since portable code cannot
6566 # rely on this symbol name, it's probably fine to never include it in
6567 # preloaded symbol tables.
6568 # Exclude shared library initialization/finalization symbols.
6569 dnl Note also adjust exclude_expsyms for C++ above.
6570 extract_expsyms_cmds=
6571
6572 case $host_os in
6573 cygwin* | mingw* | pw32* | cegcc*)
6574 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6575 # When not using gcc, we currently assume that we are using
6576 # Microsoft Visual C++.
6577 if test yes != "$GCC"; then
6578 with_gnu_ld=no
6579 fi
6580 ;;
6581 interix*)
6582 # we just hope/assume this is gcc and not c89 (= MSVC++)
6583 with_gnu_ld=yes
6584 ;;
6585 openbsd* | bitrig*)
6586 with_gnu_ld=no
6587 ;;
6588 linux* | k*bsd*-gnu | gnu*)
6589 _LT_TAGVAR(link_all_deplibs, $1)=no
6590 ;;
6591 esac
6592
6593 _LT_TAGVAR(ld_shlibs, $1)=yes
6594
6595 # On some targets, GNU ld is compatible enough with the native linker
6596 # that we're better off using the native interface for both.
6597 lt_use_gnu_ld_interface=no
6598 if test yes = "$with_gnu_ld"; then
6599 case $host_os in
6600 aix*)
6601 # The AIX port of GNU ld has always aspired to compatibility
6602 # with the native linker. However, as the warning in the GNU ld
6603 # block says, versions before 2.19.5* couldn't really create working
6604 # shared libraries, regardless of the interface used.
6605 case `$LD -v 2>&1` in
6606 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6607 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6608 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6609 *)
6610 lt_use_gnu_ld_interface=yes
6611 ;;
6612 esac
6613 ;;
6614 *)
6615 lt_use_gnu_ld_interface=yes
6616 ;;
6617 esac
6618 fi
6619
6620 if test yes = "$lt_use_gnu_ld_interface"; then
6621 # If archive_cmds runs LD, not CC, wlarc should be empty
6622 wlarc='$wl'
6623
6624 # Set some defaults for GNU ld with shared library support. These
6625 # are reset later if shared libraries are not supported. Putting them
6626 # here allows them to be overridden if necessary.
6627 runpath_var=LD_RUN_PATH
6628 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6629 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6630 # ancient GNU ld didn't support --whole-archive et. al.
6631 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6632 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6633 else
6634 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6635 fi
6636 supports_anon_versioning=no
6637 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
6638 *GNU\ gold*) supports_anon_versioning=yes ;;
6639 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6640 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6641 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6642 *\ 2.11.*) ;; # other 2.11 versions
6643 *) supports_anon_versioning=yes ;;
6644 esac
6645
6646 # See if GNU ld supports shared libraries.
6647 case $host_os in
6648 aix[[3-9]]*)
6649 # On AIX/PPC, the GNU linker is very broken
6650 if test ia64 != "$host_cpu"; then
6651 _LT_TAGVAR(ld_shlibs, $1)=no
6652 cat <<_LT_EOF 1>&2
6653
6654 *** Warning: the GNU linker, at least up to release 2.19, is reported
6655 *** to be unable to reliably create shared libraries on AIX.
6656 *** Therefore, libtool is disabling shared libraries support. If you
6657 *** really care for shared libraries, you may want to install binutils
6658 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6659 *** You will then need to restart the configuration process.
6660
6661 _LT_EOF
6662 fi
6663 ;;
6664
6665 amigaos*)
6666 case $host_cpu in
6667 powerpc)
6668 # see comment about AmigaOS4 .so support
6669 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6670 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6671 ;;
6672 m68k)
6673 _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)'
6674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6675 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6676 ;;
6677 esac
6678 ;;
6679
6680 beos*)
6681 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6682 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6683 # Joseph Beckenbach <[email protected]> says some releases of gcc
6684 # support --undefined. This deserves some investigation. FIXME
6685 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6686 else
6687 _LT_TAGVAR(ld_shlibs, $1)=no
6688 fi
6689 ;;
6690
6691 cygwin* | mingw* | pw32* | cegcc*)
6692 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6693 # as there is no search path for DLLs.
6694 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6695 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6696 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6697 _LT_TAGVAR(always_export_symbols, $1)=no
6698 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6699 _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'
6700 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6701
6702 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6703 _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'
6704 # If the export-symbols file already is a .def file, use it as
6705 # is; otherwise, prepend EXPORTS...
6706 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6707 cp $export_symbols $output_objdir/$soname.def;
6708 else
6709 echo EXPORTS > $output_objdir/$soname.def;
6710 cat $export_symbols >> $output_objdir/$soname.def;
6711 fi~
6712 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6713 else
6714 _LT_TAGVAR(ld_shlibs, $1)=no
6715 fi
6716 ;;
6717
6718 haiku*)
6719 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6720 _LT_TAGVAR(link_all_deplibs, $1)=yes
6721 ;;
6722
6723 os2*)
6724 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6725 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6726 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6727 shrext_cmds=.dll
6728 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6729 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6730 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6731 $ECHO EXPORTS >> $output_objdir/$libname.def~
6732 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6733 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6734 emximp -o $lib $output_objdir/$libname.def'
6735 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6736 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6737 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6738 $ECHO EXPORTS >> $output_objdir/$libname.def~
6739 prefix_cmds="$SED"~
6740 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6741 prefix_cmds="$prefix_cmds -e 1d";
6742 fi~
6743 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6744 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6745 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6746 emximp -o $lib $output_objdir/$libname.def'
6747 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6748 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6749 ;;
6750
6751 interix[[3-9]]*)
6752 _LT_TAGVAR(hardcode_direct, $1)=no
6753 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6754 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6755 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6756 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6757 # Instead, shared libraries are loaded at an image base (0x10000000 by
6758 # default) and relocated if they conflict, which is a slow very memory
6759 # consuming and fragmenting process. To avoid this, we pick a random,
6760 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6761 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6762 _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'
6763 _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'
6764 ;;
6765
6766 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6767 tmp_diet=no
6768 if test linux-dietlibc = "$host_os"; then
6769 case $cc_basename in
6770 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6771 esac
6772 fi
6773 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6774 && test no = "$tmp_diet"
6775 then
6776 tmp_addflag=' $pic_flag'
6777 tmp_sharedflag='-shared'
6778 case $cc_basename,$host_cpu in
6779 pgcc*) # Portland Group C compiler
6780 _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'
6781 tmp_addflag=' $pic_flag'
6782 ;;
6783 pgf77* | pgf90* | pgf95* | pgfortran*)
6784 # Portland Group f77 and f90 compilers
6785 _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'
6786 tmp_addflag=' $pic_flag -Mnomain' ;;
6787 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6788 tmp_addflag=' -i_dynamic' ;;
6789 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6790 tmp_addflag=' -i_dynamic -nofor_main' ;;
6791 ifc* | ifort*) # Intel Fortran compiler
6792 tmp_addflag=' -nofor_main' ;;
6793 lf95*) # Lahey Fortran 8.1
6794 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6795 tmp_sharedflag='--shared' ;;
6796 nagfor*) # NAGFOR 5.3
6797 tmp_sharedflag='-Wl,-shared' ;;
6798 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6799 tmp_sharedflag='-qmkshrobj'
6800 tmp_addflag= ;;
6801 nvcc*) # Cuda Compiler Driver 2.2
6802 _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'
6803 _LT_TAGVAR(compiler_needs_object, $1)=yes
6804 ;;
6805 esac
6806 case `$CC -V 2>&1 | sed 5q` in
6807 *Sun\ C*) # Sun C 5.9
6808 _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'
6809 _LT_TAGVAR(compiler_needs_object, $1)=yes
6810 tmp_sharedflag='-G' ;;
6811 *Sun\ F*) # Sun Fortran 8.3
6812 tmp_sharedflag='-G' ;;
6813 esac
6814 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6815
6816 if test yes = "$supports_anon_versioning"; then
6817 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6818 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6819 echo "local: *; };" >> $output_objdir/$libname.ver~
6820 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
6821 fi
6822
6823 case $cc_basename in
6824 tcc*)
6825 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
6826 ;;
6827 xlf* | bgf* | bgxlf* | mpixlf*)
6828 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6829 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6831 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6832 if test yes = "$supports_anon_versioning"; then
6833 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6834 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6835 echo "local: *; };" >> $output_objdir/$libname.ver~
6836 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6837 fi
6838 ;;
6839 esac
6840 else
6841 _LT_TAGVAR(ld_shlibs, $1)=no
6842 fi
6843 ;;
6844
6845 netbsd* | netbsdelf*-gnu)
6846 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6847 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6848 wlarc=
6849 else
6850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6851 _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'
6852 fi
6853 ;;
6854
6855 solaris*)
6856 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6857 _LT_TAGVAR(ld_shlibs, $1)=no
6858 cat <<_LT_EOF 1>&2
6859
6860 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6861 *** create shared libraries on Solaris systems. Therefore, libtool
6862 *** is disabling shared libraries support. We urge you to upgrade GNU
6863 *** binutils to release 2.9.1 or newer. Another option is to modify
6864 *** your PATH or compiler configuration so that the native linker is
6865 *** used, and then restart.
6866
6867 _LT_EOF
6868 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6869 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6870 _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'
6871 else
6872 _LT_TAGVAR(ld_shlibs, $1)=no
6873 fi
6874 ;;
6875
6876 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6877 case `$LD -v 2>&1` in
6878 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6879 _LT_TAGVAR(ld_shlibs, $1)=no
6880 cat <<_LT_EOF 1>&2
6881
6882 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
6883 *** reliably create shared libraries on SCO systems. Therefore, libtool
6884 *** is disabling shared libraries support. We urge you to upgrade GNU
6885 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6886 *** your PATH or compiler configuration so that the native linker is
6887 *** used, and then restart.
6888
6889 _LT_EOF
6890 ;;
6891 *)
6892 # For security reasons, it is highly recommended that you always
6893 # use absolute paths for naming shared libraries, and exclude the
6894 # DT_RUNPATH tag from executables and libraries. But doing so
6895 # requires that you compile everything twice, which is a pain.
6896 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6897 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6899 _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'
6900 else
6901 _LT_TAGVAR(ld_shlibs, $1)=no
6902 fi
6903 ;;
6904 esac
6905 ;;
6906
6907 sunos4*)
6908 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6909 wlarc=
6910 _LT_TAGVAR(hardcode_direct, $1)=yes
6911 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6912 ;;
6913
6914 *)
6915 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6917 _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'
6918 else
6919 _LT_TAGVAR(ld_shlibs, $1)=no
6920 fi
6921 ;;
6922 esac
6923
6924 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
6925 runpath_var=
6926 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6927 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6928 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6929 fi
6930 else
6931 # PORTME fill in a description of your system's linker (not GNU ld)
6932 case $host_os in
6933 aix3*)
6934 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6935 _LT_TAGVAR(always_export_symbols, $1)=yes
6936 _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'
6937 # Note: this linker hardcodes the directories in LIBPATH if there
6938 # are no directories specified by -L.
6939 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6940 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
6941 # Neither direct hardcoding nor static linking is supported with a
6942 # broken collect2.
6943 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6944 fi
6945 ;;
6946
6947 aix[[4-9]]*)
6948 if test ia64 = "$host_cpu"; then
6949 # On IA64, the linker does run time linking by default, so we don't
6950 # have to do anything special.
6951 aix_use_runtimelinking=no
6952 exp_sym_flag='-Bexport'
6953 no_entry_flag=
6954 else
6955 # If we're using GNU nm, then we don't want the "-C" option.
6956 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
6957 # Without the "-l" option, or with the "-B" option, AIX nm treats
6958 # weak defined symbols like other global defined symbols, whereas
6959 # GNU nm marks them as "W".
6960 # While the 'weak' keyword is ignored in the Export File, we need
6961 # it in the Import File for the 'aix-soname' feature, so we have
6962 # to replace the "-B" option with "-P" for AIX nm.
6963 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6964 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
6965 else
6966 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
6967 fi
6968 aix_use_runtimelinking=no
6969
6970 # Test if we are trying to use run time linking or normal
6971 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6972 # have runtime linking enabled, and use it for executables.
6973 # For shared libraries, we enable/disable runtime linking
6974 # depending on the kind of the shared library created -
6975 # when "with_aix_soname,aix_use_runtimelinking" is:
6976 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6977 # "aix,yes" lib.so shared, rtl:yes, for executables
6978 # lib.a static archive
6979 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6980 # lib.a(lib.so.V) shared, rtl:no, for executables
6981 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6982 # lib.a(lib.so.V) shared, rtl:no
6983 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6984 # lib.a static archive
6985 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6986 for ld_flag in $LDFLAGS; do
6987 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
6988 aix_use_runtimelinking=yes
6989 break
6990 fi
6991 done
6992 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6993 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6994 # so we don't have lib.a shared libs to link our executables.
6995 # We have to force runtime linking in this case.
6996 aix_use_runtimelinking=yes
6997 LDFLAGS="$LDFLAGS -Wl,-brtl"
6998 fi
6999 ;;
7000 esac
7001
7002 exp_sym_flag='-bexport'
7003 no_entry_flag='-bnoentry'
7004 fi
7005
7006 # When large executables or shared objects are built, AIX ld can
7007 # have problems creating the table of contents. If linking a library
7008 # or program results in "error TOC overflow" add -mminimal-toc to
7009 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7010 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7011
7012 _LT_TAGVAR(archive_cmds, $1)=''
7013 _LT_TAGVAR(hardcode_direct, $1)=yes
7014 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7015 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7016 _LT_TAGVAR(link_all_deplibs, $1)=yes
7017 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
7018 case $with_aix_soname,$aix_use_runtimelinking in
7019 aix,*) ;; # traditional, no import file
7020 svr4,* | *,yes) # use import file
7021 # The Import File defines what to hardcode.
7022 _LT_TAGVAR(hardcode_direct, $1)=no
7023 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7024 ;;
7025 esac
7026
7027 if test yes = "$GCC"; then
7028 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7029 # We only want to do this on AIX 4.2 and lower, the check
7030 # below for broken collect2 doesn't work under 4.3+
7031 collect2name=`$CC -print-prog-name=collect2`
7032 if test -f "$collect2name" &&
7033 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7034 then
7035 # We have reworked collect2
7036 :
7037 else
7038 # We have old collect2
7039 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7040 # It fails to find uninstalled libraries when the uninstalled
7041 # path is not listed in the libpath. Setting hardcode_minus_L
7042 # to unsupported forces relinking
7043 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7045 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7046 fi
7047 ;;
7048 esac
7049 shared_flag='-shared'
7050 if test yes = "$aix_use_runtimelinking"; then
7051 shared_flag="$shared_flag "'$wl-G'
7052 fi
7053 # Need to ensure runtime linking is disabled for the traditional
7054 # shared library, or the linker may eventually find shared libraries
7055 # /with/ Import File - we do not want to mix them.
7056 shared_flag_aix='-shared'
7057 shared_flag_svr4='-shared $wl-G'
7058 else
7059 # not using gcc
7060 if test ia64 = "$host_cpu"; then
7061 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7062 # chokes on -Wl,-G. The following line is correct:
7063 shared_flag='-G'
7064 else
7065 if test yes = "$aix_use_runtimelinking"; then
7066 shared_flag='$wl-G'
7067 else
7068 shared_flag='$wl-bM:SRE'
7069 fi
7070 shared_flag_aix='$wl-bM:SRE'
7071 shared_flag_svr4='$wl-G'
7072 fi
7073 fi
7074
7075 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
7076 # It seems that -bexpall does not export symbols beginning with
7077 # underscore (_), so it is better to generate a list of symbols to export.
7078 _LT_TAGVAR(always_export_symbols, $1)=yes
7079 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7080 # Warning - without using the other runtime loading flags (-brtl),
7081 # -berok will link without error, but may produce a broken library.
7082 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7083 # Determine the default libpath from the value encoded in an
7084 # empty executable.
7085 _LT_SYS_MODULE_PATH_AIX([$1])
7086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7087 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
7088 else
7089 if test ia64 = "$host_cpu"; then
7090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7091 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7092 _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"
7093 else
7094 # Determine the default libpath from the value encoded in an
7095 # empty executable.
7096 _LT_SYS_MODULE_PATH_AIX([$1])
7097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7098 # Warning - without using the other run time loading flags,
7099 # -berok will link without error, but may produce a broken library.
7100 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7101 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7102 if test yes = "$with_gnu_ld"; then
7103 # We only use this code for GNU lds that support --whole-archive.
7104 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7105 else
7106 # Exported symbols can be pulled into shared objects from archives
7107 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7108 fi
7109 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7110 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7111 # -brtl affects multiple linker settings, -berok does not and is overridden later
7112 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7113 if test svr4 != "$with_aix_soname"; then
7114 # This is similar to how AIX traditionally builds its shared libraries.
7115 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
7116 fi
7117 if test aix != "$with_aix_soname"; then
7118 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
7119 else
7120 # used by -dlpreopen to get the symbols
7121 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
7122 fi
7123 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7124 fi
7125 fi
7126 ;;
7127
7128 amigaos*)
7129 case $host_cpu in
7130 powerpc)
7131 # see comment about AmigaOS4 .so support
7132 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7133 _LT_TAGVAR(archive_expsym_cmds, $1)=''
7134 ;;
7135 m68k)
7136 _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)'
7137 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7138 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7139 ;;
7140 esac
7141 ;;
7142
7143 bsdi[[45]]*)
7144 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7145 ;;
7146
7147 cygwin* | mingw* | pw32* | cegcc*)
7148 # When not using gcc, we currently assume that we are using
7149 # Microsoft Visual C++.
7150 # hardcode_libdir_flag_spec is actually meaningless, as there is
7151 # no search path for DLLs.
7152 case $cc_basename in
7153 cl*)
7154 # Native MSVC
7155 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7156 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7157 _LT_TAGVAR(always_export_symbols, $1)=yes
7158 _LT_TAGVAR(file_list_spec, $1)='@'
7159 # Tell ltmain to make .lib files, not .a files.
7160 libext=lib
7161 # Tell ltmain to make .dll files, not .so files.
7162 shrext_cmds=.dll
7163 # FIXME: Setting linknames here is a bad hack.
7164 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7165 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7166 cp "$export_symbols" "$output_objdir/$soname.def";
7167 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7168 else
7169 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7170 fi~
7171 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7172 linknames='
7173 # The linker will not automatically build a static lib if we build a DLL.
7174 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7176 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7177 _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'
7178 # Don't use ranlib
7179 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7180 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7181 lt_tool_outputfile="@TOOL_OUTPUT@"~
7182 case $lt_outputfile in
7183 *.exe|*.EXE) ;;
7184 *)
7185 lt_outputfile=$lt_outputfile.exe
7186 lt_tool_outputfile=$lt_tool_outputfile.exe
7187 ;;
7188 esac~
7189 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7190 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7191 $RM "$lt_outputfile.manifest";
7192 fi'
7193 ;;
7194 *)
7195 # Assume MSVC wrapper
7196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7197 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7198 # Tell ltmain to make .lib files, not .a files.
7199 libext=lib
7200 # Tell ltmain to make .dll files, not .so files.
7201 shrext_cmds=.dll
7202 # FIXME: Setting linknames here is a bad hack.
7203 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7204 # The linker will automatically build a .lib file if we build a DLL.
7205 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7206 # FIXME: Should let the user specify the lib program.
7207 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7208 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7209 ;;
7210 esac
7211 ;;
7212
7213 darwin* | rhapsody*)
7214 _LT_DARWIN_LINKER_FEATURES($1)
7215 ;;
7216
7217 dgux*)
7218 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7220 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7221 ;;
7222
7223 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7224 # support. Future versions do this automatically, but an explicit c++rt0.o
7225 # does not break anything, and helps significantly (at the cost of a little
7226 # extra space).
7227 freebsd2.2*)
7228 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7229 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7230 _LT_TAGVAR(hardcode_direct, $1)=yes
7231 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7232 ;;
7233
7234 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7235 freebsd2.*)
7236 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7237 _LT_TAGVAR(hardcode_direct, $1)=yes
7238 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7239 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7240 ;;
7241
7242 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7243 freebsd* | dragonfly*)
7244 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7245 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7246 _LT_TAGVAR(hardcode_direct, $1)=yes
7247 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7248 ;;
7249
7250 hpux9*)
7251 if test yes = "$GCC"; then
7252 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
7253 else
7254 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
7255 fi
7256 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7257 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7258 _LT_TAGVAR(hardcode_direct, $1)=yes
7259
7260 # hardcode_minus_L: Not really in the search PATH,
7261 # but as the default location of the library.
7262 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7263 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7264 ;;
7265
7266 hpux10*)
7267 if test yes,no = "$GCC,$with_gnu_ld"; then
7268 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7269 else
7270 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7271 fi
7272 if test no = "$with_gnu_ld"; then
7273 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7274 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7275 _LT_TAGVAR(hardcode_direct, $1)=yes
7276 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7277 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7278 # hardcode_minus_L: Not really in the search PATH,
7279 # but as the default location of the library.
7280 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7281 fi
7282 ;;
7283
7284 hpux11*)
7285 if test yes,no = "$GCC,$with_gnu_ld"; then
7286 case $host_cpu in
7287 hppa*64*)
7288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7289 ;;
7290 ia64*)
7291 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7292 ;;
7293 *)
7294 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7295 ;;
7296 esac
7297 else
7298 case $host_cpu in
7299 hppa*64*)
7300 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7301 ;;
7302 ia64*)
7303 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7304 ;;
7305 *)
7306 m4_if($1, [], [
7307 # Older versions of the 11.00 compiler do not understand -b yet
7308 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7309 _LT_LINKER_OPTION([if $CC understands -b],
7310 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7311 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7312 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7313 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7314 ;;
7315 esac
7316 fi
7317 if test no = "$with_gnu_ld"; then
7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7319 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7320
7321 case $host_cpu in
7322 hppa*64*|ia64*)
7323 _LT_TAGVAR(hardcode_direct, $1)=no
7324 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7325 ;;
7326 *)
7327 _LT_TAGVAR(hardcode_direct, $1)=yes
7328 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7329 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7330
7331 # hardcode_minus_L: Not really in the search PATH,
7332 # but as the default location of the library.
7333 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7334 ;;
7335 esac
7336 fi
7337 ;;
7338
7339 irix5* | irix6* | nonstopux*)
7340 if test yes = "$GCC"; then
7341 _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'
7342 # Try to use the -exported_symbol ld option, if it does not
7343 # work, assume that -exports_file does not work either and
7344 # implicitly export all symbols.
7345 # This should be the same for all languages, so no per-tag cache variable.
7346 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7347 [lt_cv_irix_exported_symbol],
7348 [save_LDFLAGS=$LDFLAGS
7349 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
7350 AC_LINK_IFELSE(
7351 [AC_LANG_SOURCE(
7352 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7353 [C++], [[int foo (void) { return 0; }]],
7354 [Fortran 77], [[
7355 subroutine foo
7356 end]],
7357 [Fortran], [[
7358 subroutine foo
7359 end]])])],
7360 [lt_cv_irix_exported_symbol=yes],
7361 [lt_cv_irix_exported_symbol=no])
7362 LDFLAGS=$save_LDFLAGS])
7363 if test yes = "$lt_cv_irix_exported_symbol"; then
7364 _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'
7365 fi
7366 _LT_TAGVAR(link_all_deplibs, $1)=no
7367 else
7368 _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'
7369 _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'
7370 fi
7371 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7373 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7374 _LT_TAGVAR(inherit_rpath, $1)=yes
7375 _LT_TAGVAR(link_all_deplibs, $1)=yes
7376 ;;
7377
7378 linux*)
7379 case $cc_basename in
7380 tcc*)
7381 # Fabrice Bellard et al's Tiny C Compiler
7382 _LT_TAGVAR(ld_shlibs, $1)=yes
7383 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7384 ;;
7385 esac
7386 ;;
7387
7388 netbsd* | netbsdelf*-gnu)
7389 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7390 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7391 else
7392 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7393 fi
7394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7395 _LT_TAGVAR(hardcode_direct, $1)=yes
7396 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7397 ;;
7398
7399 newsos6)
7400 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7401 _LT_TAGVAR(hardcode_direct, $1)=yes
7402 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7403 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7404 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7405 ;;
7406
7407 *nto* | *qnx*)
7408 ;;
7409
7410 openbsd* | bitrig*)
7411 if test -f /usr/libexec/ld.so; then
7412 _LT_TAGVAR(hardcode_direct, $1)=yes
7413 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7414 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7415 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7416 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7417 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
7418 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7419 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7420 else
7421 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7423 fi
7424 else
7425 _LT_TAGVAR(ld_shlibs, $1)=no
7426 fi
7427 ;;
7428
7429 os2*)
7430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7431 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7432 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7433 shrext_cmds=.dll
7434 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7435 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7436 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7437 $ECHO EXPORTS >> $output_objdir/$libname.def~
7438 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7439 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7440 emximp -o $lib $output_objdir/$libname.def'
7441 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7442 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7443 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7444 $ECHO EXPORTS >> $output_objdir/$libname.def~
7445 prefix_cmds="$SED"~
7446 if test EXPORTS = "`$SED 1q $export_symbols`"; then
7447 prefix_cmds="$prefix_cmds -e 1d";
7448 fi~
7449 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7450 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7451 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7452 emximp -o $lib $output_objdir/$libname.def'
7453 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7454 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7455 ;;
7456
7457 osf3*)
7458 if test yes = "$GCC"; then
7459 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7460 _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'
7461 else
7462 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7463 _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'
7464 fi
7465 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7466 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7467 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7468 ;;
7469
7470 osf4* | osf5*) # as osf3* with the addition of -msym flag
7471 if test yes = "$GCC"; then
7472 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7473 _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'
7474 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7475 else
7476 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7477 _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'
7478 _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~
7479 $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'
7480
7481 # Both c and cxx compiler support -rpath directly
7482 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7483 fi
7484 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7485 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7486 ;;
7487
7488 solaris*)
7489 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7490 if test yes = "$GCC"; then
7491 wlarc='$wl'
7492 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7493 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7494 $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'
7495 else
7496 case `$CC -V 2>&1` in
7497 *"Compilers 5.0"*)
7498 wlarc=''
7499 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
7500 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7501 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7502 ;;
7503 *)
7504 wlarc='$wl'
7505 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7506 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7507 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7508 ;;
7509 esac
7510 fi
7511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7512 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7513 case $host_os in
7514 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7515 *)
7516 # The compiler driver will combine and reorder linker options,
7517 # but understands '-z linker_flag'. GCC discards it without '$wl',
7518 # but is careful enough not to reorder.
7519 # Supported since Solaris 2.6 (maybe 2.5.1?)
7520 if test yes = "$GCC"; then
7521 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7522 else
7523 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7524 fi
7525 ;;
7526 esac
7527 _LT_TAGVAR(link_all_deplibs, $1)=yes
7528 ;;
7529
7530 sunos4*)
7531 if test sequent = "$host_vendor"; then
7532 # Use $CC to link under sequent, because it throws in some extra .o
7533 # files that make .init and .fini sections work.
7534 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7535 else
7536 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7537 fi
7538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7539 _LT_TAGVAR(hardcode_direct, $1)=yes
7540 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7541 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7542 ;;
7543
7544 sysv4)
7545 case $host_vendor in
7546 sni)
7547 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7548 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7549 ;;
7550 siemens)
7551 ## LD is ld it makes a PLAMLIB
7552 ## CC just makes a GrossModule.
7553 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7554 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7555 _LT_TAGVAR(hardcode_direct, $1)=no
7556 ;;
7557 motorola)
7558 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7559 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7560 ;;
7561 esac
7562 runpath_var='LD_RUN_PATH'
7563 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7564 ;;
7565
7566 sysv4.3*)
7567 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7568 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7569 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7570 ;;
7571
7572 sysv4*MP*)
7573 if test -d /usr/nec; then
7574 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7575 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7576 runpath_var=LD_RUN_PATH
7577 hardcode_runpath_var=yes
7578 _LT_TAGVAR(ld_shlibs, $1)=yes
7579 fi
7580 ;;
7581
7582 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7583 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7584 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7585 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7586 runpath_var='LD_RUN_PATH'
7587
7588 if test yes = "$GCC"; then
7589 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7590 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7591 else
7592 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7593 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7594 fi
7595 ;;
7596
7597 sysv5* | sco3.2v5* | sco5v6*)
7598 # Note: We CANNOT use -z defs as we might desire, because we do not
7599 # link with -lc, and that would cause any symbols used from libc to
7600 # always be unresolved, which means just about no library would
7601 # ever link correctly. If we're not using GNU ld we use -z text
7602 # though, which does catch some bad symbols but isn't as heavy-handed
7603 # as -z defs.
7604 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7605 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7606 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7607 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7609 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7610 _LT_TAGVAR(link_all_deplibs, $1)=yes
7611 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7612 runpath_var='LD_RUN_PATH'
7613
7614 if test yes = "$GCC"; then
7615 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7616 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7617 else
7618 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7619 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7620 fi
7621 ;;
7622
7623 uts4*)
7624 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7625 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7626 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7627 ;;
7628
7629 *)
7630 _LT_TAGVAR(ld_shlibs, $1)=no
7631 ;;
7632 esac
7633
7634 if test sni = "$host_vendor"; then
7635 case $host in
7636 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7637 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
7638 ;;
7639 esac
7640 fi
7641 fi
7642 ])
7643 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7644 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7645
7646 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7647
7648 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7649 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7650 _LT_DECL([], [extract_expsyms_cmds], [2],
7651 [The commands to extract the exported symbol list from a shared archive])
7652
7653 #
7654 # Do we need to explicitly link libc?
7655 #
7656 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7657 x|xyes)
7658 # Assume -lc should be added
7659 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7660
7661 if test yes,yes = "$GCC,$enable_shared"; then
7662 case $_LT_TAGVAR(archive_cmds, $1) in
7663 *'~'*)
7664 # FIXME: we may have to deal with multi-command sequences.
7665 ;;
7666 '$CC '*)
7667 # Test whether the compiler implicitly links with -lc since on some
7668 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7669 # to ld, don't add -lc before -lgcc.
7670 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7671 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7672 [$RM conftest*
7673 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7674
7675 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7676 soname=conftest
7677 lib=conftest
7678 libobjs=conftest.$ac_objext
7679 deplibs=
7680 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7681 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7682 compiler_flags=-v
7683 linker_flags=-v
7684 verstring=
7685 output_objdir=.
7686 libname=conftest
7687 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7688 _LT_TAGVAR(allow_undefined_flag, $1)=
7689 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7690 then
7691 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7692 else
7693 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7694 fi
7695 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7696 else
7697 cat conftest.err 1>&5
7698 fi
7699 $RM conftest*
7700 ])
7701 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7702 ;;
7703 esac
7704 fi
7705 ;;
7706 esac
7707
7708 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7709 [Whether or not to add -lc for building shared libraries])
7710 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7711 [enable_shared_with_static_runtimes], [0],
7712 [Whether or not to disallow shared libs when runtime libs are static])
7713 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7714 [Compiler flag to allow reflexive dlopens])
7715 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7716 [Compiler flag to generate shared objects directly from archives])
7717 _LT_TAGDECL([], [compiler_needs_object], [1],
7718 [Whether the compiler copes with passing no objects directly])
7719 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7720 [Create an old-style archive from a shared archive])
7721 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7722 [Create a temporary old-style archive to link instead of a shared archive])
7723 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7724 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7725 _LT_TAGDECL([], [module_cmds], [2],
7726 [Commands used to build a loadable module if different from building
7727 a shared archive.])
7728 _LT_TAGDECL([], [module_expsym_cmds], [2])
7729 _LT_TAGDECL([], [with_gnu_ld], [1],
7730 [Whether we are building with GNU ld or not])
7731 _LT_TAGDECL([], [allow_undefined_flag], [1],
7732 [Flag that allows shared libraries with undefined symbols to be built])
7733 _LT_TAGDECL([], [no_undefined_flag], [1],
7734 [Flag that enforces no undefined symbols])
7735 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7736 [Flag to hardcode $libdir into a binary during linking.
7737 This must work even if $libdir does not exist])
7738 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7739 [Whether we need a single "-rpath" flag with a separated argument])
7740 _LT_TAGDECL([], [hardcode_direct], [0],
7741 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
7742 DIR into the resulting binary])
7743 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7744 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
7745 DIR into the resulting binary and the resulting library dependency is
7746 "absolute", i.e impossible to change by setting $shlibpath_var if the
7747 library is relocated])
7748 _LT_TAGDECL([], [hardcode_minus_L], [0],
7749 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7750 into the resulting binary])
7751 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7752 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7753 into the resulting binary])
7754 _LT_TAGDECL([], [hardcode_automatic], [0],
7755 [Set to "yes" if building a shared library automatically hardcodes DIR
7756 into the library and all subsequent libraries and executables linked
7757 against it])
7758 _LT_TAGDECL([], [inherit_rpath], [0],
7759 [Set to yes if linker adds runtime paths of dependent libraries
7760 to runtime path list])
7761 _LT_TAGDECL([], [link_all_deplibs], [0],
7762 [Whether libtool must link a program against all its dependency libraries])
7763 _LT_TAGDECL([], [always_export_symbols], [0],
7764 [Set to "yes" if exported symbols are required])
7765 _LT_TAGDECL([], [export_symbols_cmds], [2],
7766 [The commands to list exported symbols])
7767 _LT_TAGDECL([], [exclude_expsyms], [1],
7768 [Symbols that should not be listed in the preloaded symbols])
7769 _LT_TAGDECL([], [include_expsyms], [1],
7770 [Symbols that must always be exported])
7771 _LT_TAGDECL([], [prelink_cmds], [2],
7772 [Commands necessary for linking programs (against libraries) with templates])
7773 _LT_TAGDECL([], [postlink_cmds], [2],
7774 [Commands necessary for finishing linking programs])
7775 _LT_TAGDECL([], [file_list_spec], [1],
7776 [Specify filename containing input files])
7777 dnl FIXME: Not yet implemented
7778 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7779 dnl [Compiler flag to generate thread safe objects])
7780 ])# _LT_LINKER_SHLIBS
7781
7782
7783 # _LT_LANG_C_CONFIG([TAG])
7784 # ------------------------
7785 # Ensure that the configuration variables for a C compiler are suitably
7786 # defined. These variables are subsequently used by _LT_CONFIG to write
7787 # the compiler configuration to 'libtool'.
7788 m4_defun([_LT_LANG_C_CONFIG],
7789 [m4_require([_LT_DECL_EGREP])dnl
7790 lt_save_CC=$CC
7791 AC_LANG_PUSH(C)
7792
7793 # Source file extension for C test sources.
7794 ac_ext=c
7795
7796 # Object file extension for compiled C test sources.
7797 objext=o
7798 _LT_TAGVAR(objext, $1)=$objext
7799
7800 # Code to be used in simple compile tests
7801 lt_simple_compile_test_code="int some_variable = 0;"
7802
7803 # Code to be used in simple link tests
7804 lt_simple_link_test_code='int main(){return(0);}'
7805
7806 _LT_TAG_COMPILER
7807 # Save the default compiler, since it gets overwritten when the other
7808 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7809 compiler_DEFAULT=$CC
7810
7811 # save warnings/boilerplate of simple test code
7812 _LT_COMPILER_BOILERPLATE
7813 _LT_LINKER_BOILERPLATE
7814
7815 if test -n "$compiler"; then
7816 _LT_COMPILER_NO_RTTI($1)
7817 _LT_COMPILER_PIC($1)
7818 _LT_COMPILER_C_O($1)
7819 _LT_COMPILER_FILE_LOCKS($1)
7820 _LT_LINKER_SHLIBS($1)
7821 _LT_SYS_DYNAMIC_LINKER($1)
7822 _LT_LINKER_HARDCODE_LIBPATH($1)
7823 LT_SYS_DLOPEN_SELF
7824 _LT_CMD_STRIPLIB
7825
7826 # Report what library types will actually be built
7827 AC_MSG_CHECKING([if libtool supports shared libraries])
7828 AC_MSG_RESULT([$can_build_shared])
7829
7830 AC_MSG_CHECKING([whether to build shared libraries])
7831 test no = "$can_build_shared" && enable_shared=no
7832
7833 # On AIX, shared libraries and static libraries use the same namespace, and
7834 # are all built from PIC.
7835 case $host_os in
7836 aix3*)
7837 test yes = "$enable_shared" && enable_static=no
7838 if test -n "$RANLIB"; then
7839 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7840 postinstall_cmds='$RANLIB $lib'
7841 fi
7842 ;;
7843
7844 aix[[4-9]]*)
7845 if test ia64 != "$host_cpu"; then
7846 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7847 yes,aix,yes) ;; # shared object as lib.so file only
7848 yes,svr4,*) ;; # shared object as lib.so archive member only
7849 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7850 esac
7851 fi
7852 ;;
7853 esac
7854 AC_MSG_RESULT([$enable_shared])
7855
7856 AC_MSG_CHECKING([whether to build static libraries])
7857 # Make sure either enable_shared or enable_static is yes.
7858 test yes = "$enable_shared" || enable_static=yes
7859 AC_MSG_RESULT([$enable_static])
7860
7861 _LT_CONFIG($1)
7862 fi
7863 AC_LANG_POP
7864 CC=$lt_save_CC
7865 ])# _LT_LANG_C_CONFIG
7866
7867
7868 # _LT_LANG_CXX_CONFIG([TAG])
7869 # --------------------------
7870 # Ensure that the configuration variables for a C++ compiler are suitably
7871 # defined. These variables are subsequently used by _LT_CONFIG to write
7872 # the compiler configuration to 'libtool'.
7873 m4_defun([_LT_LANG_CXX_CONFIG],
7874 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7875 m4_require([_LT_DECL_EGREP])dnl
7876 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7877 if test -n "$CXX" && ( test no != "$CXX" &&
7878 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
7879 (test g++ != "$CXX"))); then
7880 AC_PROG_CXXCPP
7881 else
7882 _lt_caught_CXX_error=yes
7883 fi
7884
7885 AC_LANG_PUSH(C++)
7886 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7887 _LT_TAGVAR(allow_undefined_flag, $1)=
7888 _LT_TAGVAR(always_export_symbols, $1)=no
7889 _LT_TAGVAR(archive_expsym_cmds, $1)=
7890 _LT_TAGVAR(compiler_needs_object, $1)=no
7891 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7892 _LT_TAGVAR(hardcode_direct, $1)=no
7893 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7895 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7896 _LT_TAGVAR(hardcode_minus_L, $1)=no
7897 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7898 _LT_TAGVAR(hardcode_automatic, $1)=no
7899 _LT_TAGVAR(inherit_rpath, $1)=no
7900 _LT_TAGVAR(module_cmds, $1)=
7901 _LT_TAGVAR(module_expsym_cmds, $1)=
7902 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7903 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7904 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7905 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7906 _LT_TAGVAR(no_undefined_flag, $1)=
7907 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7908 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7909
7910 # Source file extension for C++ test sources.
7911 ac_ext=cpp
7912
7913 # Object file extension for compiled C++ test sources.
7914 objext=o
7915 _LT_TAGVAR(objext, $1)=$objext
7916
7917 # No sense in running all these tests if we already determined that
7918 # the CXX compiler isn't working. Some variables (like enable_shared)
7919 # are currently assumed to apply to all compilers on this platform,
7920 # and will be corrupted by setting them based on a non-working compiler.
7921 if test yes != "$_lt_caught_CXX_error"; then
7922 # Code to be used in simple compile tests
7923 lt_simple_compile_test_code="int some_variable = 0;"
7924
7925 # Code to be used in simple link tests
7926 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7927
7928 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7929 _LT_TAG_COMPILER
7930
7931 # save warnings/boilerplate of simple test code
7932 _LT_COMPILER_BOILERPLATE
7933 _LT_LINKER_BOILERPLATE
7934
7935 # Allow CC to be a program name with arguments.
7936 lt_save_CC=$CC
7937 lt_save_CFLAGS=$CFLAGS
7938 lt_save_LD=$LD
7939 lt_save_GCC=$GCC
7940 GCC=$GXX
7941 lt_save_with_gnu_ld=$with_gnu_ld
7942 lt_save_path_LD=$lt_cv_path_LD
7943 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7944 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7945 else
7946 $as_unset lt_cv_prog_gnu_ld
7947 fi
7948 if test -n "${lt_cv_path_LDCXX+set}"; then
7949 lt_cv_path_LD=$lt_cv_path_LDCXX
7950 else
7951 $as_unset lt_cv_path_LD
7952 fi
7953 test -z "${LDCXX+set}" || LD=$LDCXX
7954 CC=${CXX-"c++"}
7955 CFLAGS=$CXXFLAGS
7956 compiler=$CC
7957 _LT_TAGVAR(compiler, $1)=$CC
7958 _LT_CC_BASENAME([$compiler])
7959
7960 if test -n "$compiler"; then
7961 # We don't want -fno-exception when compiling C++ code, so set the
7962 # no_builtin_flag separately
7963 if test yes = "$GXX"; then
7964 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7965 else
7966 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7967 fi
7968
7969 if test yes = "$GXX"; then
7970 # Set up default GNU C++ configuration
7971
7972 LT_PATH_LD
7973
7974 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7975 # archiving commands below assume that GNU ld is being used.
7976 if test yes = "$with_gnu_ld"; then
7977 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7978 _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'
7979
7980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7981 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7982
7983 # If archive_cmds runs LD, not CC, wlarc should be empty
7984 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7985 # investigate it a little bit more. (MM)
7986 wlarc='$wl'
7987
7988 # ancient GNU ld didn't support --whole-archive et. al.
7989 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7990 $GREP 'no-whole-archive' > /dev/null; then
7991 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7992 else
7993 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7994 fi
7995 else
7996 with_gnu_ld=no
7997 wlarc=
7998
7999 # A generic and very simple default shared library creation
8000 # command for GNU C++ for the case where it uses the native
8001 # linker, instead of GNU ld. If possible, this setting should
8002 # overridden to take advantage of the native linker features on
8003 # the platform it is being used on.
8004 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8005 fi
8006
8007 # Commands to make compiler produce verbose output that lists
8008 # what "hidden" libraries, object files and flags are used when
8009 # linking a shared library.
8010 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8011
8012 else
8013 GXX=no
8014 with_gnu_ld=no
8015 wlarc=
8016 fi
8017
8018 # PORTME: fill in a description of your system's C++ link characteristics
8019 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8020 _LT_TAGVAR(ld_shlibs, $1)=yes
8021 case $host_os in
8022 aix3*)
8023 # FIXME: insert proper C++ library support
8024 _LT_TAGVAR(ld_shlibs, $1)=no
8025 ;;
8026 aix[[4-9]]*)
8027 if test ia64 = "$host_cpu"; then
8028 # On IA64, the linker does run time linking by default, so we don't
8029 # have to do anything special.
8030 aix_use_runtimelinking=no
8031 exp_sym_flag='-Bexport'
8032 no_entry_flag=
8033 else
8034 aix_use_runtimelinking=no
8035
8036 # Test if we are trying to use run time linking or normal
8037 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8038 # have runtime linking enabled, and use it for executables.
8039 # For shared libraries, we enable/disable runtime linking
8040 # depending on the kind of the shared library created -
8041 # when "with_aix_soname,aix_use_runtimelinking" is:
8042 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
8043 # "aix,yes" lib.so shared, rtl:yes, for executables
8044 # lib.a static archive
8045 # "both,no" lib.so.V(shr.o) shared, rtl:yes
8046 # lib.a(lib.so.V) shared, rtl:no, for executables
8047 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8048 # lib.a(lib.so.V) shared, rtl:no
8049 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
8050 # lib.a static archive
8051 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8052 for ld_flag in $LDFLAGS; do
8053 case $ld_flag in
8054 *-brtl*)
8055 aix_use_runtimelinking=yes
8056 break
8057 ;;
8058 esac
8059 done
8060 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8061 # With aix-soname=svr4, we create the lib.so.V shared archives only,
8062 # so we don't have lib.a shared libs to link our executables.
8063 # We have to force runtime linking in this case.
8064 aix_use_runtimelinking=yes
8065 LDFLAGS="$LDFLAGS -Wl,-brtl"
8066 fi
8067 ;;
8068 esac
8069
8070 exp_sym_flag='-bexport'
8071 no_entry_flag='-bnoentry'
8072 fi
8073
8074 # When large executables or shared objects are built, AIX ld can
8075 # have problems creating the table of contents. If linking a library
8076 # or program results in "error TOC overflow" add -mminimal-toc to
8077 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8078 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8079
8080 _LT_TAGVAR(archive_cmds, $1)=''
8081 _LT_TAGVAR(hardcode_direct, $1)=yes
8082 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8083 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8084 _LT_TAGVAR(link_all_deplibs, $1)=yes
8085 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
8086 case $with_aix_soname,$aix_use_runtimelinking in
8087 aix,*) ;; # no import file
8088 svr4,* | *,yes) # use import file
8089 # The Import File defines what to hardcode.
8090 _LT_TAGVAR(hardcode_direct, $1)=no
8091 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8092 ;;
8093 esac
8094
8095 if test yes = "$GXX"; then
8096 case $host_os in aix4.[[012]]|aix4.[[012]].*)
8097 # We only want to do this on AIX 4.2 and lower, the check
8098 # below for broken collect2 doesn't work under 4.3+
8099 collect2name=`$CC -print-prog-name=collect2`
8100 if test -f "$collect2name" &&
8101 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8102 then
8103 # We have reworked collect2
8104 :
8105 else
8106 # We have old collect2
8107 _LT_TAGVAR(hardcode_direct, $1)=unsupported
8108 # It fails to find uninstalled libraries when the uninstalled
8109 # path is not listed in the libpath. Setting hardcode_minus_L
8110 # to unsupported forces relinking
8111 _LT_TAGVAR(hardcode_minus_L, $1)=yes
8112 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8113 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8114 fi
8115 esac
8116 shared_flag='-shared'
8117 if test yes = "$aix_use_runtimelinking"; then
8118 shared_flag=$shared_flag' $wl-G'
8119 fi
8120 # Need to ensure runtime linking is disabled for the traditional
8121 # shared library, or the linker may eventually find shared libraries
8122 # /with/ Import File - we do not want to mix them.
8123 shared_flag_aix='-shared'
8124 shared_flag_svr4='-shared $wl-G'
8125 else
8126 # not using gcc
8127 if test ia64 = "$host_cpu"; then
8128 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8129 # chokes on -Wl,-G. The following line is correct:
8130 shared_flag='-G'
8131 else
8132 if test yes = "$aix_use_runtimelinking"; then
8133 shared_flag='$wl-G'
8134 else
8135 shared_flag='$wl-bM:SRE'
8136 fi
8137 shared_flag_aix='$wl-bM:SRE'
8138 shared_flag_svr4='$wl-G'
8139 fi
8140 fi
8141
8142 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8143 # It seems that -bexpall does not export symbols beginning with
8144 # underscore (_), so it is better to generate a list of symbols to
8145 # export.
8146 _LT_TAGVAR(always_export_symbols, $1)=yes
8147 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8148 # Warning - without using the other runtime loading flags (-brtl),
8149 # -berok will link without error, but may produce a broken library.
8150 # The "-G" linker flag allows undefined symbols.
8151 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
8152 # Determine the default libpath from the value encoded in an empty
8153 # executable.
8154 _LT_SYS_MODULE_PATH_AIX([$1])
8155 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8156
8157 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8158 else
8159 if test ia64 = "$host_cpu"; then
8160 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8161 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8162 _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"
8163 else
8164 # Determine the default libpath from the value encoded in an
8165 # empty executable.
8166 _LT_SYS_MODULE_PATH_AIX([$1])
8167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8168 # Warning - without using the other run time loading flags,
8169 # -berok will link without error, but may produce a broken library.
8170 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
8171 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
8172 if test yes = "$with_gnu_ld"; then
8173 # We only use this code for GNU lds that support --whole-archive.
8174 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8175 else
8176 # Exported symbols can be pulled into shared objects from archives
8177 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8178 fi
8179 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8180 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8181 # -brtl affects multiple linker settings, -berok does not and is overridden later
8182 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
8183 if test svr4 != "$with_aix_soname"; then
8184 # This is similar to how AIX traditionally builds its shared
8185 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
8186 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
8187 fi
8188 if test aix != "$with_aix_soname"; then
8189 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
8190 else
8191 # used by -dlpreopen to get the symbols
8192 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
8193 fi
8194 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8195 fi
8196 fi
8197 ;;
8198
8199 beos*)
8200 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8201 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8202 # Joseph Beckenbach <[email protected]> says some releases of gcc
8203 # support --undefined. This deserves some investigation. FIXME
8204 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8205 else
8206 _LT_TAGVAR(ld_shlibs, $1)=no
8207 fi
8208 ;;
8209
8210 chorus*)
8211 case $cc_basename in
8212 *)
8213 # FIXME: insert proper C++ library support
8214 _LT_TAGVAR(ld_shlibs, $1)=no
8215 ;;
8216 esac
8217 ;;
8218
8219 cygwin* | mingw* | pw32* | cegcc*)
8220 case $GXX,$cc_basename in
8221 ,cl* | no,cl*)
8222 # Native MSVC
8223 # hardcode_libdir_flag_spec is actually meaningless, as there is
8224 # no search path for DLLs.
8225 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8226 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8227 _LT_TAGVAR(always_export_symbols, $1)=yes
8228 _LT_TAGVAR(file_list_spec, $1)='@'
8229 # Tell ltmain to make .lib files, not .a files.
8230 libext=lib
8231 # Tell ltmain to make .dll files, not .so files.
8232 shrext_cmds=.dll
8233 # FIXME: Setting linknames here is a bad hack.
8234 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
8235 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8236 cp "$export_symbols" "$output_objdir/$soname.def";
8237 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
8238 else
8239 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
8240 fi~
8241 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8242 linknames='
8243 # The linker will not automatically build a static lib if we build a DLL.
8244 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8245 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8246 # Don't use ranlib
8247 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8248 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8249 lt_tool_outputfile="@TOOL_OUTPUT@"~
8250 case $lt_outputfile in
8251 *.exe|*.EXE) ;;
8252 *)
8253 lt_outputfile=$lt_outputfile.exe
8254 lt_tool_outputfile=$lt_tool_outputfile.exe
8255 ;;
8256 esac~
8257 func_to_tool_file "$lt_outputfile"~
8258 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
8259 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8260 $RM "$lt_outputfile.manifest";
8261 fi'
8262 ;;
8263 *)
8264 # g++
8265 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8266 # as there is no search path for DLLs.
8267 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8268 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8269 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8270 _LT_TAGVAR(always_export_symbols, $1)=no
8271 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8272
8273 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8274 _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'
8275 # If the export-symbols file already is a .def file, use it as
8276 # is; otherwise, prepend EXPORTS...
8277 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8278 cp $export_symbols $output_objdir/$soname.def;
8279 else
8280 echo EXPORTS > $output_objdir/$soname.def;
8281 cat $export_symbols >> $output_objdir/$soname.def;
8282 fi~
8283 $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'
8284 else
8285 _LT_TAGVAR(ld_shlibs, $1)=no
8286 fi
8287 ;;
8288 esac
8289 ;;
8290 darwin* | rhapsody*)
8291 _LT_DARWIN_LINKER_FEATURES($1)
8292 ;;
8293
8294 os2*)
8295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8296 _LT_TAGVAR(hardcode_minus_L, $1)=yes
8297 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8298 shrext_cmds=.dll
8299 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8300 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8301 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8302 $ECHO EXPORTS >> $output_objdir/$libname.def~
8303 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8304 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8305 emximp -o $lib $output_objdir/$libname.def'
8306 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8307 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8308 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8309 $ECHO EXPORTS >> $output_objdir/$libname.def~
8310 prefix_cmds="$SED"~
8311 if test EXPORTS = "`$SED 1q $export_symbols`"; then
8312 prefix_cmds="$prefix_cmds -e 1d";
8313 fi~
8314 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8315 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8316 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8317 emximp -o $lib $output_objdir/$libname.def'
8318 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8319 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8320 ;;
8321
8322 dgux*)
8323 case $cc_basename in
8324 ec++*)
8325 # FIXME: insert proper C++ library support
8326 _LT_TAGVAR(ld_shlibs, $1)=no
8327 ;;
8328 ghcx*)
8329 # Green Hills C++ Compiler
8330 # FIXME: insert proper C++ library support
8331 _LT_TAGVAR(ld_shlibs, $1)=no
8332 ;;
8333 *)
8334 # FIXME: insert proper C++ library support
8335 _LT_TAGVAR(ld_shlibs, $1)=no
8336 ;;
8337 esac
8338 ;;
8339
8340 freebsd2.*)
8341 # C++ shared libraries reported to be fairly broken before
8342 # switch to ELF
8343 _LT_TAGVAR(ld_shlibs, $1)=no
8344 ;;
8345
8346 freebsd-elf*)
8347 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8348 ;;
8349
8350 freebsd* | dragonfly*)
8351 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8352 # conventions
8353 _LT_TAGVAR(ld_shlibs, $1)=yes
8354 ;;
8355
8356 haiku*)
8357 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8358 _LT_TAGVAR(link_all_deplibs, $1)=yes
8359 ;;
8360
8361 hpux9*)
8362 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8363 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8364 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8365 _LT_TAGVAR(hardcode_direct, $1)=yes
8366 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8367 # but as the default
8368 # location of the library.
8369
8370 case $cc_basename in
8371 CC*)
8372 # FIXME: insert proper C++ library support
8373 _LT_TAGVAR(ld_shlibs, $1)=no
8374 ;;
8375 aCC*)
8376 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8377 # Commands to make compiler produce verbose output that lists
8378 # what "hidden" libraries, object files and flags are used when
8379 # linking a shared library.
8380 #
8381 # There doesn't appear to be a way to prevent this compiler from
8382 # explicitly linking system object files so we need to strip them
8383 # from the output so that they don't get included in the library
8384 # dependencies.
8385 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"'
8386 ;;
8387 *)
8388 if test yes = "$GXX"; then
8389 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8390 else
8391 # FIXME: insert proper C++ library support
8392 _LT_TAGVAR(ld_shlibs, $1)=no
8393 fi
8394 ;;
8395 esac
8396 ;;
8397
8398 hpux10*|hpux11*)
8399 if test no = "$with_gnu_ld"; then
8400 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8401 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8402
8403 case $host_cpu in
8404 hppa*64*|ia64*)
8405 ;;
8406 *)
8407 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8408 ;;
8409 esac
8410 fi
8411 case $host_cpu in
8412 hppa*64*|ia64*)
8413 _LT_TAGVAR(hardcode_direct, $1)=no
8414 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8415 ;;
8416 *)
8417 _LT_TAGVAR(hardcode_direct, $1)=yes
8418 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8419 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8420 # but as the default
8421 # location of the library.
8422 ;;
8423 esac
8424
8425 case $cc_basename in
8426 CC*)
8427 # FIXME: insert proper C++ library support
8428 _LT_TAGVAR(ld_shlibs, $1)=no
8429 ;;
8430 aCC*)
8431 case $host_cpu in
8432 hppa*64*)
8433 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8434 ;;
8435 ia64*)
8436 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8437 ;;
8438 *)
8439 _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'
8440 ;;
8441 esac
8442 # Commands to make compiler produce verbose output that lists
8443 # what "hidden" libraries, object files and flags are used when
8444 # linking a shared library.
8445 #
8446 # There doesn't appear to be a way to prevent this compiler from
8447 # explicitly linking system object files so we need to strip them
8448 # from the output so that they don't get included in the library
8449 # dependencies.
8450 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"'
8451 ;;
8452 *)
8453 if test yes = "$GXX"; then
8454 if test no = "$with_gnu_ld"; then
8455 case $host_cpu in
8456 hppa*64*)
8457 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8458 ;;
8459 ia64*)
8460 _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'
8461 ;;
8462 *)
8463 _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'
8464 ;;
8465 esac
8466 fi
8467 else
8468 # FIXME: insert proper C++ library support
8469 _LT_TAGVAR(ld_shlibs, $1)=no
8470 fi
8471 ;;
8472 esac
8473 ;;
8474
8475 interix[[3-9]]*)
8476 _LT_TAGVAR(hardcode_direct, $1)=no
8477 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8478 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8479 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8480 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8481 # Instead, shared libraries are loaded at an image base (0x10000000 by
8482 # default) and relocated if they conflict, which is a slow very memory
8483 # consuming and fragmenting process. To avoid this, we pick a random,
8484 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8485 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8486 _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'
8487 _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'
8488 ;;
8489 irix5* | irix6*)
8490 case $cc_basename in
8491 CC*)
8492 # SGI C++
8493 _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'
8494
8495 # Archives containing C++ object files must be created using
8496 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8497 # necessary to make sure instantiated templates are included
8498 # in the archive.
8499 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8500 ;;
8501 *)
8502 if test yes = "$GXX"; then
8503 if test no = "$with_gnu_ld"; then
8504 _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'
8505 else
8506 _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'
8507 fi
8508 fi
8509 _LT_TAGVAR(link_all_deplibs, $1)=yes
8510 ;;
8511 esac
8512 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8513 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8514 _LT_TAGVAR(inherit_rpath, $1)=yes
8515 ;;
8516
8517 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8518 case $cc_basename in
8519 KCC*)
8520 # Kuck and Associates, Inc. (KAI) C++ Compiler
8521
8522 # KCC will only create a shared library if the output file
8523 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8524 # to its proper name (with version) after linking.
8525 _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'
8526 _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'
8527 # Commands to make compiler produce verbose output that lists
8528 # what "hidden" libraries, object files and flags are used when
8529 # linking a shared library.
8530 #
8531 # There doesn't appear to be a way to prevent this compiler from
8532 # explicitly linking system object files so we need to strip them
8533 # from the output so that they don't get included in the library
8534 # dependencies.
8535 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"'
8536
8537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8538 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8539
8540 # Archives containing C++ object files must be created using
8541 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8542 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8543 ;;
8544 icpc* | ecpc* )
8545 # Intel C++
8546 with_gnu_ld=yes
8547 # version 8.0 and above of icpc choke on multiply defined symbols
8548 # if we add $predep_objects and $postdep_objects, however 7.1 and
8549 # earlier do not add the objects themselves.
8550 case `$CC -V 2>&1` in
8551 *"Version 7."*)
8552 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8553 _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'
8554 ;;
8555 *) # Version 8.0 or newer
8556 tmp_idyn=
8557 case $host_cpu in
8558 ia64*) tmp_idyn=' -i_dynamic';;
8559 esac
8560 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8561 _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'
8562 ;;
8563 esac
8564 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8566 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8567 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8568 ;;
8569 pgCC* | pgcpp*)
8570 # Portland Group C++ compiler
8571 case `$CC -V` in
8572 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8573 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8574 rm -rf $tpldir~
8575 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8576 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8577 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8578 rm -rf $tpldir~
8579 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8580 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8581 $RANLIB $oldlib'
8582 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8583 rm -rf $tpldir~
8584 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8585 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8586 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8587 rm -rf $tpldir~
8588 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8589 $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'
8590 ;;
8591 *) # Version 6 and above use weak symbols
8592 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8593 _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'
8594 ;;
8595 esac
8596
8597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
8598 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8599 _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'
8600 ;;
8601 cxx*)
8602 # Compaq C++
8603 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8604 _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'
8605
8606 runpath_var=LD_RUN_PATH
8607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8608 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8609
8610 # Commands to make compiler produce verbose output that lists
8611 # what "hidden" libraries, object files and flags are used when
8612 # linking a shared library.
8613 #
8614 # There doesn't appear to be a way to prevent this compiler from
8615 # explicitly linking system object files so we need to strip them
8616 # from the output so that they don't get included in the library
8617 # dependencies.
8618 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'
8619 ;;
8620 xl* | mpixl* | bgxl*)
8621 # IBM XL 8.0 on PPC, with GNU ld
8622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8623 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8624 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8625 if test yes = "$supports_anon_versioning"; then
8626 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8627 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8628 echo "local: *; };" >> $output_objdir/$libname.ver~
8629 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8630 fi
8631 ;;
8632 *)
8633 case `$CC -V 2>&1 | sed 5q` in
8634 *Sun\ C*)
8635 # Sun C++ 5.9
8636 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8637 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8638 _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'
8639 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8640 _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'
8641 _LT_TAGVAR(compiler_needs_object, $1)=yes
8642
8643 # Not sure whether something based on
8644 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8645 # would be better.
8646 output_verbose_link_cmd='func_echo_all'
8647
8648 # Archives containing C++ object files must be created using
8649 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8650 # necessary to make sure instantiated templates are included
8651 # in the archive.
8652 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8653 ;;
8654 esac
8655 ;;
8656 esac
8657 ;;
8658
8659 lynxos*)
8660 # FIXME: insert proper C++ library support
8661 _LT_TAGVAR(ld_shlibs, $1)=no
8662 ;;
8663
8664 m88k*)
8665 # FIXME: insert proper C++ library support
8666 _LT_TAGVAR(ld_shlibs, $1)=no
8667 ;;
8668
8669 mvs*)
8670 case $cc_basename in
8671 cxx*)
8672 # FIXME: insert proper C++ library support
8673 _LT_TAGVAR(ld_shlibs, $1)=no
8674 ;;
8675 *)
8676 # FIXME: insert proper C++ library support
8677 _LT_TAGVAR(ld_shlibs, $1)=no
8678 ;;
8679 esac
8680 ;;
8681
8682 netbsd*)
8683 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8684 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8685 wlarc=
8686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8687 _LT_TAGVAR(hardcode_direct, $1)=yes
8688 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8689 fi
8690 # Workaround some broken pre-1.5 toolchains
8691 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8692 ;;
8693
8694 *nto* | *qnx*)
8695 _LT_TAGVAR(ld_shlibs, $1)=yes
8696 ;;
8697
8698 openbsd* | bitrig*)
8699 if test -f /usr/libexec/ld.so; then
8700 _LT_TAGVAR(hardcode_direct, $1)=yes
8701 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8702 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8703 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8705 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
8706 _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'
8707 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8708 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8709 fi
8710 output_verbose_link_cmd=func_echo_all
8711 else
8712 _LT_TAGVAR(ld_shlibs, $1)=no
8713 fi
8714 ;;
8715
8716 osf3* | osf4* | osf5*)
8717 case $cc_basename in
8718 KCC*)
8719 # Kuck and Associates, Inc. (KAI) C++ Compiler
8720
8721 # KCC will only create a shared library if the output file
8722 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8723 # to its proper name (with version) after linking.
8724 _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'
8725
8726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8727 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8728
8729 # Archives containing C++ object files must be created using
8730 # the KAI C++ compiler.
8731 case $host in
8732 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8733 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8734 esac
8735 ;;
8736 RCC*)
8737 # Rational C++ 2.4.1
8738 # FIXME: insert proper C++ library support
8739 _LT_TAGVAR(ld_shlibs, $1)=no
8740 ;;
8741 cxx*)
8742 case $host in
8743 osf3*)
8744 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8745 _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'
8746 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8747 ;;
8748 *)
8749 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8750 _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'
8751 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8752 echo "-hidden">> $lib.exp~
8753 $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~
8754 $RM $lib.exp'
8755 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8756 ;;
8757 esac
8758
8759 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8760
8761 # Commands to make compiler produce verbose output that lists
8762 # what "hidden" libraries, object files and flags are used when
8763 # linking a shared library.
8764 #
8765 # There doesn't appear to be a way to prevent this compiler from
8766 # explicitly linking system object files so we need to strip them
8767 # from the output so that they don't get included in the library
8768 # dependencies.
8769 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"'
8770 ;;
8771 *)
8772 if test yes,no = "$GXX,$with_gnu_ld"; then
8773 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8774 case $host in
8775 osf3*)
8776 _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'
8777 ;;
8778 *)
8779 _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'
8780 ;;
8781 esac
8782
8783 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8784 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8785
8786 # Commands to make compiler produce verbose output that lists
8787 # what "hidden" libraries, object files and flags are used when
8788 # linking a shared library.
8789 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8790
8791 else
8792 # FIXME: insert proper C++ library support
8793 _LT_TAGVAR(ld_shlibs, $1)=no
8794 fi
8795 ;;
8796 esac
8797 ;;
8798
8799 psos*)
8800 # FIXME: insert proper C++ library support
8801 _LT_TAGVAR(ld_shlibs, $1)=no
8802 ;;
8803
8804 sunos4*)
8805 case $cc_basename in
8806 CC*)
8807 # Sun C++ 4.x
8808 # FIXME: insert proper C++ library support
8809 _LT_TAGVAR(ld_shlibs, $1)=no
8810 ;;
8811 lcc*)
8812 # Lucid
8813 # FIXME: insert proper C++ library support
8814 _LT_TAGVAR(ld_shlibs, $1)=no
8815 ;;
8816 *)
8817 # FIXME: insert proper C++ library support
8818 _LT_TAGVAR(ld_shlibs, $1)=no
8819 ;;
8820 esac
8821 ;;
8822
8823 solaris*)
8824 case $cc_basename in
8825 CC* | sunCC*)
8826 # Sun C++ 4.2, 5.x and Centerline C++
8827 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8828 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8829 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8830 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8831 $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'
8832
8833 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8835 case $host_os in
8836 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8837 *)
8838 # The compiler driver will combine and reorder linker options,
8839 # but understands '-z linker_flag'.
8840 # Supported since Solaris 2.6 (maybe 2.5.1?)
8841 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8842 ;;
8843 esac
8844 _LT_TAGVAR(link_all_deplibs, $1)=yes
8845
8846 output_verbose_link_cmd='func_echo_all'
8847
8848 # Archives containing C++ object files must be created using
8849 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8850 # necessary to make sure instantiated templates are included
8851 # in the archive.
8852 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8853 ;;
8854 gcx*)
8855 # Green Hills C++ Compiler
8856 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8857
8858 # The C++ compiler must be used to create the archive.
8859 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8860 ;;
8861 *)
8862 # GNU C++ compiler with Solaris linker
8863 if test yes,no = "$GXX,$with_gnu_ld"; then
8864 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
8865 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8866 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8867 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8868 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8869
8870 # Commands to make compiler produce verbose output that lists
8871 # what "hidden" libraries, object files and flags are used when
8872 # linking a shared library.
8873 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8874 else
8875 # g++ 2.7 appears to require '-G' NOT '-shared' on this
8876 # platform.
8877 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8878 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8879 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8880
8881 # Commands to make compiler produce verbose output that lists
8882 # what "hidden" libraries, object files and flags are used when
8883 # linking a shared library.
8884 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8885 fi
8886
8887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
8888 case $host_os in
8889 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8890 *)
8891 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8892 ;;
8893 esac
8894 fi
8895 ;;
8896 esac
8897 ;;
8898
8899 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8900 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8901 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8902 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8903 runpath_var='LD_RUN_PATH'
8904
8905 case $cc_basename in
8906 CC*)
8907 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8908 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8909 ;;
8910 *)
8911 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8912 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8913 ;;
8914 esac
8915 ;;
8916
8917 sysv5* | sco3.2v5* | sco5v6*)
8918 # Note: We CANNOT use -z defs as we might desire, because we do not
8919 # link with -lc, and that would cause any symbols used from libc to
8920 # always be unresolved, which means just about no library would
8921 # ever link correctly. If we're not using GNU ld we use -z text
8922 # though, which does catch some bad symbols but isn't as heavy-handed
8923 # as -z defs.
8924 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8925 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8926 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8927 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8929 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8930 _LT_TAGVAR(link_all_deplibs, $1)=yes
8931 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8932 runpath_var='LD_RUN_PATH'
8933
8934 case $cc_basename in
8935 CC*)
8936 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8937 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8938 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8939 '"$_LT_TAGVAR(old_archive_cmds, $1)"
8940 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8941 '"$_LT_TAGVAR(reload_cmds, $1)"
8942 ;;
8943 *)
8944 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8945 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8946 ;;
8947 esac
8948 ;;
8949
8950 tandem*)
8951 case $cc_basename in
8952 NCC*)
8953 # NonStop-UX NCC 3.20
8954 # FIXME: insert proper C++ library support
8955 _LT_TAGVAR(ld_shlibs, $1)=no
8956 ;;
8957 *)
8958 # FIXME: insert proper C++ library support
8959 _LT_TAGVAR(ld_shlibs, $1)=no
8960 ;;
8961 esac
8962 ;;
8963
8964 vxworks*)
8965 # FIXME: insert proper C++ library support
8966 _LT_TAGVAR(ld_shlibs, $1)=no
8967 ;;
8968
8969 *)
8970 # FIXME: insert proper C++ library support
8971 _LT_TAGVAR(ld_shlibs, $1)=no
8972 ;;
8973 esac
8974
8975 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8976 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8977
8978 _LT_TAGVAR(GCC, $1)=$GXX
8979 _LT_TAGVAR(LD, $1)=$LD
8980
8981 ## CAVEAT EMPTOR:
8982 ## There is no encapsulation within the following macros, do not change
8983 ## the running order or otherwise move them around unless you know exactly
8984 ## what you are doing...
8985 _LT_SYS_HIDDEN_LIBDEPS($1)
8986 _LT_COMPILER_PIC($1)
8987 _LT_COMPILER_C_O($1)
8988 _LT_COMPILER_FILE_LOCKS($1)
8989 _LT_LINKER_SHLIBS($1)
8990 _LT_SYS_DYNAMIC_LINKER($1)
8991 _LT_LINKER_HARDCODE_LIBPATH($1)
8992
8993 _LT_CONFIG($1)
8994 fi # test -n "$compiler"
8995
8996 CC=$lt_save_CC
8997 CFLAGS=$lt_save_CFLAGS
8998 LDCXX=$LD
8999 LD=$lt_save_LD
9000 GCC=$lt_save_GCC
9001 with_gnu_ld=$lt_save_with_gnu_ld
9002 lt_cv_path_LDCXX=$lt_cv_path_LD
9003 lt_cv_path_LD=$lt_save_path_LD
9004 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9005 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9006 fi # test yes != "$_lt_caught_CXX_error"
9007
9008 AC_LANG_POP
9009 ])# _LT_LANG_CXX_CONFIG
9010
9011
9012 # _LT_FUNC_STRIPNAME_CNF
9013 # ----------------------
9014 # func_stripname_cnf prefix suffix name
9015 # strip PREFIX and SUFFIX off of NAME.
9016 # PREFIX and SUFFIX must not contain globbing or regex special
9017 # characters, hashes, percent signs, but SUFFIX may contain a leading
9018 # dot (in which case that matches only a dot).
9019 #
9020 # This function is identical to the (non-XSI) version of func_stripname,
9021 # except this one can be used by m4 code that may be executed by configure,
9022 # rather than the libtool script.
9023 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9024 AC_REQUIRE([_LT_DECL_SED])
9025 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9026 func_stripname_cnf ()
9027 {
9028 case @S|@2 in
9029 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
9030 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
9031 esac
9032 } # func_stripname_cnf
9033 ])# _LT_FUNC_STRIPNAME_CNF
9034
9035
9036 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9037 # ---------------------------------
9038 # Figure out "hidden" library dependencies from verbose
9039 # compiler output when linking a shared library.
9040 # Parse the compiler output and extract the necessary
9041 # objects, libraries and library flags.
9042 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9043 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9044 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9045 # Dependencies to place before and after the object being linked:
9046 _LT_TAGVAR(predep_objects, $1)=
9047 _LT_TAGVAR(postdep_objects, $1)=
9048 _LT_TAGVAR(predeps, $1)=
9049 _LT_TAGVAR(postdeps, $1)=
9050 _LT_TAGVAR(compiler_lib_search_path, $1)=
9051
9052 dnl we can't use the lt_simple_compile_test_code here,
9053 dnl because it contains code intended for an executable,
9054 dnl not a library. It's possible we should let each
9055 dnl tag define a new lt_????_link_test_code variable,
9056 dnl but it's only used here...
9057 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9058 int a;
9059 void foo (void) { a = 0; }
9060 _LT_EOF
9061 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9062 class Foo
9063 {
9064 public:
9065 Foo (void) { a = 0; }
9066 private:
9067 int a;
9068 };
9069 _LT_EOF
9070 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9071 subroutine foo
9072 implicit none
9073 integer*4 a
9074 a=0
9075 return
9076 end
9077 _LT_EOF
9078 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9079 subroutine foo
9080 implicit none
9081 integer a
9082 a=0
9083 return
9084 end
9085 _LT_EOF
9086 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9087 public class foo {
9088 private int a;
9089 public void bar (void) {
9090 a = 0;
9091 }
9092 };
9093 _LT_EOF
9094 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9095 package foo
9096 func foo() {
9097 }
9098 _LT_EOF
9099 ])
9100
9101 _lt_libdeps_save_CFLAGS=$CFLAGS
9102 case "$CC $CFLAGS " in #(
9103 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9104 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9105 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9106 esac
9107
9108 dnl Parse the compiler output and extract the necessary
9109 dnl objects, libraries and library flags.
9110 if AC_TRY_EVAL(ac_compile); then
9111 # Parse the compiler output and extract the necessary
9112 # objects, libraries and library flags.
9113
9114 # Sentinel used to keep track of whether or not we are before
9115 # the conftest object file.
9116 pre_test_object_deps_done=no
9117
9118 for p in `eval "$output_verbose_link_cmd"`; do
9119 case $prev$p in
9120
9121 -L* | -R* | -l*)
9122 # Some compilers place space between "-{L,R}" and the path.
9123 # Remove the space.
9124 if test x-L = "$p" ||
9125 test x-R = "$p"; then
9126 prev=$p
9127 continue
9128 fi
9129
9130 # Expand the sysroot to ease extracting the directories later.
9131 if test -z "$prev"; then
9132 case $p in
9133 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9134 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9135 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9136 esac
9137 fi
9138 case $p in
9139 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9140 esac
9141 if test no = "$pre_test_object_deps_done"; then
9142 case $prev in
9143 -L | -R)
9144 # Internal compiler library paths should come after those
9145 # provided the user. The postdeps already come after the
9146 # user supplied libs so there is no need to process them.
9147 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9148 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
9149 else
9150 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
9151 fi
9152 ;;
9153 # The "-l" case would never come before the object being
9154 # linked, so don't bother handling this case.
9155 esac
9156 else
9157 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9158 _LT_TAGVAR(postdeps, $1)=$prev$p
9159 else
9160 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
9161 fi
9162 fi
9163 prev=
9164 ;;
9165
9166 *.lto.$objext) ;; # Ignore GCC LTO objects
9167 *.$objext)
9168 # This assumes that the test object file only shows up
9169 # once in the compiler output.
9170 if test "$p" = "conftest.$objext"; then
9171 pre_test_object_deps_done=yes
9172 continue
9173 fi
9174
9175 if test no = "$pre_test_object_deps_done"; then
9176 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9177 _LT_TAGVAR(predep_objects, $1)=$p
9178 else
9179 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9180 fi
9181 else
9182 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9183 _LT_TAGVAR(postdep_objects, $1)=$p
9184 else
9185 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9186 fi
9187 fi
9188 ;;
9189
9190 *) ;; # Ignore the rest.
9191
9192 esac
9193 done
9194
9195 # Clean up.
9196 rm -f a.out a.exe
9197 else
9198 echo "libtool.m4: error: problem compiling $1 test program"
9199 fi
9200
9201 $RM -f confest.$objext
9202 CFLAGS=$_lt_libdeps_save_CFLAGS
9203
9204 # PORTME: override above test on systems where it is broken
9205 m4_if([$1], [CXX],
9206 [case $host_os in
9207 interix[[3-9]]*)
9208 # Interix 3.5 installs completely hosed .la files for C++, so rather than
9209 # hack all around it, let's just trust "g++" to DTRT.
9210 _LT_TAGVAR(predep_objects,$1)=
9211 _LT_TAGVAR(postdep_objects,$1)=
9212 _LT_TAGVAR(postdeps,$1)=
9213 ;;
9214 esac
9215 ])
9216
9217 case " $_LT_TAGVAR(postdeps, $1) " in
9218 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9219 esac
9220 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9221 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9222 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
9223 fi
9224 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9225 [The directories searched by this compiler when creating a shared library])
9226 _LT_TAGDECL([], [predep_objects], [1],
9227 [Dependencies to place before and after the objects being linked to
9228 create a shared library])
9229 _LT_TAGDECL([], [postdep_objects], [1])
9230 _LT_TAGDECL([], [predeps], [1])
9231 _LT_TAGDECL([], [postdeps], [1])
9232 _LT_TAGDECL([], [compiler_lib_search_path], [1],
9233 [The library search path used internally by the compiler when linking
9234 a shared library])
9235 ])# _LT_SYS_HIDDEN_LIBDEPS
9236
9237
9238 # _LT_LANG_F77_CONFIG([TAG])
9239 # --------------------------
9240 # Ensure that the configuration variables for a Fortran 77 compiler are
9241 # suitably defined. These variables are subsequently used by _LT_CONFIG
9242 # to write the compiler configuration to 'libtool'.
9243 m4_defun([_LT_LANG_F77_CONFIG],
9244 [AC_LANG_PUSH(Fortran 77)
9245 if test -z "$F77" || test no = "$F77"; then
9246 _lt_disable_F77=yes
9247 fi
9248
9249 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9250 _LT_TAGVAR(allow_undefined_flag, $1)=
9251 _LT_TAGVAR(always_export_symbols, $1)=no
9252 _LT_TAGVAR(archive_expsym_cmds, $1)=
9253 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9254 _LT_TAGVAR(hardcode_direct, $1)=no
9255 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9256 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9257 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9258 _LT_TAGVAR(hardcode_minus_L, $1)=no
9259 _LT_TAGVAR(hardcode_automatic, $1)=no
9260 _LT_TAGVAR(inherit_rpath, $1)=no
9261 _LT_TAGVAR(module_cmds, $1)=
9262 _LT_TAGVAR(module_expsym_cmds, $1)=
9263 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9264 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9265 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9266 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9267 _LT_TAGVAR(no_undefined_flag, $1)=
9268 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9269 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9270
9271 # Source file extension for f77 test sources.
9272 ac_ext=f
9273
9274 # Object file extension for compiled f77 test sources.
9275 objext=o
9276 _LT_TAGVAR(objext, $1)=$objext
9277
9278 # No sense in running all these tests if we already determined that
9279 # the F77 compiler isn't working. Some variables (like enable_shared)
9280 # are currently assumed to apply to all compilers on this platform,
9281 # and will be corrupted by setting them based on a non-working compiler.
9282 if test yes != "$_lt_disable_F77"; then
9283 # Code to be used in simple compile tests
9284 lt_simple_compile_test_code="\
9285 subroutine t
9286 return
9287 end
9288 "
9289
9290 # Code to be used in simple link tests
9291 lt_simple_link_test_code="\
9292 program t
9293 end
9294 "
9295
9296 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9297 _LT_TAG_COMPILER
9298
9299 # save warnings/boilerplate of simple test code
9300 _LT_COMPILER_BOILERPLATE
9301 _LT_LINKER_BOILERPLATE
9302
9303 # Allow CC to be a program name with arguments.
9304 lt_save_CC=$CC
9305 lt_save_GCC=$GCC
9306 lt_save_CFLAGS=$CFLAGS
9307 CC=${F77-"f77"}
9308 CFLAGS=$FFLAGS
9309 compiler=$CC
9310 _LT_TAGVAR(compiler, $1)=$CC
9311 _LT_CC_BASENAME([$compiler])
9312 GCC=$G77
9313 if test -n "$compiler"; then
9314 AC_MSG_CHECKING([if libtool supports shared libraries])
9315 AC_MSG_RESULT([$can_build_shared])
9316
9317 AC_MSG_CHECKING([whether to build shared libraries])
9318 test no = "$can_build_shared" && enable_shared=no
9319
9320 # On AIX, shared libraries and static libraries use the same namespace, and
9321 # are all built from PIC.
9322 case $host_os in
9323 aix3*)
9324 test yes = "$enable_shared" && enable_static=no
9325 if test -n "$RANLIB"; then
9326 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9327 postinstall_cmds='$RANLIB $lib'
9328 fi
9329 ;;
9330 aix[[4-9]]*)
9331 if test ia64 != "$host_cpu"; then
9332 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9333 yes,aix,yes) ;; # shared object as lib.so file only
9334 yes,svr4,*) ;; # shared object as lib.so archive member only
9335 yes,*) enable_static=no ;; # shared object in lib.a archive as well
9336 esac
9337 fi
9338 ;;
9339 esac
9340 AC_MSG_RESULT([$enable_shared])
9341
9342 AC_MSG_CHECKING([whether to build static libraries])
9343 # Make sure either enable_shared or enable_static is yes.
9344 test yes = "$enable_shared" || enable_static=yes
9345 AC_MSG_RESULT([$enable_static])
9346
9347 _LT_TAGVAR(GCC, $1)=$G77
9348 _LT_TAGVAR(LD, $1)=$LD
9349
9350 ## CAVEAT EMPTOR:
9351 ## There is no encapsulation within the following macros, do not change
9352 ## the running order or otherwise move them around unless you know exactly
9353 ## what you are doing...
9354 _LT_COMPILER_PIC($1)
9355 _LT_COMPILER_C_O($1)
9356 _LT_COMPILER_FILE_LOCKS($1)
9357 _LT_LINKER_SHLIBS($1)
9358 _LT_SYS_DYNAMIC_LINKER($1)
9359 _LT_LINKER_HARDCODE_LIBPATH($1)
9360
9361 _LT_CONFIG($1)
9362 fi # test -n "$compiler"
9363
9364 GCC=$lt_save_GCC
9365 CC=$lt_save_CC
9366 CFLAGS=$lt_save_CFLAGS
9367 fi # test yes != "$_lt_disable_F77"
9368
9369 AC_LANG_POP
9370 ])# _LT_LANG_F77_CONFIG
9371
9372
9373 # _LT_LANG_FC_CONFIG([TAG])
9374 # -------------------------
9375 # Ensure that the configuration variables for a Fortran compiler are
9376 # suitably defined. These variables are subsequently used by _LT_CONFIG
9377 # to write the compiler configuration to 'libtool'.
9378 m4_defun([_LT_LANG_FC_CONFIG],
9379 [AC_LANG_PUSH(Fortran)
9380
9381 if test -z "$FC" || test no = "$FC"; then
9382 _lt_disable_FC=yes
9383 fi
9384
9385 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9386 _LT_TAGVAR(allow_undefined_flag, $1)=
9387 _LT_TAGVAR(always_export_symbols, $1)=no
9388 _LT_TAGVAR(archive_expsym_cmds, $1)=
9389 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9390 _LT_TAGVAR(hardcode_direct, $1)=no
9391 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9393 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9394 _LT_TAGVAR(hardcode_minus_L, $1)=no
9395 _LT_TAGVAR(hardcode_automatic, $1)=no
9396 _LT_TAGVAR(inherit_rpath, $1)=no
9397 _LT_TAGVAR(module_cmds, $1)=
9398 _LT_TAGVAR(module_expsym_cmds, $1)=
9399 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9400 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9401 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9402 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9403 _LT_TAGVAR(no_undefined_flag, $1)=
9404 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9405 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9406
9407 # Source file extension for fc test sources.
9408 ac_ext=${ac_fc_srcext-f}
9409
9410 # Object file extension for compiled fc test sources.
9411 objext=o
9412 _LT_TAGVAR(objext, $1)=$objext
9413
9414 # No sense in running all these tests if we already determined that
9415 # the FC compiler isn't working. Some variables (like enable_shared)
9416 # are currently assumed to apply to all compilers on this platform,
9417 # and will be corrupted by setting them based on a non-working compiler.
9418 if test yes != "$_lt_disable_FC"; then
9419 # Code to be used in simple compile tests
9420 lt_simple_compile_test_code="\
9421 subroutine t
9422 return
9423 end
9424 "
9425
9426 # Code to be used in simple link tests
9427 lt_simple_link_test_code="\
9428 program t
9429 end
9430 "
9431
9432 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9433 _LT_TAG_COMPILER
9434
9435 # save warnings/boilerplate of simple test code
9436 _LT_COMPILER_BOILERPLATE
9437 _LT_LINKER_BOILERPLATE
9438
9439 # Allow CC to be a program name with arguments.
9440 lt_save_CC=$CC
9441 lt_save_GCC=$GCC
9442 lt_save_CFLAGS=$CFLAGS
9443 CC=${FC-"f95"}
9444 CFLAGS=$FCFLAGS
9445 compiler=$CC
9446 GCC=$ac_cv_fc_compiler_gnu
9447
9448 _LT_TAGVAR(compiler, $1)=$CC
9449 _LT_CC_BASENAME([$compiler])
9450
9451 if test -n "$compiler"; then
9452 AC_MSG_CHECKING([if libtool supports shared libraries])
9453 AC_MSG_RESULT([$can_build_shared])
9454
9455 AC_MSG_CHECKING([whether to build shared libraries])
9456 test no = "$can_build_shared" && enable_shared=no
9457
9458 # On AIX, shared libraries and static libraries use the same namespace, and
9459 # are all built from PIC.
9460 case $host_os in
9461 aix3*)
9462 test yes = "$enable_shared" && enable_static=no
9463 if test -n "$RANLIB"; then
9464 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9465 postinstall_cmds='$RANLIB $lib'
9466 fi
9467 ;;
9468 aix[[4-9]]*)
9469 if test ia64 != "$host_cpu"; then
9470 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9471 yes,aix,yes) ;; # shared object as lib.so file only
9472 yes,svr4,*) ;; # shared object as lib.so archive member only
9473 yes,*) enable_static=no ;; # shared object in lib.a archive as well
9474 esac
9475 fi
9476 ;;
9477 esac
9478 AC_MSG_RESULT([$enable_shared])
9479
9480 AC_MSG_CHECKING([whether to build static libraries])
9481 # Make sure either enable_shared or enable_static is yes.
9482 test yes = "$enable_shared" || enable_static=yes
9483 AC_MSG_RESULT([$enable_static])
9484
9485 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
9486 _LT_TAGVAR(LD, $1)=$LD
9487
9488 ## CAVEAT EMPTOR:
9489 ## There is no encapsulation within the following macros, do not change
9490 ## the running order or otherwise move them around unless you know exactly
9491 ## what you are doing...
9492 _LT_SYS_HIDDEN_LIBDEPS($1)
9493 _LT_COMPILER_PIC($1)
9494 _LT_COMPILER_C_O($1)
9495 _LT_COMPILER_FILE_LOCKS($1)
9496 _LT_LINKER_SHLIBS($1)
9497 _LT_SYS_DYNAMIC_LINKER($1)
9498 _LT_LINKER_HARDCODE_LIBPATH($1)
9499
9500 _LT_CONFIG($1)
9501 fi # test -n "$compiler"
9502
9503 GCC=$lt_save_GCC
9504 CC=$lt_save_CC
9505 CFLAGS=$lt_save_CFLAGS
9506 fi # test yes != "$_lt_disable_FC"
9507
9508 AC_LANG_POP
9509 ])# _LT_LANG_FC_CONFIG
9510
9511
9512 # _LT_LANG_GCJ_CONFIG([TAG])
9513 # --------------------------
9514 # Ensure that the configuration variables for the GNU Java Compiler compiler
9515 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9516 # to write the compiler configuration to 'libtool'.
9517 m4_defun([_LT_LANG_GCJ_CONFIG],
9518 [AC_REQUIRE([LT_PROG_GCJ])dnl
9519 AC_LANG_SAVE
9520
9521 # Source file extension for Java test sources.
9522 ac_ext=java
9523
9524 # Object file extension for compiled Java test sources.
9525 objext=o
9526 _LT_TAGVAR(objext, $1)=$objext
9527
9528 # Code to be used in simple compile tests
9529 lt_simple_compile_test_code="class foo {}"
9530
9531 # Code to be used in simple link tests
9532 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9533
9534 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9535 _LT_TAG_COMPILER
9536
9537 # save warnings/boilerplate of simple test code
9538 _LT_COMPILER_BOILERPLATE
9539 _LT_LINKER_BOILERPLATE
9540
9541 # Allow CC to be a program name with arguments.
9542 lt_save_CC=$CC
9543 lt_save_CFLAGS=$CFLAGS
9544 lt_save_GCC=$GCC
9545 GCC=yes
9546 CC=${GCJ-"gcj"}
9547 CFLAGS=$GCJFLAGS
9548 compiler=$CC
9549 _LT_TAGVAR(compiler, $1)=$CC
9550 _LT_TAGVAR(LD, $1)=$LD
9551 _LT_CC_BASENAME([$compiler])
9552
9553 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9554 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9555
9556 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9557 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9558 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9559
9560 if test -n "$compiler"; then
9561 _LT_COMPILER_NO_RTTI($1)
9562 _LT_COMPILER_PIC($1)
9563 _LT_COMPILER_C_O($1)
9564 _LT_COMPILER_FILE_LOCKS($1)
9565 _LT_LINKER_SHLIBS($1)
9566 _LT_LINKER_HARDCODE_LIBPATH($1)
9567
9568 _LT_CONFIG($1)
9569 fi
9570
9571 AC_LANG_RESTORE
9572
9573 GCC=$lt_save_GCC
9574 CC=$lt_save_CC
9575 CFLAGS=$lt_save_CFLAGS
9576 ])# _LT_LANG_GCJ_CONFIG
9577
9578
9579 # _LT_LANG_GO_CONFIG([TAG])
9580 # --------------------------
9581 # Ensure that the configuration variables for the GNU Go compiler
9582 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9583 # to write the compiler configuration to 'libtool'.
9584 m4_defun([_LT_LANG_GO_CONFIG],
9585 [AC_REQUIRE([LT_PROG_GO])dnl
9586 AC_LANG_SAVE
9587
9588 # Source file extension for Go test sources.
9589 ac_ext=go
9590
9591 # Object file extension for compiled Go test sources.
9592 objext=o
9593 _LT_TAGVAR(objext, $1)=$objext
9594
9595 # Code to be used in simple compile tests
9596 lt_simple_compile_test_code="package main; func main() { }"
9597
9598 # Code to be used in simple link tests
9599 lt_simple_link_test_code='package main; func main() { }'
9600
9601 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9602 _LT_TAG_COMPILER
9603
9604 # save warnings/boilerplate of simple test code
9605 _LT_COMPILER_BOILERPLATE
9606 _LT_LINKER_BOILERPLATE
9607
9608 # Allow CC to be a program name with arguments.
9609 lt_save_CC=$CC
9610 lt_save_CFLAGS=$CFLAGS
9611 lt_save_GCC=$GCC
9612 GCC=yes
9613 CC=${GOC-"gccgo"}
9614 CFLAGS=$GOFLAGS
9615 compiler=$CC
9616 _LT_TAGVAR(compiler, $1)=$CC
9617 _LT_TAGVAR(LD, $1)=$LD
9618 _LT_CC_BASENAME([$compiler])
9619
9620 # Go did not exist at the time GCC didn't implicitly link libc in.
9621 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9622
9623 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9624 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9625 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9626
9627 if test -n "$compiler"; then
9628 _LT_COMPILER_NO_RTTI($1)
9629 _LT_COMPILER_PIC($1)
9630 _LT_COMPILER_C_O($1)
9631 _LT_COMPILER_FILE_LOCKS($1)
9632 _LT_LINKER_SHLIBS($1)
9633 _LT_LINKER_HARDCODE_LIBPATH($1)
9634
9635 _LT_CONFIG($1)
9636 fi
9637
9638 AC_LANG_RESTORE
9639
9640 GCC=$lt_save_GCC
9641 CC=$lt_save_CC
9642 CFLAGS=$lt_save_CFLAGS
9643 ])# _LT_LANG_GO_CONFIG
9644
9645
9646 # _LT_LANG_RC_CONFIG([TAG])
9647 # -------------------------
9648 # Ensure that the configuration variables for the Windows resource compiler
9649 # are suitably defined. These variables are subsequently used by _LT_CONFIG
9650 # to write the compiler configuration to 'libtool'.
9651 m4_defun([_LT_LANG_RC_CONFIG],
9652 [AC_REQUIRE([LT_PROG_RC])dnl
9653 AC_LANG_SAVE
9654
9655 # Source file extension for RC test sources.
9656 ac_ext=rc
9657
9658 # Object file extension for compiled RC test sources.
9659 objext=o
9660 _LT_TAGVAR(objext, $1)=$objext
9661
9662 # Code to be used in simple compile tests
9663 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9664
9665 # Code to be used in simple link tests
9666 lt_simple_link_test_code=$lt_simple_compile_test_code
9667
9668 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9669 _LT_TAG_COMPILER
9670
9671 # save warnings/boilerplate of simple test code
9672 _LT_COMPILER_BOILERPLATE
9673 _LT_LINKER_BOILERPLATE
9674
9675 # Allow CC to be a program name with arguments.
9676 lt_save_CC=$CC
9677 lt_save_CFLAGS=$CFLAGS
9678 lt_save_GCC=$GCC
9679 GCC=
9680 CC=${RC-"windres"}
9681 CFLAGS=
9682 compiler=$CC
9683 _LT_TAGVAR(compiler, $1)=$CC
9684 _LT_CC_BASENAME([$compiler])
9685 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9686
9687 if test -n "$compiler"; then
9688 :
9689 _LT_CONFIG($1)
9690 fi
9691
9692 GCC=$lt_save_GCC
9693 AC_LANG_RESTORE
9694 CC=$lt_save_CC
9695 CFLAGS=$lt_save_CFLAGS
9696 ])# _LT_LANG_RC_CONFIG
9697
9698
9699 # LT_PROG_GCJ
9700 # -----------
9701 AC_DEFUN([LT_PROG_GCJ],
9702 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9703 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9704 [AC_CHECK_TOOL(GCJ, gcj,)
9705 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
9706 AC_SUBST(GCJFLAGS)])])[]dnl
9707 ])
9708
9709 # Old name:
9710 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9711 dnl aclocal-1.4 backwards compatibility:
9712 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9713
9714
9715 # LT_PROG_GO
9716 # ----------
9717 AC_DEFUN([LT_PROG_GO],
9718 [AC_CHECK_TOOL(GOC, gccgo,)
9719 ])
9720
9721
9722 # LT_PROG_RC
9723 # ----------
9724 AC_DEFUN([LT_PROG_RC],
9725 [AC_CHECK_TOOL(RC, windres,)
9726 ])
9727
9728 # Old name:
9729 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9730 dnl aclocal-1.4 backwards compatibility:
9731 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9732
9733
9734 # _LT_DECL_EGREP
9735 # --------------
9736 # If we don't have a new enough Autoconf to choose the best grep
9737 # available, choose the one first in the user's PATH.
9738 m4_defun([_LT_DECL_EGREP],
9739 [AC_REQUIRE([AC_PROG_EGREP])dnl
9740 AC_REQUIRE([AC_PROG_FGREP])dnl
9741 test -z "$GREP" && GREP=grep
9742 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9743 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9744 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9745 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9746 AC_SUBST([GREP])
9747 ])
9748
9749
9750 # _LT_DECL_OBJDUMP
9751 # --------------
9752 # If we don't have a new enough Autoconf to choose the best objdump
9753 # available, choose the one first in the user's PATH.
9754 m4_defun([_LT_DECL_OBJDUMP],
9755 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9756 test -z "$OBJDUMP" && OBJDUMP=objdump
9757 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9758 AC_SUBST([OBJDUMP])
9759 ])
9760
9761 # _LT_DECL_DLLTOOL
9762 # ----------------
9763 # Ensure DLLTOOL variable is set.
9764 m4_defun([_LT_DECL_DLLTOOL],
9765 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9766 test -z "$DLLTOOL" && DLLTOOL=dlltool
9767 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9768 AC_SUBST([DLLTOOL])
9769 ])
9770
9771 # _LT_DECL_SED
9772 # ------------
9773 # Check for a fully-functional sed program, that truncates
9774 # as few characters as possible. Prefer GNU sed if found.
9775 m4_defun([_LT_DECL_SED],
9776 [AC_PROG_SED
9777 test -z "$SED" && SED=sed
9778 Xsed="$SED -e 1s/^X//"
9779 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9780 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9781 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9782 ])# _LT_DECL_SED
9783
9784 m4_ifndef([AC_PROG_SED], [
9785 # NOTE: This macro has been submitted for inclusion into #
9786 # GNU Autoconf as AC_PROG_SED. When it is available in #
9787 # a released version of Autoconf we should remove this #
9788 # macro and use it instead. #
9789
9790 m4_defun([AC_PROG_SED],
9791 [AC_MSG_CHECKING([for a sed that does not truncate output])
9792 AC_CACHE_VAL(lt_cv_path_SED,
9793 [# Loop through the user's path and test for sed and gsed.
9794 # Then use that list of sed's as ones to test for truncation.
9795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9796 for as_dir in $PATH
9797 do
9798 IFS=$as_save_IFS
9799 test -z "$as_dir" && as_dir=.
9800 for lt_ac_prog in sed gsed; do
9801 for ac_exec_ext in '' $ac_executable_extensions; do
9802 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9803 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9804 fi
9805 done
9806 done
9807 done
9808 IFS=$as_save_IFS
9809 lt_ac_max=0
9810 lt_ac_count=0
9811 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9812 # along with /bin/sed that truncates output.
9813 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9814 test ! -f "$lt_ac_sed" && continue
9815 cat /dev/null > conftest.in
9816 lt_ac_count=0
9817 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9818 # Check for GNU sed and select it if it is found.
9819 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9820 lt_cv_path_SED=$lt_ac_sed
9821 break
9822 fi
9823 while true; do
9824 cat conftest.in conftest.in >conftest.tmp
9825 mv conftest.tmp conftest.in
9826 cp conftest.in conftest.nl
9827 echo >>conftest.nl
9828 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9829 cmp -s conftest.out conftest.nl || break
9830 # 10000 chars as input seems more than enough
9831 test 10 -lt "$lt_ac_count" && break
9832 lt_ac_count=`expr $lt_ac_count + 1`
9833 if test "$lt_ac_count" -gt "$lt_ac_max"; then
9834 lt_ac_max=$lt_ac_count
9835 lt_cv_path_SED=$lt_ac_sed
9836 fi
9837 done
9838 done
9839 ])
9840 SED=$lt_cv_path_SED
9841 AC_SUBST([SED])
9842 AC_MSG_RESULT([$SED])
9843 ])#AC_PROG_SED
9844 ])#m4_ifndef
9845
9846 # Old name:
9847 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9848 dnl aclocal-1.4 backwards compatibility:
9849 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9850
9851
9852 # _LT_CHECK_SHELL_FEATURES
9853 # ------------------------
9854 # Find out whether the shell is Bourne or XSI compatible,
9855 # or has some other useful features.
9856 m4_defun([_LT_CHECK_SHELL_FEATURES],
9857 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9858 lt_unset=unset
9859 else
9860 lt_unset=false
9861 fi
9862 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9863
9864 # test EBCDIC or ASCII
9865 case `echo X|tr X '\101'` in
9866 A) # ASCII based system
9867 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9868 lt_SP2NL='tr \040 \012'
9869 lt_NL2SP='tr \015\012 \040\040'
9870 ;;
9871 *) # EBCDIC based system
9872 lt_SP2NL='tr \100 \n'
9873 lt_NL2SP='tr \r\n \100\100'
9874 ;;
9875 esac
9876 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9877 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9878 ])# _LT_CHECK_SHELL_FEATURES
9879
9880
9881 # _LT_PATH_CONVERSION_FUNCTIONS
9882 # -----------------------------
9883 # Determine what file name conversion functions should be used by
9884 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
9885 # for certain cross-compile configurations and native mingw.
9886 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9887 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9888 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9889 AC_MSG_CHECKING([how to convert $build file names to $host format])
9890 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9891 [case $host in
9892 *-*-mingw* )
9893 case $build in
9894 *-*-mingw* ) # actually msys
9895 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9896 ;;
9897 *-*-cygwin* )
9898 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9899 ;;
9900 * ) # otherwise, assume *nix
9901 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9902 ;;
9903 esac
9904 ;;
9905 *-*-cygwin* )
9906 case $build in
9907 *-*-mingw* ) # actually msys
9908 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9909 ;;
9910 *-*-cygwin* )
9911 lt_cv_to_host_file_cmd=func_convert_file_noop
9912 ;;
9913 * ) # otherwise, assume *nix
9914 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9915 ;;
9916 esac
9917 ;;
9918 * ) # unhandled hosts (and "normal" native builds)
9919 lt_cv_to_host_file_cmd=func_convert_file_noop
9920 ;;
9921 esac
9922 ])
9923 to_host_file_cmd=$lt_cv_to_host_file_cmd
9924 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9925 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9926 [0], [convert $build file names to $host format])dnl
9927
9928 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9929 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9930 [#assume ordinary cross tools, or native build.
9931 lt_cv_to_tool_file_cmd=func_convert_file_noop
9932 case $host in
9933 *-*-mingw* )
9934 case $build in
9935 *-*-mingw* ) # actually msys
9936 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9937 ;;
9938 esac
9939 ;;
9940 esac
9941 ])
9942 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9943 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9944 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9945 [0], [convert $build files to toolchain format])dnl
9946 ])# _LT_PATH_CONVERSION_FUNCTIONS
9947
9948 # Helper functions for option handling. -*- Autoconf -*-
9949 #
9950 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
9951 # Foundation, Inc.
9952 # Written by Gary V. Vaughan, 2004
9953 #
9954 # This file is free software; the Free Software Foundation gives
9955 # unlimited permission to copy and/or distribute it, with or without
9956 # modifications, as long as this notice is preserved.
9957
9958 # serial 8 ltoptions.m4
9959
9960 # This is to help aclocal find these macros, as it can't see m4_define.
9961 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9962
9963
9964 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9965 # ------------------------------------------
9966 m4_define([_LT_MANGLE_OPTION],
9967 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9968
9969
9970 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9971 # ---------------------------------------
9972 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9973 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9974 # saved as a flag.
9975 m4_define([_LT_SET_OPTION],
9976 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9977 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9978 _LT_MANGLE_DEFUN([$1], [$2]),
9979 [m4_warning([Unknown $1 option '$2'])])[]dnl
9980 ])
9981
9982
9983 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9984 # ------------------------------------------------------------
9985 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9986 m4_define([_LT_IF_OPTION],
9987 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9988
9989
9990 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9991 # -------------------------------------------------------
9992 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9993 # are set.
9994 m4_define([_LT_UNLESS_OPTIONS],
9995 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9996 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9997 [m4_define([$0_found])])])[]dnl
9998 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9999 ])[]dnl
10000 ])
10001
10002
10003 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10004 # ----------------------------------------
10005 # OPTION-LIST is a space-separated list of Libtool options associated
10006 # with MACRO-NAME. If any OPTION has a matching handler declared with
10007 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10008 # the unknown option and exit.
10009 m4_defun([_LT_SET_OPTIONS],
10010 [# Set options
10011 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10012 [_LT_SET_OPTION([$1], _LT_Option)])
10013
10014 m4_if([$1],[LT_INIT],[
10015 dnl
10016 dnl Simply set some default values (i.e off) if boolean options were not
10017 dnl specified:
10018 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10019 ])
10020 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10021 ])
10022 dnl
10023 dnl If no reference was made to various pairs of opposing options, then
10024 dnl we run the default mode handler for the pair. For example, if neither
10025 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
10026 dnl archives by default:
10027 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10028 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10029 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10030 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10031 [_LT_ENABLE_FAST_INSTALL])
10032 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
10033 [_LT_WITH_AIX_SONAME([aix])])
10034 ])
10035 ])# _LT_SET_OPTIONS
10036
10037
10038
10039 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10040 # -----------------------------------------
10041 m4_define([_LT_MANGLE_DEFUN],
10042 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10043
10044
10045 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10046 # -----------------------------------------------
10047 m4_define([LT_OPTION_DEFINE],
10048 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10049 ])# LT_OPTION_DEFINE
10050
10051
10052 # dlopen
10053 # ------
10054 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10055 ])
10056
10057 AU_DEFUN([AC_LIBTOOL_DLOPEN],
10058 [_LT_SET_OPTION([LT_INIT], [dlopen])
10059 AC_DIAGNOSE([obsolete],
10060 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10061 put the 'dlopen' option into LT_INIT's first parameter.])
10062 ])
10063
10064 dnl aclocal-1.4 backwards compatibility:
10065 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10066
10067
10068 # win32-dll
10069 # ---------
10070 # Declare package support for building win32 dll's.
10071 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10072 [enable_win32_dll=yes
10073
10074 case $host in
10075 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10076 AC_CHECK_TOOL(AS, as, false)
10077 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10078 AC_CHECK_TOOL(OBJDUMP, objdump, false)
10079 ;;
10080 esac
10081
10082 test -z "$AS" && AS=as
10083 _LT_DECL([], [AS], [1], [Assembler program])dnl
10084
10085 test -z "$DLLTOOL" && DLLTOOL=dlltool
10086 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10087
10088 test -z "$OBJDUMP" && OBJDUMP=objdump
10089 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10090 ])# win32-dll
10091
10092 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10093 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
10094 _LT_SET_OPTION([LT_INIT], [win32-dll])
10095 AC_DIAGNOSE([obsolete],
10096 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10097 put the 'win32-dll' option into LT_INIT's first parameter.])
10098 ])
10099
10100 dnl aclocal-1.4 backwards compatibility:
10101 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10102
10103
10104 # _LT_ENABLE_SHARED([DEFAULT])
10105 # ----------------------------
10106 # implement the --enable-shared flag, and supports the 'shared' and
10107 # 'disable-shared' LT_INIT options.
10108 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
10109 m4_define([_LT_ENABLE_SHARED],
10110 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10111 AC_ARG_ENABLE([shared],
10112 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10113 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10114 [p=${PACKAGE-default}
10115 case $enableval in
10116 yes) enable_shared=yes ;;
10117 no) enable_shared=no ;;
10118 *)
10119 enable_shared=no
10120 # Look at the argument we got. We use all the common list separators.
10121 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10122 for pkg in $enableval; do
10123 IFS=$lt_save_ifs
10124 if test "X$pkg" = "X$p"; then
10125 enable_shared=yes
10126 fi
10127 done
10128 IFS=$lt_save_ifs
10129 ;;
10130 esac],
10131 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10132
10133 _LT_DECL([build_libtool_libs], [enable_shared], [0],
10134 [Whether or not to build shared libraries])
10135 ])# _LT_ENABLE_SHARED
10136
10137 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10138 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10139
10140 # Old names:
10141 AC_DEFUN([AC_ENABLE_SHARED],
10142 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10143 ])
10144
10145 AC_DEFUN([AC_DISABLE_SHARED],
10146 [_LT_SET_OPTION([LT_INIT], [disable-shared])
10147 ])
10148
10149 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10150 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10151
10152 dnl aclocal-1.4 backwards compatibility:
10153 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10154 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10155
10156
10157
10158 # _LT_ENABLE_STATIC([DEFAULT])
10159 # ----------------------------
10160 # implement the --enable-static flag, and support the 'static' and
10161 # 'disable-static' LT_INIT options.
10162 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
10163 m4_define([_LT_ENABLE_STATIC],
10164 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10165 AC_ARG_ENABLE([static],
10166 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10167 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10168 [p=${PACKAGE-default}
10169 case $enableval in
10170 yes) enable_static=yes ;;
10171 no) enable_static=no ;;
10172 *)
10173 enable_static=no
10174 # Look at the argument we got. We use all the common list separators.
10175 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10176 for pkg in $enableval; do
10177 IFS=$lt_save_ifs
10178 if test "X$pkg" = "X$p"; then
10179 enable_static=yes
10180 fi
10181 done
10182 IFS=$lt_save_ifs
10183 ;;
10184 esac],
10185 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10186
10187 _LT_DECL([build_old_libs], [enable_static], [0],
10188 [Whether or not to build static libraries])
10189 ])# _LT_ENABLE_STATIC
10190
10191 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10192 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10193
10194 # Old names:
10195 AC_DEFUN([AC_ENABLE_STATIC],
10196 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10197 ])
10198
10199 AC_DEFUN([AC_DISABLE_STATIC],
10200 [_LT_SET_OPTION([LT_INIT], [disable-static])
10201 ])
10202
10203 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10204 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10205
10206 dnl aclocal-1.4 backwards compatibility:
10207 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10208 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10209
10210
10211
10212 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
10213 # ----------------------------------
10214 # implement the --enable-fast-install flag, and support the 'fast-install'
10215 # and 'disable-fast-install' LT_INIT options.
10216 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
10217 m4_define([_LT_ENABLE_FAST_INSTALL],
10218 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10219 AC_ARG_ENABLE([fast-install],
10220 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10221 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10222 [p=${PACKAGE-default}
10223 case $enableval in
10224 yes) enable_fast_install=yes ;;
10225 no) enable_fast_install=no ;;
10226 *)
10227 enable_fast_install=no
10228 # Look at the argument we got. We use all the common list separators.
10229 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10230 for pkg in $enableval; do
10231 IFS=$lt_save_ifs
10232 if test "X$pkg" = "X$p"; then
10233 enable_fast_install=yes
10234 fi
10235 done
10236 IFS=$lt_save_ifs
10237 ;;
10238 esac],
10239 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10240
10241 _LT_DECL([fast_install], [enable_fast_install], [0],
10242 [Whether or not to optimize for fast installation])dnl
10243 ])# _LT_ENABLE_FAST_INSTALL
10244
10245 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10246 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10247
10248 # Old names:
10249 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10250 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10251 AC_DIAGNOSE([obsolete],
10252 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10253 the 'fast-install' option into LT_INIT's first parameter.])
10254 ])
10255
10256 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10257 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10258 AC_DIAGNOSE([obsolete],
10259 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10260 the 'disable-fast-install' option into LT_INIT's first parameter.])
10261 ])
10262
10263 dnl aclocal-1.4 backwards compatibility:
10264 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10265 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10266
10267
10268 # _LT_WITH_AIX_SONAME([DEFAULT])
10269 # ----------------------------------
10270 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
10271 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
10272 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
10273 m4_define([_LT_WITH_AIX_SONAME],
10274 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
10275 shared_archive_member_spec=
10276 case $host,$enable_shared in
10277 power*-*-aix[[5-9]]*,yes)
10278 AC_MSG_CHECKING([which variant of shared library versioning to provide])
10279 AC_ARG_WITH([aix-soname],
10280 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
10281 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
10282 [case $withval in
10283 aix|svr4|both)
10284 ;;
10285 *)
10286 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
10287 ;;
10288 esac
10289 lt_cv_with_aix_soname=$with_aix_soname],
10290 [AC_CACHE_VAL([lt_cv_with_aix_soname],
10291 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
10292 with_aix_soname=$lt_cv_with_aix_soname])
10293 AC_MSG_RESULT([$with_aix_soname])
10294 if test aix != "$with_aix_soname"; then
10295 # For the AIX way of multilib, we name the shared archive member
10296 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10297 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10298 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10299 # the AIX toolchain works better with OBJECT_MODE set (default 32).
10300 if test 64 = "${OBJECT_MODE-32}"; then
10301 shared_archive_member_spec=shr_64
10302 else
10303 shared_archive_member_spec=shr
10304 fi
10305 fi
10306 ;;
10307 *)
10308 with_aix_soname=aix
10309 ;;
10310 esac
10311
10312 _LT_DECL([], [shared_archive_member_spec], [0],
10313 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
10314 ])# _LT_WITH_AIX_SONAME
10315
10316 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
10317 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
10318 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
10319
10320
10321 # _LT_WITH_PIC([MODE])
10322 # --------------------
10323 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
10324 # LT_INIT options.
10325 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
10326 m4_define([_LT_WITH_PIC],
10327 [AC_ARG_WITH([pic],
10328 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10330 [lt_p=${PACKAGE-default}
10331 case $withval in
10332 yes|no) pic_mode=$withval ;;
10333 *)
10334 pic_mode=default
10335 # Look at the argument we got. We use all the common list separators.
10336 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10337 for lt_pkg in $withval; do
10338 IFS=$lt_save_ifs
10339 if test "X$lt_pkg" = "X$lt_p"; then
10340 pic_mode=yes
10341 fi
10342 done
10343 IFS=$lt_save_ifs
10344 ;;
10345 esac],
10346 [pic_mode=m4_default([$1], [default])])
10347
10348 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10349 ])# _LT_WITH_PIC
10350
10351 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10352 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10353
10354 # Old name:
10355 AU_DEFUN([AC_LIBTOOL_PICMODE],
10356 [_LT_SET_OPTION([LT_INIT], [pic-only])
10357 AC_DIAGNOSE([obsolete],
10358 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10359 put the 'pic-only' option into LT_INIT's first parameter.])
10360 ])
10361
10362 dnl aclocal-1.4 backwards compatibility:
10363 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10364
10365
10366 m4_define([_LTDL_MODE], [])
10367 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10368 [m4_define([_LTDL_MODE], [nonrecursive])])
10369 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10370 [m4_define([_LTDL_MODE], [recursive])])
10371 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10372 [m4_define([_LTDL_MODE], [subproject])])
10373
10374 m4_define([_LTDL_TYPE], [])
10375 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10376 [m4_define([_LTDL_TYPE], [installable])])
10377 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10378 [m4_define([_LTDL_TYPE], [convenience])])
10379
10380 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
10381 #
10382 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
10383 # Foundation, Inc.
10384 # Written by Gary V. Vaughan, 2004
10385 #
10386 # This file is free software; the Free Software Foundation gives
10387 # unlimited permission to copy and/or distribute it, with or without
10388 # modifications, as long as this notice is preserved.
10389
10390 # serial 6 ltsugar.m4
10391
10392 # This is to help aclocal find these macros, as it can't see m4_define.
10393 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10394
10395
10396 # lt_join(SEP, ARG1, [ARG2...])
10397 # -----------------------------
10398 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10399 # associated separator.
10400 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10401 # versions in m4sugar had bugs.
10402 m4_define([lt_join],
10403 [m4_if([$#], [1], [],
10404 [$#], [2], [[$2]],
10405 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10406 m4_define([_lt_join],
10407 [m4_if([$#$2], [2], [],
10408 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10409
10410
10411 # lt_car(LIST)
10412 # lt_cdr(LIST)
10413 # ------------
10414 # Manipulate m4 lists.
10415 # These macros are necessary as long as will still need to support
10416 # Autoconf-2.59, which quotes differently.
10417 m4_define([lt_car], [[$1]])
10418 m4_define([lt_cdr],
10419 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10420 [$#], 1, [],
10421 [m4_dquote(m4_shift($@))])])
10422 m4_define([lt_unquote], $1)
10423
10424
10425 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10426 # ------------------------------------------
10427 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
10428 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10429 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10430 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10431 # than defined and empty).
10432 #
10433 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10434 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10435 m4_define([lt_append],
10436 [m4_define([$1],
10437 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10438
10439
10440
10441 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10442 # ----------------------------------------------------------
10443 # Produce a SEP delimited list of all paired combinations of elements of
10444 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
10445 # has the form PREFIXmINFIXSUFFIXn.
10446 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10447 m4_define([lt_combine],
10448 [m4_if(m4_eval([$# > 3]), [1],
10449 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10450 [[m4_foreach([_Lt_prefix], [$2],
10451 [m4_foreach([_Lt_suffix],
10452 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10453 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10454
10455
10456 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10457 # -----------------------------------------------------------------------
10458 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10459 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10460 m4_define([lt_if_append_uniq],
10461 [m4_ifdef([$1],
10462 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10463 [lt_append([$1], [$2], [$3])$4],
10464 [$5])],
10465 [lt_append([$1], [$2], [$3])$4])])
10466
10467
10468 # lt_dict_add(DICT, KEY, VALUE)
10469 # -----------------------------
10470 m4_define([lt_dict_add],
10471 [m4_define([$1($2)], [$3])])
10472
10473
10474 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10475 # --------------------------------------------
10476 m4_define([lt_dict_add_subkey],
10477 [m4_define([$1($2:$3)], [$4])])
10478
10479
10480 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10481 # ----------------------------------
10482 m4_define([lt_dict_fetch],
10483 [m4_ifval([$3],
10484 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10485 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10486
10487
10488 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10489 # -----------------------------------------------------------------
10490 m4_define([lt_if_dict_fetch],
10491 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10492 [$5],
10493 [$6])])
10494
10495
10496 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10497 # --------------------------------------------------------------
10498 m4_define([lt_dict_filter],
10499 [m4_if([$5], [], [],
10500 [lt_join(m4_quote(m4_default([$4], [[, ]])),
10501 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10502 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10503 ])
10504
10505 # ltversion.m4 -- version numbers -*- Autoconf -*-
10506 #
10507 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
10508 # Written by Scott James Remnant, 2004
10509 #
10510 # This file is free software; the Free Software Foundation gives
10511 # unlimited permission to copy and/or distribute it, with or without
10512 # modifications, as long as this notice is preserved.
10513
10514 # @configure_input@
10515
10516 # serial 4179 ltversion.m4
10517 # This file is part of GNU Libtool
10518
10519 m4_define([LT_PACKAGE_VERSION], [2.4.6])
10520 m4_define([LT_PACKAGE_REVISION], [2.4.6])
10521
10522 AC_DEFUN([LTVERSION_VERSION],
10523 [macro_version='2.4.6'
10524 macro_revision='2.4.6'
10525 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10526 _LT_DECL(, macro_revision, 0)
10527 ])
10528
10529 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
10530 #
10531 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
10532 # Foundation, Inc.
10533 # Written by Scott James Remnant, 2004.
10534 #
10535 # This file is free software; the Free Software Foundation gives
10536 # unlimited permission to copy and/or distribute it, with or without
10537 # modifications, as long as this notice is preserved.
10538
10539 # serial 5 lt~obsolete.m4
10540
10541 # These exist entirely to fool aclocal when bootstrapping libtool.
10542 #
10543 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
10544 # which have later been changed to m4_define as they aren't part of the
10545 # exported API, or moved to Autoconf or Automake where they belong.
10546 #
10547 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
10548 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10549 # using a macro with the same name in our local m4/libtool.m4 it'll
10550 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10551 # and doesn't know about Autoconf macros at all.)
10552 #
10553 # So we provide this file, which has a silly filename so it's always
10554 # included after everything else. This provides aclocal with the
10555 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10556 # because those macros already exist, or will be overwritten later.
10557 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10558 #
10559 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10560 # Yes, that means every name once taken will need to remain here until
10561 # we give up compatibility with versions before 1.7, at which point
10562 # we need to keep only those names which we still refer to.
10563
10564 # This is to help aclocal find these macros, as it can't see m4_define.
10565 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10566
10567 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10568 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
10569 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10570 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
10571 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10572 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
10573 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
10574 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10575 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
10576 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10577 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
10578 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10579 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10580 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10581 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10582 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10583 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
10584 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10585 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10586 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
10587 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
10588 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10589 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10590 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10591 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10592 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10593 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10594 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10595 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
10596 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
10597 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
10598 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10599 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10600 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
10601 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
10602 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10603 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10604 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
10605 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10606 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
10607 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
10608 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
10609 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10610 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10611 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10612 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10613 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10614 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10615 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10616 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10617 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10618 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10619 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10620 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10621 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10622 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10623 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10624 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10625 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
10626 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
10627 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
10628
10629 m4_include([acinclude.m4])